23#include <QBluetoothDeviceInfo>
24#include <QBluetoothPermission>
25#include <QBluetoothSocket>
27#include "traffic/TrafficDataSource_AbstractSocket.h"
29using namespace Qt::Literals::StringLiterals;
80 [[nodiscard]] QString
dataFormat()
const override {
return u
"FLARM/NMEA"_s; }
89 [[nodiscard]] QString
icon()
const override {
return u
"/icons/material/ic_bluetooth.svg"_s; }
127 void onErrorOccurred(QBluetoothSocket::SocketError error);
130 void onStateChanged(QBluetoothSocket::SocketState state);
139 QBluetoothDeviceInfo m_info;
142 QBluetoothPermission m_bluetoothPermission;
145 QBluetoothSocket m_socket {QBluetoothServiceInfo::RfcommProtocol};
148 QTextStream m_textStream {&m_socket};
TrafficDataSource_AbstractSocket(bool isCanonical, QObject *parent)
Default constructor.
QBluetoothDeviceInfo sourceInfo
Source info.
void connectToTrafficReceiver() override
Start attempt to connect to traffic receiver.
QString dataFormat() const override
Getter function for the property with the same name.
void disconnectFromTrafficReceiver() override
Disconnect from traffic receiver.
QString sourceName() const override
Getter function for the property with the same name.
TrafficDataSource_BluetoothClassic(bool isCanonical, const QBluetoothDeviceInfo &info, QObject *parent)
Default constructor.
QString icon() const override
Getter function for the property with the same name.
QBluetoothDeviceInfo sourceInfo() const
Getter function for the property with the same name.