src/server/daemon/config.h

changeset 650
3e4f9cdd70b8
parent 632
1defab20b477
child 651
ed74879c7041
equal deleted inserted replaced
649:3887fd7e8bd7 650:3e4f9cdd70b8
46 #include "vfs.h" 46 #include "vfs.h"
47 47
48 #include "../webdav/webdav.h" 48 #include "../webdav/webdav.h"
49 49
50 #include <cx/linked_list.h> 50 #include <cx/linked_list.h>
51 #include <cx/array_list.h>
51 #include <cx/hash_map.h> 52 #include <cx/hash_map.h>
52 #include <cx/mempool.h> 53 #include <cx/mempool.h>
53 #include <cx/string.h> 54 #include <cx/string.h>
54 55
55 #ifdef __cplusplus 56 #ifdef __cplusplus
61 typedef struct CfgManager { 62 typedef struct CfgManager {
62 ServerConfig *serverconf; 63 ServerConfig *serverconf;
63 ServerConfiguration *cfg; 64 ServerConfiguration *cfg;
64 } CfgManager; 65 } CfgManager;
65 66
67 typedef struct ScfgDestr {
68 cx_destructor_func destr;
69 void *data;
70 } ScfgDestr;
71
66 struct ServerConfiguration { 72 struct ServerConfiguration {
67 pool_handle_t *pool; 73 pool_handle_t *pool;
68 CxAllocator *a; 74 CxAllocator *a;
75
76 CxList *destr; // list of ScfgDestr
69 77
70 ServerConfiguration *next; 78 ServerConfiguration *next;
71 79
72 CxMap *host_vs; // map of all vservers. key is the host name 80 CxMap *host_vs; // map of all vservers. key is the host name
73 CxList *listeners; // list of all listeners - TODO: remove 81 CxList *listeners; // list of all listeners - TODO: remove
133 ACLList* acl_config_convert(ServerConfiguration *cfg, ACLConfig *acl); 141 ACLList* acl_config_convert(ServerConfiguration *cfg, ACLConfig *acl);
134 AuthDB* keyfile_load(ServerConfiguration *cfg, cxstring file); 142 AuthDB* keyfile_load(ServerConfiguration *cfg, cxstring file);
135 143
136 pblock* config_obj2pblock(pool_handle_t *pool, ConfigNode *obj); 144 pblock* config_obj2pblock(pool_handle_t *pool, ConfigNode *obj);
137 145
146 void server_config_destroy(ServerConfiguration *cfg);
147
138 #ifdef __cplusplus 148 #ifdef __cplusplus
139 } 149 }
140 #endif 150 #endif
141 151
142 #endif /* CONF_H */ 152 #endif /* CONF_H */

mercurial