7ec6cbcfd545b29faa749277e7515ccee841ca76
[idzebra-moved-to-github.git] / recctrl / grsread.h
1 /*
2  * Copyright (C) 1994-1999, Index Data
3  * All rights reserved.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: grsread.h,v $
7  * Revision 1.6  1999-05-20 12:57:18  adam
8  * Implemented TCL filter. Updated recctrl system.
9  *
10  * Revision 1.5  1999/02/02 14:51:26  adam
11  * Updated WIN32 code specific sections. Changed header.
12  *
13  * Revision 1.4  1997/09/17 12:19:21  adam
14  * Zebra version corresponds to YAZ version 1.4.
15  * Changed Zebra server so that it doesn't depend on global common_resource.
16  *
17  * Revision 1.3  1997/09/04 13:54:40  adam
18  * Added MARC filter - type grs.marc.<syntax> where syntax refers
19  * to abstract syntax. New method tellf in retrieve/extract method.
20  *
21  * Revision 1.2  1997/04/30 08:56:08  quinn
22  * null
23  *
24  * Revision 1.1  1996/10/11  10:57:23  adam
25  * New module recctrl. Used to manage records (extract/retrieval).
26  *
27  */
28
29 #ifndef GRSREAD_H
30 #define GRSREAD_H
31
32 #include <data1.h>
33 struct grs_read_info {
34     void *clientData;
35     int (*readf)(void *, char *, size_t);
36     off_t (*seekf)(void *, off_t);
37     off_t (*tellf)(void *);
38     void (*endf)(void *, off_t);
39     void *fh;
40     off_t offset;
41     char type[80];
42     NMEM mem;
43     data1_handle dh;
44 };
45
46 typedef struct recTypeGrs {
47     char *type;
48     void *(*init)(void);
49     void (*destroy)(void *clientData);
50     data1_node *(*read)(struct grs_read_info *p);
51 } *RecTypeGrs;
52
53 extern RecTypeGrs recTypeGrs_sgml;
54 extern RecTypeGrs recTypeGrs_regx;
55 extern RecTypeGrs recTypeGrs_tcl;
56 extern RecTypeGrs recTypeGrs_marc;
57 #endif