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
bluezperipheralconnectionmanager_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 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 BLUEZ_PERIPHERAL_CONNECTION_MANAGER_P_H
5#define BLUEZ_PERIPHERAL_CONNECTION_MANAGER_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/QBluetoothAddress>
19#include <QtBluetooth/QBluetoothUuid>
20#include <QtCore/QObject>
21
23
25
26/*
27 QtBluezPeripheralConnectionManager determines
28 - when remote Gatt client(s) connect and disconnect
29 - the remote device details (name, address, mtu)
30
31 'Connected' state is assumed when first client reads a characteristic.
32 'Disconnected' state is assumed when all such clients have disconnected.
33*/
34
36{
38public:
40 QObject* parent = nullptr);
41 void reset();
42 void disconnectDevices();
43
44public slots:
45 void remoteDeviceAccessEvent(const QString& remoteDeviceObjectPath, quint16 mtu);
46
50
51private slots:
52 void remoteDeviceDisconnected(const QBluetoothAddress& address);
53
54private:
55 struct RemoteDeviceDetails {
58 quint16 mtu;
59 };
60 bool m_connected{false};
61 QString m_hostAdapterPath;
62 QMap<QString, RemoteDeviceDetails> m_clients;
63 QBluetoothLocalDevice* m_localDevice;
64};
65
67
68#endif
bool connected
\inmodule QtBluetooth
\inmodule QtBluetooth
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
void connectivityStateChanged(bool connected)
void remoteDeviceAccessEvent(const QString &remoteDeviceObjectPath, quint16 mtu)
QtBluezPeripheralConnectionManager(const QBluetoothAddress &localAddress, QObject *parent=nullptr)
void remoteDeviceChanged(const QBluetoothAddress &address, const QString &name, quint16 mtu)
Combined button and popup list for selecting options.
GLuint name
GLuint GLuint64EXT address
#define Q_OBJECT
#define slots
#define signals
unsigned short quint16
Definition qtypes.h:48