| 1 | /* |
|---|---|
| 2 | * BluezQt - Asynchronous Bluez wrapper library |
| 3 | * |
| 4 | * SPDX-FileCopyrightText: 2022 Pontus Sjögren |
| 5 | * |
| 6 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 7 | */ |
| 8 | |
| 9 | #include "gattdescriptoradaptor.h" |
| 10 | #include "gattdescriptor.h" |
| 11 | |
| 12 | namespace BluezQt |
| 13 | { |
| 14 | |
| 15 | GattDescriptorAdaptor::GattDescriptorAdaptor(GattDescriptor *parent) |
| 16 | : QDBusAbstractAdaptor(parent) |
| 17 | , m_gattDescriptor(parent) |
| 18 | { |
| 19 | } |
| 20 | |
| 21 | QString GattDescriptorAdaptor::uuid() const |
| 22 | { |
| 23 | return m_gattDescriptor->uuid(); |
| 24 | } |
| 25 | |
| 26 | QDBusObjectPath GattDescriptorAdaptor::characteristic() const |
| 27 | { |
| 28 | return m_gattDescriptor->characteristic(); |
| 29 | } |
| 30 | |
| 31 | QByteArray GattDescriptorAdaptor::value() const |
| 32 | { |
| 33 | return m_gattDescriptor->readValue(); |
| 34 | } |
| 35 | |
| 36 | QStringList GattDescriptorAdaptor::flags() const |
| 37 | { |
| 38 | return m_gattDescriptor->flags(); |
| 39 | } |
| 40 | |
| 41 | QByteArray GattDescriptorAdaptor::ReadValue(const QVariantMap &options) |
| 42 | { |
| 43 | Q_UNUSED(options); |
| 44 | return m_gattDescriptor->readValue(); |
| 45 | } |
| 46 | |
| 47 | void GattDescriptorAdaptor::WriteValue(QByteArray value) |
| 48 | { |
| 49 | m_gattDescriptor->writeValue(value); |
| 50 | } |
| 51 | |
| 52 | } |
| 53 | |
| 54 | #include "moc_gattdescriptoradaptor.cpp" |
| 55 |
