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>
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 #ifndef BLUEZ_BLUETOOTHINTERFACE_H
23 #define BLUEZ_BLUETOOTHINTERFACE_H
25 #include <kdemacros.h>
27 #include <solid/control/ifaces/bluetoothinterface.h>
29 class BluezBluetoothInterfacePrivate
;
31 class KDE_EXPORT BluezBluetoothInterface
: public Solid::Control::Ifaces::BluetoothInterface
34 Q_INTERFACES(Solid::Control::Ifaces::BluetoothInterface
)
36 BluezBluetoothInterface(const QString
& objectPath
);
37 virtual ~BluezBluetoothInterface();
39 QString
address() const;
40 QString
version() const;
41 QString
revision() const;
42 QString
manufacturer() const;
43 QString
company() const;
44 Solid::Control::BluetoothInterface::Mode
mode() const;
45 int discoverableTimeout() const;
46 bool isDiscoverable() const;
47 QStringList
listConnections() const;
48 QString
majorClass() const;
49 QStringList
listAvailableMinorClasses() const;
50 QString
minorClass() const;
51 QStringList
serviceClasses() const;
53 QStringList
listBondings() const;
54 bool isPeriodicDiscoveryActive() const;
55 bool isPeriodicDiscoveryNameResolvingActive() const;
56 QStringList
listRemoteDevices() const;
57 QStringList
listRecentRemoteDevices(const QDateTime
&) const;
59 QObject
*createBluetoothRemoteDevice(const QString
&);
62 void setMode(const Solid::Control::BluetoothInterface::Mode
);
63 void setDiscoverableTimeout(int);
64 void setMinorClass(const QString
&);
65 void setName(const QString
&);
66 void discoverDevices();
67 void discoverDevicesWithoutNameResolving();
68 void cancelDiscovery();
69 void startPeriodicDiscovery();
70 void stopPeriodicDiscovery();
71 void setPeriodicDiscoveryNameResolving(bool);
73 void slotModeChanged(const Solid::Control::BluetoothInterface::Mode mode
);
74 void slotDiscoverableTimeoutChanged(int timeout
);
75 void slotMinorClassChanged(const QString
&minor
);
76 void slotNameChanged(const QString
&name
);
77 void slotDiscoveryStarted();
78 void slotDiscoveryCompleted();
79 void slotRemoteDeviceFound(const QString
&ubi
, uint deviceClass
, short rssi
);
80 void slotRemoteDeviceDisappeared(const QString
&ubi
);
83 BluezBluetoothInterfacePrivate
* d
;
85 QStringList
listReply(const QString
&method
) const;
86 QString
stringReply(const QString
&method
) const;
87 bool boolReply(const QString
&method
) const;