blob: dfd0b919fd78e8c273ecd16f32c29ab2766c2efb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// Copyright (C) 2013 BlackBerry Limited. All rights reserved.
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef SERVICEINFO_H
#define SERVICEINFO_H
#include <QtCore/qobject.h>
#include <QtQmlIntegration/qqmlintegration.h>
QT_BEGIN_NAMESPACE
class QLowEnergyService;
QT_END_NAMESPACE
class ServiceInfo: public QObject
{
Q_OBJECT
Q_PROPERTY(QString serviceName READ getName NOTIFY serviceChanged)
Q_PROPERTY(QString serviceUuid READ getUuid NOTIFY serviceChanged)
Q_PROPERTY(QString serviceType READ getType NOTIFY serviceChanged)
QML_ANONYMOUS
public:
ServiceInfo() = default;
ServiceInfo(QLowEnergyService *service);
QLowEnergyService *service() const;
QString getUuid() const;
QString getName() const;
QString getType() const;
Q_SIGNALS:
void serviceChanged();
private:
QLowEnergyService *m_service = nullptr;
};
#endif // SERVICEINFO_H
|