IDZEBRA  2.1.2
isams.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 
21 #ifndef ISAMS_H
22 #define ISAMS_H
23 
24 #include <idzebra/isam-codec.h>
25 #include <idzebra/bfile.h>
26 #include <idzebra/isamc.h>
27 
28 YAZ_BEGIN_CDECL
29 
30 typedef struct ISAMS_s *ISAMS;
31 typedef struct ISAMS_PP_s *ISAMS_PP;
32 
33 typedef struct ISAMS_M_s {
34  int (*compare_item)(const void *a, const void *b);
35  void (*log_item)(int logmask, const void *p, const char *txt);
36 
38 
39  int debug;
41 } ISAMS_M;
42 
43 typedef struct ISAMS_I_s {
44  int (*read_item)(void *clientData, char **dst, int *insertMode);
45  void *clientData;
46 } *ISAMS_I;
47 
48 void isams_getmethod (ISAMS_M *me);
49 
50 ISAMS isams_open (BFiles bfs, const char *name, int writeflag,
51  ISAMS_M *method);
52 int isams_close (ISAMS is);
53 ISAM_P isams_merge (ISAMS is, ISAMS_I data);
54 ISAMS_PP isams_pp_open (ISAMS is, ISAM_P pos);
55 void isams_pp_close (ISAMS_PP pp);
56 int isams_read_item (ISAMS_PP pp, char **dst);
57 int isams_pp_read (ISAMS_PP pp, void *buf);
58 int isams_pp_num (ISAMS_PP pp);
59 
60 YAZ_END_CDECL
61 
62 #endif
63 /*
64  * Local variables:
65  * c-basic-offset: 4
66  * c-file-style: "Stroustrup"
67  * indent-tabs-mode: nil
68  * End:
69  * vim: shiftwidth=4 tabstop=8 expandtab
70  */
71 
int(* compare_item)(const void *a, const void *b)
Definition: isams.h:34
ISAMS_PP isams_pp_open(ISAMS is, ISAM_P pos)
Definition: isams.c:187
ISAM_CODEC codec
Definition: isams.h:37
int isams_close(ISAMS is)
Definition: isams.c:99
struct ISAMS_s * ISAMS
Definition: isams.h:30
struct ISAMS_M_s ISAMS_M
int isams_read_item(ISAMS_PP pp, char **dst)
Definition: isams.c:233
zint ISAM_P
Definition: isamc.h:28
struct ISAMS_PP_s * ISAMS_PP
Definition: isams.h:31
int isams_pp_num(ISAMS_PP pp)
Definition: isams.c:222
int isams_pp_read(ISAMS_PP pp, void *buf)
Definition: isams.c:227
Definition: isams.c:40
struct ISAMS_I_s * ISAMS_I
Zebra Block File Layer.
void isams_getmethod(ISAMS_M *me)
Definition: isams.c:61
int debug
Definition: isams.h:39
int block_size
Definition: isams.h:40
void * clientData
Definition: isams.h:45
ISAMS isams_open(BFiles bfs, const char *name, int writeflag, ISAMS_M *method)
Definition: isams.c:76
void(* log_item)(int logmask, const void *p, const char *txt)
Definition: isams.h:35
void isams_pp_close(ISAMS_PP pp)
Definition: isams.c:215
ISAM_P isams_merge(ISAMS is, ISAMS_I data)
Definition: isams.c:115