dav/config.h

changeset 36
c8755c87ce7f
parent 5
88625853ae74
child 38
b855f76e965b
equal deleted inserted replaced
35:ad0c9dacd7e3 36:c8755c87ce7f
35 extern "C" { 35 extern "C" {
36 #endif 36 #endif
37 37
38 typedef struct Repository Repository; 38 typedef struct Repository Repository;
39 typedef struct Key Key; 39 typedef struct Key Key;
40 typedef struct Proxy Proxy;
41
42 #define HTTP_PROXY 1
43 #define HTTPS_PROXY 2
40 44
41 enum key_type { 45 enum key_type {
42 KEY_AES128 = 0, 46 KEY_AES128 = 0,
43 KEY_AES256, 47 KEY_AES256,
44 KEY_PASSWORD 48 KEY_PASSWORD
61 char *name; 65 char *name;
62 KeyType type; 66 KeyType type;
63 void *data; 67 void *data;
64 size_t length; 68 size_t length;
65 }; 69 };
70
71 struct Proxy {
72 char *url;
73 char *user;
74 char *password;
75 char *no;
76 };
66 77
67 void load_config(); 78 void load_config();
68 void load_repository(xmlNode *reponode); 79 void load_repository(xmlNode *reponode);
69 void load_key(xmlNode *keynode); 80 void load_key(xmlNode *keynode);
81 void load_proxy(xmlNode *proxynode, int type);
70 sstr_t load_key_file(char *filename); 82 sstr_t load_key_file(char *filename);
71 83
72 Repository* get_repository(char *name); 84 Repository* get_repository(char *name);
73 Key* get_key(char *name); 85 Key* get_key(char *name);
86 Proxy* get_http_proxy();
87 Proxy* get_https_proxy();
74 88
75 #ifdef __cplusplus 89 #ifdef __cplusplus
76 } 90 }
77 #endif 91 #endif
78 92

mercurial