• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libsolidcontrol

wirelessaccesspoint.cpp

Go to the documentation of this file.
00001 /*
00002 Copyright 2008 Will Stephenson <wstephenson@kde.org>
00003 
00004 This library is free software; you can redistribute it and/or
00005 modify it under the terms of the GNU Lesser General Public
00006 License as published by the Free Software Foundation; either
00007 version 2.1 of the License, or (at your option) version 3, or any
00008 later version accepted by the membership of KDE e.V. (or its
00009 successor approved by the membership of KDE e.V.), which shall
00010 act as a proxy defined in Section 6 of version 3 of the license.
00011 
00012 This library is distributed in the hope that it will be useful,
00013 but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 Lesser General Public License for more details.
00016 
00017 You should have received a copy of the GNU Lesser General Public 
00018 License along with this library.  If not, see <http://www.gnu.org/licenses/>.
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     // nothing to do yet
00163 }
00164 
00165 #include "wirelessaccesspoint.moc"

libsolidcontrol

Skip menu "libsolidcontrol"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal