on xenial help sign in
Relating us with the virtual object
commitc54b124a380356dd4e0dabf2cca48f0e7027b4f9 authorTed Gould <ted@gould.cx> dateMon 7 Apr 2014, 16:49 (13 years ago) parente9ab822
2 files changed+31−2
plugins/Unity/Launcher/backend/launcherbackend.cpp+14−1 plugins/Unity/Launcher/backend/launcherbackend.h+17−1
plugins/Unity/Launcher/backend/launcherbackend.cpp+14−1
@@ -37,7 +37,7 @@ public:
3737};
3838
3939LauncherBackend::LauncherBackend(QObject *parent):
40− QObject(parent),
40+ QDBusVirtualObject(parent),
4141 m_accounts(nullptr)
4242{
4343#ifndef LAUNCHER_TESTING
@@ -318,3 +318,16 @@ bool LauncherBackend::isDefaultsItem(const QList<QVariantMap> &apps) const
318318 // list of one item with the 'defaults' field set to true.
319319 return (apps.size() == 1 && apps[0].value("defaults").toBool());
320320}
321+
322+bool LauncherBackend::handleMessage(const QDBusMessage& message, const QDBusConnection& connection)
323+{
324+ Q_UNUSED(message)
325+ Q_UNUSED(connection)
326+ return false;
327+}
328+
329+QString LauncherBackend::introspect (const QString &path) const
330+{
331+ Q_UNUSED(path)
332+ return "";
333+}
plugins/Unity/Launcher/backend/launcherbackend.h+17−1
@@ -24,6 +24,7 @@
2424#include <QObject>
2525#include <QSettings>
2626#include <QStringList>
27+#include <QDBusVirtualObject>
2728
2829class AccountsServiceDBusAdaptor;
2930
@@ -33,7 +34,7 @@ class AccountsServiceDBusAdaptor;
3334
3435class LauncherBackendItem;
3536
36−class LauncherBackend : public QObject
37+class LauncherBackend : public QDBusVirtualObject
3738{
3839 Q_OBJECT
3940
@@ -122,6 +123,21 @@ public:
122123 */
123124 void setUser(const QString &username);
124125
126+ /**
127+ * @brief Handle a message to an application node
128+ * @param message DBus message to handle
129+ * @param connection DBus connection that we're using
130+ * @returns whether the message was handled
131+ */
132+ virtual bool handleMessage(const QDBusMessage& message, const QDBusConnection& connection);
133+
134+ /**
135+ * @brief Get introspection information on the objects we're exporting
136+ * @param path the dbus path containing the appid
137+ * @returns Introspection information for that node in the tree
138+ */
139+ virtual QString introspect (const QString &path) const;
140+
125141Q_SIGNALS:
126142 void quickListChanged(const QString &appId, const QList<QuickListEntry> &quickList);
127143 void progressChanged(const QString &appId, int progress);