summaryrefslogtreecommitdiff
path: root/rockworkd/libpebble/bluez
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2016-02-11 23:55:16 +0100
committerAndrew Branson <andrew.branson@cern.ch>2016-02-11 23:55:16 +0100
commit29aaea2d80a9eb1715b6cddfac2d2aacf76358bd (patch)
tree012795b6bec16c72f38d33cff46324c9a0225868 /rockworkd/libpebble/bluez
launchpad ~mzanetti/rockwork/trunk r87
Diffstat (limited to 'rockworkd/libpebble/bluez')
-rw-r--r--rockworkd/libpebble/bluez/bluez_adapter1.cpp26
-rw-r--r--rockworkd/libpebble/bluez/bluez_adapter1.h66
-rw-r--r--rockworkd/libpebble/bluez/bluez_agentmanager1.cpp26
-rw-r--r--rockworkd/libpebble/bluez/bluez_agentmanager1.h68
-rw-r--r--rockworkd/libpebble/bluez/bluez_device1.cpp26
-rw-r--r--rockworkd/libpebble/bluez/bluez_device1.h85
-rw-r--r--rockworkd/libpebble/bluez/bluez_helper.h30
-rw-r--r--rockworkd/libpebble/bluez/bluezclient.cpp84
-rw-r--r--rockworkd/libpebble/bluez/bluezclient.h51
-rw-r--r--rockworkd/libpebble/bluez/dbus-shared.h36
-rw-r--r--rockworkd/libpebble/bluez/freedesktop_objectmanager.cpp26
-rw-r--r--rockworkd/libpebble/bluez/freedesktop_objectmanager.h58
-rw-r--r--rockworkd/libpebble/bluez/freedesktop_properties.cpp26
-rw-r--r--rockworkd/libpebble/bluez/freedesktop_properties.h71
-rw-r--r--rockworkd/libpebble/bluez/org.bluez.AgentManager1.xml16
15 files changed, 695 insertions, 0 deletions
diff --git a/rockworkd/libpebble/bluez/bluez_adapter1.cpp b/rockworkd/libpebble/bluez/bluez_adapter1.cpp
new file mode 100644
index 0000000..a386af1
--- /dev/null
+++ b/rockworkd/libpebble/bluez/bluez_adapter1.cpp
@@ -0,0 +1,26 @@
+/*
+ * This file was generated by qdbusxml2cpp version 0.8
+ * Command line was: qdbusxml2cpp -c BluezAdapter1 -p bluez_adapter1 -v org.bluez.Adapter1.xml
+ *
+ * qdbusxml2cpp is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * This file may have been hand-edited. Look for HAND-EDIT comments
+ * before re-generating it.
+ */
+
+#include "bluez_adapter1.h"
+
+/*
+ * Implementation of interface class BluezAdapter1
+ */
+
+BluezAdapter1::BluezAdapter1(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
+ : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
+{
+}
+
+BluezAdapter1::~BluezAdapter1()
+{
+}
+
diff --git a/rockworkd/libpebble/bluez/bluez_adapter1.h b/rockworkd/libpebble/bluez/bluez_adapter1.h
new file mode 100644
index 0000000..8690075
--- /dev/null
+++ b/rockworkd/libpebble/bluez/bluez_adapter1.h
@@ -0,0 +1,66 @@
+/*
+ * This file was generated by qdbusxml2cpp version 0.8
+ * Command line was: qdbusxml2cpp -c BluezAdapter1 -p bluez_adapter1 -v org.bluez.Adapter1.xml
+ *
+ * qdbusxml2cpp is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * Do not edit! All changes made to it will be lost.
+ */
+
+#ifndef BLUEZ_ADAPTER1_H_1442480417
+#define BLUEZ_ADAPTER1_H_1442480417
+
+#include <QtCore/QObject>
+#include <QtCore/QByteArray>
+#include <QtCore/QList>
+#include <QtCore/QMap>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QVariant>
+#include <QtDBus/QtDBus>
+
+/*
+ * Proxy class for interface org.bluez.Adapter1
+ */
+class BluezAdapter1: public QDBusAbstractInterface
+{
+ Q_OBJECT
+public:
+ static inline const char *staticInterfaceName()
+ { return "org.bluez.Adapter1"; }
+
+public:
+ BluezAdapter1(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
+
+ ~BluezAdapter1();
+
+public Q_SLOTS: // METHODS
+ inline QDBusPendingReply<> RemoveDevice(const QDBusObjectPath &device)
+ {
+ QList<QVariant> argumentList;
+ argumentList << QVariant::fromValue(device);
+ return asyncCallWithArgumentList(QStringLiteral("RemoveDevice"), argumentList);
+ }
+
+ inline QDBusPendingReply<> StartDiscovery()
+ {
+ QList<QVariant> argumentList;
+ return asyncCallWithArgumentList(QStringLiteral("StartDiscovery"), argumentList);
+ }
+
+ inline QDBusPendingReply<> StopDiscovery()
+ {
+ QList<QVariant> argumentList;
+ return asyncCallWithArgumentList(QStringLiteral("StopDiscovery"), argumentList);
+ }
+
+Q_SIGNALS: // SIGNALS
+};
+
+namespace org {
+ namespace bluez {
+ typedef ::BluezAdapter1 Adapter1;
+ }
+}
+#endif
diff --git a/rockworkd/libpebble/bluez/bluez_agentmanager1.cpp b/rockworkd/libpebble/bluez/bluez_agentmanager1.cpp
new file mode 100644
index 0000000..630953b
--- /dev/null
+++ b/rockworkd/libpebble/bluez/bluez_agentmanager1.cpp
@@ -0,0 +1,26 @@
+/*
+ * This file was generated by qdbusxml2cpp version 0.8
+ * Command line was: qdbusxml2cpp -c BluezAgentManager1 -p bluez_agentmanager1 org.bluez.AgentManager1.xml
+ *
+ * qdbusxml2cpp is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * This file may have been hand-edited. Look for HAND-EDIT comments
+ * before re-generating it.
+ */
+
+#include "bluez_agentmanager1.h"
+
+/*
+ * Implementation of interface class BluezAgentManager1
+ */
+
+BluezAgentManager1::BluezAgentManager1(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
+ : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
+{
+}
+
+BluezAgentManager1::~BluezAgentManager1()
+{
+}
+
diff --git a/rockworkd/libpebble/bluez/bluez_agentmanager1.h b/rockworkd/libpebble/bluez/bluez_agentmanager1.h
new file mode 100644
index 0000000..5f50e0d
--- /dev/null
+++ b/rockworkd/libpebble/bluez/bluez_agentmanager1.h
@@ -0,0 +1,68 @@
+/*
+ * This file was generated by qdbusxml2cpp version 0.8
+ * Command line was: qdbusxml2cpp -c BluezAgentManager1 -p bluez_agentmanager1 org.bluez.AgentManager1.xml
+ *
+ * qdbusxml2cpp is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * Do not edit! All changes made to it will be lost.
+ */
+
+#ifndef BLUEZ_AGENTMANAGER1_H_1442489332
+#define BLUEZ_AGENTMANAGER1_H_1442489332
+
+#include <QtCore/QObject>
+#include <QtCore/QByteArray>
+#include <QtCore/QList>
+#include <QtCore/QMap>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QVariant>
+#include <QtDBus/QtDBus>
+
+/*
+ * Proxy class for interface org.bluez.AgentManager1
+ */
+class BluezAgentManager1: public QDBusAbstractInterface
+{
+ Q_OBJECT
+public:
+ static inline const char *staticInterfaceName()
+ { return "org.bluez.AgentManager1"; }
+
+public:
+ BluezAgentManager1(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
+
+ ~BluezAgentManager1();
+
+public Q_SLOTS: // METHODS
+ inline QDBusPendingReply<> RegisterAgent(const QDBusObjectPath &agent, const QString &capability)
+ {
+ QList<QVariant> argumentList;
+ argumentList << QVariant::fromValue(agent) << QVariant::fromValue(capability);
+ return asyncCallWithArgumentList(QStringLiteral("RegisterAgent"), argumentList);
+ }
+
+ inline QDBusPendingReply<> RequestDefaultAgent(const QDBusObjectPath &agent)
+ {
+ QList<QVariant> argumentList;
+ argumentList << QVariant::fromValue(agent);
+ return asyncCallWithArgumentList(QStringLiteral("RequestDefaultAgent"), argumentList);
+ }
+
+ inline QDBusPendingReply<> UnregisterAgent(const QDBusObjectPath &agent)
+ {
+ QList<QVariant> argumentList;
+ argumentList << QVariant::fromValue(agent);
+ return asyncCallWithArgumentList(QStringLiteral("UnregisterAgent"), argumentList);
+ }
+
+Q_SIGNALS: // SIGNALS
+};
+
+namespace org {
+ namespace bluez {
+ typedef ::BluezAgentManager1 AgentManager1;
+ }
+}
+#endif
diff --git a/rockworkd/libpebble/bluez/bluez_device1.cpp b/rockworkd/libpebble/bluez/bluez_device1.cpp
new file mode 100644
index 0000000..b5ee0f8
--- /dev/null
+++ b/rockworkd/libpebble/bluez/bluez_device1.cpp
@@ -0,0 +1,26 @@
+/*
+ * This file was generated by qdbusxml2cpp version 0.8
+ * Command line was: qdbusxml2cpp -c BluezDevice1 -p bluez_device1 org.bluez.Device1.xml
+ *
+ * qdbusxml2cpp is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * This file may have been hand-edited. Look for HAND-EDIT comments
+ * before re-generating it.
+ */
+
+#include "bluez_device1.h"
+
+/*
+ * Implementation of interface class BluezDevice1
+ */
+
+BluezDevice1::BluezDevice1(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
+ : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
+{
+}
+
+BluezDevice1::~BluezDevice1()
+{
+}
+
diff --git a/rockworkd/libpebble/bluez/bluez_device1.h b/rockworkd/libpebble/bluez/bluez_device1.h
new file mode 100644
index 0000000..c9eaa1f
--- /dev/null
+++ b/rockworkd/libpebble/bluez/bluez_device1.h
@@ -0,0 +1,85 @@
+/*
+ * This file was generated by qdbusxml2cpp version 0.8
+ * Command line was: qdbusxml2cpp -c BluezDevice1 -p bluez_device1 org.bluez.Device1.xml
+ *
+ * qdbusxml2cpp is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * Do not edit! All changes made to it will be lost.
+ */
+
+#ifndef BLUEZ_DEVICE1_H_1442480478
+#define BLUEZ_DEVICE1_H_1442480478
+
+#include <QtCore/QObject>
+#include <QtCore/QByteArray>
+#include <QtCore/QList>
+#include <QtCore/QMap>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QVariant>
+#include <QtDBus/QtDBus>
+
+/*
+ * Proxy class for interface org.bluez.Device1
+ */
+class BluezDevice1: public QDBusAbstractInterface
+{
+ Q_OBJECT
+public:
+ static inline const char *staticInterfaceName()
+ { return "org.bluez.Device1"; }
+
+public:
+ BluezDevice1(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
+
+ ~BluezDevice1();
+
+public Q_SLOTS: // METHODS
+ inline QDBusPendingReply<> CancelPairing()
+ {
+ QList<QVariant> argumentList;
+ return asyncCallWithArgumentList(QStringLiteral("CancelPairing"), argumentList);
+ }
+
+ inline QDBusPendingReply<> Connect()
+ {
+ QList<QVariant> argumentList;
+ return asyncCallWithArgumentList(QStringLiteral("Connect"), argumentList);
+ }
+
+ inline QDBusPendingReply<> ConnectProfile(const QString &UUID)
+ {
+ QList<QVariant> argumentList;
+ argumentList << QVariant::fromValue(UUID);
+ return asyncCallWithArgumentList(QStringLiteral("ConnectProfile"), argumentList);
+ }
+
+ inline QDBusPendingReply<> Disconnect()
+ {
+ QList<QVariant> argumentList;
+ return asyncCallWithArgumentList(QStringLiteral("Disconnect"), argumentList);
+ }
+
+ inline QDBusPendingReply<> DisconnectProfile(const QString &UUID)
+ {
+ QList<QVariant> argumentList;
+ argumentList << QVariant::fromValue(UUID);
+ return asyncCallWithArgumentList(QStringLiteral("DisconnectProfile"), argumentList);
+ }
+
+ inline QDBusPendingReply<> Pair()
+ {
+ QList<QVariant> argumentList;
+ return asyncCallWithArgumentList(QStringLiteral("Pair"), argumentList);
+ }
+
+Q_SIGNALS: // SIGNALS
+};
+
+namespace org {
+ namespace bluez {
+ typedef ::BluezDevice1 Device1;
+ }
+}
+#endif
diff --git a/rockworkd/libpebble/bluez/bluez_helper.h b/rockworkd/libpebble/bluez/bluez_helper.h
new file mode 100644
index 0000000..363f7ae
--- /dev/null
+++ b/rockworkd/libpebble/bluez/bluez_helper.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2015 Canonical Ltd
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+*/
+
+#ifndef BLUEZ_HELPER_H_
+#define BLUEZ_HELPER_H_
+
+#include <QObject>
+#include <QDBusObjectPath>
+
+typedef QMap<QString, QVariantMap> InterfaceList;
+typedef QMap<QDBusObjectPath, InterfaceList> ManagedObjectList;
+
+Q_DECLARE_METATYPE(InterfaceList)
+Q_DECLARE_METATYPE(ManagedObjectList)
+
+#endif
diff --git a/rockworkd/libpebble/bluez/bluezclient.cpp b/rockworkd/libpebble/bluez/bluezclient.cpp
new file mode 100644
index 0000000..8cdf848
--- /dev/null
+++ b/rockworkd/libpebble/bluez/bluezclient.cpp
@@ -0,0 +1,84 @@
+#include "bluezclient.h"
+#include "dbus-shared.h"
+
+#include <QDBusConnection>
+#include <QDBusReply>
+#include <QDebug>
+
+BluezClient::BluezClient(QObject *parent):
+ QObject(parent),
+ m_dbus(QDBusConnection::systemBus()),
+ m_bluezManager("org.bluez", "/", m_dbus),
+ m_bluezAgentManager("org.bluez", "/org/bluez", m_dbus)
+{
+ qDBusRegisterMetaType<InterfaceList>();
+ qDBusRegisterMetaType<ManagedObjectList>();
+
+ if (m_bluezManager.isValid()) {
+ connect(&m_bluezManager, SIGNAL(InterfacesAdded(const QDBusObjectPath&, InterfaceList)),
+ this, SLOT(slotInterfacesAdded(const QDBusObjectPath&, InterfaceList)));
+
+ connect(&m_bluezManager, SIGNAL(InterfacesRemoved(const QDBusObjectPath&, const QStringList&)),
+ this, SLOT(slotInterfacesRemoved(const QDBusObjectPath&, const QStringList&)));
+
+ auto objectList = m_bluezManager.GetManagedObjects().argumentAt<0>();
+ for (QDBusObjectPath path : objectList.keys()) {
+ InterfaceList ifaces = objectList.value(path);
+ if (ifaces.contains(BLUEZ_DEVICE_IFACE)) {
+ QString candidatePath = path.path();
+
+ auto properties = ifaces.value(BLUEZ_DEVICE_IFACE);
+ addDevice(path, properties);
+ }
+ }
+ }
+}
+
+QList<Device> BluezClient::pairedPebbles() const
+{
+ QList<Device> ret;
+ if (m_bluezManager.isValid()) {
+ foreach (const Device &dev, m_devices) {
+ ret << dev;
+ }
+ }
+ return ret;
+}
+
+void BluezClient::addDevice(const QDBusObjectPath &path, const QVariantMap &properties)
+{
+ QString address = properties.value("Address").toString();
+ QString name = properties.value("Name").toString();
+ if (name.startsWith("Pebble") && !name.startsWith("Pebble Time LE") && !name.startsWith("Pebble-LE") && !m_devices.contains(address)) {
+ qDebug() << "Found new Pebble:" << address << name;
+ Device device;
+ device.address = QBluetoothAddress(address);
+ device.name = name;
+ device.path = path.path();
+ m_devices.insert(path.path(), device);
+ qDebug() << "emitting added";
+ emit devicesChanged();
+ }
+}
+
+void BluezClient::slotInterfacesAdded(const QDBusObjectPath &path, InterfaceList ifaces)
+{
+ qDebug() << "Interface added!";
+ if (ifaces.contains(BLUEZ_DEVICE_IFACE)) {
+ auto properties = ifaces.value(BLUEZ_DEVICE_IFACE);
+ addDevice(path, properties);
+ }
+}
+
+void BluezClient::slotInterfacesRemoved(const QDBusObjectPath &path, const QStringList &ifaces)
+{
+ qDebug() << "interfaces removed" << path.path() << ifaces;
+ if (!ifaces.contains(BLUEZ_DEVICE_IFACE)) {
+ return;
+ }
+ if (m_devices.contains(path.path())) {
+ m_devices.take(path.path());
+ qDebug() << "removing dev";
+ emit devicesChanged();
+ }
+}
diff --git a/rockworkd/libpebble/bluez/bluezclient.h b/rockworkd/libpebble/bluez/bluezclient.h
new file mode 100644
index 0000000..f8e5749
--- /dev/null
+++ b/rockworkd/libpebble/bluez/bluezclient.h
@@ -0,0 +1,51 @@
+#ifndef BLUEZCLIENT_H
+#define BLUEZCLIENT_H
+
+#include <QList>
+#include <QBluetoothAddress>
+#include <QBluetoothLocalDevice>
+
+#include "bluez_helper.h"
+#include "freedesktop_objectmanager.h"
+#include "freedesktop_properties.h"
+#include "bluez_adapter1.h"
+#include "bluez_agentmanager1.h"
+
+class Device {
+public:
+ QBluetoothAddress address;
+ QString name;
+ QString path;
+};
+
+class BluezClient: public QObject
+{
+ Q_OBJECT
+
+public:
+ BluezClient(QObject *parent = 0);
+
+
+ QList<Device> pairedPebbles() const;
+
+private slots:
+ void addDevice(const QDBusObjectPath &path, const QVariantMap &properties);
+
+ void slotInterfacesAdded(const QDBusObjectPath&path, InterfaceList ifaces);
+ void slotInterfacesRemoved(const QDBusObjectPath&path, const QStringList &ifaces);
+
+signals:
+ void devicesChanged();
+
+private:
+ QDBusConnection m_dbus;
+ DBusObjectManagerInterface m_bluezManager;
+ BluezAgentManager1 m_bluezAgentManager;
+ BluezAdapter1 *m_bluezAdapter = nullptr;
+ FreeDesktopProperties *m_bluezAdapterProperties = nullptr;
+
+
+ QHash<QString, Device> m_devices;
+};
+
+#endif // BLUEZCLIENT_H
diff --git a/rockworkd/libpebble/bluez/dbus-shared.h b/rockworkd/libpebble/bluez/dbus-shared.h
new file mode 100644
index 0000000..01e9699
--- /dev/null
+++ b/rockworkd/libpebble/bluez/dbus-shared.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2013-2015 Canonical Ltd
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ * Charles Kerr <charles.kerr@canonical.com>
+ */
+
+#ifndef USS_DBUS_SHARED_H
+#define USS_DBUS_SHARED_H
+
+#define DBUS_AGENT_PATH "/com/canonical/SettingsBluetoothAgent"
+#define DBUS_ADAPTER_AGENT_PATH "/com/canonical/SettingsBluetoothAgent/adapteragent"
+#define DBUS_AGENT_CAPABILITY "KeyboardDisplay"
+
+#define BLUEZ_SERVICE "org.bluez"
+
+#define BLUEZ_ADAPTER_IFACE "org.bluez.Adapter1"
+#define BLUEZ_DEVICE_IFACE "org.bluez.Device1"
+
+#define watchCall(call, func) \
+ QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(call, this); \
+ QObject::connect(watcher, &QDBusPendingCallWatcher::finished, func)
+
+#endif // USS_DBUS_SHARED_H
diff --git a/rockworkd/libpebble/bluez/freedesktop_objectmanager.cpp b/rockworkd/libpebble/bluez/freedesktop_objectmanager.cpp
new file mode 100644
index 0000000..71ca4ce
--- /dev/null
+++ b/rockworkd/libpebble/bluez/freedesktop_objectmanager.cpp
@@ -0,0 +1,26 @@
+/*
+ * This file was generated by qdbusxml2cpp version 0.8
+ * Command line was: qdbusxml2cpp -p freedesktop_objectmanager -i bluez_helper.h -v -c DBusObjectManagerInterface org.freedesktop.DBus.ObjectManager.xml
+ *
+ * qdbusxml2cpp is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * This file may have been hand-edited. Look for HAND-EDIT comments
+ * before re-generating it.
+ */
+
+#include "freedesktop_objectmanager.h"
+
+/*
+ * Implementation of interface class DBusObjectManagerInterface
+ */
+
+DBusObjectManagerInterface::DBusObjectManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
+ : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
+{
+}
+
+DBusObjectManagerInterface::~DBusObjectManagerInterface()
+{
+}
+
diff --git a/rockworkd/libpebble/bluez/freedesktop_objectmanager.h b/rockworkd/libpebble/bluez/freedesktop_objectmanager.h
new file mode 100644
index 0000000..509c5fc
--- /dev/null
+++ b/rockworkd/libpebble/bluez/freedesktop_objectmanager.h
@@ -0,0 +1,58 @@
+/*
+ * This file was generated by qdbusxml2cpp version 0.8
+ * Command line was: qdbusxml2cpp -p freedesktop_objectmanager -i bluez_helper.h -v -c DBusObjectManagerInterface org.freedesktop.DBus.ObjectManager.xml
+ *
+ * qdbusxml2cpp is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * Do not edit! All changes made to it will be lost.
+ */
+
+#ifndef FREEDESKTOP_OBJECTMANAGER_H_1442473386
+#define FREEDESKTOP_OBJECTMANAGER_H_1442473386
+
+#include <QtCore/QObject>
+#include <QtCore/QByteArray>
+#include <QtCore/QList>
+#include <QtCore/QMap>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QVariant>
+#include <QtDBus/QtDBus>
+#include "bluez_helper.h"
+
+/*
+ * Proxy class for interface org.freedesktop.DBus.ObjectManager
+ */
+class DBusObjectManagerInterface: public QDBusAbstractInterface
+{
+ Q_OBJECT
+public:
+ static inline const char *staticInterfaceName()
+ { return "org.freedesktop.DBus.ObjectManager"; }
+
+public:
+ DBusObjectManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
+
+ ~DBusObjectManagerInterface();
+
+public Q_SLOTS: // METHODS
+ inline QDBusPendingReply<ManagedObjectList> GetManagedObjects()
+ {
+ QList<QVariant> argumentList;
+ return asyncCallWithArgumentList(QStringLiteral("GetManagedObjects"), argumentList);
+ }
+
+Q_SIGNALS: // SIGNALS
+ void InterfacesAdded(const QDBusObjectPath &object_path, InterfaceList interfaces_and_properties);
+ void InterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces);
+};
+
+namespace org {
+ namespace freedesktop {
+ namespace DBus {
+ typedef ::DBusObjectManagerInterface ObjectManager;
+ }
+ }
+}
+#endif
diff --git a/rockworkd/libpebble/bluez/freedesktop_properties.cpp b/rockworkd/libpebble/bluez/freedesktop_properties.cpp
new file mode 100644
index 0000000..c74347c
--- /dev/null
+++ b/rockworkd/libpebble/bluez/freedesktop_properties.cpp
@@ -0,0 +1,26 @@
+/*
+ * This file was generated by qdbusxml2cpp version 0.8
+ * Command line was: qdbusxml2cpp -c FreeDesktopProperties -p freedesktop_properties -v org.freedesktop.DBus.Properties.xml
+ *
+ * qdbusxml2cpp is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * This file may have been hand-edited. Look for HAND-EDIT comments
+ * before re-generating it.
+ */
+
+#include "freedesktop_properties.h"
+
+/*
+ * Implementation of interface class FreeDesktopProperties
+ */
+
+FreeDesktopProperties::FreeDesktopProperties(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
+ : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
+{
+}
+
+FreeDesktopProperties::~FreeDesktopProperties()
+{
+}
+
diff --git a/rockworkd/libpebble/bluez/freedesktop_properties.h b/rockworkd/libpebble/bluez/freedesktop_properties.h
new file mode 100644
index 0000000..a7a655c
--- /dev/null
+++ b/rockworkd/libpebble/bluez/freedesktop_properties.h
@@ -0,0 +1,71 @@
+/*
+ * This file was generated by qdbusxml2cpp version 0.8
+ * Command line was: qdbusxml2cpp -c FreeDesktopProperties -p freedesktop_properties -v org.freedesktop.DBus.Properties.xml
+ *
+ * qdbusxml2cpp is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * Do not edit! All changes made to it will be lost.
+ */
+
+#ifndef FREEDESKTOP_PROPERTIES_H_1442473392
+#define FREEDESKTOP_PROPERTIES_H_1442473392
+
+#include <QtCore/QObject>
+#include <QtCore/QByteArray>
+#include <QtCore/QList>
+#include <QtCore/QMap>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QVariant>
+#include <QtDBus/QtDBus>
+
+/*
+ * Proxy class for interface org.freedesktop.DBus.Properties
+ */
+class FreeDesktopProperties: public QDBusAbstractInterface
+{
+ Q_OBJECT
+public:
+ static inline const char *staticInterfaceName()
+ { return "org.freedesktop.DBus.Properties"; }
+
+public:
+ FreeDesktopProperties(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
+
+ ~FreeDesktopProperties();
+
+public Q_SLOTS: // METHODS
+ inline QDBusPendingReply<QDBusVariant> Get(const QString &interface, const QString &name)
+ {
+ QList<QVariant> argumentList;
+ argumentList << QVariant::fromValue(interface) << QVariant::fromValue(name);
+ return asyncCallWithArgumentList(QStringLiteral("Get"), argumentList);
+ }
+
+ inline QDBusPendingReply<QVariantMap> GetAll(const QString &interface)
+ {
+ QList<QVariant> argumentList;
+ argumentList << QVariant::fromValue(interface);
+ return asyncCallWithArgumentList(QStringLiteral("GetAll"), argumentList);
+ }
+
+ inline QDBusPendingReply<> Set(const QString &interface, const QString &name, const QDBusVariant &value)
+ {
+ QList<QVariant> argumentList;
+ argumentList << QVariant::fromValue(interface) << QVariant::fromValue(name) << QVariant::fromValue(value);
+ return asyncCallWithArgumentList(QStringLiteral("Set"), argumentList);
+ }
+
+Q_SIGNALS: // SIGNALS
+ void PropertiesChanged(const QString &interface, const QVariantMap &changed_properties, const QStringList &invalidated_properties);
+};
+
+namespace org {
+ namespace freedesktop {
+ namespace DBus {
+ typedef ::FreeDesktopProperties Properties;
+ }
+ }
+}
+#endif
diff --git a/rockworkd/libpebble/bluez/org.bluez.AgentManager1.xml b/rockworkd/libpebble/bluez/org.bluez.AgentManager1.xml
new file mode 100644
index 0000000..e535c7e
--- /dev/null
+++ b/rockworkd/libpebble/bluez/org.bluez.AgentManager1.xml
@@ -0,0 +1,16 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node>
+ <interface name="org.bluez.AgentManager1">
+ <method name="RegisterAgent">
+ <arg type="o" name="agent"/>
+ <arg type="s" name="capability"/>
+ </method>
+ <method name="UnregisterAgent">
+ <arg type="o" name="agent"/>
+ </method>
+ <method name="RequestDefaultAgent">
+ <arg type="o" name="agent"/>
+ </method>
+ </interface>
+</node>