From c6035c02992d874c1422cb279423017ca4c05eec Mon Sep 17 00:00:00 2001 From: wang_zhiqiang Date: Tue, 6 Nov 2018 10:28:59 +0800 Subject: [PATCH] use appid instead of appname in "tap_shortcut" Now In homescreen-service used application_id to identify different application, so use appid instead of appname in "tap_shortcut" parameter. Bug-AGL: SPEC-1764 Change-Id: I8493331f37977a30d6d88c0d222da4c2db32e727 Signed-off-by: wang_zhiqiang --- doc/ApplicationGuide.md | 8 ++++---- doc/parts/tap_shortcut.svg | 30 +++++++++++++++--------------- src/homescreen.cpp | 4 ++-- src/hs-client.cpp | 8 ++++---- src/hs-client.h | 2 +- src/hs-clientmanager.cpp | 11 +++-------- src/hs-helper.h | 2 +- 7 files changed, 30 insertions(+), 35 deletions(-) diff --git a/doc/ApplicationGuide.md b/doc/ApplicationGuide.md index 5bbf234..dd3f1f0 100644 --- a/doc/ApplicationGuide.md +++ b/doc/ApplicationGuide.md @@ -134,7 +134,7 @@ The port and token is provided by Application Framework Execute the "tapShortcut()" function. ``` -libhs->tapShortcut("application_name"); +libhs->tapShortcut("application_id"); ``` Regarding the detail of tap_shortcut() API, please refer [this](#HomeScreen\ API) section. @@ -190,7 +190,7 @@ The communication protocols between libhomescreen and upper binder, upper binder - [LibHomeScreen ()](api-ref/html/de/dd0/class_lib_home_screen.html#a724bd949c4154fad041f96a15ef0f5dc) - [init (const int port, const std::string &token)](api-ref/html/de/dd0/class_lib_home_screen.html#a6a57b573cc767725762ba9beab032220) -- [tapShortcut(const char *application_name)](api-ref/html/de/dd0/class_lib_home_screen.html#afb571c9577087b47065eb23e7fdbc903) +- [tapShortcut(const char *application_id)](api-ref/html/de/dd0/class_lib_home_screen.html#afb571c9577087b47065eb23e7fdbc903) - [onScreenMessage(const char *display_message)](api-ref/html/de/dd0/class_lib_home_screen.html#ac336482036a72b51a822725f1929523c) - [onScreenReply(const char *reply_message)](api-ref/html/de/dd0/class_lib_home_screen.html#a6c065f41f2c5d1f58d2763bfb4da9c37) - [registerCallback (void(*event_cb)(const std::string &event, struct json_object *event_contents), void(*reply_cb)(struct json_object *reply_contents), void(*hangup_cb)(void)=nullptr)](api-ref/html/de/dd0/class_lib_home_screen.html#a2789e8a5372202cc36f48e71dbb9b7cf) @@ -286,8 +286,8 @@ note over App LibHomeScreen::Event_TapShortcut end note -HomeScreenGUI->HomeScreenBinder: tapShortcut(application_name) -HomeScreenBinder->App: event_handler(application_name) +HomeScreenGUI->HomeScreenBinder: tapShortcut(application_id) +HomeScreenBinder->App: event_handler(application_id) @enduml ``` diff --git a/doc/parts/tap_shortcut.svg b/doc/parts/tap_shortcut.svg index d454164..c6be41b 100644 --- a/doc/parts/tap_shortcut.svg +++ b/doc/parts/tap_shortcut.svg @@ -1,18 +1,18 @@ -Application Callback Event TapShortcut phaseAppAppHomeScreenBinderHomeScreenBinderHomeScreenGUIHomeScreenGUIset_event_handler()LibHomeScreen::Event_TapShortcuttapShortcut(application_name)event_handler(application_name)