2 * Copyright (C) 1994-1998, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.2 1998-06-13 00:14:09 adam
10 * Revision 1.1 1998/06/12 12:22:13 adam
19 /* Retrieval Record Descriptor */
21 int errCode; /* non-zero if error when fetching this */
22 char *errString; /* error string */
23 int position; /* position of record in result set (1,2,..) */
24 char *buf; /* record buffer (void pointer really) */
26 oid_value format; /* record syntax */
28 } ZebraRetrievalRecord;
30 /* Scan Term Descriptor */
32 int occurrences; /* scan term occurrences */
33 char *term; /* scan term string */
36 typedef struct zebra_info *ZebraHandle;
38 /* Open Zebra using file 'configName' (usually zebra.cfg) */
39 YAZ_EXPORT ZebraHandle zebra_open (const char *configName);
41 /* Search using RPN-Query */
42 YAZ_EXPORT void zebra_search_rpn (ZebraHandle zh, ODR stream,
43 Z_RPNQuery *query, int num_bases, char **basenames,
46 /* Retrieve record(s) */
47 YAZ_EXPORT void zebra_records_retrieve (ZebraHandle zh, ODR stream,
48 const char *setname, Z_RecordComposition *comp,
49 oid_value input_format,
50 int num_recs, ZebraRetrievalRecord *recs);
53 YAZ_EXPORT void zebra_scan (ZebraHandle zh, ODR stream,
54 Z_AttributesPlusTerm *zapt,
55 oid_value attributeset,
56 int num_bases, char **basenames,
57 int *position, int *num_entries,
58 ZebraScanEntry **list,
61 /* Close zebra and destroy handle */
62 YAZ_EXPORT void zebra_close (ZebraHandle zh);
65 YAZ_EXPORT int zebra_errCode (ZebraHandle zh);
66 /* string representatio of above */
67 YAZ_EXPORT const char *zebra_errString (ZebraHandle zh);
69 /* extra information associated with error */
70 YAZ_EXPORT char *zebra_errAdd (ZebraHandle zh);
72 /* number of hits (after search) */
73 YAZ_EXPORT int zebra_hits (ZebraHandle zh);