diff options
Diffstat (limited to 'src/hs-appinfo.h')
-rw-r--r-- | src/hs-appinfo.h | 10 |
1 files changed, 4 insertions, 6 deletions
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<std::string, func_handler> 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<std::string, func_handler> concerned_event_list; private: static HS_AppInfo* me; |