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.
19 #include "bluez-bluetoothsecurity.h"
22 /*********************** BluezBluetoothSecurity ***********************/
23 BluezBluetoothSecurity::BluezBluetoothSecurity(QObject
* parent
)
24 :Solid::Control::Ifaces::BluetoothSecurity(parent
),passkeyAgent(0),authAgent(0)
26 kDebug() << k_funcinfo
<< endl
;
29 BluezBluetoothSecurity::BluezBluetoothSecurity(const QString
& interface
, QObject
* parent
)
30 :Solid::Control::Ifaces::BluetoothSecurity(interface
,parent
)
32 kDebug() << k_funcinfo
<< " interface: " << interface
<< endl
;
35 BluezBluetoothSecurity::~ BluezBluetoothSecurity()
37 kDebug() << k_funcinfo
<< endl
;
40 /*********************** methods from Solid::Control::BluetoothSecurity ***********************/
41 void BluezBluetoothSecurity::setPasskeyAgent(Solid::Control::BluetoothPasskeyAgent
* agent
)
48 void BluezBluetoothSecurity::setAuthorizationAgent(Solid::Control::BluetoothAuthorizationAgent
* agent
)
57 /**************************************************************************************/
58 QString
BluezBluetoothSecurity::request(const QString
& address
, bool numeric
)
62 out
= passkeyAgent
->requestPasskey(address
,numeric
);
67 bool BluezBluetoothSecurity::confirm(const QString
& address
, const QString
& value
)
71 out
= passkeyAgent
->confirmPasskey(address
,value
);
76 void BluezBluetoothSecurity::display(const QString
& address
, const QString
& value
)
79 passkeyAgent
->displayPasskey(address
,value
);
83 void BluezBluetoothSecurity::complete(const QString
& address
)
86 passkeyAgent
->completedAuthentication(address
);
90 void BluezBluetoothSecurity::keypress(const QString
& address
)
93 passkeyAgent
->keypress(address
);
97 void BluezBluetoothSecurity::cancel(const QString
& address
)
100 passkeyAgent
->cancelAuthentication( address
);
104 bool BluezBluetoothSecurity::authorize(const QString
& localUbi
, const QString
& remoteAddress
, const QString
& serviceUuid
)
108 out
= authAgent
->authorize(localUbi
,remoteAddress
,serviceUuid
);
113 void BluezBluetoothSecurity::cancel(const QString
& localUbi
, const QString
& remoteAddress
, const QString
& serviceUuid
)
116 authAgent
->cancel(localUbi
,remoteAddress
,serviceUuid
);
120 #include "bluez-bluetoothsecurity.moc"