aboutsummaryrefslogtreecommitdiffstats
path: root/src/hs-client.cpp
diff options
context:
space:
mode:
authorwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2019-02-19 09:29:53 +0800
committerwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2019-03-14 13:58:34 +0800
commit25299ef60fa4df5f590ff364cff004e90376a4bf (patch)
treef908127b90ddcc965bbfbed3a5e0b615aa16d195 /src/hs-client.cpp
parent256c66de221e748638c7cb0193bfe52ed312be93 (diff)
Define func_list as static
For sharing func_list between all client instance, define func_list as static. Change-Id: I8a0a131128e057cc55a2d3efb76b66033dd20a04 Signed-off-by: wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>
Diffstat (limited to 'src/hs-client.cpp')
-rw-r--r--src/hs-client.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/hs-client.cpp b/src/hs-client.cpp
index dd91e10..e0d4bf0 100644
--- a/src/hs-client.cpp
+++ b/src/hs-client.cpp
@@ -27,6 +27,21 @@ static const char _parameter[] = "parameter";
static const char _replyto[] = "replyto";
static const char _caller[] = "caller";
+// homescreen-service event and event handler function list
+const std::unordered_map<std::string, HS_Client::func_handler> HS_Client::func_list {
+ {"tap_shortcut", &HS_Client::tap_shortcut},
+ {"showWindow", &HS_Client::showWindow},
+ {"hideWindow", &HS_Client::hideWindow},
+ {"replyShowWindow", &HS_Client::replyShowWindow},
+ {"on_screen_message", &HS_Client::on_screen_message},
+ {"on_screen_reply", &HS_Client::on_screen_reply},
+ {"subscribe", &HS_Client::subscribe},
+ {"unsubscribe", &HS_Client::unsubscribe},
+ {"showNotification", &HS_Client::showNotification},
+ {"showInformation", &HS_Client::showInformation},
+ {"application-list-changed", nullptr}
+};
+
/**
* HS_Client construction function
*