NDEVR
API Documentation
BluetoothManager.h
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/Connection.h>
4#include "Base/Headers/Buffer.hpp"
5#include "Base/Headers/String.h"
6#include "Base/Headers/TimeSpan.h"
7#include <QObject>
8#include <QBluetoothServiceInfo>
9#include <QBluetoothDeviceInfo>
10class QBluetoothAddress;
11class QBluetoothUuid;
12namespace NDEVR
13{
14 class InfoPipe;
19 class NDEVR_BLUETOOTH_API BluetoothManager : public QObject
20 {
21 Q_OBJECT
22 public:
27 static BluetoothManager& DefaultManager();
33 Buffer<String> ToBTDConnectionStrings(const QBluetoothDeviceInfo& device);
39 void LogBluetoothDiscoveryError(int error, LogPtr log);
45 Buffer<QBluetoothDeviceInfo> BluetoothDeviceInfo(const ConnectionSearchParameters& params);
51 Buffer<QBluetoothServiceInfo> BluetoothServiceInfo(const ConnectionSearchParameters& params);
58 Buffer<QBluetoothServiceInfo> BluetoothServiceInfo(const QBluetoothAddress& device, const ConnectionSearchParameters& params);
65 Buffer<QBluetoothServiceInfo> BluetoothServiceInfo(const ConnectionInfo& device, const ConnectionSearchParameters& params);
71 static TranslatedString ErrorMessage(int error);
77 static ConnectionInfo ConvertFromDeviceInfo(const QBluetoothDeviceInfo& info);
83 static ConnectionInfo ConvertFromServiceInfo(const QBluetoothServiceInfo& info);
84 signals:
89 void bluetoothErrorSignal(int error);
90 };
91
92 template class NDEVR_BLUETOOTH_API StringStream<QBluetoothUuid>;
93 template class NDEVR_BLUETOOTH_API StringStream<QBluetoothServiceInfo>;
94 template class NDEVR_BLUETOOTH_API StringStream<QBluetoothAddress>;
95}
A light-weight base class for Log that allows processes to update, without the need for additional in...
Logic for reading or writing to a string or a user friendly, TranslatedString.
The primary namespace for the NDEVR SDK.