not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / libs / solid / control / networkipv4config.h
blobd9c6fc539aa2aa389676d0dca69fc2817d9148ab
1 /*
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"
29 namespace Solid
31 namespace Control
34 class SOLIDCONTROL_EXPORT IPv4Address
36 public:
37 IPv4Address(quint32 address, quint32 netMask, quint32 gateway);
38 IPv4Address();
39 ~IPv4Address();
40 IPv4Address(const IPv4Address&);
41 quint32 address() const;
42 quint32 netMask() const;
43 quint32 gateway() const;
44 IPv4Address &operator=(const IPv4Address&);
45 bool isValid() const;
46 private:
47 class Private;
48 Private * d;
51 class SOLIDCONTROL_EXPORT IPv4Route
53 public:
54 IPv4Route(quint32 route, quint32 prefix, quint32 nextHop, quint32 metric);
55 IPv4Route();
56 ~IPv4Route();
57 IPv4Route(const IPv4Route&);
58 IPv4Route &operator=(const IPv4Route&);
59 bool isValid() const;
60 quint32 route() const;
61 quint32 prefix() const;
62 quint32 nextHop() const;
63 quint32 metric() const;
64 private:
65 class Private;
66 Private * d;
69 class SOLIDCONTROL_EXPORT IPv4Config
71 public:
72 IPv4Config(const QList<IPv4Address> &addresses,
73 const QList<quint32> &nameservers,
74 const QStringList &domains,
75 const QList<IPv4Route> &routes);
76 IPv4Config();
77 ~IPv4Config();
78 IPv4Config(const IPv4Config&);
79 /**
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&);
87 bool isValid() const;
88 private:
89 class Private;
90 Private * d;
93 } // namespace Control
94 } // namespace Solid
96 #endif // NETWORKIPV4CONFIG_H