libsolidcontrol
wirelessnetworkinterface.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef SOLID_CONTROL_WIRELESSNETWORKINTERFACE_H
00022 #define SOLID_CONTROL_WIRELESSNETWORKINTERFACE_H
00023
00024 #include "solid_control_export.h"
00025
00026 #include "networkinterface.h"
00027
00028 typedef QStringList AccessPointList;
00029 namespace Solid
00030 {
00031 namespace Control
00032 {
00033 class AccessPoint;
00034 class WirelessNetworkInterfacePrivate;
00035 namespace Ifaces
00036 {
00037 class AccessPoint;
00038 }
00039
00043 class SOLIDCONTROL_EXPORT WirelessNetworkInterface : public NetworkInterface
00044 {
00045 Q_OBJECT
00046 Q_ENUMS(OperationMode DeviceInterface)
00047 Q_FLAGS(Capabilities)
00048 Q_DECLARE_PRIVATE(WirelessNetworkInterface)
00049
00050 public:
00051 enum OperationMode { Unassociated, Adhoc, Managed, Master, Repeater };
00052
00053 enum Capability { NoCapability = 0x0, Wep40 = 0x2, Wep104, Tkip = 0x4, Ccmp = 0x8, Wpa = 0x10,
00054 Rsn };
00055 Q_DECLARE_FLAGS(Capabilities, Capability)
00056
00057
00062 WirelessNetworkInterface(QObject *backendObject = 0);
00063
00069 WirelessNetworkInterface(const WirelessNetworkInterface &network);
00070
00074 virtual ~WirelessNetworkInterface();
00075
00081 virtual NetworkInterface::Type type() const;
00082
00086 AccessPointList accessPoints() const;
00087
00091 QString activeAccessPoint() const;
00092
00096 QString hardwareAddress() const;
00097
00104 Solid::Control::WirelessNetworkInterface::OperationMode mode() const;
00105
00111 int bitRate() const;
00112
00119 Solid::Control::WirelessNetworkInterface::Capabilities wirelessCapabilities() const;
00120
00127 AccessPoint *findAccessPoint(const QString & uni) const;
00128
00129 Q_SIGNALS:
00135 void bitRateChanged(int);
00139 void activeAccessPointChanged(const QString &);
00143 void modeChanged(Solid::Control::WirelessNetworkInterface::OperationMode);
00147 void accessPointAppeared(const QString &);
00151 void accessPointDisappeared(const QString &);
00152 protected:
00156 WirelessNetworkInterface(WirelessNetworkInterfacePrivate &dd, QObject *backendObject);
00157
00161 WirelessNetworkInterface(WirelessNetworkInterfacePrivate &dd, const WirelessNetworkInterface &network);
00162
00163 void makeConnections(QObject * source);
00164 QPair<AccessPoint *, Ifaces::AccessPoint *> findRegisteredAccessPoint(const QString &uni) const;
00165 private Q_SLOTS:
00166 void _k_accessPointAdded(const QString &uni);
00167 void _k_accessPointRemoved(const QString &uni);
00168 void _k_destroyed(QObject *object);
00169 };
00170 }
00171 }
00172
00173 #endif //SOLID_CONTROL_WIREDNETWORKINTERFACE_H
00174