on xenial help sign in
Relating us with the virtual object
c54b124Ted Gould
plugins/Unity/Launcher/backend/launcherbackend.cpp+14−1
@@ -37,7 +37,7 @@ public:
37};
37};
38
38
39LauncherBackend::LauncherBackend(QObject *parent):
39LauncherBackend::LauncherBackend(QObject *parent):
40− QObject(parent),
40+ QDBusVirtualObject(parent),
41 m_accounts(nullptr)
41 m_accounts(nullptr)
42{
42{
43#ifndef LAUNCHER_TESTING
43#ifndef LAUNCHER_TESTING
@@ -318,3 +318,16 @@ bool LauncherBackend::isDefaultsItem(const QList<QVariantMap> &apps) const
318 // list of one item with the 'defaults' field set to true.
318 // list of one item with the 'defaults' field set to true.
319 return (apps.size() == 1 && apps[0].value("defaults").toBool());
319 return (apps.size() == 1 && apps[0].value("defaults").toBool());
320}
320}
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 @@
24#include <QObject>
24#include <QObject>
25#include <QSettings>
25#include <QSettings>
26#include <QStringList>
26#include <QStringList>
27+#include <QDBusVirtualObject>
27
28
28class AccountsServiceDBusAdaptor;
29class AccountsServiceDBusAdaptor;
29
30
@@ -33,7 +34,7 @@ class AccountsServiceDBusAdaptor;
33
34
34class LauncherBackendItem;
35class LauncherBackendItem;
35
36
36−class LauncherBackend : public QObject
37+class LauncherBackend : public QDBusVirtualObject
37{
38{
38 Q_OBJECT
39 Q_OBJECT
39
40
@@ -122,6 +123,21 @@ public:
122 */
123 */
123 void setUser(const QString &username);
124 void setUser(const QString &username);
124
125
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+
125Q_SIGNALS:
141Q_SIGNALS:
126 void quickListChanged(const QString &appId, const QList<QuickListEntry> &quickList);
142 void quickListChanged(const QString &appId, const QList<QuickListEntry> &quickList);
127 void progressChanged(const QString &appId, int progress);
143 void progressChanged(const QString &appId, int progress);