d42a1ef328999e7f7b5afeb911bb1200739d3768
[idzebra-moved-to-github.git] / include / idzebra / isamb.h
1 /* $Id: isamb.h,v 1.9 2006-12-18 23:40:07 adam Exp $
2    Copyright (C) 1995-2006
3    Index Data ApS
4
5 This file is part of the Zebra server.
6
7 Zebra is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
10 version.
11
12 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20
21 */
22
23 #ifndef ISAMB_H
24 #define ISAMB_H
25
26 #include <idzebra/bfile.h>
27 #include <idzebra/isamc.h>
28
29 YAZ_BEGIN_CDECL
30
31 typedef struct ISAMB_s *ISAMB;
32 typedef struct ISAMB_PP_s *ISAMB_PP;
33
34 YAZ_EXPORT
35 ISAMB isamb_open(BFiles bfs, const char *name, int writeflag, ISAMC_M *method,
36                   int cache);
37
38 YAZ_EXPORT
39 ISAMB isamb_open2(BFiles bfs, const char *name, int writeflag, ISAMC_M *method,
40                   int cache, int no_cat, int *sizes, int use_root_ptr);
41
42 YAZ_EXPORT
43 void isamb_close(ISAMB isamb);
44
45 YAZ_EXPORT 
46 void isamb_merge(ISAMB b, ISAM_P *pos, ISAMC_I *data);
47
48 YAZ_EXPORT
49 ISAMB_PP isamb_pp_open(ISAMB isamb, ISAM_P pos, int scope);
50
51 YAZ_EXPORT
52 int isamb_pp_read(ISAMB_PP pp, void *buf);
53
54 YAZ_EXPORT
55 int isamb_pp_forward(ISAMB_PP pp, void *buf, const void *untilbuf);
56 YAZ_EXPORT
57 int isamb_pp_forward2(ISAMB_PP pp, void *buf, const void *untilbuf);
58
59 YAZ_EXPORT
60 void isamb_pp_pos(ISAMB_PP pp, double *current, double *total);
61
62 YAZ_EXPORT
63 void isamb_pp_close(ISAMB_PP pp);
64
65 YAZ_EXPORT
66 int isamb_unlink(ISAMB b, ISAM_P pos);
67
68 YAZ_EXPORT
69 ISAMB_PP isamb_pp_open_x(ISAMB isamb, ISAM_P pos, int *level, int scope);
70 YAZ_EXPORT
71 void isamb_pp_close_x(ISAMB_PP pp, zint *size, zint *blocks);
72
73 YAZ_EXPORT
74 int isamb_block_info(ISAMB isamb, int cat);
75
76 YAZ_EXPORT
77 void isamb_dump(ISAMB b, ISAM_P pos, void (*pr)(const char *str));
78
79 YAZ_EXPORT
80 zint isamb_get_int_splits(ISAMB b);
81
82 YAZ_EXPORT
83 zint isamb_get_leaf_splits(ISAMB b);
84
85 YAZ_EXPORT
86 void isamb_set_int_count(ISAMB b, int v);
87
88 YAZ_EXPORT
89 void isamb_set_cache_size(ISAMB b, int sz);
90
91 YAZ_EXPORT
92 zint isamb_get_root_ptr(ISAMB b);
93
94 YAZ_EXPORT
95 void isamb_set_root_ptr(ISAMB b, zint root_ptr);
96
97
98 YAZ_END_CDECL
99
100 #endif
101 /*
102  * Local variables:
103  * c-basic-offset: 4
104  * indent-tabs-mode: nil
105  * End:
106  * vim: shiftwidth=4 tabstop=8 expandtab
107  */
108