NetworkManagerQt

dnsdomain.cpp
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#include "ipconfig.h"
8
9#include <arpa/inet.h>
10
11#include "dnsdomain.h"
12
13namespace NetworkManager
14{
15class NetworkManager::DnsDomain::Private
16{
17public:
18 Private(const QString &theName, const QList<QHostAddress> &theServers, const QStringList &theOptions)
19 : name(theName)
20 , servers(theServers)
21 , options(theOptions)
22 {
23 }
24 Private()
25 {
26 }
27 QString name;
28 QList<QHostAddress> servers;
29 QStringList options;
30};
31
32}
33
35 : d(new Private(name, servers, options))
36{
37}
38
40 : d(new Private())
41{
42}
43
45 : d(new Private)
46{
47 *this = other;
48}
49
54
56{
57 return d->name;
58}
59
61{
62 d->name = name;
63}
64
66{
67 return d->servers;
68}
69
71{
72 d->servers = servers;
73}
74
76{
77 return d->options;
78}
79
81{
82 d->options = options;
83}
84
86{
87 if (this == &other) {
88 return *this;
89 }
90
91 *d = *other.d;
92 return *this;
93}
This class represents the configuration for a DNS domain.
Definition dnsdomain.h:28
void setOptions(const QStringList &list)
Sets the list of resolver options.
Definition dnsdomain.cpp:80
DnsDomain & operator=(const DnsDomain &other)
Makes a copy of the DnsDomain object other.
Definition dnsdomain.cpp:85
void setServers(const QList< QHostAddress > &list)
Sets the list of servers.
Definition dnsdomain.cpp:70
void setName(const QString &name)
Sets the domain name.
Definition dnsdomain.cpp:60
QString name() const
Returns the domain name.
Definition dnsdomain.cpp:55
QList< QHostAddress > servers() const
Returns the list of servers.
Definition dnsdomain.cpp:65
QStringList options() const
Returns the list of resolver options.
Definition dnsdomain.cpp:75
~DnsDomain()
Destroys this DnsDomain object.
Definition dnsdomain.cpp:50
DnsDomain()
Constructs a DnsDomain object.
Definition dnsdomain.cpp:39
This class allows querying the underlying system to discover the available network interfaces and rea...
Definition accesspoint.h:21
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:46:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.