Option record filter. Maybe not the way.
[pazpar2-moved-to-github.git] / src / settings.h
1 /* This file is part of Pazpar2.
2    Copyright (C) 2006-2011 Index Data
3
4 Pazpar2 is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
7 version.
8
9 Pazpar2 is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12 for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
18 */
19
20 #ifndef SETTINGS_H
21 #define SETTINGS_H
22
23 #define PZ_PIGGYBACK      0
24 #define PZ_ELEMENTS       1
25 #define PZ_REQUESTSYNTAX  2
26 #define PZ_CCLMAP         3
27 #define PZ_XSLT           4
28 #define PZ_NATIVESYNTAX   5
29 #define PZ_AUTHENTICATION 6
30 #define PZ_ALLOW          7
31 #define PZ_MAXRECS        8
32 #define PZ_ID             9
33 #define PZ_NAME          10
34 #define PZ_QUERYENCODING 11
35 #define PZ_IP            12
36 #define PZ_ZPROXY        13
37 #define PZ_APDULOG       14
38 #define PZ_SRU           15
39 #define PZ_SRU_VERSION   16
40 #define PZ_PQF_PREFIX    17
41 #define PZ_SORT          18
42 #define PZ_RECORDFILTER  19
43 #define PZ_PQF_STRFTIME  20
44 #define PZ_NEGOTIATION_CHARSET  21
45 #define PZ_MAX_CONNECTIONS      22
46 #define PZ_REUSE_CONNECTIONS    23
47 #define PZ_TERMLIST_TERM_SORT   24
48 #define PZ_TERMLIST_TERM_COUNT  25
49 #define PZ_TERMLIST_TERM_FACTOR 26
50 #define PZ_PREFERRED            27
51 #define PZ_EXTRA_ARGS           28
52 #define PZ_QUERY_SYNTAX         29
53 #define PZ_OPTION_RECORDFILTER  30
54 #define PZ_MAX_EOF              31
55
56 struct setting
57 {
58     int precedence;
59     char *target;
60     char *name;
61     char *value;
62     struct setting *next;
63 };
64
65 void settings_read_file(struct conf_service *service, const char *path,
66                         int pass);
67 void settings_read_node(struct conf_service *service, xmlNode *n,
68                         int pass);
69 int settings_num(struct conf_service *service);
70 int settings_create_offset(struct conf_service *service, const char *name);
71 int settings_lookup_offset(struct conf_service *service, const char *name);
72 void init_settings(struct conf_service *service);
73 void resolve_databases(struct conf_service *service);
74 void settings_read_node_x(xmlNode *n,
75                           void *client_data,
76                           void (*fun)(void *client_data,
77                                       struct setting *set));
78 void expand_settings_array(struct setting ***set_ar, int *num, int offset,
79                            NMEM nmem);
80
81 #endif
82
83 /*
84  * Local variables:
85  * c-basic-offset: 4
86  * c-file-style: "Stroustrup"
87  * indent-tabs-mode: nil
88  * End:
89  * vim: shiftwidth=4 tabstop=8 expandtab
90  */
91