pazpar2  1.13.0
settings.h
Go to the documentation of this file.
1 /* This file is part of Pazpar2.
2  Copyright (C) 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_ZPROXY 12
36 #define PZ_APDULOG 13
37 #define PZ_SRU 14
38 #define PZ_SRU_VERSION 15
39 #define PZ_PQF_PREFIX 16
40 #define PZ_SORT 17
41 #define PZ_RECORDFILTER 18
42 #define PZ_PQF_STRFTIME 19
43 #define PZ_NEGOTIATION_CHARSET 20
44 #define PZ_MAX_CONNECTIONS 21
45 #define PZ_REUSE_CONNECTIONS 22
46 #define PZ_TERMLIST_TERM_FACTOR 23
47 #define PZ_TERMLIST_TERM_COUNT 24
48 #define PZ_PREFERRED 25
49 #define PZ_EXTRA_ARGS 26
50 #define PZ_QUERY_SYNTAX 27
51 #define PZ_FACETMAP 28
52 #define PZ_LIMITMAP 29
53 #define PZ_URL 30
54 #define PZ_SORTMAP 31
55 #define PZ_PRESENT_CHUNK 32
56 #define PZ_BLOCK_TIMEOUT 33
57 #define PZ_EXTENDRECS 34
58 #define PZ_AUTHENTICATION_MODE 35
59 #define PZ_NATIVE_SCORE 36
60 #define PZ_MEMCACHED 37
61 #define PZ_REDIS 38
62 #define PZ_TIMEOUT 39
63 #define PZ_MAX_EOF 40
64 
65 struct setting
66 {
68  const char *target;
69  const char *name;
70  const char *value;
71  struct setting *next;
72 };
73 
74 // Represents a database
75 struct database {
76  char *id;
78  struct setting **settings;
79  struct database *next;
80 };
81 
83 {
84  // Array of pointer setting, index is looked up in setting_dictionary
85  struct setting **settings;
87 };
88 
89 int settings_read_file(struct conf_service *service, const char *path,
90  int pass);
91 int settings_read_node(struct conf_service *service, xmlNode *n, int pass);
92 int settings_num(struct conf_service *service);
93 int settings_create_offset(struct conf_service *service, const char *name);
94 int settings_lookup_offset(struct conf_service *service, const char *name);
95 void init_settings(struct conf_service *service);
96 int settings_read_node_x(xmlNode *n,
97  void *client_data,
98  void (*fun)(void *client_data,
99  struct setting *set));
100 void expand_settings_array(struct setting ***set_ar, int *num, int offset,
101  NMEM nmem);
102 
103 #endif
104 
105 /*
106  * Local variables:
107  * c-basic-offset: 4
108  * c-file-style: "Stroustrup"
109  * indent-tabs-mode: nil
110  * End:
111  * vim: shiftwidth=4 tabstop=8 expandtab
112  */
113 
struct setting * next
Definition: settings.h:71
int settings_num(struct conf_service *service)
Definition: settings.c:107
int precedence
Definition: settings.h:67
int num_settings
Definition: settings.h:77
struct setting ** settings
Definition: settings.h:78
int settings_read_node_x(xmlNode *n, void *client_data, void(*fun)(void *client_data, struct setting *set))
Definition: settings.c:174
int settings_read_node(struct conf_service *service, xmlNode *n, int pass)
Definition: settings.c:572
void expand_settings_array(struct setting ***set_ar, int *num, int offset, NMEM nmem)
Definition: settings.c:336
void(* fun)(struct http_channel *c)
struct setting ** settings
Definition: settings.h:85
const char * name
Definition: settings.h:69
char * id
Definition: settings.h:76
const char * target
Definition: settings.h:68
int num_settings
Definition: settings.h:86
void init_settings(struct conf_service *service)
Definition: settings.c:550
int settings_lookup_offset(struct conf_service *service, const char *name)
Definition: settings.c:150
struct database * next
Definition: settings.h:79
int settings_create_offset(struct conf_service *service, const char *name)
Definition: settings.c:145
int settings_read_file(struct conf_service *service, const char *path, int pass)
Definition: settings.c:563
const char * value
Definition: settings.h:70