• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

SolidModules

bluez-bluetoothsecurity.cpp

Go to the documentation of this file.
00001 /*  This file is part of the KDE project
00002     Copyright (C) 2007 Juan González <jaguilera@opsiland.info>
00003 
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License version 2 as published by the Free Software Foundation.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to
00016     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017     Boston, MA 02110-1301, USA.
00018 */
00019 #include "bluez-bluetoothsecurity.h"
00020 #include <kdebug.h>
00021 
00022 /*********************** BluezBluetoothSecurity ***********************/
00023 BluezBluetoothSecurity::BluezBluetoothSecurity(QObject * parent)
00024     :Solid::Control::Ifaces::BluetoothSecurity(parent),passkeyAgent(0),authAgent(0)
00025 {
00026     kDebug() << k_funcinfo << endl; 
00027 }
00028 
00029 BluezBluetoothSecurity::BluezBluetoothSecurity(const QString & interface, QObject * parent)
00030     :Solid::Control::Ifaces::BluetoothSecurity(interface,parent)
00031 {
00032     kDebug() << k_funcinfo << " interface: " << interface << endl; 
00033 }
00034 
00035 BluezBluetoothSecurity::~ BluezBluetoothSecurity()
00036 {
00037     kDebug() << k_funcinfo << endl; 
00038 }
00039 
00040 /*********************** methods from Solid::Control::BluetoothSecurity ***********************/
00041 void BluezBluetoothSecurity::setPasskeyAgent(Solid::Control::BluetoothPasskeyAgent * agent)
00042 {
00043     if (passkeyAgent) {
00044         delete passkeyAgent;
00045     }
00046     passkeyAgent = agent;
00047 }
00048 void BluezBluetoothSecurity::setAuthorizationAgent(Solid::Control::BluetoothAuthorizationAgent * agent)
00049 {
00050     if (authAgent) {
00051         delete authAgent;
00052     }
00053     authAgent = agent;
00054 }
00055 
00056 
00057 /**************************************************************************************/
00058 QString BluezBluetoothSecurity::request(const QString & address, bool numeric)
00059 {
00060     QString out;
00061     if (passkeyAgent) {
00062         out = passkeyAgent->requestPasskey(address,numeric);
00063     }
00064     return out;
00065 }
00066 
00067 bool BluezBluetoothSecurity::confirm(const QString & address, const QString & value)
00068 {
00069     bool out = false;
00070     if (passkeyAgent) {
00071         out = passkeyAgent->confirmPasskey(address,value);
00072     }
00073     return out;
00074 }
00075 
00076 void BluezBluetoothSecurity::display(const QString & address, const QString & value)
00077 {
00078     if (passkeyAgent) {
00079         passkeyAgent->displayPasskey(address,value);
00080     }
00081 }
00082 
00083 void BluezBluetoothSecurity::complete(const QString & address)
00084 {
00085     if (passkeyAgent) {
00086         passkeyAgent->completedAuthentication(address);
00087     }
00088 }
00089 
00090 void BluezBluetoothSecurity::keypress(const QString & address)
00091 {
00092     if (passkeyAgent) {
00093         passkeyAgent->keypress(address);
00094     }
00095 }
00096 
00097 void BluezBluetoothSecurity::cancel(const QString & address)
00098 {
00099     if (passkeyAgent) {
00100         passkeyAgent->cancelAuthentication(  address);
00101     }
00102 }
00103 
00104 bool BluezBluetoothSecurity::authorize(const QString & localUbi, const QString & remoteAddress, const QString & serviceUuid)
00105 {
00106     bool out = false;
00107     if (authAgent) {
00108         out = authAgent->authorize(localUbi,remoteAddress,serviceUuid);
00109     }
00110     return out;
00111 }
00112 
00113 void BluezBluetoothSecurity::cancel(const QString & localUbi, const QString & remoteAddress, const QString & serviceUuid)
00114 {
00115     if (authAgent) {
00116         authAgent->cancel(localUbi,remoteAddress,serviceUuid);
00117     }
00118 }
00119 
00120 #include "bluez-bluetoothsecurity.moc"

SolidModules

Skip menu "SolidModules"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal