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