--- a/libidav/config.h Sat Sep 30 16:33:47 2023 +0200 +++ b/libidav/config.h Sat Sep 30 17:26:00 2023 +0200 @@ -49,6 +49,8 @@ typedef enum dav_cfg_key_type DavCfgKeyType; +typedef cxmutstr (*dav_loadkeyfile_func)(const char *filename); + #define DAV_HTTP_PROXY 1 #define DAV_HTTPS_PROXY 2 @@ -160,6 +162,8 @@ DavConfig* dav_config_load(cxmutstr xmlfilecontent, int *error); +void dav_config_free(DavConfig *config); + CxBuffer* dav_config2buf(DavConfig *config); void dav_config_add_repository(DavConfig *config, DavCfgRepository *repo); @@ -179,6 +183,8 @@ DavCfgRepository* dav_config_url2repo(DavConfig *config, const char *url, char **path); DavCfgRepository* dav_config_url2repo_s(DavConfig *config, cxstring url, cxmutstr *path); +int dav_config_keytype(DavCfgKeyType type); +int dav_config_register_keys(DavConfig *config, DavContext *ctx, dav_loadkeyfile_func loadkey); #ifdef __cplusplus }