X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fhs-apprecover.h;h=48138b5c54d387b80643cfeed665fc0d1342ee11;hb=refs%2Fheads%2Fsandbox%2Fzheng_wenlong%2Fals2019_vertical;hp=701ec5f6ff0ee1cdd2c75755a49f794f59244184;hpb=4cb1ba39335aa2a2d2e08481acd72a3682adaefe;p=apps%2Fagl-service-homescreen.git diff --git a/src/hs-apprecover.h b/src/hs-apprecover.h index 701ec5f..48138b5 100644 --- a/src/hs-apprecover.h +++ b/src/hs-apprecover.h @@ -20,15 +20,17 @@ #include #include "hs-helper.h" #include "hs-config.h" +#include "hs-clientmanager.h" struct app_recover_info { std::string recover_type; bool visibility; + std::string after; }; -class HS_AppRecover { +class HS_AppRecover : public listener_interface { public: - HS_AppRecover() = default; + HS_AppRecover() : listener_interface(std::string("hs_apprecover")) {} ~HS_AppRecover() = default; HS_AppRecover(HS_AppRecover const &) = delete; HS_AppRecover &operator=(HS_AppRecover const &) = delete; @@ -37,11 +39,13 @@ public: static HS_AppRecover* instance(void); int init(afb_api_t api); - void startRecovery(afb_api_t api, recover_map &map); - bool registerRecoveredApp(const std::string &appid); + void setRecoverMap(recover_map &map) {recover_app_map.swap(map);} + void startRecovery(afb_api_t api); void screenUpdated(struct json_object *obj); + void notify(afb_api_t api, std::string appid = ""); private: + void startApplication(afb_api_t api, const std::string &appid); void updateLastmode(std::set &set); bool isHomescreenApp(const std::string &appid) const; @@ -49,7 +53,9 @@ private: static HS_AppRecover* me; std::map m_recover_apps_list; std::set m_recovering_set; + std::map> m_wait_recover_set; std::set m_lastmode_list; + recover_map recover_app_map; }; #endif // HOMESCREEN_APPRECOVER_H \ No newline at end of file