From 66fcda8bf06abcc557d2d435b5dc0562de3a9566 Mon Sep 17 00:00:00 2001 From: Tomasz Sterna Date: Sun, 6 Jul 2014 02:56:39 +0200 Subject: Implemented org.pebbled DBus service --- daemon/dbusadaptor.cpp | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 daemon/dbusadaptor.cpp (limited to 'daemon/dbusadaptor.cpp') diff --git a/daemon/dbusadaptor.cpp b/daemon/dbusadaptor.cpp new file mode 100644 index 0000000..914f9f2 --- /dev/null +++ b/daemon/dbusadaptor.cpp @@ -0,0 +1,59 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp -c DBusAdaptor -a dbusadaptor org.pebbled.xml + * + * qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#include "dbusadaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class DBusAdaptor + */ + +DBusAdaptor::DBusAdaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +DBusAdaptor::~DBusAdaptor() +{ + // destructor +} + +QString DBusAdaptor::address() const +{ + // get the value of property address + return qvariant_cast< QString >(parent()->property("address")); +} + +bool DBusAdaptor::connected() const +{ + // get the value of property connected + return qvariant_cast< bool >(parent()->property("connected")); +} + +QString DBusAdaptor::name() const +{ + // get the value of property name + return qvariant_cast< QString >(parent()->property("name")); +} + +QVariantMap DBusAdaptor::pebble() const +{ + // get the value of property pebble + return qvariant_cast< QVariantMap >(parent()->property("pebble")); +} + -- cgit v1.2.3