recover application
[apps/agl-service-homescreen.git] / src / hs-config.h
index 7cc5dd3..849dc4f 100644 (file)
@@ -21,6 +21,8 @@
 #include <unordered_map>
 #include "hs-helper.h"
 
+#define RECOVER_MAX 3
+
 struct handshake_info {
     int times;    // sleep times
     int sleep;    // sleep x ms
@@ -44,8 +46,9 @@ public:
     HS_Config &operator=(HS_Config &&) = delete;
 
     int readConfig(void);
-    struct handshake_info getHandshakeInfo(void) {return m_handshake_info;}
-    recover_map getRecoverMap(void) {return m_recover_map;}
+    const struct handshake_info* getHandshakeInfo(void) const {return &m_handshake_info;}
+    recover_map& getRecoverMap(void) {return m_recover_map;}
+    static const std::array<std::string, RECOVER_MAX> keys_recover_type;   // based on hs-conf.json
 
 private:
     int parseConfig(void);
@@ -60,11 +63,6 @@ private:
     const std::string key_appid = "appid";
     const std::string key_visibility = "visibility";
     const std::string key_area = "area";
-    const std::array<std::string, 3> keys_recover_type = {   // based on hs-conf.json
-        "hs-apps",
-        "default-lastmode",
-        "normal-apps"
-    };
 
     struct json_object *m_hs_conf;
     struct json_object *m_lastmode;