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
qlowenergyserviceprivate_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 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 QLOWENERGYSERVICEPRIVATE_P_H
5#define QLOWENERGYSERVICEPRIVATE_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 <QtCore/QObject>
19#include <QtCore/QPointer>
20#include <QtBluetooth/qbluetooth.h>
21#include <QtBluetooth/QLowEnergyService>
22#include <QtBluetooth/QLowEnergyCharacteristic>
23#include <QtCore/private/qglobal_p.h>
24
25#if defined(QT_ANDROID_BLUETOOTH)
26#include <QtCore/QJniObject>
27#endif
28
30
32
34{
36public:
39
44
45 struct CharData {
48 QLowEnergyCharacteristic::PropertyTypes properties;
50 QHash<QLowEnergyHandle, DescData> descriptorList;
51 };
52
59
63
68 const QByteArray &newValue);
70 const QByteArray &value);
72 const QByteArray &newValue);
74 const QByteArray &value);
76 const QByteArray &newValue);
77
78public:
81
83 QList<QBluetoothUuid> includedServices;
84 QLowEnergyService::ServiceTypes type = QLowEnergyService::PrimaryService;
88
89 QHash<QLowEnergyHandle, CharData> characteristicList;
90
91 QPointer<QLowEnergyControllerPrivate> controller;
92
93#if defined(QT_ANDROID_BLUETOOTH)
94 // reference to the BluetoothGattService object
95 QJniObject androidService;
96#endif
97
98};
99
100typedef QHash<QLowEnergyHandle, QLowEnergyServicePrivate::CharData> CharacteristicDataMap;
101typedef QHash<QLowEnergyHandle, QLowEnergyServicePrivate::DescData> DescriptorDataMap;
102
104
105QT_DECL_METATYPE_EXTERN_TAGGED(QSharedPointer<QLowEnergyServicePrivate>,
106 QSharedPointer_QLowEnergyServicePrivate,
107 /* not exported */)
108
109#endif // QLOWENERGYSERVICEPRIVATE_P_H
\inmodule QtBluetooth
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore
\inmodule QtBluetooth
void characteristicWritten(const QLowEnergyCharacteristic &characteristic, const QByteArray &newValue)
QList< QBluetoothUuid > includedServices
void setController(QLowEnergyControllerPrivate *control)
void characteristicChanged(const QLowEnergyCharacteristic &characteristic, const QByteArray &newValue)
void characteristicRead(const QLowEnergyCharacteristic &info, const QByteArray &value)
void descriptorWritten(const QLowEnergyDescriptor &descriptor, const QByteArray &newValue)
void descriptorRead(const QLowEnergyDescriptor &info, const QByteArray &value)
QLowEnergyService::ServiceError lastError
void setError(QLowEnergyService::ServiceError newError)
QPointer< QLowEnergyControllerPrivate > controller
void stateChanged(QLowEnergyService::ServiceState newState)
void errorOccurred(QLowEnergyService::ServiceError error)
void setState(QLowEnergyService::ServiceState newState)
QLowEnergyService::ServiceState state
QLowEnergyServicePrivate(QObject *parent=nullptr)
QHash< QLowEnergyHandle, CharData > characteristicList
DiscoveryMode
This enum lists service discovery modes.
ServiceError
This enum describes all possible error conditions during the service's existence.
ServiceState
This enum describes the \l state() of the service object.
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
void newState(QList< State > &states, const char *token, const char *lexem, bool pre)
Combined button and popup list for selecting options.
quint16 QLowEnergyHandle
Definition qbluetooth.h:42
DBusConnection const char DBusError * error
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
QHash< QLowEnergyHandle, QLowEnergyServicePrivate::CharData > CharacteristicDataMap
QHash< QLowEnergyHandle, QLowEnergyServicePrivate::DescData > DescriptorDataMap
#define QT_DECL_METATYPE_EXTERN_TAGGED(TYPE, TAG, EXPORT)
Definition qmetatype.h:1376
GLenum mode
GLenum type
#define Q_OBJECT
#define signals
QHostInfo info
[0]
QHash< QLowEnergyHandle, DescData > descriptorList
QLowEnergyCharacteristic::PropertyTypes properties