start launcher and lastmode after homescreen started
[apps/agl-service-homescreen.git] / src / hs-apprecover.h
index f46846d..b702bd9 100644 (file)
@@ -24,6 +24,7 @@
 struct app_recover_info {
     std::string recover_type;
     bool visibility;
+    std::string after;
 };
 
 class HS_AppRecover {
@@ -35,13 +36,23 @@ public:
     HS_AppRecover(HS_AppRecover &&) = delete;
     HS_AppRecover &operator=(HS_AppRecover &&) = delete;
 
+    static HS_AppRecover* instance(void);
+    int init(afb_api_t api);
     void startRecovery(afb_api_t api, recover_map &map);
-    bool registerRecoveredApp(std::string &appid);
+    bool registerRecoveredApp(afb_api_t api, const std::string &appid);
+    void screenUpdated(struct json_object *obj);
 
 private:
+    void startApplication(afb_api_t api, const std::string &appid);
+    void updateLastmode(std::set<std::string> &set);
+    bool isHomescreenApp(const std::string &appid) const;
 
+    const std::string key_ids = "ids";
+    static HS_AppRecover* me;
     std::map<std::string, struct app_recover_info> m_recover_apps_list;
     std::set<std::string> m_recovering_set;
+    std::map<std::string, std::set<std::string>> m_wait_recover_set;
+    std::set<std::string> m_lastmode_list;
 };
 
 #endif // HOMESCREEN_APPRECOVER_H
\ No newline at end of file