From 492a861a47c5165cf62a051303d4b45e5d5630cd Mon Sep 17 00:00:00 2001 From: Javier Date: Fri, 12 Dec 2014 23:32:46 +0100 Subject: query all apps from d-bus --- daemon/manager.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'daemon/manager.cpp') diff --git a/daemon/manager.cpp b/daemon/manager.cpp index 73b80e5..25908e4 100644 --- a/daemon/manager.cpp +++ b/daemon/manager.cpp @@ -366,6 +366,26 @@ QStringList PebbledProxy::AppSlots() const return l; } +QVariantList PebbledProxy::AllApps() const +{ + QList uuids = manager()->apps->appUuids(); + QVariantList l; + + foreach (const QUuid &uuid, uuids) { + const AppInfo &info = manager()->apps->info(uuid); + QVariantMap m; + m.insert("uuid", QVariant::fromValue(uuid.toString())); + m.insert("short-name", QVariant::fromValue(info.shortName())); + m.insert("long-name", QVariant::fromValue(info.longName())); + m.insert("company-name", QVariant::fromValue(info.companyName())); + m.insert("version-label", QVariant::fromValue(info.versionLabel())); + m.insert("is-watchface", QVariant::fromValue(info.isWatchface())); + l.append(QVariant::fromValue(m)); + } + + return l; +} + bool PebbledProxy::SendAppMessage(const QString &uuid, const QVariantMap &data) { Q_ASSERT(calledFromDBus()); -- cgit v1.2.3