#pragma once #include #include struct AppOption { int debug {0}; std::string webSrvUrl; std::string lunchDate; struct { std::string host; int port; std::string user; std::string passwd; std::string dbname; } database; struct { int useToken {1}; int port {0}; int encryption {1}; std::string encryptKey; } http; struct { std::string host; std::string username; std::string password; } mqtt; struct { float latitude {0}; float longitude {0}; float altitude {0}; } view; struct VideoInfo { std::string host; int port; std::string user; std::string passwd; }; std::map mapVideo; }; class Config { public: static bool init(std::string filename); static AppOption::VideoInfo* getVideoInfo(std::string name); static AppOption option; };