reorganized bluetooth-qt and added declarative plugin
[profile/ivi/bluetooth-qt.git] / bluetooth-qt / 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="", QObject *parent=0);
24 public slots:
25         virtual void authorize(OrgBluezDeviceInterface &device, QString);
26         virtual void registerAgent();
27         virtual void cancel()
28         {
29                 sendErrorReply("org.bluez.Error.Canceled","The request was canceled");
30         }
31         virtual void confirmModeChange(QString);
32         virtual void displayPasskey(OrgBluezDeviceInterface &device, uint key, uint entered);
33         virtual void release();
34         virtual void requestConfirmation(OrgBluezDeviceInterface &device, uint key);
35         virtual uint requestPasskey(OrgBluezDeviceInterface &device);
36         virtual QString requestPidCode(OrgBluezDeviceInterface &device);
37
38 private:
39         bool requestAccepted;
40         QString m_path;
41 };
42
43 #endif // BLUETOOTHBASEAGENT_H