c68d103fdf65bafd30a5cd8357d64f2580786113
[idzebra-moved-to-github.git] / recctrl / grsread.h
1 /*
2  * Copyright (C) 1994-2002, Index Data
3  * All rights reserved.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Id: grsread.h,v 1.9 2002-05-13 14:13:43 adam Exp $
7  */
8
9 #ifndef GRSREAD_H
10 #define GRSREAD_H
11
12 #include <yaz/data1.h>
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17
18 struct grs_read_info {
19     void *clientData;
20     int (*readf)(void *, char *, size_t);
21     off_t (*seekf)(void *, off_t);
22     off_t (*tellf)(void *);
23     void (*endf)(void *, off_t);
24     void *fh;
25     off_t offset;
26     char type[80];
27     NMEM mem;
28     data1_handle dh;
29 };
30
31 typedef struct recTypeGrs {
32     char *type;
33     void *(*init)(void);
34     void (*destroy)(void *clientData);
35     data1_node *(*read)(struct grs_read_info *p);
36 } *RecTypeGrs;
37
38 extern RecTypeGrs recTypeGrs_sgml;
39 extern RecTypeGrs recTypeGrs_regx;
40 extern RecTypeGrs recTypeGrs_tcl;
41 extern RecTypeGrs recTypeGrs_marc;
42 extern RecTypeGrs recTypeGrs_xml;
43
44 #ifdef __cplusplus
45 }
46 #endif
47
48 #endif