libsolidcontrol
bluetoothremotedevice.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
00022 #ifndef SOLID_CONTROL_BLUETOOTHREMOTEDEVICE_H
00023 #define SOLID_CONTROL_BLUETOOTHREMOTEDEVICE_H
00024
00025 #include <QtCore/QObject>
00026 #include <QtCore/QStringList>
00027 #include <QtCore/QMap>
00028
00029 #include "bluetoothmanager.h"
00030 #include "bluetoothinterface.h"
00031
00032 class KJob;
00033
00034 namespace Solid
00035 {
00036 namespace Control
00037 {
00038 class BluetoothRemoteDevicePrivate;
00042 class SOLIDCONTROL_EXPORT BluetoothRemoteDevice : public QObject
00043 {
00044 Q_OBJECT
00045 Q_DECLARE_PRIVATE(BluetoothRemoteDevice)
00046
00047 public:
00053 BluetoothRemoteDevice(QObject *backendObject = 0);
00054
00060 BluetoothRemoteDevice(const BluetoothRemoteDevice &device);
00061
00065 ~BluetoothRemoteDevice();
00066
00073 BluetoothRemoteDevice &operator=(const BluetoothRemoteDevice &device);
00074
00080 bool operator==(const BluetoothRemoteDevice & other) const;
00081
00088 QString ubi() const;
00089
00095 QString address() const;
00096
00097
00103 bool isConnected() const;
00104
00111 QString version() const;
00112
00118 QString revision() const;
00119
00125 QString manufacturer() const;
00126
00132 QString company() const;
00133
00140 QString majorClass() const;
00141
00148 QString minorClass() const;
00149
00156 QStringList serviceClasses() const;
00157
00164 QString name() const;
00165
00175 QString alias() const;
00176
00183 QString lastSeen() const;
00184
00191 QString lastUsed() const;
00192
00198 bool hasBonding() const;
00199
00205 int pinCodeLength() const;
00206
00212 int encryptionKeySize() const;
00213
00219 KJob *createBonding();
00220
00221 public Q_SLOTS:
00227 void setAlias(const QString &alias);
00228
00232 void clearAlias();
00233
00237 void disconnect();
00238
00242 void cancelBondingProcess();
00243
00247 void removeBonding();
00257 void serviceHandles(const QString &filter ="") const;
00267 void serviceRecordAsXml(uint handle) const;
00268 Q_SIGNALS:
00274 void classChanged(uint deviceClass);
00275
00281 void nameChanged(const QString &name);
00282
00286 void nameResolvingFailed();
00287
00293 void aliasChanged(const QString &alias);
00294
00298 void aliasCleared();
00299
00303 void connected();
00304
00308 void requestDisconnection();
00309
00313 void disconnected();
00314
00318 void bondingCreated();
00319
00323 void bondingRemoved();
00324
00328 void serviceHandlesAvailable(const QString &ubi, const QList<uint> &handles);
00332 void serviceRecordXmlAvailable(const QString &ubi, const QString &record);
00333 protected:
00334 BluetoothRemoteDevicePrivate *d_ptr;
00335
00336 private:
00337 Q_PRIVATE_SLOT(d_func(), void _k_destroyed(QObject *))
00338 };
00339
00340 }
00341 }
00342
00343 #endif