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
qlowenergydescriptordata.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 QLOWENERGYDESCRIPTORDATA_H
5#define QLOWENERGYDESCRIPTORDATA_H
6
7#include <QtBluetooth/qbluetooth.h>
8#include <QtBluetooth/qbluetoothuuid.h>
9#include <QtCore/qshareddata.h>
10
12
13class QByteArray;
15
16class Q_BLUETOOTH_EXPORT QLowEnergyDescriptorData
17{
18public:
21 const QByteArray &value);
24
27 {
28 return equals(a, b);
29 }
30
32 {
33 return !equals(a, b);
34 }
35
36 QByteArray value() const;
37 void setValue(const QByteArray &value);
38
39 QBluetoothUuid uuid() const;
40 void setUuid(const QBluetoothUuid &uuid);
41
42 bool isValid() const;
43
44 void setReadPermissions(bool readable,
45 QBluetooth::AttAccessConstraints constraints = QBluetooth::AttAccessConstraints());
46 bool isReadable() const;
47 QBluetooth::AttAccessConstraints readConstraints() const;
48
49 void setWritePermissions(bool writable,
50 QBluetooth::AttAccessConstraints constraints = QBluetooth::AttAccessConstraints());
51 bool isWritable() const;
52 QBluetooth::AttAccessConstraints writeConstraints() const;
53
54 void swap(QLowEnergyDescriptorData &other) noexcept { d.swap(other.d); }
55
56private:
57 static bool equals(const QLowEnergyDescriptorData &a, const QLowEnergyDescriptorData &b);
58 QSharedDataPointer<QLowEnergyDescriptorDataPrivate> d;
59};
60
61Q_DECLARE_SHARED(QLowEnergyDescriptorData)
62
64
65#endif // Include guard.
\inmodule QtBluetooth
\inmodule QtCore
Definition qbytearray.h:57
The QLowEnergyDescriptorData class is used to create GATT service data. \inmodule QtBluetooth.
friend bool operator!=(const QLowEnergyDescriptorData &a, const QLowEnergyDescriptorData &b)
Returns true if a and b are unequal with respect to their public state, otherwise returns false.
friend bool operator==(const QLowEnergyDescriptorData &a, const QLowEnergyDescriptorData &b)
Returns true if a and b are equal with respect to their public state, otherwise returns false.
void swap(QLowEnergyDescriptorData &other) noexcept
Swaps this object with other.
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
[7]
return device isReadable() ? device -> read(static_cast< char * >(buf), size) :-1
settings setValue("DataPump/bgcolor", color)
QSharedPointer< T > other(t)
[5]