| 1 | /* |
| 2 | * This file was generated by qdbusxml2cpp version 0.8 |
| 3 | * Source file was org.bluez.GattDescriptor1.xml |
| 4 | * |
| 5 | * qdbusxml2cpp is Copyright (C) The Qt Company Ltd. and other contributors. |
| 6 | * |
| 7 | * This is an auto-generated file. |
| 8 | * Do not edit! All changes made to it will be lost. |
| 9 | */ |
| 10 | |
| 11 | #include "gattdescriptor1adaptor_p.h" |
| 12 | #include <QtCore/QMetaObject> |
| 13 | #include <QtCore/QByteArray> |
| 14 | #include <QtCore/QList> |
| 15 | #include <QtCore/QMap> |
| 16 | #include <QtCore/QString> |
| 17 | #include <QtCore/QStringList> |
| 18 | #include <QtCore/QVariant> |
| 19 | |
| 20 | namespace QtBluetoothPrivate { |
| 21 | |
| 22 | /* |
| 23 | * Implementation of adaptor class OrgBluezGattDescriptor1Adaptor |
| 24 | */ |
| 25 | |
| 26 | OrgBluezGattDescriptor1Adaptor::OrgBluezGattDescriptor1Adaptor(QObject *parent) |
| 27 | : QDBusAbstractAdaptor(parent) |
| 28 | { |
| 29 | // constructor |
| 30 | setAutoRelaySignals(true); |
| 31 | } |
| 32 | |
| 33 | OrgBluezGattDescriptor1Adaptor::~OrgBluezGattDescriptor1Adaptor() |
| 34 | { |
| 35 | // destructor |
| 36 | } |
| 37 | |
| 38 | QDBusObjectPath OrgBluezGattDescriptor1Adaptor::characteristic() const |
| 39 | { |
| 40 | // get the value of property Characteristic |
| 41 | return qvariant_cast< QDBusObjectPath >(v: parent()->property(name: "Characteristic" )); |
| 42 | } |
| 43 | |
| 44 | QString OrgBluezGattDescriptor1Adaptor::uUID() const |
| 45 | { |
| 46 | // get the value of property UUID |
| 47 | return qvariant_cast< QString >(v: parent()->property(name: "UUID" )); |
| 48 | } |
| 49 | |
| 50 | QByteArray OrgBluezGattDescriptor1Adaptor::value() const |
| 51 | { |
| 52 | // get the value of property Value |
| 53 | return qvariant_cast< QByteArray >(v: parent()->property(name: "Value" )); |
| 54 | } |
| 55 | |
| 56 | QByteArray OrgBluezGattDescriptor1Adaptor::ReadValue(const QVariantMap &options, |
| 57 | const QDBusMessage& msg) |
| 58 | { |
| 59 | // handle method call org.bluez.GattDescriptor1.ReadValue |
| 60 | QByteArray value; |
| 61 | QString error; |
| 62 | QMetaObject::invokeMethod(obj: parent(), member: "ReadValue" , Q_RETURN_ARG(QByteArray, value), |
| 63 | Q_ARG(QVariantMap, options), Q_ARG(QString&, error)); |
| 64 | if (!error.isEmpty()) { |
| 65 | // Reply with error if needed |
| 66 | auto reply = msg.createErrorReply(name: error, msg: {}); |
| 67 | QDBusConnection::systemBus().send(message: reply); |
| 68 | } |
| 69 | return value; |
| 70 | } |
| 71 | |
| 72 | void OrgBluezGattDescriptor1Adaptor::WriteValue(const QByteArray &value, |
| 73 | const QVariantMap &options, |
| 74 | const QDBusMessage& msg) |
| 75 | { |
| 76 | // handle method call org.bluez.GattDescriptor1.WriteValue |
| 77 | QString error; |
| 78 | QMetaObject::invokeMethod(obj: parent(), member: "WriteValue" , Q_RETURN_ARG(QString, error), |
| 79 | Q_ARG(QByteArray, value), Q_ARG(QVariantMap, options)); |
| 80 | |
| 81 | if (!error.isEmpty()) { |
| 82 | // Reply with error if needed |
| 83 | auto reply = msg.createErrorReply(name: error, msg: {}); |
| 84 | QDBusConnection::systemBus().send(message: reply); |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | } // end of namespace QtBluetoothPrivate |
| 89 | |