blob: 50ee1deefb5875a9792c0f7fb5951b170036911d (
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
36
37
38
39
|
#ifndef BLUETOOTHGPSSERVER_H
#define BLUETOOTHGPSSERVER_H
#include <QtCore/QObject>
#include <QtCore/QList>
#include <QtBluetooth/QBluetoothSocket>
#include <QtBluetooth/QBluetoothServiceInfo>
#include <QtBluetooth/QBluetoothServer>
class NmeaSource;
class BluetoothGpsServer : public QObject
{
Q_OBJECT
public:
explicit BluetoothGpsServer(uint m_port, QObject *parent = 0);
~BluetoothGpsServer();
signals:
public slots:
void start();
void stop();
protected slots:
void sendData(const QString& data);
void acceptConnection();
void handleDisconnection();
private:
uint m_port;
NmeaSource* m_source;
QBluetoothServiceInfo m_service;
QBluetoothServer* m_server;
QList<QBluetoothSocket*> m_clients;
};
#endif // BLUETOOTHGPSSERVER_H
|