| 1 | /* |
| 2 | * This file was generated by qdbusxml2cpp version 0.8 |
| 3 | * Source file was org.bluez.GattCharacteristic1.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 "gattcharacteristic1adaptor_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 OrgBluezGattCharacteristic1Adaptor |
| 24 | */ |
| 25 | |
| 26 | OrgBluezGattCharacteristic1Adaptor::OrgBluezGattCharacteristic1Adaptor(QObject *parent) |
| 27 | : QDBusAbstractAdaptor(parent) |
| 28 | { |
| 29 | // constructor |
| 30 | setAutoRelaySignals(true); |
| 31 | } |
| 32 | |
| 33 | OrgBluezGattCharacteristic1Adaptor::~OrgBluezGattCharacteristic1Adaptor() |
| 34 | { |
| 35 | // destructor |
| 36 | } |
| 37 | |
| 38 | QStringList OrgBluezGattCharacteristic1Adaptor::flags() const |
| 39 | { |
| 40 | // get the value of property Flags |
| 41 | return qvariant_cast< QStringList >(v: parent()->property(name: "Flags" )); |
| 42 | } |
| 43 | |
| 44 | bool OrgBluezGattCharacteristic1Adaptor::notifying() const |
| 45 | { |
| 46 | // get the value of property Notifying |
| 47 | return qvariant_cast< bool >(v: parent()->property(name: "Notifying" )); |
| 48 | } |
| 49 | |
| 50 | QDBusObjectPath OrgBluezGattCharacteristic1Adaptor::service() const |
| 51 | { |
| 52 | // get the value of property Service |
| 53 | return qvariant_cast< QDBusObjectPath >(v: parent()->property(name: "Service" )); |
| 54 | } |
| 55 | |
| 56 | QString OrgBluezGattCharacteristic1Adaptor::uUID() const |
| 57 | { |
| 58 | // get the value of property UUID |
| 59 | return qvariant_cast< QString >(v: parent()->property(name: "UUID" )); |
| 60 | } |
| 61 | |
| 62 | QByteArray OrgBluezGattCharacteristic1Adaptor::value() const |
| 63 | { |
| 64 | // get the value of property Value |
| 65 | return qvariant_cast< QByteArray >(v: parent()->property(name: "Value" )); |
| 66 | } |
| 67 | |
| 68 | QByteArray OrgBluezGattCharacteristic1Adaptor::ReadValue(const QVariantMap &options, |
| 69 | const QDBusMessage& msg) |
| 70 | { |
| 71 | // handle method call org.bluez.GattCharacteristic1.ReadValue |
| 72 | QByteArray value; |
| 73 | QString error; |
| 74 | QMetaObject::invokeMethod(obj: parent(), member: "ReadValue" , Q_RETURN_ARG(QByteArray, value), |
| 75 | Q_ARG(QVariantMap, options), Q_ARG(QString&, error)); |
| 76 | if (!error.isEmpty()) { |
| 77 | // Reply with error if needed |
| 78 | auto reply = msg.createErrorReply(name: error, msg: {}); |
| 79 | QDBusConnection::systemBus().send(message: reply); |
| 80 | } |
| 81 | return value; |
| 82 | } |
| 83 | |
| 84 | void OrgBluezGattCharacteristic1Adaptor::StartNotify() |
| 85 | { |
| 86 | // handle method call org.bluez.GattCharacteristic1.StartNotify |
| 87 | QMetaObject::invokeMethod(obj: parent(), member: "StartNotify" ); |
| 88 | } |
| 89 | |
| 90 | void OrgBluezGattCharacteristic1Adaptor::StopNotify() |
| 91 | { |
| 92 | // handle method call org.bluez.GattCharacteristic1.StopNotify |
| 93 | QMetaObject::invokeMethod(obj: parent(), member: "StopNotify" ); |
| 94 | } |
| 95 | |
| 96 | void OrgBluezGattCharacteristic1Adaptor::WriteValue(const QByteArray &value, |
| 97 | const QVariantMap &options, |
| 98 | const QDBusMessage& msg) |
| 99 | { |
| 100 | // handle method call org.bluez.GattCharacteristic1.WriteValue |
| 101 | QString error; |
| 102 | QMetaObject::invokeMethod(obj: parent(), member: "WriteValue" , Q_RETURN_ARG(QString, error), |
| 103 | Q_ARG(QByteArray, value), Q_ARG(QVariantMap, options)); |
| 104 | |
| 105 | if (!error.isEmpty()) { |
| 106 | // Reply with error if needed |
| 107 | auto reply = msg.createErrorReply(name: error, msg: {}); |
| 108 | QDBusConnection::systemBus().send(message: reply); |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | } // end of namespace QtBluetoothPrivate |
| 113 | |