~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to libs/solid/control/backends/fakenet/fakewirelessnetworkinterface.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright 2008 Will Stephenson <wstephenson@kde.org>
 
3
 
 
4
This library is free software; you can redistribute it and/or
 
5
modify it under the terms of the GNU Lesser General Public
 
6
License as published by the Free Software Foundation; either
 
7
version 2.1 of the License, or (at your option) version 3, or any
 
8
later version accepted by the membership of KDE e.V. (or its
 
9
successor approved by the membership of KDE e.V.), which shall
 
10
act as a proxy defined in Section 6 of version 3 of the license.
 
11
 
 
12
This library 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 GNU
 
15
Lesser General Public License for more details.
 
16
 
 
17
You should have received a copy of the GNU Lesser General Public 
 
18
License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 
19
*/
 
20
 
 
21
#ifndef FAKE_WIRELESS_NETWORK_INTERFACE_H
 
22
#define FAKE_WIRELESS_NETWORK_INTERFACE_H
 
23
 
 
24
#include "fakenetworkinterface.h"
 
25
#include <solid/control/ifaces/wirelessnetworkinterface.h>
 
26
#include <QString>
 
27
#include <QMap>
 
28
#include <QVariant>
 
29
 
 
30
class FakeAccessPoint;
 
31
#include <kdemacros.h>
 
32
 
 
33
class KDE_EXPORT FakeWirelessNetworkInterface : public FakeNetworkInterface, virtual public Solid::Control::Ifaces::WirelessNetworkInterface
 
34
{
 
35
Q_OBJECT
 
36
Q_INTERFACES(Solid::Control::Ifaces::WirelessNetworkInterface)
 
37
friend class FakeNetworkManager;
 
38
public:
 
39
    FakeWirelessNetworkInterface(const QMap<QString, QVariant> & propertyMap, QObject * parent = 0);
 
40
    ~FakeWirelessNetworkInterface();
 
41
    MacAddressList accessPoints() const;
 
42
    QString activeAccessPoint() const;
 
43
    QString hardwareAddress() const;
 
44
    Solid::Control::WirelessNetworkInterface::OperationMode mode() const;
 
45
    int bitRate() const;
 
46
    Solid::Control::WirelessNetworkInterface::Capabilities wirelessCapabilities() const;
 
47
    QObject * createAccessPoint(const QString & uni);
 
48
signals:
 
49
    void bitRateChanged(int bitrate);
 
50
    void activeAccessPointChanged(const QString &);
 
51
    void modeChanged(Solid::Control::WirelessNetworkInterface::OperationMode);
 
52
    void accessPointAppeared(const QString &);
 
53
    void accessPointDisappeared(const QString &);
 
54
protected:
 
55
    void injectAccessPoint( FakeAccessPoint * ap );
 
56
private:
 
57
    QMap<QString, FakeAccessPoint *> mAccessPoints;
 
58
 
 
59
};
 
60
 
 
61
#endif
 
62