C++ compilation.
[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.7  1999-05-26 07:49:14  adam
8  * C++ compilation.
9  *
10  * Revision 1.6  1999/05/20 12:57:18  adam
11  * Implemented TCL filter. Updated recctrl system.
12  *
13  * Revision 1.5  1999/02/02 14:51:26  adam
14  * Updated WIN32 code specific sections. Changed header.
15  *
16  * Revision 1.4  1997/09/17 12:19:21  adam
17  * Zebra version corresponds to YAZ version 1.4.
18  * Changed Zebra server so that it doesn't depend on global common_resource.
19  *
20  * Revision 1.3  1997/09/04 13:54:40  adam
21  * Added MARC filter - type grs.marc.<syntax> where syntax refers
22  * to abstract syntax. New method tellf in retrieve/extract method.
23  *
24  * Revision 1.2  1997/04/30 08:56:08  quinn
25  * null
26  *
27  * Revision 1.1  1996/10/11  10:57:23  adam
28  * New module recctrl. Used to manage records (extract/retrieval).
29  *
30  */
31
32 #ifndef GRSREAD_H
33 #define GRSREAD_H
34
35 #include <data1.h>
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 struct grs_read_info {
42     void *clientData;
43     int (*readf)(void *, char *, size_t);
44     off_t (*seekf)(void *, off_t);
45     off_t (*tellf)(void *);
46     void (*endf)(void *, off_t);
47     void *fh;
48     off_t offset;
49     char type[80];
50     NMEM mem;
51     data1_handle dh;
52 };
53
54 typedef struct recTypeGrs {
55     char *type;
56     void *(*init)(void);
57     void (*destroy)(void *clientData);
58     data1_node *(*read)(struct grs_read_info *p);
59 } *RecTypeGrs;
60
61 extern RecTypeGrs recTypeGrs_sgml;
62 extern RecTypeGrs recTypeGrs_regx;
63 extern RecTypeGrs recTypeGrs_tcl;
64 extern RecTypeGrs recTypeGrs_marc;
65
66 #ifdef __cplusplus
67 }
68 #endif
69
70 #endif