summaryrefslogtreecommitdiff
path: root/sap/sapbtlistener.h
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2016-01-01 22:05:42 +0100
committerJavier <dev.git@javispedro.com>2016-01-01 22:05:42 +0100
commita45977185a485624095bff1a15024e9199eee676 (patch)
tree6cc57d085bdd01e493477c870dbe0548137998e1 /sap/sapbtlistener.h
parenta24034bdfea259cdc09c74217be75d4f9de0dce5 (diff)
downloadsapd-a45977185a485624095bff1a15024e9199eee676.tar.gz
sapd-a45977185a485624095bff1a15024e9199eee676.zip
reorganize source files into SAP and agents
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