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

libsolidcontrol

fakebluetoothremotedevice.h

Go to the documentation of this file.
00001 /*  This file is part of the KDE project
00002     Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
00003 
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License version 2 as published by the Free Software Foundation.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to
00016     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017     Boston, MA 02110-1301, USA.
00018 
00019 */
00020 
00021 #ifndef FAKE_BLUETOOTH_REMOTEDEVICE_H
00022 #define FAKE_BLUETOOTH_REMOTEDEVICE_H
00023 
00024 #include <QString>
00025 #include <QVariant>
00026 
00027 #include <kdemacros.h>
00028 
00029 #include <solid/control/ifaces/bluetoothremotedevice.h>
00030 
00031 using namespace Solid::Control::Ifaces;
00032 
00033 class KDE_EXPORT FakeBluetoothRemoteDevice : public Solid::Control::Ifaces::BluetoothRemoteDevice
00034 {
00035     Q_OBJECT
00036     Q_INTERFACES(Solid::Control::Ifaces::BluetoothRemoteDevice)
00037 public:
00038     FakeBluetoothRemoteDevice(const QMap<QString, QVariant>  & propertyMap,
00039                               QObject *parent = 0);
00040     virtual ~FakeBluetoothRemoteDevice();
00041     QString ubi() const
00042     {
00043         return mUbi;
00044     }
00045     QString address() const
00046     {
00047         return mAddress;
00048     }
00049     bool isConnected() const
00050     {
00051         return mConnected;
00052     }
00053     QString version() const
00054     {
00055         return mVersion;
00056     }
00057     QString revision() const
00058     {
00059         return mRevision;
00060     }
00061     QString manufacturer() const
00062     {
00063         return mManufacturer;
00064     }
00065     QString company() const
00066     {
00067         return mCompany;
00068     }
00069     QString majorClass() const
00070     {
00071         return mMajorClass;
00072     }
00073     QString minorClass() const
00074     {
00075         return mMinorClass;
00076     }
00077     QStringList serviceClasses() const
00078     {
00079         return mServiceClass;
00080     }
00081     QString name() const
00082     {
00083         return mName;
00084     }
00085     QString alias() const
00086     {
00087         return mAlias;
00088     }
00089     QString lastSeen() const
00090     {
00091         return mLastSeen;
00092     }
00093     QString lastUsed() const
00094     {
00095         return mLastUsed;
00096     }
00097     bool hasBonding() const
00098     {
00099         return mBonded;
00100     }
00101     int pinCodeLength() const
00102     {
00103         return mPinCodeLength;
00104     }
00105     int encryptionKeySize() const
00106     {
00107         return mEncryptionKeySize;
00108     }
00109     KJob *createBonding();
00110 
00111 private:
00112     QString mUbi;
00113     QString mAddress;
00114     bool mConnected;
00115     QString mVersion;
00116     QString mRevision;
00117     QString mManufacturer;
00118     QString mCompany;
00119     QString mMajorClass;
00120     QString mMinorClass;
00121     QStringList mServiceClass;
00122     QString mName;
00123     QString mAlias;
00124     QString mLastSeen;
00125     QString mLastUsed;
00126     bool mBonded;
00127     int mPinCodeLength;
00128     int mEncryptionKeySize;
00129     bool servicesFound;
00130 
00131 public Q_SLOTS:
00132     void setAlias(const QString &alias)
00133     {
00134         mAlias = alias;
00135     }
00136     void clearAlias()
00137     {
00138         mAlias = "";
00139     }
00140     void disconnect()
00141     {
00142         mConnected = false;
00143     }
00144     void cancelBondingProcess()
00145     {}
00146     void removeBonding()
00147     {
00148         mBonded = false;
00149     }
00150     void serviceHandles(const QString &) const
00151     {
00152         
00153     }
00154     void serviceRecordAsXml(uint ) const
00155     {
00156     }
00157 Q_SIGNALS:
00158     void classChanged(uint devClass);
00159     void nameChanged(const QString &name);
00160     void nameResolvingFailed();
00161     void aliasChanged(const QString &alias);
00162     void aliasCleared();
00163     void connected();
00164     void requestDisconnection();
00165     void disconnected();
00166     void bondingCreated();
00167     void bondingRemoved();
00168     void serviceRecordXmlAvailable(const QString &ubi, const QString &record);
00169     void serviceHandlesAvailable(const QString &ubi, const QList<uint> &handles);
00170 protected:
00171     QMap<QString, QVariant> mPropertyMap;
00172 
00173 };
00174 
00175 #endif

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