~ubuntu-branches/ubuntu/gutsy/kdebase-workspace/gutsy-backports

« back to all changes in this revision

Viewing changes to solid/bluez/bluez-bluetoothsecurity.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2007-09-05 20:45:14 UTC
  • Revision ID: james.westby@ubuntu.com-20070905204514-632hhspl0nvrc84i
Tags: upstream-3.93.0
Import upstream version 3.93.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*  This file is part of the KDE project
 
2
    Copyright (C) 2007 Juan González <jaguilera@opsiland.info>
 
3
 
 
4
 
 
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.
 
8
 
 
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.
 
13
 
 
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.
 
18
 
 
19
*/
 
20
#ifndef BLUEZ_BLUETOOTH_SECURITY_H
 
21
#define BLUEZ_BLUETOOTH_SECURITY_H
 
22
 
 
23
#include <solid/control/ifaces/bluetoothsecurity.h>
 
24
#include <solid/control/bluetoothsecurity.h>
 
25
 
 
26
#include <QStringList>
 
27
 
 
28
/**
 
29
 * Implementation of the bluez security stuff. This is used to handle remote device pairing/authorization
 
30
 * using the BlueZ stack.
 
31
 */
 
32
class KDE_EXPORT BluezBluetoothSecurity : public Solid::Control::Ifaces::BluetoothSecurity
 
33
{
 
34
    Q_OBJECT
 
35
    Q_INTERFACES(Solid::Control::Ifaces::BluetoothSecurity)
 
36
    public:
 
37
        explicit BluezBluetoothSecurity(QObject *parent = 0);
 
38
        BluezBluetoothSecurity(const QString &interface,QObject *parent = 0);
 
39
        ~BluezBluetoothSecurity();
 
40
 
 
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);
 
49
 
 
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);
 
53
 
 
54
    public Q_SLOTS:
 
55
        void setPasskeyAgent(Solid::Control::BluetoothPasskeyAgent *agent);
 
56
        void setAuthorizationAgent(Solid::Control::BluetoothAuthorizationAgent *agent);
 
57
 
 
58
    private:
 
59
        Solid::Control::BluetoothPasskeyAgent * passkeyAgent;
 
60
        Solid::Control::BluetoothAuthorizationAgent *authAgent;
 
61
};
 
62
 
 
63
#endif