Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qohosbluetoothserver_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
QOHOSBLUETOOTHSERVER_P_H
5
#
define
QOHOSBLUETOOTHSERVER_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
20
#
include
<
QtCore
/
qobject
.
h
>
21
#
include
<
QtCore
/
qstring
.
h
>
22
#
include
<
QtCore
/
qtconfigmacros
.
h
>
23
24
#
include
<
cstdint
>
25
#
include
<
memory
>
26
#
include
<
optional
>
27
28
QT_BEGIN_NAMESPACE
29
30
namespace
QtOhosBluetooth
{
31
32
class
QOhosBluetoothServerProxy
33
:
public
QObject
,
public
std
::
enable_shared_from_this
<
QOhosBluetoothServerProxy
>
34
{
35
Q_OBJECT
36
public
:
37
QOhosBluetoothServerProxy
();
38
39
bool
listen
(
const
QString &serviceName,
const
QString &uuid,
bool
secure);
40
bool
accept
();
41
void
close
();
42
bool
isServiceRegistered
()
const
;
43
std
::
optional
<
QString
>
tryGetRegisteredServiceName
()
const
;
44
std
::optional<
std
::
uint64_t
>
tryGetRegisteredServiceId
()
const
;
45
46
Q_SIGNALS
:
47
void
clientAccepted
(
int
clientSocketDescriptor
);
48
void
acceptingStopped
();
49
void
errorOccurred
(QOhosBluetoothErrorCode errorCode);
50
51
private
:
52
void
onClientAccepted(
std
::shared_ptr<
int
> clientSocketHandle);
53
void
onAcceptFailed(QOhosBluetoothErrorCode errorCode);
54
void
acceptNextConnection();
55
void
scheduleAcceptNextConnection();
56
void
reportError(QOhosBluetoothErrorCode errorCode);
57
void
reportAcceptingStopped();
58
59
std
::shared_ptr<
int
> m_serverSocketHandle;
60
std::optional<QString> m_registeredServiceName;
61
std
::optional<
std
::uint64_t> m_optRegisteredServiceId;
62
std
::uint64_t m_registeredServicesCounter = 0;
63
};
64
65
}
66
67
QT_END_NAMESPACE
68
69
#
endif
// QOHOSBLUETOOTHSERVER_P_H
QtOhosBluetooth::QOhosBluetoothServerProxy
Definition
qohosbluetoothserver_p.h:34
QtOhosBluetooth::QOhosBluetoothServerProxy::tryGetRegisteredServiceId
std::optional< std::uint64_t > tryGetRegisteredServiceId() const
Definition
qohosbluetoothserver.cpp:311
QtOhosBluetooth::QOhosBluetoothServerProxy::close
void close()
Definition
qohosbluetoothserver.cpp:289
QtOhosBluetooth::QOhosBluetoothServerProxy::isServiceRegistered
bool isServiceRegistered() const
Definition
qohosbluetoothserver.cpp:301
QtOhosBluetooth::QOhosBluetoothServerProxy::tryGetRegisteredServiceName
std::optional< QString > tryGetRegisteredServiceName() const
Definition
qohosbluetoothserver.cpp:306
QtOhosBluetooth::QOhosBluetoothServerProxy::errorOccurred
void errorOccurred(QOhosBluetoothErrorCode errorCode)
QtOhosBluetooth::QOhosBluetoothServerProxy::listen
bool listen(const QString &serviceName, const QString &uuid, bool secure)
Definition
qohosbluetoothserver.cpp:55
QtOhosBluetooth::QOhosBluetoothServerProxy::accept
bool accept()
Definition
qohosbluetoothserver.cpp:134
QtOhosBluetooth::QOhosBluetoothServerProxy::acceptingStopped
void acceptingStopped()
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QtOhosBluetooth
Definition
qohosbluetoothaccess.cpp:21
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
qtconnectivity
src
bluetooth
ohos
qohosbluetoothserver_p.h
Generated on
for Qt by
1.18.0