aboutsummaryrefslogtreecommitdiffstats
path: root/src/hs-config.h
diff options
context:
space:
mode:
authorwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2019-04-19 16:27:49 +0800
committerwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2019-04-19 16:27:49 +0800
commitf16e0728c0c9806d9a7c3766028428ed73b5a8cf (patch)
tree0a28552d766170c85bcaa1ee60f582744524124c /src/hs-config.h
parent0fc1fc7db6ff7cb95ad6cd6f0ef8f2b88f3d08da (diff)
recover application
Change-Id: I02330f9c9336609ce585ab172211acada68fba9c
Diffstat (limited to 'src/hs-config.h')
-rw-r--r--src/hs-config.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/hs-config.h b/src/hs-config.h
index a81a660..849dc4f 100644
--- a/src/hs-config.h
+++ b/src/hs-config.h
@@ -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
@@ -45,7 +47,8 @@ public:
int readConfig(void);
const struct handshake_info* getHandshakeInfo(void) const {return &m_handshake_info;}
- const recover_map* getRecoverMap(void) const {return &m_recover_map;}
+ 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;