Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / workspace / solid / bluez / bluez-bluetoothremotedevice.h
blob671d2595e5d8603fc6e366f7d9585be0a381d5c7
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_BLUETOOTHREMOTEDEVICE_H
23 #define BLUEZ_BLUETOOTHREMOTEDEVICE_H
25 #include <kdemacros.h>
27 #include <solid/control/ifaces/bluetoothremotedevice.h>
28 #include <QtDBus>
31 class KDE_EXPORT BluezBluetoothRemoteDevice : public Solid::Control::Ifaces::BluetoothRemoteDevice
33 Q_OBJECT
34 Q_INTERFACES(Solid::Control::Ifaces::BluetoothRemoteDevice)
35 public:
36 BluezBluetoothRemoteDevice(const QString &objectPath);
37 virtual ~BluezBluetoothRemoteDevice();
38 QString ubi() const;
39 QString address() const;
40 bool isConnected() const;
41 QString version() const;
42 QString revision() const;
43 QString manufacturer() const;
44 QString company() const;
45 QString majorClass() const;
46 QString minorClass() const;
47 QStringList serviceClasses() const;
48 QString name() const;
49 QString alias() const;
50 QString lastSeen() const;
51 QString lastUsed() const;
52 bool hasBonding() const;
53 int pinCodeLength() const;
54 int encryptionKeySize() const;
56 KJob *createBonding();
57 private Q_SLOTS:
58 void slotClassChanged(const QString &address, uint newClass);
59 void slotNameUpdated(const QString &address,const QString &newName);
60 void slotNameResolvingFailed(const QString &address);
61 void slotAliasChanged(const QString &address,const QString &newAlias);
62 void slotAliasCleared(const QString &address);
63 void slotConnected(const QString &address);
64 void slotRequestDisconnection(const QString &address);
65 void slotDisconnected(const QString &address);
66 void slotBonded(const QString &address);
67 void slotUnbonded(const QString &address);
69 void slotServiceHandles(const QList<uint> &handles);
70 void dbusErrorHandles(const QDBusError &error);
71 void slotServiceRecordAsXml(const QString &record);
72 void dbusErrorRecordAsXml(const QDBusError &error);
74 public Q_SLOTS:
75 void setAlias(const QString &alias);
76 void clearAlias();
77 void disconnect();
78 void cancelBondingProcess();
79 void removeBonding();
80 void serviceHandles(const QString &filter ="") const;
81 void serviceRecordAsXml(uint handle) const;
82 Q_SIGNALS:
83 void classChanged(uint deviceClass);
84 void nameChanged(const QString &name);
85 void nameResolvingFailed();
86 void aliasChanged(const QString &alias);
87 void aliasCleared();
88 void connected();
89 void requestDisconnection();
90 void disconnected();
91 void bondingCreated();
92 void bondingRemoved();
93 void serviceRecordXmlAvailable(const QString &ubi, const QString &record);
94 void serviceHandlesAvailable(const QString &ubi, const QList<uint> &handles);
96 private:
97 QString m_objectPath;
98 QDBusInterface *device;
99 QString m_address;
100 QString m_adapter;
102 QStringList listReply(const QString &method) const;
103 QString stringReply(const QString &method) const;
104 bool boolReply(const QString &method) const;
107 #endif