SolidModules
bluez-bluetoothinterface.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
00023 #ifndef BLUEZ_BLUETOOTHINTERFACE_H
00024 #define BLUEZ_BLUETOOTHINTERFACE_H
00025
00026 #include <kdemacros.h>
00027 #include <QtDBus>
00028 #include <QDBusVariant>
00029 #include <QDBusObjectPath>
00030 #include <QString>
00031
00032 #include <solid/control/ifaces/bluetoothinterface.h>
00033
00034 class BluezBluetoothInterfacePrivate;
00035
00036
00037 class KDE_EXPORT BluezBluetoothInterface : public Solid::Control::Ifaces::BluetoothInterface
00038 {
00039 Q_OBJECT
00040 Q_INTERFACES(Solid::Control::Ifaces::BluetoothInterface)
00041
00042 public:
00043 BluezBluetoothInterface(const QString & objectPath);
00044 virtual ~BluezBluetoothInterface();
00045 QString ubi() const;
00046
00047 QObject *createBluetoothRemoteDevice(const QString &);
00048 QObject *createBluetoothInputDevice(const QString &);
00049 void createDevice(const QString &) const;
00050 void createPairedDevice(const QString &,const QString &,const QString &) const;
00051 QString findDevice(const QString &) const;
00052 QMap< QString, QVariant > getProperties() const;
00053 QStringList listDevices() const;
00054
00055
00056 public Q_SLOTS:
00057
00058 void cancelDeviceCreation(const QString &);
00059 void registerAgent(const QString &,const QString &);
00060 void releaseSession();
00061 void removeDevice(const QString &);
00062 void requestSession();
00063 void setProperty(const QString &,const QVariant&);
00064 void startDiscovery();
00065 void stopDiscovery();
00066 void unregisterAgent(const QString &);
00067
00068 void slotDeviceCreated(const QDBusObjectPath &);
00069 void slotDeviceDisappeared(const QString &);
00070 void slotDeviceFound(const QString &, const QMap< QString, QVariant > &);
00071 void slotDeviceRemoved(const QDBusObjectPath &);
00072 void slotPropertyChanged(const QString &,const QVariant &);
00073
00074 private:
00075 BluezBluetoothInterfacePrivate * d;
00076
00077 QStringList listReply(const QString &method) const;
00078 QString stringReply(const QString &method, const QString ¶m = "") const;
00079 bool boolReply(const QString &method, const QString ¶m = "") const;
00080 QDBusObjectPath objectReply(const QString &method, const QString ¶m = "" ) const;
00081
00082
00083 };
00084
00085 #endif