summaryrefslogtreecommitdiff
path: root/daemon/manager.cpp
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2014-12-12 23:32:46 +0100
committerJavier <dev.git@javispedro.com>2014-12-12 23:32:46 +0100
commit492a861a47c5165cf62a051303d4b45e5d5630cd (patch)
treeee78b2cb3c176a2a9f76cf7fbf805404e0f23b69 /daemon/manager.cpp
parent75352f8cf5a60cfd291a26fe2c93d06281055f31 (diff)
query all apps from d-bus
Diffstat (limited to 'daemon/manager.cpp')
-rw-r--r--daemon/manager.cpp20
1 files changed, 20 insertions, 0 deletions
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<QUuid> 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());