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
qlowenergyadvertisingparameters.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
7
25
136
142
147
154
160
168
176void QLowEnergyAdvertisingParameters::setWhiteList(const QList<AddressInfo> &whiteList,
178{
179 d->whiteList = whiteList;
180 d->filterPolicy = policy;
181}
182
187QList<QLowEnergyAdvertisingParameters::AddressInfo> QLowEnergyAdvertisingParameters::whiteList() const
188{
189 return d->whiteList;
190}
191
200
215{
216 d->minInterval = minimum;
217 d->maxInterval = qMax(minimum, maximum);
218}
219
227
235
246bool QLowEnergyAdvertisingParameters::equals(const QLowEnergyAdvertisingParameters &a,
248{
249 if (a.d == b.d)
250 return true;
251 return a.filterPolicy() == b.filterPolicy() && a.minimumInterval() == b.minimumInterval()
252 && a.maximumInterval() == b.maximumInterval() && a.mode() == b.mode()
253 && a.whiteList() == b.whiteList();
254}
255
256bool QLowEnergyAdvertisingParameters::AddressInfo::equals(
259{
260 return ai1.address == ai2.address && ai1.type == ai2.type;
261}
262
QLowEnergyAdvertisingParameters::FilterPolicy filterPolicy
QList< QLowEnergyAdvertisingParameters::AddressInfo > whiteList
The QLowEnergyAdvertisingParameters class represents the parameters used for Bluetooth Low Energy adv...
void setWhiteList(const QList< AddressInfo > &whiteList, FilterPolicy policy)
Sets the white list that is potentially used for filtering scan and connection requests.
FilterPolicy filterPolicy() const
Returns the filter policy that determines how the white list is used.
QLowEnergyAdvertisingParameters()
Constructs a new object of this class.
Mode mode() const
Returns the advertising mode.
QLowEnergyAdvertisingParameters & operator=(const QLowEnergyAdvertisingParameters &other)
Makes this object a copy of other and returns the new value of this object.
void setInterval(quint16 minimum, quint16 maximum)
Sets the advertising interval.
int minimumInterval() const
Returns the minimum advertising interval in milliseconds.
void setMode(Mode mode)
Sets the advertising mode to mode.
int maximumInterval() const
Returns the maximum advertising interval in milliseconds.
Mode
Specifies in which way to advertise.
FilterPolicy
Specifies the semantics of the white list.
QList< AddressInfo > whiteList() const
Returns the white list used for filtering scan and connection requests.
\inmodule QtCore
Definition qshareddata.h:19
Combined button and popup list for selecting options.
constexpr const T & qMax(const T &a, const T &b)
Definition qminmax.h:42
GLboolean GLboolean GLboolean b
GLenum mode
GLboolean GLboolean GLboolean GLboolean a
[7]
unsigned short quint16
Definition qtypes.h:48
QSharedPointer< T > other(t)
[5]
QSizePolicy policy