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

source code of qtconnectivity/src/bluetooth/bluez/gattcharacteristic1adaptor.cpp