Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qohosbluetoothremotedevice_p.h
Go to the documentation of this file.
1// Copyright (C) 2026 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QOHOSBLUETOOTHREMOTEDEVICE_P_H
5#define QOHOSBLUETOOTHREMOTEDEVICE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtBluetooth/private/qohosbluetoothcommon_p.h>
19#include <QtBluetooth/private/qohosbluetoothenums_p.h>
20
21#include <QtCore/qobject.h>
22#include <QtCore/qstring.h>
23#include <QtCore/qstringlist.h>
24#include <QtCore/qtconfigmacros.h>
25
26#include <memory>
27#include <optional>
28#include <string>
29#include <vector>
30
31QT_BEGIN_NAMESPACE
32
33namespace QtOhosBluetooth {
34
43
45{
47public:
52
53 static std::shared_ptr<QOhosBluetoothRemoteDeviceProxy> instance();
54
55 std::optional<QString> tryGetRemoteDeviceName(const QString &deviceId);
56 std::optional<BondState> tryGetPairState(const QString &deviceId);
57
58 bool pairDevice(const QString &deviceId);
60
63 void pairDeviceFailed(QString deviceId);
66
67protected:
69
70private:
71 bool ensureBondStateChangeConsumerRegistered();
72
73 std::shared_ptr<void> m_bondStateChangeConsumerHandle;
74};
75
76std::optional<std::string> readRemoteDeviceName(QOhosJsState &jsState, const std::string &deviceId);
77std::optional<quint32> readRemoteDeviceClass(QOhosJsState &jsState, const std::string &deviceId);
79 QOhosJsState &jsState, const std::string &deviceId);
80bool isRemoteDeviceLowEnergyOnly(QOhosJsState &jsState, const std::string &deviceId);
81
82}
83
84QT_END_NAMESPACE
85
86#endif // QOHOSBLUETOOTHREMOTEDEVICE_P_H
std::optional< QString > tryGetRemoteDeviceName(const QString &deviceId)
std::optional< QOhosBluetoothErrorCode > requestRemoteDeviceServices(const QString &deviceId)
std::optional< BondState > tryGetPairState(const QString &deviceId)
static std::shared_ptr< QOhosBluetoothRemoteDeviceProxy > instance()
void remoteDeviceServicesRead(RemoteDeviceServices remoteDeviceServices)
Combined button and popup list for selecting options.
bool isRemoteDeviceLowEnergyOnly(QOhosJsState &jsState, const std::string &deviceId)
std::optional< quint32 > readRemoteDeviceClass(QOhosJsState &jsState, const std::string &deviceId)
std::optional< QOhosBluetoothRemoteDeviceProxy::BluetoothTransport > readRemoteDeviceTransport(QOhosJsState &jsState, const std::string &deviceId)
std::optional< std::string > readRemoteDeviceName(QOhosJsState &jsState, const std::string &deviceId)
std::optional< std::vector< std::string > > optProfileUuids