libsolidcontrol
bluetoothinputdevice.cpp
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 #include <QMap>
00023 #include <QStringList>
00024
00025 #include "ifaces/bluetoothinputdevice.h"
00026
00027 #include "frontendobject_p.h"
00028
00029 #include "soliddefs_p.h"
00030
00031 #include "bluetoothinputdevice.h"
00032
00033 namespace Solid
00034 {
00035 namespace Control
00036 {
00037 class BluetoothInputDevicePrivate : public FrontendObjectPrivate
00038 {
00039 public:
00040 BluetoothInputDevicePrivate(QObject *parent)
00041 : FrontendObjectPrivate(parent) { }
00042
00043 void setBackendObject(QObject *object);
00044 };
00045 }
00046 }
00047
00048 Solid::Control::BluetoothInputDevice::BluetoothInputDevice(QObject *backendObject)
00049 : QObject(), d(new BluetoothInputDevicePrivate(this))
00050 {
00051 d->setBackendObject(backendObject);
00052 }
00053
00054 Solid::Control::BluetoothInputDevice::BluetoothInputDevice(const BluetoothInputDevice &device)
00055 : QObject(), d(new BluetoothInputDevicePrivate(this))
00056 {
00057 d->setBackendObject(device.d->backendObject());
00058 }
00059
00060 Solid::Control::BluetoothInputDevice::~BluetoothInputDevice()
00061 {}
00062
00063 Solid::Control::BluetoothInputDevice &Solid::Control::BluetoothInputDevice::operator=(const Solid::Control::BluetoothInputDevice & dev)
00064 {
00065 d->setBackendObject(dev.d->backendObject());
00066
00067 return *this;
00068 }
00069
00070 QString Solid::Control::BluetoothInputDevice::ubi() const
00071 {
00072 return_SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), QString(), ubi());
00073 }
00074
00075 bool Solid::Control::BluetoothInputDevice::isConnected() const
00076 {
00077 return_SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), false, isConnected());
00078 }
00079
00080 QString Solid::Control::BluetoothInputDevice::name() const
00081 {
00082 return_SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), QString(), name());
00083 }
00084
00085 QString Solid::Control::BluetoothInputDevice::address() const
00086 {
00087 return_SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), QString(), address());
00088 }
00089
00090 QString Solid::Control::BluetoothInputDevice::productID() const
00091 {
00092 return_SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), QString(), productID());
00093 }
00094
00095 QString Solid::Control::BluetoothInputDevice::vendorID() const
00096 {
00097 return_SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), QString(), vendorID());
00098 }
00099
00100 void Solid::Control::BluetoothInputDevice::slotConnect()
00101 {
00102 SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), slotConnect());
00103 }
00104
00105 void Solid::Control::BluetoothInputDevice::slotDisconnect()
00106 {
00107 SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), slotDisconnect());
00108 }
00109
00110 void Solid::Control::BluetoothInputDevicePrivate::setBackendObject(QObject *object)
00111 {
00112 FrontendObjectPrivate::setBackendObject(object);
00113
00114 if (object) {
00115 QObject::connect(object, SIGNAL(connected()),
00116 parent(), SIGNAL(connected()));
00117 QObject::connect(object, SIGNAL(disconnected()),
00118 parent(), SIGNAL(disconnected()));
00119 }
00120 }
00121
00122 #include "bluetoothinputdevice.moc"