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