Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / workspace / solid / bluez / bluez-bluetoothsecurityadaptor.h
blob8879bcbe5fc22fac91c897cec78b1e8f356b9d33
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"
27 #include <QtDBus>
29 /**
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
35 Q_OBJECT
36 Q_CLASSINFO("D-Bus Interface","org.bluez.PasskeyAgent")
37 public:
38 BluezBluetoothSecurityPasskeyAgentAdaptor(BluezBluetoothSecurity *security);
39 ~BluezBluetoothSecurityPasskeyAgentAdaptor();
40 public Q_SLOTS:
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);
49 void Release();
50 private:
51 QString serviceName;
52 BluezBluetoothSecurity *security;
53 QDBusInterface *manager;
54 QDBusConnection conn;
56 class BluezBluetoothSecurityAuthorizationAgentAdaptor: public QDBusAbstractAdaptor
58 Q_OBJECT
59 Q_CLASSINFO("D-Bus Interface","org.bluez.AuthorizationAgent")
60 public:
61 BluezBluetoothSecurityAuthorizationAgentAdaptor(BluezBluetoothSecurity *security);
62 ~BluezBluetoothSecurityAuthorizationAgentAdaptor();
63 public Q_SLOTS:
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);
71 void Release();
72 private:
73 QString serviceName;
74 BluezBluetoothSecurity *security;
75 QDBusInterface *manager;
76 QDBusConnection conn;
79 #endif // __BLUEZ_BLUETOOTHSECURITYADAPTOR_H