add more spacing
[personal-kdebase.git] / workspace / libs / solid / control / backends / fakenet / fakenetworkmanager.h
blob163768c025a541f0d1decc116bc926495f49e029
1 /* This file is part of the KDE project
2 Copyright (C) 2006,2008 Will Stephenson <wstephenson@kde.org>
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
20 #ifndef FAKE_NETWORK_MANAGER_H
21 #define FAKE_NETWORK_MANAGER_H
23 #include <QObject>
24 #include <QStringList>
26 #include <kdemacros.h>
28 #include <solid/control/ifaces/networkmanager.h>
30 #include "fakenetworkinterface.h"
33 class FakeAuthenticationValidator;
34 class QDomElement;
35 //class FakeNetworkInterface;
37 namespace Solid {
38 class Authentication;
41 class KDE_EXPORT FakeNetworkManager : public Solid::Control::Ifaces::NetworkManager
43 Q_OBJECT
44 public:
45 FakeNetworkManager(QObject * parent, const QStringList & args);
46 FakeNetworkManager(QObject * parent, const QStringList & args, const QString & xmlFile);
47 virtual ~FakeNetworkManager();
48 Solid::Networking::Status status() const;
49 QStringList networkInterfaces() const;
50 QStringList activeNetworkInterfaces() const;
51 QObject * createNetworkInterface(const QString &);
53 bool isNetworkingEnabled() const;
54 bool isWirelessEnabled() const;
55 bool isWirelessHardwareEnabled() const;
57 void activateConnection(const QString & interfaceUni, const QString & connectionUni, const QVariantMap & connectionParameters);
59 void deactivateConnection(const QString & activeConnection);
60 QStringList activeConnections() const;
62 public Q_SLOTS:
63 void setWirelessEnabled(bool);
64 void setNetworkingEnabled(bool);
66 private:
67 void parseNetworkingFile();
68 FakeNetworkInterface *parseDeviceElement(const QDomElement &deviceElement);
69 QMap<QString,QVariant> parseAPElement(const QDomElement &deviceElement);
71 bool mUserNetworkingEnabled;
72 bool mUserWirelessEnabled;
73 bool mRfKillEnabled;
74 QMap<QString, FakeNetworkInterface *> mNetworkInterfaces;
75 QStringList mActiveConnections;
76 QString mXmlFile;
79 #endif