2 * Copyright (C) 1994-1998, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.3 1998-06-22 11:36:48 adam
8 * Added authentication check facility to zebra.
10 * Revision 1.2 1998/06/13 00:14:09 adam
13 * Revision 1.1 1998/06/12 12:22:13 adam
22 /* Retrieval Record Descriptor */
24 int errCode; /* non-zero if error when fetching this */
25 char *errString; /* error string */
26 int position; /* position of record in result set (1,2,..) */
27 char *buf; /* record buffer (void pointer really) */
29 oid_value format; /* record syntax */
31 } ZebraRetrievalRecord;
33 /* Scan Term Descriptor */
35 int occurrences; /* scan term occurrences */
36 char *term; /* scan term string */
39 typedef struct zebra_info *ZebraHandle;
41 /* Open Zebra using file 'configName' (usually zebra.cfg) */
42 YAZ_EXPORT ZebraHandle zebra_open (const char *configName);
44 /* Search using RPN-Query */
45 YAZ_EXPORT void zebra_search_rpn (ZebraHandle zh, ODR stream,
46 Z_RPNQuery *query, int num_bases, char **basenames,
49 /* Retrieve record(s) */
50 YAZ_EXPORT void zebra_records_retrieve (ZebraHandle zh, ODR stream,
51 const char *setname, Z_RecordComposition *comp,
52 oid_value input_format,
53 int num_recs, ZebraRetrievalRecord *recs);
56 YAZ_EXPORT void zebra_scan (ZebraHandle zh, ODR stream,
57 Z_AttributesPlusTerm *zapt,
58 oid_value attributeset,
59 int num_bases, char **basenames,
60 int *position, int *num_entries,
61 ZebraScanEntry **list,
64 /* Close zebra and destroy handle */
65 YAZ_EXPORT void zebra_close (ZebraHandle zh);
68 YAZ_EXPORT int zebra_errCode (ZebraHandle zh);
69 /* string representatio of above */
70 YAZ_EXPORT const char *zebra_errString (ZebraHandle zh);
72 /* extra information associated with error */
73 YAZ_EXPORT char *zebra_errAdd (ZebraHandle zh);
75 /* number of hits (after search) */
76 YAZ_EXPORT int zebra_hits (ZebraHandle zh);
78 /* do authentication */
79 YAZ_EXPORT int zebra_auth (ZebraHandle zh, const char *user, const char *pass);