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
qohosbluetoothdevicediscovery_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 QOHOSBLUETOOTHDEVICEDISCOVERY_P_H
5#define QOHOSBLUETOOTHDEVICEDISCOVERY_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/qohosbluetoothaccess_p.h>
19#include <QtBluetooth/private/qohosbluetoothcommon_p.h>
20
21#include <QtCore/qobject.h>
22#include <QtCore/qtconfigmacros.h>
23#include <QtCore/qtimer.h>
24#include <QtCore/qtypes.h>
25#include <QtCore/private/qcore_ohos_p.h>
26
27#include <memory>
28#include <optional>
29#include <string>
30#include <vector>
31
32QT_BEGIN_NAMESPACE
33
34namespace QtOhosBluetooth {
35
37{
38 std::string deviceId;
39 std::string deviceName;
42
44 QOhosJsState &jsState, QNapi::Object discoveryResultObject);
45};
46
48{
50public:
52
55
58
61 void bluetoothDevicesFound(const std::vector<DiscoveryResult> &discoveredDevices);
62
67
68protected:
70
71private:
72 bool ensureDiscoveredDevicesConsumerRegistered();
73 std::optional<bool> tryCheckBluetoothDiscovering();
74 void resetDiscoveryTracking();
75
76 std::shared_ptr<QOhosBluetoothAccessProxy> m_accessProxy;
77 std::shared_ptr<void> m_discoveredDevicesConsumerHandle;
78 bool m_discoveryStartedByProxy = false;
79 QTimer m_discoveryStoppedPollTimer;
80 QTimer m_discoveryStoppedTimeoutTimer;
81};
82
83}
84
85QT_END_NAMESPACE
86
87#endif // QOHOSBLUETOOTHDEVICEDISCOVERY_P_H
void bluetoothDevicesFound(const std::vector< DiscoveryResult > &discoveredDevices)
QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY(lcQIORing)
static DiscoveryResult makeFromOhosDiscoveryResultObject(QOhosJsState &jsState, QNapi::Object discoveryResultObject)