1 | /* |
2 | SPDX-FileCopyrightText: 2018 Aleksander Morgado <aleksander@aleksander.es> |
3 | |
4 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
5 | */ |
6 | |
7 | #ifndef NETWORKMANAGERQT_DNSDOMAIN_H |
8 | #define NETWORKMANAGERQT_DNSDOMAIN_H |
9 | |
10 | #include "ipaddress.h" |
11 | #include "iproute.h" |
12 | #include <networkmanagerqt/networkmanagerqt_export.h> |
13 | |
14 | // To prevent signals in glib2 be defined by QT |
15 | #undef signals |
16 | #include <libnm/NetworkManager.h> |
17 | #include <nm-version.h> |
18 | #define signals Q_SIGNALS |
19 | |
20 | #include <QStringList> |
21 | |
22 | namespace NetworkManager |
23 | { |
24 | /*! |
25 | * \class NetworkManager::DnsDomain |
26 | * \inheaderfile NetworkManagerQt/DnsDomain |
27 | * \inmodule NetworkManagerQt |
28 | * |
29 | * \brief This class represents the configuration for a DNS domain. |
30 | */ |
31 | class NETWORKMANAGERQT_EXPORT DnsDomain |
32 | { |
33 | public: |
34 | /*! |
35 | * Constructs a DnsDomain object with a list of |
36 | */ |
37 | DnsDomain(const QString &name, const QList<QHostAddress> &servers, const QStringList &options); |
38 | |
39 | /*! |
40 | * Constructs a DnsDomain object |
41 | */ |
42 | DnsDomain(); |
43 | |
44 | /*! |
45 | * Destroys this DnsDomain object. |
46 | */ |
47 | ~DnsDomain(); |
48 | |
49 | /*! |
50 | * Constructs a DnsDomain object that is a copy of the object \a other. |
51 | */ |
52 | DnsDomain(const DnsDomain &other); |
53 | |
54 | /*! |
55 | * Returns the domain name |
56 | */ |
57 | QString name() const; |
58 | |
59 | /*! |
60 | * Sets the domain name |
61 | */ |
62 | void setName(const QString &name); |
63 | |
64 | /*! |
65 | * Returns the list of servers |
66 | */ |
67 | QList<QHostAddress> servers() const; |
68 | |
69 | /*! |
70 | * Sets the list of servers |
71 | */ |
72 | void setServers(const QList<QHostAddress> &list); |
73 | |
74 | /*! |
75 | * Returns the list of resolver options |
76 | */ |
77 | QStringList options() const; |
78 | |
79 | /*! |
80 | * Sets the list of resolver options |
81 | */ |
82 | void setOptions(const QStringList &list); |
83 | |
84 | /*! |
85 | * Makes a copy of the DnsDomain object \a other. |
86 | */ |
87 | DnsDomain &operator=(const DnsDomain &other); |
88 | |
89 | private: |
90 | class Private; |
91 | Private *const d; |
92 | }; |
93 | |
94 | } // namespace NetworkManager |
95 | |
96 | #endif // NETWORKMANAGERQT_DNSDOMAIN_H |
97 | |