1 /* This file is part of the Zebra server.
2 Copyright (C) 1994-2009 Index Data
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
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
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
20 #ifndef ZEBRA_STRMAP_H
21 #define ZEBRA_STRMAP_H
23 #include <yaz/yconfig.h>
27 typedef struct zebra_strmap *zebra_strmap_t;
28 typedef struct zebra_strmap_it_s *zebra_strmap_it;
31 zebra_strmap_t zebra_strmap_create(void);
34 void zebra_strmap_destroy(zebra_strmap_t st);
37 void zebra_strmap_add(zebra_strmap_t st, const char *name,
38 void *data_buf, size_t data_len);
41 void *zebra_strmap_lookup(zebra_strmap_t st, const char *name, int no,
45 int zebra_strmap_remove(zebra_strmap_t st, const char *name);
48 zebra_strmap_it zebra_strmap_it_create(zebra_strmap_t st);
51 void zebra_strmap_it_destroy(zebra_strmap_it it);
54 const char *zebra_strmap_it_next(zebra_strmap_it it, void **data_buf,
64 * c-file-style: "Stroustrup"
65 * indent-tabs-mode: nil
67 * vim: shiftwidth=4 tabstop=8 expandtab