IDZEBRA  2.1.2
sortidx.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 SORTIDX_H
21 #define SORTIDX_H
22 
23 #include <yaz/yconfig.h>
24 #include <idzebra/bfile.h>
25 #include <yaz/wrbuf.h>
26 
27 YAZ_BEGIN_CDECL
28 
29 #define SORT_IDX_ENTRYSIZE 64
30 
35 
36 #define ZEBRA_SORT_TYPE_FLAT 1
37 #define ZEBRA_SORT_TYPE_ISAMB 2
38 #define ZEBRA_SORT_TYPE_MULTI 3
39 
46 zebra_sort_index_t zebra_sort_open(BFiles bfs, int write_flag, int sort_type);
47 
50 void zebra_sort_close(zebra_sort_index_t si);
51 
56 int zebra_sort_type(zebra_sort_index_t si, int type);
57 
62 void zebra_sort_sysno(zebra_sort_index_t si, zint sysno);
63 
71 void zebra_sort_add(zebra_sort_index_t si, zint section_id, WRBUF w);
72 
73 
80 void zebra_sort_delete(zebra_sort_index_t si, zint section_id);
81 
89 int zebra_sort_read(zebra_sort_index_t si, zint *section_id, WRBUF w);
90 
91 YAZ_END_CDECL
92 
93 #endif
94 /*
95  * Local variables:
96  * c-basic-offset: 4
97  * c-file-style: "Stroustrup"
98  * indent-tabs-mode: nil
99  * End:
100  * vim: shiftwidth=4 tabstop=8 expandtab
101  */
102 
int zebra_sort_read(zebra_sort_index_t si, zint *section_id, WRBUF w)
reads sort entry
Definition: sortidx.c:469
struct zebra_sort_index * zebra_sort_index_t
sort index handle
Definition: sortidx.h:34
Zebra Block File Layer.
void zebra_sort_add(zebra_sort_index_t si, zint section_id, WRBUF w)
adds multi-map content to sort file
Definition: sortidx.c:392
int zebra_sort_type(zebra_sort_index_t si, int type)
sets type for sort usage
Definition: sortidx.c:234
void zebra_sort_sysno(zebra_sort_index_t si, zint sysno)
sets sort system number for read / add / delete
Definition: sortidx.c:339
void zebra_sort_delete(zebra_sort_index_t si, zint section_id)
delete sort entry
Definition: sortidx.c:355
zebra_sort_index_t zebra_sort_open(BFiles bfs, int write_flag, int sort_type)
creates sort handle
Definition: sortidx.c:196
long zint
Zebra integer.
Definition: util.h:66
void zebra_sort_close(zebra_sort_index_t si)
frees sort handle
Definition: sortidx.c:208