Add gitreview file for Magic Marlin branch
[apps/agl-service-homescreen.git] / src / hs-helper.cpp
index 2d8ab7a..50a3ae1 100644 (file)
@@ -23,6 +23,12 @@ const char* evlist[] = {
     "tap_shortcut",
     "on_screen_message",
     "on_screen_reply",
+    "showWindow",
+    "hideWindow",
+    "replyShowWindow",
+    "showNotification",
+    "showInformation",
+    "application-list-changed",
     "reserved"
   };
 
@@ -241,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;
+}