aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2019-02-13 12:54:23 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2019-02-13 12:54:23 +0000
commite5c3f28f53eeef478d19a39b32dc7405efa46ef9 (patch)
tree31207f64e6efa1c36a824938047dda14d9b8ed84
parent603e18905e0a3fbdd26d9966d704b605a9a3fb6e (diff)
parent9a338344f1a892fd188d80e71038634e4ee5096e (diff)
Merge changes Ie2da3e54,I86fcb0cd
* changes: binding: act upon messageType package: update application name and author
-rw-r--r--app/taskmanager.cpp17
-rw-r--r--app/taskmanager.h1
-rw-r--r--package/config.xml4
3 files changed, 17 insertions, 5 deletions
diff --git a/app/taskmanager.cpp b/app/taskmanager.cpp
index 03a39bb..3b0d1e7 100644
--- a/app/taskmanager.cpp
+++ b/app/taskmanager.cpp
@@ -54,10 +54,21 @@ void TaskManager::onMessageReceived(MessageType type, Message *message)
void TaskManager::ProcessResponse(Message *message)
{
- std::vector<ProcInfo> procs;
-
qDebug() << "got message " << message->toJson();
- QJsonArray processes = message->replyData()["processes"].toArray();
+ QString msgType = message->replyData()["msgType"].toString();
+ if (msgType.isNull())
+ return; // no type supplied, ignoring
+
+ if (QString::compare(msgType, "processList") == 0) {
+ QJsonArray processes = message->replyData()["processes"].toArray();
+ ProcessResponseTasklist(processes);
+ }
+ // more response types to follow
+}
+
+void TaskManager::ProcessResponseTasklist(QJsonArray& processes)
+{
+ std::vector<ProcInfo> procs;
if (processes.size() == 0) {
// this is not a valid process list response
diff --git a/app/taskmanager.h b/app/taskmanager.h
index 4049f9b..a874c22 100644
--- a/app/taskmanager.h
+++ b/app/taskmanager.h
@@ -38,6 +38,7 @@ private:
std::vector<ProcInfo> m_procinfos;
void ProcessResponse(Message *message);
+ void ProcessResponseTasklist(QJsonArray& processes);
};
#endif // TASKMANAGER_H
diff --git a/package/config.xml b/package/config.xml
index 933606d..01ba8d0 100644
--- a/package/config.xml
+++ b/package/config.xml
@@ -3,8 +3,8 @@
<name>taskmanager</name>
<icon src="icon.png"/>
<content src="bin/taskmanager" type="application/vnd.agl.native"/>
- <description>AGL application example</description>
- <author>Last Name, First Name &lt;example.man@bigouden.bzh&gt;</author>
+ <description>AGL Task Manager</description>
+ <author>Wool, Vitaly &lt;vitaly.wool@konsulko.com&gt;</author>
<license>APL2.0</license>
<feature name="urn:AGL:widget:required-permission">