支持加载使用gzip命令压缩的maat JSON文件。允许先压缩、后加密,不支持先加密后压缩。

This commit is contained in:
zhengchao
2021-04-28 21:44:04 +08:00
parent c5239762fe
commit 1460f891c6
8 changed files with 148 additions and 16 deletions

View File

@@ -159,7 +159,8 @@ enum MAAT_INIT_OPT
MAAT_OPT_ENABLE_UPDATE, //VALUE is interger, SIZE=sizeof(int). 1: Enabled, 0:Disabled. DEFAULT: Backgroud update is enabled. Runtime setting is allowed.
MAAT_OPT_ACCEPT_TAGS, //VALUE is a const char*, MUST end with '\0', SIZE= strlen(string+'\0')+1. Format is a JSON, e.g.{"tags":[{"tag":"location","value":"Beijing/ChaoYang/Huayan/22A"},{"tag":"isp","value":"telecom"}]}
MAAT_OPT_FOREIGN_CONT_DIR, //VALUE is a const char*, MUST end with '\0', SIZE= strlen(string+'\0')+1. Specifies a local diretory to store foreign content. Default: []table_info_path]_files
MAAT_OPT_GARBAGE_COLLECTION_TIMEOUT_MS //VALUE is interger, SIZE=sizeof(int). DEFAULT:10,000 milliseconds.
MAAT_OPT_GARBAGE_COLLECTION_TIMEOUT_MS, //VALUE is interger, SIZE=sizeof(int). DEFAULT:10,000 milliseconds.
MAAT_OPT_JSON_IS_GZIPPED //VALUE is NULL, SIZE is 0. Default: 0, Not compressed by gzip.
};
//return -1 if failed, return 0 on success;
int Maat_set_feather_opt(Maat_feather_t feather,enum MAAT_INIT_OPT type,const void* value,int size);