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

« back to all changes in this revision

Viewing changes to libs/solid/control/ifaces/wirelessnetworkinterface.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
/*  This file is part of the KDE project
 
2
    Copyright (C) 2006,2007,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 Library General Public
 
6
    License version 2 as published by the Free Software Foundation.
 
7
 
 
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.
 
12
 
 
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.
 
17
 
 
18
*/
 
19
 
 
20
#ifndef SOLID_IFACES_WIRELESSNETWORKINTERFACE_H
 
21
#define SOLID_IFACES_WIRELESSNETWORKINTERFACE_H
 
22
 
 
23
#include "../solid_control_export.h"
 
24
 
 
25
#include <QtCore/QStringList>
 
26
 
 
27
#include "../wirelessnetworkinterface.h"
 
28
#include "networkinterface.h"
 
29
 
 
30
 
 
31
typedef QString MacAddress;
 
32
typedef QStringList MacAddressList;
 
33
 
 
34
namespace Solid
 
35
{
 
36
namespace Control
 
37
{
 
38
namespace Ifaces
 
39
{
 
40
    /**
 
41
     * Represents a wireless network interface
 
42
     */
 
43
    class SOLIDCONTROLIFACES_EXPORT WirelessNetworkInterface : virtual public NetworkInterface
 
44
    {
 
45
    public:
 
46
        /**
 
47
         * Destroys a WirelessNetworkInterface object
 
48
         */
 
49
        virtual ~WirelessNetworkInterface();
 
50
        /**
 
51
         * List of wireless networks currently visible to the hardware
 
52
         */
 
53
        virtual MacAddressList accessPoints() const = 0;
 
54
        /**
 
55
         * Identifier of the network this interface is currently associated with
 
56
         */
 
57
        virtual QString activeAccessPoint() const = 0;
 
58
        /**
 
59
         * The hardware address assigned to the network interface
 
60
         */
 
61
        virtual QString hardwareAddress() const = 0;
 
62
        /**
 
63
         * Retrieves the operation mode of this network.
 
64
         *
 
65
         * @return the current mode
 
66
         * @see Solid::Control::WirelessNetworkInterface::OperationMode
 
67
         */
 
68
        virtual Solid::Control::WirelessNetworkInterface::OperationMode mode() const = 0;
 
69
 
 
70
        /**
 
71
         * Retrieves the effective bit rate currently attainable by this device.
 
72
         *
 
73
         * @return the bitrate in bit/s
 
74
         */
 
75
        virtual int bitRate() const = 0;
 
76
 
 
77
        /**
 
78
         * Retrieves the capabilities of this wifi network.
 
79
         *
 
80
         * @return the flag set describing the capabilities
 
81
         * @see Solid::Control::WirelessNetworkInterface::DeviceInterface
 
82
         */
 
83
        virtual Solid::Control::WirelessNetworkInterface::Capabilities wirelessCapabilities() const = 0;
 
84
        /**
 
85
         * Instantiates a new AccessPoint object from the current backend given its UNI.
 
86
         *
 
87
         * @param uni the identifier of the network instantiated
 
88
         * @returns a new AccessPoint object if there's a network having the given UNI for this device, 0 otherwise
 
89
         */
 
90
         virtual QObject * createAccessPoint(const QString & uni) = 0;
 
91
    protected:
 
92
    //Q_SIGNALS:
 
93
        /**
 
94
         * This signal is emitted when the bitrate of this network has changed.
 
95
         *
 
96
         * @param bitrate the new bitrate value for this network
 
97
         */
 
98
        virtual void bitRateChanged(int bitrate) = 0;
 
99
        /**
 
100
         * The accesspoint in use changed.
 
101
         */
 
102
        virtual void activeAccessPointChanged(const QString &) = 0;
 
103
        /**
 
104
         * The device switched operating mode.
 
105
         */
 
106
        virtual void modeChanged(Solid::Control::WirelessNetworkInterface::OperationMode) = 0;
 
107
        /**
 
108
         * A new wireless access point appeared
 
109
         */
 
110
        virtual void accessPointAppeared(const QString &) = 0;
 
111
        /**
 
112
         * A wireless access point disappeared
 
113
         */
 
114
        virtual void accessPointDisappeared(const QString &) = 0;
 
115
    };
 
116
} //Ifaces
 
117
} //Control
 
118
} //Solid
 
119
 
 
120
Q_DECLARE_INTERFACE(Solid::Control::Ifaces::WirelessNetworkInterface, "org.kde.Solid.Control.Ifaces.WirelessNetworkInterface/0.1")
 
121
 
 
122
#endif //SOLID_IFACES_WIRELESSNETWORKINTERFACE_H
 
123