Added XSLT support. Configuration file (e.g. etc/pazpar2.cfg) must now be specified
[pazpar2-moved-to-github.git] / src / config.h
1 #ifndef CONFIG_H
2 #define CONFIG_H
3
4 #include <libxslt/xslt.h>
5 #include <libxslt/transform.h>
6 #include <libxslt/xsltutils.h>
7
8 struct conf_termlist
9 {
10     char *name;
11     struct conf_termlist *next;
12 };
13
14 struct conf_service
15 {
16     struct conf_termlist *termlists;
17 };
18
19 struct conf_server
20 {
21     char *host;
22     int port;
23     char *proxy_host;
24     int proxy_port;
25     struct conf_service *service;
26     struct conf_server *next;
27 };
28
29 struct conf_queryprofile
30 {
31 };
32
33 struct conf_retrievalmap
34 {
35     enum {
36         Map_xslt
37     } type;
38     char *charset;
39     char *format;
40     xsltStylesheet *stylesheet;
41     struct conf_retrievalmap *next;
42 };
43
44 struct conf_retrievalprofile
45 {
46     char *requestsyntax;
47     enum {
48         Nativesyn_xml,
49         Nativesyn_iso2709
50     } native_syntax;
51     enum {
52         Nativeform_na,
53         Nativeform_marc21,
54     } native_format;
55     char *native_encoding;
56     enum {
57         Nativemapto_na,
58         Nativemapto_marcxml,
59         Nativemapto_marcxchange
60     } native_mapto;
61     yaz_marc_t yaz_marc;
62     struct conf_retrievalmap *maplist;
63     struct conf_retrievalprofile *next;
64 };
65
66 struct conf_config
67 {
68     struct conf_server *servers;
69     struct conf_queryprofile *queryprofiles;
70     struct conf_retrievalprofile *retrievalprofiles;
71 };
72
73 #ifndef CONFIG_NOEXTERNS
74
75 extern struct conf_config *config;
76
77 #endif
78
79 int read_config(const char *fname);
80
81 #endif
82
83 /*
84  * Local variables:
85  * c-basic-offset: 4
86  * indent-tabs-mode: nil
87  * End:
88  * vim: shiftwidth=4 tabstop=8 expandtab
89  */