add more spacing
[personal-kdebase.git] / workspace / libs / solid / control / backends / fakenet / fakenetworkinterface.h
blobd0e7ccc492b4402a8c06356b74e767044e078b37
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_INTERFACE_H
21 #define FAKE_NETWORK_INTERFACE_H
23 #include <QString>
24 #include <QVariant>
26 #include <kdemacros.h>
28 #include <solid/control/ifaces/networkinterface.h>
29 #include <solid/control/networkipv4config.h>
31 using namespace Solid::Control::Ifaces;
33 class KDE_EXPORT FakeNetworkInterface : public QObject, virtual public Solid::Control::Ifaces::NetworkInterface
35 friend class FakeNetworkManager;
36 Q_OBJECT
37 Q_INTERFACES(Solid::Control::Ifaces::NetworkInterface)
38 public:
39 FakeNetworkInterface(const QMap<QString, QVariant> & propertyMap,
40 QObject *parent = 0);
41 virtual ~FakeNetworkInterface();
42 QString uni() const;
43 QString interfaceName() const;
44 QString driver() const;
45 bool isActive() const;
46 Solid::Control::IPv4Config ipV4Config() const;
47 Solid::Control::NetworkInterface::ConnectionState connectionState() const;
48 int designSpeed() const;
49 Solid::Control::NetworkInterface::Capabilities capabilities() const;
50 void activate(const QString & connectionUni, const QString & extra_connection_parameter = QString() );
51 void deactivate();
52 Q_SIGNALS:
53 void ipDetailsChanged();
54 void activeChanged(bool);
55 void linkUpChanged(bool);
56 void connectionStateChanged(int /*NetworkStatus::ConnectionState */);
58 protected:
59 /* These methods are operations that are carried out by the manager
60 In a real backend they would be events coming up from the network layer */
61 QString mActiveConnection;
62 QMap<QString, QVariant> mPropertyMap;
65 #endif