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
qohosbluetoothaccess_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
QOHOSBLUETOOTHACCESS_P_H
5
#
define
QOHOSBLUETOOTHACCESS_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
/
qtconfigmacros
.
h
>
23
#
include
<
QtCore
/
private
/
qohoscommon_p
.
h
>
24
25
#
include
<
optional
>
26
27
QT_BEGIN_NAMESPACE
28
29
namespace
QtOhosBluetooth
{
30
31
class
QOhosBluetoothAccessProxy
:
public
QObject
32
{
33
Q_OBJECT
34
35
public
:
36
using
BluetoothState
=
QtOhosBluetooth
::
enums
::
ohos
::
bluetooth
::
access
::
BluetoothState
;
37
38
static
std
::
shared_ptr
<
QOhosBluetoothAccessProxy
>
instance
();
39
40
std
::
optional
<
BluetoothState
>
tryGetBluetoothState
()
const
;
41
std
::
optional
<
QOhosBluetoothErrorCode
>
trySetBluetoothEnabled
(
bool
enabled);
42
43
Q_SIGNALS
:
44
void
stateChanged
(
BluetoothState
state
);
45
void
missingPermission
();
46
void
setBluetoothEnabledFailed
(QOhosBluetoothErrorCode errorCode);
47
48
protected
:
49
QOhosBluetoothAccessProxy
();
50
51
private
:
52
QOhosSupplier<std::optional<BluetoothState>> m_ohosBluetoothStateSupplier;
53
};
54
55
}
56
57
QT_END_NAMESPACE
58
59
#
endif
// QOHOSBLUETOOTHACCESS_P_H
QtOhosBluetooth::QOhosBluetoothAccessProxy
Definition
qohosbluetoothaccess_p.h:32
QtOhosBluetooth::QOhosBluetoothAccessProxy::setBluetoothEnabledFailed
void setBluetoothEnabledFailed(QOhosBluetoothErrorCode errorCode)
QtOhosBluetooth::QOhosBluetoothAccessProxy::tryGetBluetoothState
std::optional< BluetoothState > tryGetBluetoothState() const
Definition
qohosbluetoothaccess.cpp:91
QtOhosBluetooth::QOhosBluetoothAccessProxy::QOhosBluetoothAccessProxy
QOhosBluetoothAccessProxy()
Definition
qohosbluetoothaccess.cpp:76
QtOhosBluetooth::QOhosBluetoothAccessProxy::trySetBluetoothEnabled
std::optional< QOhosBluetoothErrorCode > trySetBluetoothEnabled(bool enabled)
Definition
qohosbluetoothaccess.cpp:96
QtOhosBluetooth::QOhosBluetoothAccessProxy::missingPermission
void missingPermission()
QtOhosBluetooth::QOhosBluetoothAccessProxy::instance
static std::shared_ptr< QOhosBluetoothAccessProxy > instance()
Definition
qohosbluetoothaccess.cpp:85
QtOhosBluetooth
Definition
qohosbluetoothaccess.cpp:21
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
Q_DECLARE_LOGGING_CATEGORY
QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY(lcQIORing)
qtconnectivity
src
bluetooth
ohos
qohosbluetoothaccess_p.h
Generated on
for Qt by
1.16.1