1 /* This file is part of the Zebra server.
2 Copyright (C) 1995-2008 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
23 #include <yaz/proto.h>
24 #include <idzebra/res.h>
28 typedef struct zebra_maps_s *zebra_maps_t;
29 typedef struct zebra_map *zebra_map_t;
32 zebra_maps_t zebra_maps_open(Res res, const char *base_path,
33 const char *profile_path);
35 ZEBRA_RES zebra_maps_read_file(zebra_maps_t zms, const char *fname);
38 void zebra_maps_close(zebra_maps_t zm);
41 const char **zebra_maps_input(zebra_map_t zm,
42 const char **from, int len, int first);
45 const char **zebra_maps_search(zebra_map_t zm,
46 const char **from, int len, int *q_map_match);
49 const char *zebra_maps_output(zebra_map_t zm, const char **from);
52 int zebra_maps_attr(zebra_maps_t zms, Z_AttributesPlusTerm *zapt,
53 const char **reg_id, char **search_type, char *rank_type,
54 int *complete_flag, int *sort_flag);
57 int zebra_maps_sort(zebra_maps_t zms, Z_SortAttributes *sortAttributes,
61 int zebra_maps_is_complete(zebra_map_t zm);
64 int zebra_maps_is_sort(zebra_map_t zm);
67 int zebra_maps_is_index(zebra_map_t zm);
70 int zebra_maps_is_staticrank(zebra_map_t zm);
73 int zebra_maps_is_alwaysmatches(zebra_map_t zm);
76 int zebra_maps_is_positioned(zebra_map_t zm);
79 int zebra_maps_is_icu(zebra_map_t zm);
82 int zebra_maps_is_first_in_field(zebra_map_t zm);
85 WRBUF zebra_replace(zebra_map_t zm, const char *ex_list,
86 const char *input_str, int input_len);
89 zebra_map_t zebra_map_get(zebra_maps_t zms, const char *id);
92 zebra_map_t zebra_map_get_or_add(zebra_maps_t zms, const char *id);
95 int zebra_map_tokenize_start(zebra_map_t zm,
96 const char *buf, size_t len);
99 int zebra_map_tokenize_next(zebra_map_t zm,
100 const char **result_buf, size_t *result_len,
101 const char **display_buf, size_t *display_len);
109 * indent-tabs-mode: nil
111 * vim: shiftwidth=4 tabstop=8 expandtab