- fixed base agent ignoring pass in object path
[profile/ivi/bluetooth-qt.git] / bluetoothbaseagent.h
1 /*  -*- Mode: C++ -*-
2  *
3  * meego handset bluetooth
4  * Copyright © 2010, Intel Corporation.
5  *
6  * This program is licensed under the terms and conditions of the
7  * Apache License, version 2.0.  The full text of the Apache License is at
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  */
11
12 #ifndef BLUETOOTHBASEAGENT_H
13 #define BLUETOOTHBASEAGENT_H
14
15 #include <QObject>
16 #include <QDBusContext>
17 #include "bluedevice.h"
18
19 class BluetoothBaseAgent: public QObject, public QDBusContext
20 {
21         Q_OBJECT
22 public:
23         BluetoothBaseAgent(QString path="/pairing/agent", QObject *parent=0);
24 public slots:
25         virtual void authorize(OrgBluezDeviceInterface &device, QString);
26         virtual void cancel()
27         {
28                 sendErrorReply("org.bluez.Error.Canceled","The request was canceled");
29         }
30         virtual void confirmModeChange(QString);
31         virtual void displayPasskey(OrgBluezDeviceInterface &device, uint key);
32         virtual void release();
33         virtual void requestConfirmation(OrgBluezDeviceInterface &device, uint key);
34         virtual uint requestPasskey(OrgBluezDeviceInterface &device);
35         virtual QString requestPidCode(OrgBluezDeviceInterface &device);
36
37 private:
38         bool requestAccepted;
39 };
40
41 #endif // BLUETOOTHBASEAGENT_H