1 /* This file is part of the KDE project
2 Copyright (C) 2007 Juan González <jaguilera@opsiland.info>
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.
20 #ifndef BLUEZ_BLUETOOTH_SECURITY_H
21 #define BLUEZ_BLUETOOTH_SECURITY_H
23 #include <solid/control/ifaces/bluetoothsecurity.h>
24 #include <solid/control/bluetoothsecurity.h>
26 #include <QStringList>
29 * Implementation of the bluez security stuff. This is used to handle remote device pairing/authorization
30 * using the BlueZ stack.
32 class KDE_EXPORT BluezBluetoothSecurity
: public Solid::Control::Ifaces::BluetoothSecurity
35 Q_INTERFACES(Solid::Control::Ifaces::BluetoothSecurity
)
37 explicit BluezBluetoothSecurity(QObject
*parent
= 0);
38 BluezBluetoothSecurity(const QString
&interface
,QObject
*parent
= 0);
39 ~BluezBluetoothSecurity();
41 //No need to make this private as it's not exposed in the super.
42 //For the passkey agents
43 QString
request(const QString
& address
, bool numeric
);
44 bool confirm(const QString
& address
, const QString
& value
);
45 void display(const QString
& address
, const QString
& value
);
46 void keypress(const QString
& address
);
47 void complete(const QString
& address
);
48 void cancel(const QString
& address
);
50 //For the authorization agent
51 bool authorize(const QString
&localUbi
,const QString
&remoteAddress
,const QString
& serviceUuid
);
52 void cancel(const QString
&localUbi
,const QString
&remoteAddress
,const QString
& serviceUuid
);
55 void setPasskeyAgent(Solid::Control::BluetoothPasskeyAgent
*agent
);
56 void setAuthorizationAgent(Solid::Control::BluetoothAuthorizationAgent
*agent
);
59 Solid::Control::BluetoothPasskeyAgent
* passkeyAgent
;
60 Solid::Control::BluetoothAuthorizationAgent
*authAgent
;