2 * Copyright (C) 1994-1995, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.5 1995-10-02 14:55:52 quinn
8 * *** empty log message ***
10 * Revision 1.4 1995/09/27 16:17:29 adam
11 * More work on retrieve.
13 * Revision 1.3 1995/09/27 12:21:25 adam
14 * New function: recType_byName.
16 * Revision 1.2 1995/09/15 14:45:03 adam
19 * Revision 1.1 1995/09/14 07:48:13 adam
20 * Record control management.
30 /* single word entity */
45 /* Extract record control */
46 struct recExtractCtrl {
50 void (*init)(RecWord *p);
51 void (*add)(const RecWord *p);
55 void (*init)(RecWord *p);
56 void (*add)(const RecWord *p);
58 /* input parameters ... */
59 FILE *inf; /* Extract from this file */
60 char *subType; /* Sub type - may be NULL */
61 void (*init)(RecWord *p); /* Init of word spec */
62 void (*add)(const RecWord *p); /* Addition of a single word */
66 /* Retrieve record control */
67 struct recRetrieveCtrl {
68 /* Input parameters ... */
69 ODR odr; /* ODR used to create response */
70 int fd; /* File descriptor and read function */
71 int (*readf)(int fd, char *buf, size_t count);
72 oid_value input_format; /* Preferred record syntax */
76 oid_value output_format;
83 oid_value output_format;
87 /* output parameters ... */
88 oid_value output_format; /* Record syntax of returned record */
89 void *rec_buf; /* Record buffer */
90 size_t rec_len; /* Length of record */
94 typedef struct recType
96 char *name; /* Name of record type */
97 void (*init)(void); /* Init function - called once */
98 int (*extract)(struct recExtractCtrl *ctrl); /* Extract proc */
99 int (*retrieve)(struct recRetrieveCtrl *ctrl); /* Retrieve proc */
102 RecType recType_byName (const char *name);