Basic configuration functionality in place (not yet used)
[pazpar2-moved-to-github.git] / src / config.h
1 #ifndef CONFIG_H
2 #define CONFIG_H
3
4 struct conf_termlist
5 {
6     char *name;
7     struct conf_termlist *next;
8 };
9
10 struct conf_service
11 {
12     struct conf_termlist *termlists;
13 };
14
15 struct conf_server
16 {
17     char *host;
18     int port;
19     char *proxy_host;
20     int proxy_port;
21     struct conf_service *service;
22     struct conf_server *next;
23 };
24
25 struct conf_queryprofile
26 {
27 };
28
29 struct conf_retrievalprofile
30 {
31 };
32
33 struct conf_config
34 {
35     struct conf_server *servers;
36     struct conf_queryprofile *queryprofiles;
37     struct conf_retrievalprofile *retrievalprofiles;
38 };
39
40 #ifndef CONFIG_NOEXTERNS
41
42 extern struct conf_config *config;
43
44 #endif
45
46 int read_config(const char *fname);
47
48 #endif
49
50 /*
51  * Local variables:
52  * c-basic-offset: 4
53  * indent-tabs-mode: nil
54  * End:
55  * vim: shiftwidth=4 tabstop=8 expandtab
56  */