X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fhs-helper.cpp;h=50a3ae1bbb08a042d54bed8c946e8212720f6d15;hb=refs%2Fheads%2Fsandbox%2Fwangzhiqiang%2Fjira2292;hp=07597b72c273b17a5e41304e87e36192da7a845a;hpb=7a123d6d802fe76a6d2eb32adacb2215d5bb873a;p=apps%2Fagl-service-homescreen.git diff --git a/src/hs-helper.cpp b/src/hs-helper.cpp index 07597b7..50a3ae1 100644 --- a/src/hs-helper.cpp +++ b/src/hs-helper.cpp @@ -28,6 +28,7 @@ const char* evlist[] = { "replyShowWindow", "showNotification", "showInformation", + "application-list-changed", "reserved" }; @@ -246,3 +247,28 @@ int hs_search_event_name_index(const char* value) } return ret; } + +/** + * get application id from request + * + * #### Parameters + * - request : the request + * + * #### Return + * got application id + * + */ +std::string get_application_id(const afb_req_t request) +{ + std::string appid; + char *app_id = afb_req_get_application_id(request); + if(app_id == nullptr) { + appid = std::string(""); + } + else { + appid = std::string(app_id); + free(app_id); + } + + return appid; +}