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
bluez5_helper_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 BLUEZ5_HELPER_H
5#define BLUEZ5_HELPER_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 <QtCore/QObject>
19#include <QtDBus/QtDBus>
20#include <QtBluetooth/QBluetoothUuid>
21#include <QtBluetooth/QBluetoothAddress>
22#include <QtBluetooth/private/qtbluetoothglobal_p.h>
23
28
29QT_DECL_METATYPE_EXTERN(InterfaceList, /* not exported */)
30QT_DECL_METATYPE_EXTERN(ManufacturerDataList, /* not exported */)
31QT_DECL_METATYPE_EXTERN(ServiceDataList, /* not exported */)
32QT_DECL_METATYPE_EXTERN(ManagedObjectList, /* not exported */)
33
34QT_BEGIN_NAMESPACE
35
36void initializeBluez5();
37bool isBluez5();
38
39// exported for unit test purposes
40Q_BLUETOOTH_EXPORT QVersionNumber bluetoothdVersion();
41
42QString sanitizeNameForDBus(const QString& text);
43
44QString findAdapterForAddress(const QBluetoothAddress &wantedAddress, bool *ok);
45
46QString adapterWithDBusPeripheralInterface(const QBluetoothAddress &localAddress);
47
50{
52public:
56
57 bool registerDiscoveryInterest(const QString &adapterPath);
58 void unregisterDiscoveryInterest(const QString &adapterPath);
59
60 //void dumpState() const;
61
64
65private slots:
67 const QStringList &interfaces);
68 void PropertiesChanged(const QString &interface,
69 const QVariantMap &changed_properties,
70 const QStringList &invalidated_properties,
71 const QDBusMessage &msg);
72
73private:
74 void removeAdapterFromMonitoring(const QString &dbusPath);
75
77};
78
79QT_END_NAMESPACE
80
81#endif
QString adapterWithDBusPeripheralInterface(const QBluetoothAddress &localAddress)
QString sanitizeNameForDBus(const QString &text)
QString findAdapterForAddress(const QBluetoothAddress &wantedAddress, bool *ok=nullptr)
Bluez5TestResultType
@ BluezVersion5
@ BluezNotAvailable
@ BluezVersionUnknown
QMap< QDBusObjectPath, InterfaceList > ManagedObjectList
bool isBluez5()
QMap< QString, QVariantMap > InterfaceList
QMap< QString, QDBusVariant > ServiceDataList
QMap< quint16, QDBusVariant > ManufacturerDataList
#define HCIGETDEVLIST
#define HCIGETCONNLIST
#define HCI_MAX_DEV
#define BTPROTO_HCI
#define HCIGETDEVINFO
QObject * parent
Definition qobject.h:73
\inmodule QtCore
Definition qobject.h:105
QMap< QString, AdapterData * > references
OrgFreedesktopDBusObjectManagerInterface * manager
static QtBluezDiscoveryManager * instance()
bool registerDiscoveryInterest(const QString &adapterPath)
void unregisterDiscoveryInterest(const QString &adapterPath)