Omit CVS Id. Update copyright year.
[idzebra-moved-to-github.git] / include / idzebra / res.h
1 /* This file is part of the Zebra server.
2    Copyright (C) 1995-2008 Index Data
3
4 Zebra 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 Zebra 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 IDZEBRA_RES_H
21 #define IDZEBRA_RES_H
22
23 #include <idzebra/util.h>
24
25 YAZ_BEGIN_CDECL
26
27 typedef struct res_struct *Res;
28
29 YAZ_EXPORT
30 Res res_open(Res res_def, Res over_res);
31
32 YAZ_EXPORT
33 void res_close(Res r);
34
35 YAZ_EXPORT
36 ZEBRA_RES res_read_file(Res r, const char *fname);
37
38 YAZ_EXPORT
39 ZEBRA_RES res_write_file(Res r, const char *fname);
40
41 YAZ_EXPORT
42 void res_clear(Res r);
43
44 YAZ_EXPORT
45 const char *res_get(Res r, const char *name);
46
47 YAZ_EXPORT
48 const char *res_get_def(Res r, const char *name, const char *def);
49
50 YAZ_EXPORT
51 int res_get_match(Res r, const char *name, const char *value, const char *s);
52
53 YAZ_EXPORT
54 void res_set(Res r, const char *name, const char *value);
55
56 YAZ_EXPORT
57 int res_trav(Res r, const char *prefix, void *p,
58              void (*f)(void *p, const char *name, const char *value));
59
60 YAZ_EXPORT
61 const char *res_get_prefix(Res r, const char *name, const char *prefix,
62                            const char *def);
63
64 YAZ_EXPORT
65 ZEBRA_RES res_get_int(Res r, const char *name, int *val);
66
67
68 YAZ_EXPORT
69 void res_add(Res r, const char *name, const char *value);
70
71 YAZ_EXPORT
72 void res_dump(Res r, int level);
73
74 YAZ_EXPORT
75 int res_check(Res r_i, Res r_v);
76
77 YAZ_END_CDECL
78
79 #endif
80 /*
81  * Local variables:
82  * c-basic-offset: 4
83  * indent-tabs-mode: nil
84  * End:
85  * vim: shiftwidth=4 tabstop=8 expandtab
86  */
87