1 /* This file is part of the KDE project
2 Copyright (C) 2007 Will Stephenson <wstephenson@kde.org>
3 Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
4 Copyright (C) 2008 Tom Patzig <tpatzig@suse.de>
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License version 2 as published by the Free Software Foundation.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
23 #ifndef BLUEZ_BLUETOOTHINTERFACE_H
24 #define BLUEZ_BLUETOOTHINTERFACE_H
26 #include <kdemacros.h>
28 #include <QDBusVariant>
29 #include <QDBusObjectPath>
32 #include <solid/control/ifaces/bluetoothinterface.h>
34 class BluezBluetoothInterfacePrivate
;
37 class KDE_EXPORT BluezBluetoothInterface
: public Solid::Control::Ifaces::BluetoothInterface
40 Q_INTERFACES(Solid::Control::Ifaces::BluetoothInterface
)
43 BluezBluetoothInterface(const QString
& objectPath
);
44 virtual ~BluezBluetoothInterface();
47 QObject
*createBluetoothRemoteDevice(const QString
&);
48 QObject
*createBluetoothInputDevice(const QString
&);
49 void createDevice(const QString
&) const;
50 void createPairedDevice(const QString
&,const QString
&,const QString
&) const;
51 QString
findDevice(const QString
&) const;
52 QMap
< QString
, QVariant
> getProperties() const;
53 QStringList
listDevices() const;
58 void cancelDeviceCreation(const QString
&);
59 void registerAgent(const QString
&,const QString
&);
60 void releaseSession();
61 void removeDevice(const QString
&);
62 void requestSession();
63 void setProperty(const QString
&,const QVariant
&);
64 void startDiscovery();
66 void unregisterAgent(const QString
&);
68 void slotDeviceCreated(const QDBusObjectPath
&);
69 void slotDeviceDisappeared(const QString
&);
70 void slotDeviceFound(const QString
&, const QMap
< QString
, QVariant
> &);
71 void slotDeviceRemoved(const QDBusObjectPath
&);
72 void slotPropertyChanged(const QString
&,const QVariant
&);
75 BluezBluetoothInterfacePrivate
* d
;
77 QStringList
listReply(const QString
&method
) const;
78 QString
stringReply(const QString
&method
, const QString
¶m
= "") const;
79 bool boolReply(const QString
&method
, const QString
¶m
= "") const;
80 QDBusObjectPath
objectReply(const QString
&method
, const QString
¶m
= "" ) const;