asterisk几个通用函数说明
1.? #define ast_config_load(filename, flags)?? ?ast_config_load2(filename, AST_MODULE, flags)
???? 加載配置文件filename,并返回一個ast_config結(jié)構(gòu)體指針。
???? ast_config_load2是調(diào)用了
???? struct ast_config *ast_config_internal_load(const char *filename, struct ast_config *cfg, struct ast_flags flags, const char *suggested_include_file, const char *who_asked)
??? 來實現(xiàn)的
2.? char *ast_category_browse(struct ast_config *config, const char *prev)
??????? 傳入一個ast_config結(jié)構(gòu)體指針,一個配置文件的主鍵名稱,返回下一個主鍵名稱,如果傳入的是NULL,則
???? 返回第一個主鍵的名稱。
3. struct ast_variable *ast_variable_browse(const struct ast_config *config, const char *category)
??? 傳入一個ast_config結(jié)構(gòu)體指針,一個配置文件主鍵名稱,返回一個鍵值對的列表,通過
??? ast_variable的name得到鍵名,value得到鍵值,next得到此主鍵下的另一個鍵值對。
????
4.? const char *ast_variable_retrieve(const struct ast_config *config, const char *category, const char *variable)
???? 傳入一個ast_config結(jié)構(gòu)體指針,一個配置文件主鍵名稱,一個子鍵的名稱,返回此子鍵的值
5. void ast_copy_string(char *dst, const char *src, size_t size)
??? 功能類似strcpy
6. int ast_strlen_zero(const char *s)
??? 當(dāng)a為空字符串時返回真
總結(jié)
以上是生活随笔為你收集整理的asterisk几个通用函数说明的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 解决Ubuntu下切换到root用户后没
- 下一篇: 招行附属卡申请条件/办卡材料