#ifndef __TS_CFG_H__ #define __TS_CFG_H__ #include #include #include typedef struct APP_CONFIG { ex_wstr name; ex_wstr display; ex_wstr application; ex_wstr cmdline; ex_wstrs description; }APP_CONFIG; class TsCfg { public: TsCfg(); virtual ~TsCfg(); bool init(void); bool save(const ex_astr& new_value); Json::Value& get_root() { return m_root; } APP_CONFIG ssh; APP_CONFIG sftp; APP_CONFIG telnet; APP_CONFIG rdp; protected: bool _load(const ex_astr& str_json); bool _parse_app(const Json::Value& m_root, const ex_astr& str_app, APP_CONFIG& cfg); protected: Json::Value m_root; }; extern TsCfg g_cfg; #endif // __TS_CFG_H__