• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libsolidcontrol

fakenetworkmanager.h

Go to the documentation of this file.
00001 /*  This file is part of the KDE project
00002     Copyright (C) 2006,2008 Will Stephenson <wstephenson@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License version 2 as published by the Free Software Foundation.
00007 
00008     This library is distributed in the hope that it will be useful,
00009     but WITHOUT ANY WARRANTY; without even the implied warranty of
00010     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011     Library General Public License for more details.
00012 
00013     You should have received a copy of the GNU Library General Public License
00014     along with this library; see the file COPYING.LIB.  If not, write to
00015     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016     Boston, MA 02110-1301, USA.
00017 
00018 */
00019 
00020 #ifndef FAKE_NETWORK_MANAGER_H
00021 #define FAKE_NETWORK_MANAGER_H
00022 
00023 #include <QObject>
00024 #include <QStringList>
00025 
00026 #include <kdemacros.h>
00027 
00028 #include <solid/control/ifaces/networkmanager.h>
00029 
00030 #include "fakenetworkinterface.h"
00031 
00032 
00033 class FakeAuthenticationValidator;
00034 class QDomElement;
00035 //class FakeNetworkInterface;
00036 
00037 namespace Solid {
00038     class Authentication;
00039 }
00040 
00041 class KDE_EXPORT FakeNetworkManager : public Solid::Control::Ifaces::NetworkManager
00042 {
00043 Q_OBJECT
00044     public:
00045         FakeNetworkManager(QObject * parent, const QStringList  & args);
00046         FakeNetworkManager(QObject * parent, const QStringList  & args, const QString  & xmlFile);
00047         virtual ~FakeNetworkManager();
00048         Solid::Networking::Status status() const;
00049         QStringList networkInterfaces() const;
00050         QStringList activeNetworkInterfaces() const;
00051         QObject * createNetworkInterface(const QString &);
00052 
00053         bool isNetworkingEnabled() const;
00054         bool isWirelessEnabled() const;
00055         bool isWirelessHardwareEnabled() const;
00056 
00057         void activateConnection(const QString & interfaceUni, const QString & connectionUni, const QVariantMap & connectionParameters);
00058 
00059         void deactivateConnection(const QString & activeConnection);
00060         QStringList activeConnections() const;
00061 
00062     public Q_SLOTS:
00063         void setWirelessEnabled(bool);
00064         void setNetworkingEnabled(bool);
00065 
00066     private:
00067         void parseNetworkingFile();
00068         FakeNetworkInterface *parseDeviceElement(const QDomElement &deviceElement);
00069         QMap<QString,QVariant> parseAPElement(const QDomElement &deviceElement);
00070 
00071         bool mUserNetworkingEnabled;
00072         bool mUserWirelessEnabled;
00073         bool mRfKillEnabled;
00074         QMap<QString, FakeNetworkInterface *> mNetworkInterfaces;
00075         QStringList mActiveConnections;
00076         QString mXmlFile;
00077 };
00078 
00079 #endif

libsolidcontrol

Skip menu "libsolidcontrol"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal