2 * Copyright 2008 Will Stephenson <wstephenson@kde.org>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License as
6 published by the Free Software Foundation; either version 2 of
7 the License or (at your option) version 3 or any later version
8 accepted by the membership of KDE e.V. (or its successor approved
9 by the membership of KDE e.V.), which shall act as a proxy
10 defined in Section 14 of version 3 of the license.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef SOLID_CONTROL_NETWORKIPV4CONFIG_H
23 #define SOLID_CONTROL_NETWORKIPV4CONFIG_H
25 #include <QtCore/QStringList>
27 #include "solid_control_export.h"
34 class SOLIDCONTROL_EXPORT IPv4Address
37 IPv4Address(quint32 address
, quint32 netMask
, quint32 gateway
);
40 IPv4Address(const IPv4Address
&);
41 quint32
address() const;
42 quint32
netMask() const;
43 quint32
gateway() const;
44 IPv4Address
&operator=(const IPv4Address
&);
51 class SOLIDCONTROL_EXPORT IPv4Route
54 IPv4Route(quint32 route
, quint32 prefix
, quint32 nextHop
, quint32 metric
);
57 IPv4Route(const IPv4Route
&);
58 IPv4Route
&operator=(const IPv4Route
&);
60 quint32
route() const;
61 quint32
prefix() const;
62 quint32
nextHop() const;
63 quint32
metric() const;
69 class SOLIDCONTROL_EXPORT IPv4Config
72 IPv4Config(const QList
<IPv4Address
> &addresses
,
73 const QList
<quint32
> &nameservers
,
74 const QStringList
&domains
,
75 const QList
<IPv4Route
> &routes
);
78 IPv4Config(const IPv4Config
&);
80 * List of IP addresses related to this configuration.
82 QList
<IPv4Address
> addresses() const;
83 QList
<quint32
> nameservers() const;
84 QStringList
domains() const;
85 QList
<IPv4Route
> routes() const;
86 IPv4Config
&operator=(const IPv4Config
&);
93 } // namespace Control
96 #endif // NETWORKIPV4CONFIG_H