File indexing completed on 2025-03-16 12:58:24
0001 /* 0002 SPDX-FileCopyrightText: 2018 Aleksander Morgado <aleksander@aleksander.es> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef NETWORKMANAGERQT_DNSDOMAIN_H 0008 #define NETWORKMANAGERQT_DNSDOMAIN_H 0009 0010 #include "ipaddress.h" 0011 #include "iproute.h" 0012 #include <networkmanagerqt/networkmanagerqt_export.h> 0013 0014 // To prevent signals in glib2 be defined by QT 0015 #undef signals 0016 #include <libnm/NetworkManager.h> 0017 #include <nm-version.h> 0018 #define signals Q_SIGNALS 0019 0020 #include <QStringList> 0021 0022 namespace NetworkManager 0023 { 0024 /** 0025 * This class represents the configuration for a DNS domain 0026 */ 0027 class NETWORKMANAGERQT_EXPORT DnsDomain 0028 { 0029 public: 0030 /** 0031 * Constructs a DnsDomain object with a list of 0032 */ 0033 DnsDomain(const QString &name, const QList<QHostAddress> &servers, const QStringList &options); 0034 0035 /** 0036 * Constructs a DnsDomain object 0037 */ 0038 DnsDomain(); 0039 0040 /** 0041 * Destroys this DnsDomain object. 0042 */ 0043 ~DnsDomain(); 0044 0045 /** 0046 * Constructs a DnsDomain object that is a copy of the object @p other. 0047 */ 0048 DnsDomain(const DnsDomain &other); 0049 0050 /** 0051 * Returns the domain name 0052 */ 0053 QString name() const; 0054 0055 /** 0056 * Sets the domain name 0057 */ 0058 void setName(const QString &name); 0059 0060 /** 0061 * Returns the list of servers 0062 */ 0063 QList<QHostAddress> servers() const; 0064 0065 /** 0066 * Sets the list of servers 0067 */ 0068 void setServers(const QList<QHostAddress> &list); 0069 0070 /** 0071 * Returns the list of resolver options 0072 */ 0073 QStringList options() const; 0074 0075 /** 0076 * Sets the list of resolver options 0077 */ 0078 void setOptions(const QStringList &list); 0079 0080 /** 0081 * Makes a copy of the DnsDomain object @p other. 0082 */ 0083 DnsDomain &operator=(const DnsDomain &other); 0084 0085 private: 0086 class Private; 0087 Private *const d; 0088 }; 0089 0090 } // namespace NetworkManager 0091 0092 #endif // NETWORKMANAGERQT_DNSDOMAIN_H