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
22namespace NetworkManager
23{
24/**
25 * This class represents the configuration for a DNS domain
26 */
27class NETWORKMANAGERQT_EXPORT DnsDomain
28{
29public:
30 /**
31 * Constructs a DnsDomain object with a list of
32 */
33 DnsDomain(const QString &name, const QList<QHostAddress> &servers, const QStringList &options);
34
35 /**
36 * Constructs a DnsDomain object
37 */
38 DnsDomain();
39
40 /**
41 * Destroys this DnsDomain object.
42 */
43 ~DnsDomain();
44
45 /**
46 * Constructs a DnsDomain object that is a copy of the object @p other.
47 */
48 DnsDomain(const DnsDomain &other);
49
50 /**
51 * Returns the domain name
52 */
53 QString name() const;
54
55 /**
56 * Sets the domain name
57 */
58 void setName(const QString &name);
59
60 /**
61 * Returns the list of servers
62 */
63 QList<QHostAddress> servers() const;
64
65 /**
66 * Sets the list of servers
67 */
68 void setServers(const QList<QHostAddress> &list);
69
70 /**
71 * Returns the list of resolver options
72 */
73 QStringList options() const;
74
75 /**
76 * Sets the list of resolver options
77 */
78 void setOptions(const QStringList &list);
79
80 /**
81 * Makes a copy of the DnsDomain object @p other.
82 */
83 DnsDomain &operator=(const DnsDomain &other);
84
85private:
86 class Private;
87 Private *const d;
88};
89
90} // namespace NetworkManager
91
92#endif // NETWORKMANAGERQT_DNSDOMAIN_H
93

source code of networkmanager-qt/src/dnsdomain.h