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>
31 class KDE_EXPORT BluezBluetoothRemoteDevice
: public Solid::Control::Ifaces::BluetoothRemoteDevice
34 Q_INTERFACES(Solid::Control::Ifaces::BluetoothRemoteDevice
)
36 BluezBluetoothRemoteDevice(const QString
&objectPath
);
37 virtual ~BluezBluetoothRemoteDevice();
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;
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();
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
);
75 void setAlias(const QString
&alias
);
78 void cancelBondingProcess();
80 void serviceHandles(const QString
&filter
="") const;
81 void serviceRecordAsXml(uint handle
) const;
83 void classChanged(uint deviceClass
);
84 void nameChanged(const QString
&name
);
85 void nameResolvingFailed();
86 void aliasChanged(const QString
&alias
);
89 void requestDisconnection();
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
);
98 QDBusInterface
*device
;
102 QStringList
listReply(const QString
&method
) const;
103 QString
stringReply(const QString
&method
) const;
104 bool boolReply(const QString
&method
) const;