X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fhs-appinfo.h;h=3355686ca6b3a95f28041c151a16d18793962f21;hb=a7e49d93b4dd03f8ce3b77f831f9293ba5a3de01;hp=7747f52320c5cb594e9f9f28108b26f1f3aba97c;hpb=2f7789558c98d8b79b41d62ac97f5bd6de557dc9;p=apps%2Fagl-service-homescreen.git diff --git a/src/hs-appinfo.h b/src/hs-appinfo.h index 7747f52..3355686 100644 --- a/src/hs-appinfo.h +++ b/src/hs-appinfo.h @@ -47,14 +47,14 @@ public: static HS_AppInfo* instance(void); int init(afb_api_t api); - void onEvent(afb_api_t api, const char *event, struct json_object *object); + int onEvent(afb_api_t api, const char *event, struct json_object *object); void getRunnables(struct json_object **object); std::string getAppProperty(const std::string appid, std::string key) const; std::string checkAppId(const std::string &appid); private: - void updateAppDetailList(afb_api_t api, struct json_object *object); + int updateAppDetailList(afb_api_t api, struct json_object *object); void createAppDetailList(struct json_object *object); std::string parseAppDetail(struct json_object *object, AppDetail &info) const; void addAppDetail(struct json_object *object); @@ -72,10 +72,8 @@ private: "restriction" }; - typedef void (HS_AppInfo::*func_handler)(afb_api_t, struct json_object*); - const std::unordered_map concerned_event_list { - {"afm-main/application-list-changed", &HS_AppInfo::updateAppDetailList} - }; + typedef int (HS_AppInfo::*func_handler)(afb_api_t, struct json_object*); + static const std::unordered_map concerned_event_list; private: static HS_AppInfo* me;