diff options
author | Javier <dev.git@javispedro.com> | 2014-06-29 17:32:54 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2014-06-29 17:32:54 +0200 |
commit | 3b5fc081c8d22fac73db0fbe63eb2058595d43f6 (patch) | |
tree | dec9d497ee7db895fbb9b68ecdce70a095cf2003 /bluetoothgpsserver.h | |
download | btgpsd-3b5fc081c8d22fac73db0fbe63eb2058595d43f6.tar.gz btgpsd-3b5fc081c8d22fac73db0fbe63eb2058595d43f6.zip |
initial import
Diffstat (limited to 'bluetoothgpsserver.h')
-rw-r--r-- | bluetoothgpsserver.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/bluetoothgpsserver.h b/bluetoothgpsserver.h new file mode 100644 index 0000000..db5c25b --- /dev/null +++ b/bluetoothgpsserver.h @@ -0,0 +1,41 @@ +#ifndef BLUETOOTHGPSSERVER_H +#define BLUETOOTHGPSSERVER_H + +#include <QtCore/QObject> +#include <QtCore/QList> + +#include <QtBluetooth/QBluetoothSocket> +#include <QtBluetooth/QBluetoothServiceInfo> +#include <QtBluetooth/QRfcommServer> + +QT_USE_NAMESPACE_BLUETOOTH + +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; + QRfcommServer* m_server; + QList<QBluetoothSocket*> m_clients; +}; + +#endif // BLUETOOTHGPSSERVER_H |