IDZEBRA  2.2.7
zebra_strmap.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 ZEBRA_STRMAP_H
21 #define ZEBRA_STRMAP_H
22 
23 #include <yaz/yconfig.h>
24 #include <stddef.h>
25 YAZ_BEGIN_CDECL
26 
27 typedef struct zebra_strmap *zebra_strmap_t;
29 
30 YAZ_EXPORT
32 
33 YAZ_EXPORT
35 
36 YAZ_EXPORT
37 void zebra_strmap_add(zebra_strmap_t st, const char *name,
38  void *data_buf, size_t data_len);
39 
40 YAZ_EXPORT
41 void *zebra_strmap_lookup(zebra_strmap_t st, const char *name, int no,
42  size_t *data_len);
43 
44 YAZ_EXPORT
45 int zebra_strmap_remove(zebra_strmap_t st, const char *name);
46 
47 YAZ_EXPORT
49 
50 YAZ_EXPORT
52 
53 YAZ_EXPORT
54 const char *zebra_strmap_it_next(zebra_strmap_it it, void **data_buf,
55  size_t *data_len);
56 
57 
58 YAZ_END_CDECL
59 
60 #endif
61 /*
62  * Local variables:
63  * c-basic-offset: 4
64  * c-file-style: "Stroustrup"
65  * indent-tabs-mode: nil
66  * End:
67  * vim: shiftwidth=4 tabstop=8 expandtab
68  */
69 
zebra_strmap_t st
Definition: strmap.c:144
int zebra_strmap_remove(zebra_strmap_t st, const char *name)
Definition: strmap.c:118
struct zebra_strmap * zebra_strmap_t
Definition: zebra_strmap.h:27
void zebra_strmap_destroy(zebra_strmap_t st)
Definition: strmap.c:61
void * zebra_strmap_lookup(zebra_strmap_t st, const char *name, int no, size_t *data_len)
Definition: strmap.c:99
const char * zebra_strmap_it_next(zebra_strmap_it it, void **data_buf, size_t *data_len)
Definition: strmap.c:162
zebra_strmap_t zebra_strmap_create(void)
Definition: strmap.c:45
void zebra_strmap_it_destroy(zebra_strmap_it it)
Definition: strmap.c:157
struct zebra_strmap_it_s * zebra_strmap_it
Definition: zebra_strmap.h:28
void zebra_strmap_add(zebra_strmap_t st, const char *name, void *data_buf, size_t data_len)
Definition: strmap.c:80
zebra_strmap_it zebra_strmap_it_create(zebra_strmap_t st)
Definition: strmap.c:148