aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2019-01-08 09:43:18 +0800
committerwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2019-01-08 09:43:18 +0800
commit8788711b78485032f334939d8d3ddfc319189cd2 (patch)
tree731c3f8cb3bd3a37df9cbb3ef5317dbc0f48b407
parent64b268e9c1151c1ccff3b9a20cbe3901f347e9ee (diff)
Revert "add event tabble"
This reverts commit 64b268e9c1151c1ccff3b9a20cbe3901f347e9ee.
-rw-r--r--src/homescreen.cpp3
-rw-r--r--src/hs-clientmanager.cpp12
-rw-r--r--src/hs-clientmanager.h15
3 files changed, 1 insertions, 29 deletions
diff --git a/src/homescreen.cpp b/src/homescreen.cpp
index 73b2cc9..0f6a10d 100644
--- a/src/homescreen.cpp
+++ b/src/homescreen.cpp
@@ -233,8 +233,7 @@ static void showWindow(afb_req_t request)
{
HMI_NOTICE("homescreen-service","called.");
- // int ret = g_hs_instance->client_manager->showWindow(request);
- int ret = g_hs_instance->client_manager->handleRequest(__FUNCTION__, request);
+ int ret = g_hs_instance->client_manager->showWindow(request);
if (ret != 0) {
afb_req_fail_f(request, "failed", "called %s, Unknown parameter", __FUNCTION__);
return;
diff --git a/src/hs-clientmanager.cpp b/src/hs-clientmanager.cpp
index f6c18c0..9fe8b96 100644
--- a/src/hs-clientmanager.cpp
+++ b/src/hs-clientmanager.cpp
@@ -500,15 +500,3 @@ int HS_ClientManager::pushEvent(const char *event, struct json_object *param, st
return 0;
}
-
-int HS_ClientManager::handleRequest(const char *verb, afb_req_t request)
-{
- HMI_NOTICE("homescreen-service","verb = %s", verb);
- int ret = AFB_EVENT_BAD_REQUEST;
- auto ip = func_list.find(std::string(verb));
- if(ip != func_list.end()) {
- HMI_NOTICE("homescreen-service","verb found");
- ret = (this->*(ip->second))(request);
- }
- return ret;
-} \ No newline at end of file
diff --git a/src/hs-clientmanager.h b/src/hs-clientmanager.h
index 49968f1..a568298 100644
--- a/src/hs-clientmanager.h
+++ b/src/hs-clientmanager.h
@@ -57,7 +57,6 @@ public:
int unsubscribe(afb_req_t request);
int showNotification(afb_req_t request);
int showInformation(afb_req_t request);
- int handleRequest(const char *verb, afb_req_t request);
int pushEvent(const char *event, struct json_object *param, std::string appid = "");
private:
@@ -65,20 +64,6 @@ private:
HS_Client* addClient(afb_req_t req, std::string appid);
void removeClient(std::string appid);
- typedef int (HS_ClientManager::*func_handler)(afb_req_t);
- const std::unordered_map<std::string, func_handler> func_list {
- {"tap_shortcut", &HS_ClientManager::tap_shortcut},
- {"showWindow", &HS_ClientManager::showWindow},
- {"hideWindow", &HS_ClientManager::hideWindow},
- {"replyShowWindow", &HS_ClientManager::replyShowWindow},
- {"on_screen_message", &HS_ClientManager::on_screen_message},
- {"on_screen_reply", &HS_ClientManager::on_screen_reply},
- {"subscribe", &HS_ClientManager::subscribe},
- {"unsubscribe", &HS_ClientManager::unsubscribe},
- {"showNotification", &HS_ClientManager::showNotification},
- {"showInformation", &HS_ClientManager::showInformation}
- };
-
private:
static HS_ClientManager* me;
std::unordered_map<std::string, HS_Client*> client_list;