| 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 | return m_gattCharacteristic->flags(); |
| 34 | } |
| 35 | |
| 36 | QByteArray GattCharacteristicAdaptor::ReadValue(const QVariantMap & /*options*/) |
| 37 | { |
| 38 | return m_gattCharacteristic->readValue(); |
| 39 | } |
| 40 | |
| 41 | void GattCharacteristicAdaptor::WriteValue(const QByteArray &value, const QVariantMap & /*options*/) |
| 42 | { |
| 43 | m_gattCharacteristic->writeValue(value); |
| 44 | } |
| 45 | |
| 46 | void GattCharacteristicAdaptor::StartNotify() |
| 47 | { |
| 48 | m_gattCharacteristic->startNotify(); |
| 49 | } |
| 50 | |
| 51 | void GattCharacteristicAdaptor::StopNotify() |
| 52 | { |
| 53 | m_gattCharacteristic->stopNotify(); |
| 54 | } |
| 55 | |
| 56 | } // namespace BluezQt |
| 57 | |
| 58 | #include "moc_gattcharacteristicadaptor.cpp" |
| 59 |
