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

libsolidcontrol

bluetoothremotedevice.cpp

Go to the documentation of this file.
00001 /*  This file is part of the KDE project
00002     Copyright (C) 2006 Will Stephenson <wstephenson@kde.org>
00003     Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
00004 
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License version 2 as published by the Free Software Foundation.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018     Boston, MA 02110-1301, USA.
00019 
00020 */
00021 
00022 #include <QMap>
00023 #include <QStringList>
00024 
00025 #include "ifaces/bluetoothremotedevice.h"
00026 
00027 #include "frontendobject_p.h"
00028 
00029 #include "soliddefs_p.h"
00030 #include "bluetoothmanager.h"
00031 #include "bluetoothinterface.h"
00032 
00033 namespace Solid
00034 {
00035 namespace Control
00036 {
00037     class BluetoothRemoteDevicePrivate : public FrontendObjectPrivate
00038     {
00039     public:
00040         BluetoothRemoteDevicePrivate(QObject *parent)
00041             : FrontendObjectPrivate(parent) { }
00042 
00043         void setBackendObject(QObject *object);
00044     };
00045 }
00046 }
00047 
00048 Solid::Control::BluetoothRemoteDevice::BluetoothRemoteDevice(QObject *backendObject)
00049     : QObject(), d_ptr(new BluetoothRemoteDevicePrivate(this))
00050 {
00051     Q_D(BluetoothRemoteDevice);
00052     d->setBackendObject(backendObject);
00053 }
00054 
00055 Solid::Control::BluetoothRemoteDevice::BluetoothRemoteDevice(const BluetoothRemoteDevice &device)
00056     : QObject(), d_ptr(new BluetoothRemoteDevicePrivate(this))
00057 {
00058     Q_D(BluetoothRemoteDevice);
00059     d->setBackendObject(device.d_ptr->backendObject());
00060 }
00061 
00062 Solid::Control::BluetoothRemoteDevice::~BluetoothRemoteDevice()
00063 {}
00064 
00065 Solid::Control::BluetoothRemoteDevice &Solid::Control::BluetoothRemoteDevice::operator=(const Solid::Control::BluetoothRemoteDevice  & dev)
00066 {
00067     Q_D(BluetoothRemoteDevice);
00068     d->setBackendObject(dev.d_ptr->backendObject());
00069 
00070     return *this;
00071 }
00072 
00073 bool Solid::Control::BluetoothRemoteDevice::operator==(const BluetoothRemoteDevice  & other) const
00074 {
00075     return ubi() == other.ubi();
00076 }
00077 
00078 QString Solid::Control::BluetoothRemoteDevice::ubi() const
00079 {
00080     Q_D(const BluetoothRemoteDevice);
00081     return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), QString(), ubi());
00082 }
00083 
00084 QString Solid::Control::BluetoothRemoteDevice::address() const
00085 {
00086     Q_D(const BluetoothRemoteDevice);
00087     return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), QString(), address());
00088 }
00089 
00090 bool Solid::Control::BluetoothRemoteDevice::isConnected() const
00091 {
00092     Q_D(const BluetoothRemoteDevice);
00093     return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), false, isConnected());
00094 }
00095 
00096 QString Solid::Control::BluetoothRemoteDevice::version() const
00097 {
00098     Q_D(const BluetoothRemoteDevice);
00099     return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), QString(), version());
00100 }
00101 
00102 QString Solid::Control::BluetoothRemoteDevice::revision() const
00103 {
00104     Q_D(const BluetoothRemoteDevice);
00105     return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), QString(), revision());
00106 }
00107 
00108 QString Solid::Control::BluetoothRemoteDevice::manufacturer() const
00109 {
00110     Q_D(const BluetoothRemoteDevice);
00111     return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), QString(), manufacturer());
00112 }
00113 
00114 QString Solid::Control::BluetoothRemoteDevice::company() const
00115 {
00116     Q_D(const BluetoothRemoteDevice);
00117     return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), QString(), company());
00118 }
00119 
00120 QString Solid::Control::BluetoothRemoteDevice::majorClass() const
00121 {
00122     Q_D(const BluetoothRemoteDevice);
00123     return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), QString(), majorClass());
00124 }
00125 
00126 QString Solid::Control::BluetoothRemoteDevice::minorClass() const
00127 {
00128     Q_D(const BluetoothRemoteDevice);
00129     return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), QString(), minorClass());
00130 }
00131 
00132 QStringList Solid::Control::BluetoothRemoteDevice::serviceClasses() const
00133 {
00134     Q_D(const BluetoothRemoteDevice);
00135     return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), QStringList(), serviceClasses());
00136 }
00137 QString Solid::Control::BluetoothRemoteDevice::name() const
00138 {
00139     Q_D(const BluetoothRemoteDevice);
00140     return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), QString(), name());
00141 }
00142 
00143 QString Solid::Control::BluetoothRemoteDevice::alias() const
00144 {
00145     Q_D(const BluetoothRemoteDevice);
00146     return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), QString(), alias());
00147 }
00148 
00149 QString Solid::Control::BluetoothRemoteDevice::lastSeen() const
00150 {
00151     Q_D(const BluetoothRemoteDevice);
00152     return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), QString(), lastSeen());
00153 }
00154 
00155 QString Solid::Control::BluetoothRemoteDevice::lastUsed() const
00156 {
00157     Q_D(const BluetoothRemoteDevice);
00158     return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), QString(), lastUsed());
00159 }
00160 
00161 bool Solid::Control::BluetoothRemoteDevice::hasBonding() const
00162 {
00163     Q_D(const BluetoothRemoteDevice);
00164     return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), false, hasBonding());
00165 }
00166 
00167 int Solid::Control::BluetoothRemoteDevice::pinCodeLength() const
00168 {
00169     Q_D(const BluetoothRemoteDevice);
00170     return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), 0, pinCodeLength());
00171 }
00172 
00173 int Solid::Control::BluetoothRemoteDevice::encryptionKeySize() const
00174 {
00175     Q_D(const BluetoothRemoteDevice);
00176     return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), 0, encryptionKeySize());
00177 }
00178 
00179 KJob *Solid::Control::BluetoothRemoteDevice::createBonding()
00180 {
00181     Q_D(BluetoothRemoteDevice);
00182     return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), 0, createBonding());
00183 }
00184 
00185 void Solid::Control::BluetoothRemoteDevice::setAlias(const QString &alias)
00186 {
00187     Q_D(BluetoothRemoteDevice);
00188     SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), setAlias(alias));
00189 }
00190 
00191 void Solid::Control::BluetoothRemoteDevice::clearAlias()
00192 {
00193     Q_D(BluetoothRemoteDevice);
00194     SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), clearAlias());
00195 }
00196 
00197 void Solid::Control::BluetoothRemoteDevice::disconnect()
00198 {
00199     Q_D(BluetoothRemoteDevice);
00200     SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), disconnect());
00201 }
00202 
00203 void Solid::Control::BluetoothRemoteDevice::cancelBondingProcess()
00204 {
00205     Q_D(BluetoothRemoteDevice);
00206     SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), cancelBondingProcess());
00207 }
00208 
00209 void Solid::Control::BluetoothRemoteDevice::removeBonding()
00210 {
00211     Q_D(const BluetoothRemoteDevice);
00212     SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), removeBonding());
00213 }
00214 void Solid::Control::BluetoothRemoteDevice::serviceHandles(const QString &filter) const
00215 {
00216     Q_D(const BluetoothRemoteDevice);
00217     SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), serviceHandles(filter));
00218 }
00219 
00220 void Solid::Control::BluetoothRemoteDevice::serviceRecordAsXml(uint handle) const
00221 {
00222     Q_D(const BluetoothRemoteDevice);
00223     SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), serviceRecordAsXml(handle));
00224 }
00225 
00226 void Solid::Control::BluetoothRemoteDevicePrivate::setBackendObject(QObject *object)
00227 {
00228     FrontendObjectPrivate::setBackendObject(object);
00229 
00230     if (object) {
00231         QObject::connect(object, SIGNAL(classChanged(uint)),
00232                          parent(), SIGNAL(classChanged(uint)));
00233         QObject::connect(object, SIGNAL(nameChanged(const QString &)),
00234                          parent(), SIGNAL(nameChanged(const QString &)));
00235         QObject::connect(object, SIGNAL(nameResolvingFailed()),
00236                          parent(), SIGNAL(nameResolvingFailed()));
00237         QObject::connect(object, SIGNAL(aliasChanged(const QString &)),
00238                          parent(), SIGNAL(aliasChanged(const QString &)));
00239         QObject::connect(object, SIGNAL(aliasCleared()),
00240                          parent(), SIGNAL(aliasCleared()));
00241         QObject::connect(object, SIGNAL(connected()),
00242                          parent(), SIGNAL(connected()));
00243         QObject::connect(object, SIGNAL(requestDisconnection()),
00244                          parent(), SIGNAL(requestDisconnection()));
00245         QObject::connect(object, SIGNAL(disconnected()),
00246                          parent(), SIGNAL(disconnected()));
00247         QObject::connect(object, SIGNAL(bondingCreated()),
00248                          parent(), SIGNAL(bondingCreated()));
00249         QObject::connect(object, SIGNAL(bondingRemoved()),
00250                          parent(), SIGNAL(bondingRemoved()));
00251     QObject::connect(object, SIGNAL(serviceHandlesAvailable(const QString &, const QList<uint> &)),
00252              parent(), SIGNAL(serviceHandlesAvailable(const QString &, const QList<uint> &)));
00253     QObject::connect(object, SIGNAL(serviceRecordXmlAvailable(const QString &, const QString &)),
00254              parent(), SIGNAL(serviceRecordXmlAvailable(const QString &, const QString &)));
00255     
00256     }
00257 }
00258 
00259 #include "bluetoothremotedevice.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
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
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