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
qlowenergyadvertisingdata.cpp
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
5
6#include <cstring>
7
9
28
77
83
88
95
112
122
132
142
150
156{
157 d->includePowerLevel = doInclude;
158}
159
168
179
188
194void QLowEnergyAdvertisingData::setServices(const QList<QBluetoothUuid> &services)
195{
196 d->services = services;
197}
198
203QList<QBluetoothUuid> QLowEnergyAdvertisingData::services() const
204{
205 return d->services;
206}
207
222
230
241bool QLowEnergyAdvertisingData::equals(const QLowEnergyAdvertisingData &a,
243{
244 if (a.d == b.d)
245 return true;
246 return a.discoverability() == b.discoverability()
247 && a.includePowerLevel() == b.includePowerLevel() && a.localName() == b.localName()
248 && a.manufacturerData() == b.manufacturerData()
249 && a.manufacturerId() == b.manufacturerId() && a.services() == b.services()
250 && a.rawData() == b.rawData();
251}
252
std::vector< ObjCStrongReference< CBMutableService > > services
\inmodule QtCore
Definition qbytearray.h:57
QLowEnergyAdvertisingData::Discoverability discoverability
The QLowEnergyAdvertisingData class represents the data to be broadcast during Bluetooth Low Energy a...
QString localName() const
Returns the name of the local device that is to be advertised.
void setIncludePowerLevel(bool doInclude)
Specifies whether to include the device's transmit power level in the advertising data.
void setManufacturerData(quint16 id, const QByteArray &data)
Sets the manufacturer id and data.
QByteArray manufacturerData() const
Returns the manufacturer data.
QByteArray rawData() const
Returns the user-supplied raw data to be advertised.
bool includePowerLevel() const
Returns whether to include the device's transmit power level in the advertising data.
void setLocalName(const QString &name)
Specifies that name should be broadcast as the name of the device.
quint16 manufacturerId() const
Returns the manufacturer id.
void setRawData(const QByteArray &data)
Sets the data to be advertised to data.
Discoverability discoverability() const
Returns the discoverability mode of the advertising device.
~QLowEnergyAdvertisingData()
Destroys this object.
void setDiscoverability(Discoverability mode)
Sets the discoverability type of the advertising device to mode.
QList< QBluetoothUuid > services() const
Returns the list of service UUIDs to be advertised.
Discoverability
The discoverability of the advertising device as defined by the Generic Access Profile.
void setServices(const QList< QBluetoothUuid > &services)
Specifies that the service UUIDs in services should be advertised.
QLowEnergyAdvertisingData & operator=(const QLowEnergyAdvertisingData &other)
Makes this object a copy of other and returns the new value of this object.
QLowEnergyAdvertisingData()
Creates a new object of this class.
\inmodule QtCore
Definition qshareddata.h:19
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
GLboolean GLboolean GLboolean b
GLenum mode
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint id
[7]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint name
unsigned short quint16
Definition qtypes.h:48
QSharedPointer< T > other(t)
[5]