1 /* This file is part of the KDE project
2 Copyright (C) 2006 Will Stephenson <wstephenson@kde.org>
3 Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
4 Copyright (C) 2007 Juan González Aguilera <jaguilera@opsiland.info>
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_BLUETOOTHSECURITYADAPTOR_H
23 #define __BLUEZ_BLUETOOTHSECURITYADAPTOR_H
25 #include "bluez-bluetoothsecurity.h"
30 * Acts as a proxy to BluezBluetoothSecurity to expose it's functionalities to the D-Bus, which is needed
31 * by the BlueZ system.
33 class BluezBluetoothSecurityPasskeyAgentAdaptor
: public QDBusAbstractAdaptor
36 Q_CLASSINFO("D-Bus Interface","org.bluez.PasskeyAgent")
38 BluezBluetoothSecurityPasskeyAgentAdaptor(BluezBluetoothSecurity
*security
);
39 ~BluezBluetoothSecurityPasskeyAgentAdaptor();
41 //org.bluez.PasskeyAgent
42 QString
Request(const QString
& path
, const QString
& address
, bool numeric
,const QDBusMessage
&msg
);
43 void Confirm(const QString
& path
, const QString
& address
, const QString
& value
,const QDBusMessage
&msg
);
44 void Display(const QString
& path
, const QString
& address
, const QString
& value
);
45 void Keypress(const QString
& path
, const QString
& address
);
46 void Complete(const QString
& path
, const QString
& address
);
47 void Cancel(const QString
& path
, const QString
& address
);
52 BluezBluetoothSecurity
*security
;
53 QDBusInterface
*manager
;
56 class BluezBluetoothSecurityAuthorizationAgentAdaptor
: public QDBusAbstractAdaptor
59 Q_CLASSINFO("D-Bus Interface","org.bluez.AuthorizationAgent")
61 BluezBluetoothSecurityAuthorizationAgentAdaptor(BluezBluetoothSecurity
*security
);
62 ~BluezBluetoothSecurityAuthorizationAgentAdaptor();
65 //org.bluez.AuthorizationAgent
66 void Authorize(const QString
& adapter_path
, const QString
& address
,
67 const QString
& service_path
, const QString
& uuid
,const QDBusMessage
&msg
);
68 void Cancel(const QString
& adapter_path
, const QString
& address
,
69 const QString
& service_path
, const QString
& uuid
);
74 BluezBluetoothSecurity
*security
;
75 QDBusInterface
*manager
;
79 #endif // __BLUEZ_BLUETOOTHSECURITYADAPTOR_H