#include "hs-proxy.h"
#include "hs-clientmanager.h"
-const char _keyArea[] = "area";
+
+HS_AppRecover* HS_AppRecover::me = nullptr;
+
+/**
+ * screen_update event handler
+ *
+ * #### Parameters
+ * - api : the api
+ * - event : received event name
+ * - object : received json object
+ *
+ * #### Return
+ * 0 : event can transfer to others
+ * 1 : event not transfer to others
+ */
+int on_screen_update_event(afb_api_t api, const char *event, struct json_object *object)
+{
+
+ return 0;
+}
+
+/**
+ * get instance
+ *
+ * #### Parameters
+ * - Nothing
+ *
+ * #### Return
+ * HS_AppRecover instance pointer
+ *
+ */
+HS_AppRecover* HS_AppRecover::instance(void)
+{
+ if(me == nullptr)
+ me = new HS_AppRecover();
+
+ return me;
+}
+
+/**
+ * HS_AppRecover initialize function
+ *
+ * #### Parameters
+ * - api : the api serving the request
+ *
+ * #### Return
+ * 0 : init success
+ * 1 : init fail
+ *
+ */
+int HS_AppRecover::init(afb_api_t api)
+{
+ HS_WmProxy wm_proxy;
+ wm_proxy.subscribe(api, HS_WmProxy::Event_ScreenUpdated);
+ setEventHook("windowmanager/screenUpdated", on_screen_update_event);
+ return 0;
+}
/**
* starting recover applications