1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 #ifndef CONFIG_H
30 #define CONFIG_H
31
32 #include <cx/string.h>
33 #include <stdbool.h>
34 #include <libidav/webdav.h>
35 #include "pwd.h"
36 #include "opt.h"
37
38 #include <libidav/config.h>
39
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43
44
45 #define HTTP_PROXY 1
46 #define HTTPS_PROXY 2
47
48
49 int check_config_dir(
void);
50
51 char* config_file_path(
char *name);
52
53 cxmutstr config_load_file(
const char *path);
54
55 int load_config(DavContext *ctx);
56 DavConfig* get_config(
void);
57 int store_config(
void);
58 void free_config(
void);
59
60 cxmutstr load_key_file(
const char *filename);
61
62 PwdStore* get_pwdstore(
void);
63 int pwdstore_save(PwdStore *pwdstore);
64
65
66
67
68
69 DavSession* connect_to_repo(DavContext *ctx, DavCfgRepository *repo,
const char *path, dav_auth_func authfunc, CmdArgs *a);
70
71 int request_auth(DavSession *sn,
void *userdata);
72
73 #ifdef __cplusplus
74 }
75 #endif
76
77 #endif
78
79