// // Created by xajhu on 2019/11/18 0018. // #ifndef ZTP_CLIENT_CONFIG_H #define ZTP_CLIENT_CONFIG_H #include "common.h" #define DEVICE_ZTP_PATH ("../ztp.conf") typedef struct { char server_url[MAX_PATH * 2]; int port; } ZTP_SERVER, *PZTP_SERVER; typedef struct { ZTP_SERVER svr_cfg; char dev_dir[MAX_PATH]; } ZTP_CONFIG, *PZTP_CONFIG; int init_configure(const char* pPath); int cfg_get_bool_value(const char* pTags, int defValue); int cfg_get_int_value(const char* pTags, int defValue); char* cfg_get_string_value(const char* pTags, char* pDefValue); double cfg_get_float_value(const char* pTags, double defValue); #endif //ZTP_CLIENT_CONFIG_H