IDZEBRA  2.1.2
res.h
Go to the documentation of this file.
1 /* This file is part of the Zebra server.
2  Copyright (C) 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  * c-file-style: "Stroustrup"
84  * indent-tabs-mode: nil
85  * End:
86  * vim: shiftwidth=4 tabstop=8 expandtab
87  */
88 
int res_get_match(Res r, const char *name, const char *value, const char *s)
Definition: res.c:327
const char * res_get_def(Res r, const char *name, const char *def)
Definition: res.c:313
const char * res_get(Res r, const char *name)
Definition: res.c:294
const char * res_get_prefix(Res r, const char *name, const char *prefix, const char *def)
Definition: res.c:272
Res over_res
Definition: res.c:50
struct res_struct * Res
Definition: res.h:27
void res_clear(Res r)
Definition: res.c:246
ZEBRA_RES res_get_int(Res r, const char *name, int *val)
Definition: res.c:432
void res_dump(Res r, int level)
Definition: res.c:457
void res_add(Res r, const char *name, const char *value)
Definition: res.c:445
Definition: res.c:46
int res_trav(Res r, const char *prefix, void *p, void(*f)(void *p, const char *name, const char *value))
Definition: res.c:357
void res_set(Res r, const char *name, const char *value)
Definition: res.c:338
int res_check(Res r_i, Res r_v)
Definition: res.c:479
Res res_open(Res res_def, Res over_res)
Definition: res.c:234
void res_close(Res r)
Definition: res.c:261
ZEBRA_RES res_read_file(Res r, const char *fname)
Definition: res.c:146
ZEBRA_RES res_write_file(Res r, const char *fname)
Definition: res.c:384
short ZEBRA_RES
Common return type for Zebra API.
Definition: util.h:80