BluezQt

gattcharacteristicadaptor.cpp
1 /*
2  * BluezQt - Asynchronous Bluez wrapper library
3  *
4  * SPDX-FileCopyrightText: 2019 Manuel Weichselbaumer
5  *
6  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7  */
8 
9 #include "gattcharacteristicadaptor.h"
10 #include "gattcharacteristic.h"
11 #include "gattservice.h"
12 
13 namespace BluezQt
14 {
15 GattCharacteristicAdaptor::GattCharacteristicAdaptor(GattCharacteristic *parent)
16  : QDBusAbstractAdaptor(parent)
17  , m_gattCharacteristic(parent)
18 {
19 }
20 
21 QString GattCharacteristicAdaptor::uuid() const
22 {
23  return m_gattCharacteristic->uuid();
24 }
25 
26 QDBusObjectPath GattCharacteristicAdaptor::service() const
27 {
28  return m_gattCharacteristic->service()->objectPath();
29 }
30 
31 QStringList GattCharacteristicAdaptor::flags() const
32 {
33  // TODO: implement flags
34  return {QStringLiteral("read"), QStringLiteral("write")};
35 }
36 
37 QByteArray GattCharacteristicAdaptor::ReadValue(const QVariantMap & /*options*/)
38 {
39  return m_gattCharacteristic->readValue();
40 }
41 
42 void GattCharacteristicAdaptor::WriteValue(const QByteArray &value, const QVariantMap & /*options*/)
43 {
44  m_gattCharacteristic->writeValue(value);
45 }
46 
47 void GattCharacteristicAdaptor::StartNotify()
48 {
49  // TODO: implement
50 }
51 
52 void GattCharacteristicAdaptor::StopNotify()
53 {
54  // TODO: implement
55 }
56 
57 } // namespace BluezQt
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sun Sep 25 2022 04:19:10 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.