![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QLowEnergyDescriptorData class is used to create GATT service data. \inmodule QtBluetooth. More...
#include <qlowenergydescriptordata.h>
Public Member Functions | |
QLowEnergyDescriptorData () | |
Creates a new invalid object of this class. | |
QLowEnergyDescriptorData (const QBluetoothUuid &uuid, const QByteArray &value) | |
Creates a new object of this class with UUID and value being provided by uuid and value, respectively. | |
QLowEnergyDescriptorData (const QLowEnergyDescriptorData &other) | |
Constructs a new object of this class that is a copy of other. | |
~QLowEnergyDescriptorData () | |
Destroys this object. | |
QLowEnergyDescriptorData & | operator= (const QLowEnergyDescriptorData &other) |
Makes this object a copy of other and returns the new value of this object. | |
QByteArray | value () const |
Returns the value of this descriptor. | |
void | setValue (const QByteArray &value) |
Sets the value of this descriptor to value. | |
QBluetoothUuid | uuid () const |
Returns the UUID of this descriptor. | |
void | setUuid (const QBluetoothUuid &uuid) |
Sets the UUID of this descriptor to uuid. | |
bool | isValid () const |
Returns true if and only if this object has a non-null UUID. | |
void | setReadPermissions (bool readable, QBluetooth::AttAccessConstraints constraints=QBluetooth::AttAccessConstraints()) |
Specifies whether the value of this descriptor is readable and if so, under which constraints. | |
bool | isReadable () const |
Returns true if the value of this descriptor is readable and false otherwise. | |
QBluetooth::AttAccessConstraints | readConstraints () const |
Returns the constraints under which the value of this descriptor can be read. | |
void | setWritePermissions (bool writable, QBluetooth::AttAccessConstraints constraints=QBluetooth::AttAccessConstraints()) |
Specifies whether the value of this descriptor is writable and if so, under which constraints. | |
bool | isWritable () const |
Returns true if the value of this descriptor is writable and false otherwise. | |
QBluetooth::AttAccessConstraints | writeConstraints () const |
Returns the constraints under which the value of this descriptor can be written. | |
void | swap (QLowEnergyDescriptorData &other) noexcept |
Swaps this object with other. | |
Friends | |
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 . | |
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 . | |
The QLowEnergyDescriptorData class is used to create GATT service data. \inmodule QtBluetooth.
An object of this class provides a descriptor to be added to a \l QLowEnergyCharacteristicData object via \l QLowEnergyCharacteristicData::addDescriptor().
Definition at line 16 of file qlowenergydescriptordata.h.
QLowEnergyDescriptorData::QLowEnergyDescriptorData | ( | ) |
Creates a new invalid object of this class.
Definition at line 42 of file qlowenergydescriptordata.cpp.
QLowEnergyDescriptorData::QLowEnergyDescriptorData | ( | const QBluetoothUuid & | uuid, |
const QByteArray & | value ) |
Creates a new object of this class with UUID and value being provided by uuid and value, respectively.
Definition at line 50 of file qlowenergydescriptordata.cpp.
QLowEnergyDescriptorData::QLowEnergyDescriptorData | ( | const QLowEnergyDescriptorData & | other | ) |
Constructs a new object of this class that is a copy of other.
Definition at line 59 of file qlowenergydescriptordata.cpp.
QLowEnergyDescriptorData::~QLowEnergyDescriptorData | ( | ) |
Destroys this object.
Definition at line 65 of file qlowenergydescriptordata.cpp.
bool QLowEnergyDescriptorData::isReadable | ( | ) | const |
Returns true
if the value of this descriptor is readable and false
otherwise.
Definition at line 122 of file qlowenergydescriptordata.cpp.
bool QLowEnergyDescriptorData::isValid | ( | ) | const |
Returns true if and only if this object has a non-null UUID.
Definition at line 104 of file qlowenergydescriptordata.cpp.
bool QLowEnergyDescriptorData::isWritable | ( | ) | const |
Returns true
if the value of this descriptor is writable and false
otherwise.
Definition at line 149 of file qlowenergydescriptordata.cpp.
QLowEnergyDescriptorData & QLowEnergyDescriptorData::operator= | ( | const QLowEnergyDescriptorData & | other | ) |
Makes this object a copy of other and returns the new value of this object.
Definition at line 70 of file qlowenergydescriptordata.cpp.
QBluetooth::AttAccessConstraints QLowEnergyDescriptorData::readConstraints | ( | ) | const |
Returns the constraints under which the value of this descriptor can be read.
This value is only relevant if \l isReadable() returns true
.
Definition at line 131 of file qlowenergydescriptordata.cpp.
void QLowEnergyDescriptorData::setReadPermissions | ( | bool | readable, |
QBluetooth::AttAccessConstraints | constraints = QBluetooth::AttAccessConstraints() ) |
Specifies whether the value of this descriptor is readable and if so, under which constraints.
Definition at line 114 of file qlowenergydescriptordata.cpp.
void QLowEnergyDescriptorData::setUuid | ( | const QBluetoothUuid & | uuid | ) |
Sets the UUID of this descriptor to uuid.
Definition at line 98 of file qlowenergydescriptordata.cpp.
void QLowEnergyDescriptorData::setValue | ( | const QByteArray & | value | ) |
Sets the value of this descriptor to value.
It will be sent to a peer device exactly the way it is provided here, so callers need to take care of things such as endianness.
Definition at line 86 of file qlowenergydescriptordata.cpp.
void QLowEnergyDescriptorData::setWritePermissions | ( | bool | writable, |
QBluetooth::AttAccessConstraints | constraints = QBluetooth::AttAccessConstraints() ) |
Specifies whether the value of this descriptor is writable and if so, under which constraints.
Definition at line 141 of file qlowenergydescriptordata.cpp.
|
inlinenoexcept |
Swaps this object with other.
Definition at line 54 of file qlowenergydescriptordata.h.
QBluetoothUuid QLowEnergyDescriptorData::uuid | ( | ) | const |
Returns the UUID of this descriptor.
Definition at line 92 of file qlowenergydescriptordata.cpp.
QByteArray QLowEnergyDescriptorData::value | ( | ) | const |
Returns the value of this descriptor.
Definition at line 77 of file qlowenergydescriptordata.cpp.
QBluetooth::AttAccessConstraints QLowEnergyDescriptorData::writeConstraints | ( | ) | const |
Returns the constraints under which the value of this descriptor can be written.
This value is only relevant if \l isWritable() returns true
.
Definition at line 158 of file qlowenergydescriptordata.cpp.
|
friend |
Returns true
if a and b are unequal with respect to their public state, otherwise returns false
.
Definition at line 31 of file qlowenergydescriptordata.h.
|
friend |
Returns true
if a and b are equal with respect to their public state, otherwise returns false
.
Definition at line 26 of file qlowenergydescriptordata.h.