Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qbluetoothserviceinfo_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 QBLUETOOTHSERVICEINFO_P_H
5#define QBLUETOOTHSERVICEINFO_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 "qbluetoothuuid.h"
19#include "qbluetoothaddress.h"
22
23#include <QMap>
24#include <QVariant>
25
26#ifdef Q_OS_MACOS
27#include "darwin/btraii_p.h"
28#endif
29
30class OrgBluezServiceInterface;
32
33#ifdef QT_WINRT_BLUETOOTH
34#include <wrl.h>
35
36namespace ABI {
37 namespace Windows {
38 namespace Devices {
39 namespace Bluetooth {
40 namespace Rfcomm {
41 struct IRfcommServiceProvider;
42 }
43 }
44 }
45 }
46}
47#endif
48
50
52
53
55 : public QObject
56{
58public:
61
62 bool registerService(const QBluetoothAddress &localAdapter = QBluetoothAddress());
63
64 bool isRegistered() const;
65
66 bool unregisterService();
67
69 QMap<quint16, QVariant> attributes;
70
72 int serverChannel() const;
73private:
74#if QT_CONFIG(bluez)
75 OrgBluezProfileManager1Interface *service = nullptr;
76 quint32 serviceRecord;
77 QBluetoothAddress currentLocalAdapter;
78 QString profilePath;
79#endif
80
81#ifdef QT_WINRT_BLUETOOTH
83
84 bool writeSdpAttributes();
85#endif
86
87#if QT_OSX_BLUETOOTH
88public:
90
91private:
92
93 using SDPRecord = DarwinBluetooth::ScopedPointer;
94 SDPRecord serviceRecord;
95 quint32 serviceRecordHandle = 0;
96#endif // QT_OSX_BLUETOOTH
97
98 mutable bool registered = false;
99};
100
102
103#endif // QBLUETOOTHSERVICEINFO_P_H
\inmodule QtBluetooth
\inmodule QtBluetooth
QBluetoothServiceInfo::Sequence protocolDescriptor(QBluetoothUuid::ProtocolUuid protocol) const
QMap< quint16, QVariant > attributes
bool registerService(const QBluetoothAddress &localAdapter=QBluetoothAddress())
\inmodule QtBluetooth
ProtocolUuid
This enum is a convienience type for Bluetooth protocol UUIDs.
\inmodule QtCore
Definition qobject.h:103
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
#define Q_OBJECT
unsigned int quint32
Definition qtypes.h:50
QHostInfo info
[0]