00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "wirelessaccesspoint.h"
00022 #include "frontendobject_p.h"
00023 #include "soliddefs_p.h"
00024 #include "ifaces/wirelessaccesspoint.h"
00025
00026 namespace Solid
00027 {
00028 namespace Control
00029 {
00030 class AccessPointPrivate : public FrontendObjectPrivate
00031 {
00032 public:
00033 AccessPointPrivate(QObject *parent)
00034 : FrontendObjectPrivate(parent) { }
00035
00036 void setBackendObject(QObject *object);
00037 };
00038 }
00039 }
00040
00041 Solid::Control::AccessPoint::AccessPoint(QObject *backendObject)
00042 : QObject(), d_ptr(new AccessPointPrivate(this))
00043 {
00044 Q_D(AccessPoint);
00045 d->setBackendObject(backendObject);
00046 }
00047
00048 Solid::Control::AccessPoint::AccessPoint(const AccessPoint &network)
00049 : QObject(), d_ptr(new AccessPointPrivate(this))
00050 {
00051 Q_D(AccessPoint);
00052 d->setBackendObject(network.d_ptr->backendObject());
00053 }
00054
00055 Solid::Control::AccessPoint::AccessPoint(AccessPointPrivate &dd, QObject *backendObject)
00056 : QObject(), d_ptr(&dd)
00057 {
00058 Q_D(AccessPoint);
00059 d->setBackendObject(backendObject);
00060 }
00061
00062 Solid::Control::AccessPoint::AccessPoint(AccessPointPrivate &dd, const AccessPoint &ap)
00063 : d_ptr(&dd)
00064 {
00065 Q_D(AccessPoint);
00066 d->setBackendObject(ap.d_ptr->backendObject());
00067 }
00068
00069 Solid::Control::AccessPoint::~AccessPoint()
00070 {
00071 delete d_ptr;
00072 }
00073
00074 QString Solid::Control::AccessPoint::uni() const
00075 {
00076 Q_D(const AccessPoint);
00077 return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), QString(), uni());
00078 }
00079
00080 Solid::Control::AccessPoint::Capabilities Solid::Control::AccessPoint::capabilities() const
00081 {
00082 Q_D(const AccessPoint);
00083 return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), 0, capabilities());
00084
00085 }
00086
00087 Solid::Control::AccessPoint::WpaFlags Solid::Control::AccessPoint::wpaFlags() const
00088 {
00089 Q_D(const AccessPoint);
00090 return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), 0, wpaFlags());
00091
00092 }
00093
00094 Solid::Control::AccessPoint::WpaFlags Solid::Control::AccessPoint::rsnFlags() const
00095 {
00096 Q_D(const AccessPoint);
00097 return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), 0, rsnFlags());
00098
00099 }
00100
00101 QString Solid::Control::AccessPoint::ssid() const
00102 {
00103 Q_D(const AccessPoint);
00104 return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), QString(), ssid());
00105 }
00106
00107 uint Solid::Control::AccessPoint::frequency() const
00108 {
00109 Q_D(const AccessPoint);
00110 return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), 0, frequency());
00111
00112 }
00113
00114 QString Solid::Control::AccessPoint::hardwareAddress() const
00115 {
00116 Q_D(const AccessPoint);
00117 return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), QString(), hardwareAddress());
00118
00119 }
00120
00121 uint Solid::Control::AccessPoint::maxBitRate() const
00122 {
00123 Q_D(const AccessPoint);
00124 return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), 0, maxBitRate());
00125 }
00126
00127 Solid::Control::WirelessNetworkInterface::OperationMode Solid::Control::AccessPoint::mode() const
00128 {
00129 Q_D(const AccessPoint);
00130 return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), (Solid::Control::WirelessNetworkInterface::OperationMode)0, mode());
00131 }
00132
00133 int Solid::Control::AccessPoint::signalStrength() const
00134 {
00135 Q_D(const AccessPoint);
00136 return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), 0, signalStrength());
00137 }
00138
00139 void Solid::Control::AccessPointPrivate::setBackendObject(QObject *object)
00140 {
00141 FrontendObjectPrivate::setBackendObject(object);
00142
00143 if (object) {
00144 QObject::connect(object, SIGNAL(signalStrengthChanged(int)),
00145 parent(), SIGNAL(signalStrengthChanged(int)));
00146 QObject::connect(object, SIGNAL(bitRateChanged(int)),
00147 parent(), SIGNAL(bitRateChanged(int)));
00148 QObject::connect(object, SIGNAL(wpaFlagsChanged(Solid::Control::AccessPoint::WpaFlags)),
00149 parent(), SIGNAL(wpaFlagsChanged(Solid::Control::AccessPoint::WpaFlags)));
00150 QObject::connect(object, SIGNAL(rsnFlagsChanged(Solid::Control::AccessPoint::WpaFlags)),
00151 parent(), SIGNAL(rsnFlagsChanged(Solid::Control::AccessPoint::WpaFlags)));
00152 QObject::connect(object, SIGNAL(ssidChanged(const QString&)),
00153 parent(), SIGNAL(ssidChanged(const QString&)));
00154 QObject::connect(object, SIGNAL(frequencyChanged(uint)),
00155 parent(), SIGNAL(frequencyChanged(uint)));
00156 }
00157 }
00158
00159 void Solid::Control::AccessPoint::_k_destroyed(QObject *object)
00160 {
00161 Q_UNUSED(object);
00162
00163 }
00164
00165 #include "wirelessaccesspoint.moc"