Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / workspace / libs / solid / control / bluetoothinputdevice.cpp
blob21a06388173d7a7ff1a97b2b7caff7a37adc5fc8
1 /* This file is part of the KDE project
2 Copyright (C) 2006 Will Stephenson <wstephenson@kde.org>
3 Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License version 2 as published by the Free Software Foundation.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
22 #include <QMap>
23 #include <QStringList>
25 #include <solid/control/ifaces/bluetoothinputdevice.h>
27 #include "frontendobject_p.h"
29 #include "soliddefs_p.h"
31 #include "bluetoothinputdevice.h"
33 namespace Solid
35 namespace Control
37 class BluetoothInputDevicePrivate : public FrontendObjectPrivate
39 public:
40 BluetoothInputDevicePrivate(QObject *parent)
41 : FrontendObjectPrivate(parent) { }
43 void setBackendObject(QObject *object);
48 Solid::Control::BluetoothInputDevice::BluetoothInputDevice(QObject *backendObject)
49 : QObject(), d(new BluetoothInputDevicePrivate(this))
51 d->setBackendObject(backendObject);
54 Solid::Control::BluetoothInputDevice::BluetoothInputDevice(const BluetoothInputDevice &device)
55 : QObject(), d(new BluetoothInputDevicePrivate(this))
57 d->setBackendObject(device.d->backendObject());
60 Solid::Control::BluetoothInputDevice::~BluetoothInputDevice()
63 Solid::Control::BluetoothInputDevice &Solid::Control::BluetoothInputDevice::operator=(const Solid::Control::BluetoothInputDevice & dev)
65 d->setBackendObject(dev.d->backendObject());
67 return *this;
70 QString Solid::Control::BluetoothInputDevice::ubi() const
72 return_SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), QString(), ubi());
75 bool Solid::Control::BluetoothInputDevice::isConnected() const
77 return_SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), false, isConnected());
80 QString Solid::Control::BluetoothInputDevice::name() const
82 return_SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), QString(), name());
85 QString Solid::Control::BluetoothInputDevice::address() const
87 return_SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), QString(), address());
90 QString Solid::Control::BluetoothInputDevice::productID() const
92 return_SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), QString(), productID());
95 QString Solid::Control::BluetoothInputDevice::vendorID() const
97 return_SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), QString(), vendorID());
100 void Solid::Control::BluetoothInputDevice::slotConnect()
102 SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), slotConnect());
105 void Solid::Control::BluetoothInputDevice::slotDisconnect()
107 SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), slotDisconnect());
110 void Solid::Control::BluetoothInputDevicePrivate::setBackendObject(QObject *object)
112 FrontendObjectPrivate::setBackendObject(object);
114 if (object) {
115 QObject::connect(object, SIGNAL(connected()),
116 parent(), SIGNAL(connected()));
117 QObject::connect(object, SIGNAL(disconnected()),
118 parent(), SIGNAL(disconnected()));
122 #include "bluetoothinputdevice.moc"