summaryrefslogtreecommitdiff
path: root/sap/sapbtlistener.h
diff options
context:
space:
mode:
Diffstat (limited to 'sap/sapbtlistener.h')
-rw-r--r--sap/sapbtlistener.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/sap/sapbtlistener.h b/sap/sapbtlistener.h
new file mode 100644
index 0000000..398eb1a
--- /dev/null
+++ b/sap/sapbtlistener.h
@@ -0,0 +1,35 @@
+#ifndef SAPBTLISTENER_H
+#define SAPBTLISTENER_H
+
+#include <QtCore/QObject>
+#include <QtBluetooth/QBluetoothServer>
+#include <QtBluetooth/QBluetoothServiceInfo>
+
+class SAPBTListener : public QObject
+{
+ Q_OBJECT
+public:
+ explicit SAPBTListener(QObject *parent = 0);
+ ~SAPBTListener();
+
+signals:
+
+public slots:
+ void start();
+ void stop();
+
+ void nudge(const QBluetoothAddress &address);
+
+private:
+
+private slots:
+ void acceptConnection();
+ void handleNudgeConnected();
+ void handleNudgeError(QBluetoothSocket::SocketError error);
+
+private:
+ QBluetoothServer *_server;
+ QBluetoothServiceInfo _service;
+};
+
+#endif // SAPBTLISTENER_H