dav/config.h

changeset 795
05647e862a17
parent 747
efbd59642577
child 796
81e0f67386a6
equal deleted inserted replaced
794:29d544c3c2b8 795:05647e862a17
32 #include <cx/string.h> 32 #include <cx/string.h>
33 #include <stdbool.h> 33 #include <stdbool.h>
34 #include <libidav/webdav.h> 34 #include <libidav/webdav.h>
35 #include "pwd.h" 35 #include "pwd.h"
36 #include "opt.h" 36 #include "opt.h"
37
38 #include <libidav/config.h>
37 39
38 #ifdef __cplusplus 40 #ifdef __cplusplus
39 extern "C" { 41 extern "C" {
40 #endif 42 #endif
41 43
73 }; 75 };
74 76
75 int check_config_dir(void); 77 int check_config_dir(void);
76 78
77 char* config_file_path(char *name); 79 char* config_file_path(char *name);
80
81 cxmutstr config_load_file(const char *path);
78 82
79 int load_config(DavContext *ctx); 83 int load_config(DavContext *ctx);
84 DavConfig* get_config(void);
85 int store_config(void);
86
80 void free_config(void); 87 void free_config(void);
81 int load_repository(const xmlNode *reponode); 88 int load_repository(const xmlNode *reponode);
82 int load_key(const xmlNode *keynode); 89 int load_key(const xmlNode *keynode);
83 int load_proxy(DavProxy*, const xmlNode *proxynode, int type); 90 int load_proxy(DavProxy*, const xmlNode *proxynode, int type);
84 cxmutstr load_key_file(const char *filename); 91 cxmutstr load_key_file(const char *filename);
99 106
100 PwdStore* get_pwdstore(void); 107 PwdStore* get_pwdstore(void);
101 int pwdstore_save(PwdStore *pwdstore); 108 int pwdstore_save(PwdStore *pwdstore);
102 109
103 110
104 Repository* url2repo_s(cxstring url, char **path); 111 //Repository* url2repo_s(cxstring url, char **path);
105 Repository* url2repo(const char *url, char **path); 112 //Repository* url2repo(const char *url, char **path);
106 113
107 DavSession* connect_to_repo(DavContext *ctx, Repository *repo, char *path, dav_auth_func authfunc, CmdArgs *a); 114 DavSession* connect_to_repo(DavContext *ctx, DavCfgRepository *repo, const char *path, dav_auth_func authfunc, CmdArgs *a);
108 115
109 int request_auth(DavSession *sn, void *userdata); 116 int request_auth(DavSession *sn, void *userdata);
110 117
111 #ifdef __cplusplus 118 #ifdef __cplusplus
112 } 119 }

mercurial