Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qlowenergyserviceprivate.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
9
10QT_IMPL_METATYPE_EXTERN_TAGGED(QSharedPointer<QLowEnergyServicePrivate>,
11 QSharedPointer_QLowEnergyServicePrivate)
12
13QLowEnergyServicePrivate::QLowEnergyServicePrivate(QObject *parent) : QObject(parent) { }
14
18
20{
21 controller = control;
22
23 if (control)
24 setState(QLowEnergyService::RemoteService);
25 else
26 setState(QLowEnergyService::InvalidService);
27}
28
29void QLowEnergyServicePrivate::setError(QLowEnergyService::ServiceError newError)
30{
31 lastError = newError;
32 emit errorOccurred(newError);
33}
34
35void QLowEnergyServicePrivate::setState(QLowEnergyService::ServiceState newState)
36{
37 if (state == newState)
38 return;
39
40 state = newState;
41 emit stateChanged(newState);
42}
43
44QT_END_NAMESPACE
45
46#include "moc_qlowenergyserviceprivate_p.cpp"
void setController(QLowEnergyControllerPrivate *control)
void setError(QLowEnergyService::ServiceError newError)
void setState(QLowEnergyService::ServiceState newState)