Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / workspace / libs / solid / control / backends / fakebluetooth / fakebluetoothmanager.h
blob24114ca9f1de92ebb3e0215189a3f9c4862a9d39
1 /* This file is part of the KDE project
2 Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
21 #ifndef FAKE_BLUETOOTH_MANAGER_H
22 #define FAKE_BLUETOOTH_MANAGER_H
24 #include <QObject>
25 #include <QStringList>
27 #include <kdemacros.h>
29 #include <solid/control/ifaces/bluetoothmanager.h>
30 #include "fakebluetoothinterface.h"
31 #include "fakebluetoothinputdevice.h"
32 #include "fakebluetoothsecurity.h"
34 class QDomElement;
36 class KDE_EXPORT FakeBluetoothManager : public Solid::Control::Ifaces::BluetoothManager
38 Q_OBJECT
39 public:
40 FakeBluetoothManager(QObject * parent, const QStringList & args);
41 FakeBluetoothManager(QObject * parent, const QStringList & args, const QString & xmlFile);
42 ~FakeBluetoothManager();
43 QStringList bluetoothInterfaces() const;
44 FakeBluetoothInterface *createBluetoothInterface(const QString &);
45 QString defaultInterface() const;
46 QObject *createInterface(const QString &);
48 QStringList bluetoothInputDevices() const;
49 FakeBluetoothInputDevice *createBluetoothInputDevice(const QString &ubi);
50 KJob *setupInputDevice(const QString &ubi);
51 Solid::Control::Ifaces::BluetoothSecurity * security(const QString &interface);
52 public Q_SLOTS:
53 void removeInputDevice(const QString & ubi);
55 private:
56 void parseBluetoothFile();
57 FakeBluetoothInterface *parseDeviceElement(const QDomElement &deviceElement);
58 QMap<QString, QVariant> parseBluetoothElement(const QDomElement &deviceElement);
60 QMap<QString, FakeBluetoothInterface *> mBluetoothInterfaces;
61 QMap<QString, FakeBluetoothInputDevice *> mBluetoothInputDevices;
62 QMap<QString, FakeBluetoothRemoteDevice *> mBluetoothRemoteDevices;
63 QString mXmlFile;
66 #endif