BluezQt

gattserviceremote.cpp
1/*
2 * BluezQt - Asynchronous Bluez wrapper library
3 *
4 * SPDX-FileCopyrightText: 2021 Ivan Podkurkov <podkiva2@gmail.com>
5 *
6 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7 */
8
9#include "gattserviceremote.h"
10#include "gattserviceremote_p.h"
11#include "device.h"
12#include "device_p.h"
13#include "pendingcall.h"
14#include "utils.h"
15
16namespace BluezQt
17{
18
19GattServiceRemote::GattServiceRemote(const QString &path, const QVariantMap &properties, DevicePtr adapter)
20 : QObject()
21 , d(new GattServiceRemotePrivate(path, properties, adapter))
22{
23}
24
25GattServiceRemote::~GattServiceRemote()
26{
27}
28
29GattServiceRemotePtr GattServiceRemote::toSharedPtr() const
30{
31 return d->q.toStrongRef();
32}
33
34QString GattServiceRemote::ubi() const
35{
36 return d->m_bluezGattService->path();
37}
38
39QString GattServiceRemote::uuid() const
40{
41 return d->m_uuid;
42}
43
44bool GattServiceRemote::isPrimary() const
45{
46 return d->m_primary;
47}
48
49DevicePtr GattServiceRemote::device() const
50{
51 return d->m_device;
52}
53
54QList<QDBusObjectPath> GattServiceRemote::includes() const
55{
56 return d->m_includes;
57}
58
59quint16 GattServiceRemote::handle() const
60{
61 return d->m_handle;
62}
63
64PendingCall* GattServiceRemote::setHandle(quint16 handle)
65{
66 return new PendingCall(d->setDBusProperty(QStringLiteral("Handle"), QVariant::fromValue(handle)), PendingCall::ReturnVoid, this);
67}
68
69QList<GattCharacteristicRemotePtr> GattServiceRemote::characteristics() const
70{
71 return d->m_characteristics;
72}
73
74} // namespace BluezQt
75
76#include "moc_gattserviceremote.cpp"
QString path(const QString &relativePath)
KGuiItem properties()
QVariant fromValue(T &&value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.