f9fdcefc56a81c1a2cd2de417146661dcc9b8d77
[profile/ivi/bluetooth-qt.git] / asyncagent.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 ASYNCAGENT_H
13 #define ASYNCAGENT_H
14
15 #include "bluetoothbaseagent.h"
16
17 class AsyncAgent : public BluetoothBaseAgent
18 {
19     Q_OBJECT
20 public:
21         explicit AsyncAgent(QString path, QObject *parent = 0);
22
23         void requestConfirmation(OrgBluezDeviceInterface &device, uint key);
24         uint requestPasskey(OrgBluezDeviceInterface &device);
25         QString requestPidCode(OrgBluezDeviceInterface &device);
26         void release();
27
28 signals:
29
30 public slots:
31         void replyRequestConfirmation(bool confirmed);
32         void replyPasskey(uint passkey);
33         void replyRequestPidCode(QString pidCode);
34
35 private:
36         QDBusMessage pendingMessage;
37         QDBusConnection m_connection;
38
39 };
40
41 #endif // ASYNCAGENT_H