summaryrefslogtreecommitdiff
path: root/sapbtlistener.h
blob: 398eb1a419327e791fd6c64e8bfaf9ddbcc33775 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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