2 * Copyright (c) 1995, Index Data.
4 * Permission to use, copy, modify, distribute, and sell this software and
5 * its documentation, in whole or in part, for any purpose, is hereby granted,
8 * 1. This copyright and permission notice appear in all copies of the
9 * software and its documentation. Notices of copyright or attribution
10 * which appear at the beginning of any file must remain unchanged.
12 * 2. The names of Index Data or the individual authors may not be used to
13 * endorse or promote products derived from this software without specific
14 * prior written permission.
16 * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
17 * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
18 * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
19 * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
20 * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
21 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
22 * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
23 * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
37 typedef struct Z_TooMany
40 #define Z_TooMany_argumentWords 1
41 #define Z_TooMany_truncatedWords 2
42 #define Z_TooMany_booleanOperators 3
43 #define Z_TooMany_incompleteSubfields 4
44 #define Z_TooMany_characters 5
45 #define Z_TooMany_recordsRetrieved 6
46 #define Z_TooMany_databasesSpecified 7
47 #define Z_TooMany_resultSetsCreated 8
48 #define Z_TooMany_indexTermsProcessed 9
49 int *max; /* OPTIONAL */
52 typedef struct Z_BadSpec
54 Z_Specification *spec;
55 char *db; /* OPTIONAL */
57 Z_Specification **goodOnes; /* OPTIONAL */
60 typedef struct Z_DbUnavailWhy
62 int *reasonCode; /* OPTIONAL */
63 #define Z_DbUnavail_doesNotExist 0
64 #define Z_DbUnavail_existsButUnavail 1
65 #define Z_DbUnavail_locked 2
66 #define Z_DbUnavail_accessDenied 3
67 char *message; /* OPTIONAL */
70 typedef struct Z_DbUnavail
73 Z_DbUnavailWhy *why; /* OPTIONAL */
76 typedef struct Z_Attribute
79 int *type; /* OPTIONAL */
80 int *value; /* OPTIONAL */
81 Z_Term *term; /* OPTIONAL */
84 typedef struct Z_AttCombo
86 Z_AttributeList *unsupportedCombination;
88 Z_AttributeList **alternatives; /* OPTIONAL */
91 typedef struct Z_DiagTerm
93 int *problem; /* OPTIONAL */
94 #define Z_DiagtermProb_codedValue 1
95 #define Z_DiagtermProb_unparsable 2
96 #define Z_DiagtermProb_tooShort 3
97 #define Z_DiagtermProb_type 4
101 typedef struct Z_Proximity
104 #define Z_Proximity_resultSets 0
105 #define Z_Proximity_badSet 1
106 #define Z_Proximity_relation 2
107 #define Z_Proximity_unit 3
108 #define Z_Proximity_distance 4
109 #define Z_Proximity_attributes 5
110 #define Z_Proximity_ordered 6
111 #define Z_Proximity_exclusion 7
114 Odr_null *resultSets;
119 Z_AttributeList *attributes;
125 typedef struct Z_AttrListList
128 Z_AttributeList *lists;
131 typedef struct Z_Scan
134 #define Z_ScanD_nonZeroStepSize 0
135 #define Z_ScanD_specifiedStepSize 1
136 #define Z_ScanD_termList1 2
137 #define Z_ScanD_termList2 3
138 #define Z_ScanD_posInResponse 4
139 #define Z_ScanD_resources 5
140 #define Z_ScanD_endOfList 6
143 Odr_null *nonZeroStepSize;
144 Odr_null *specifiedStepSize;
146 Z_AttrListList *termList2;
148 #define Z_ScanPosInRsp_mustBeOne 1
149 #define Z_ScanPosInRsp_mustBePositive 2
150 #define Z_ScanPosInRsp_mustBeNonNegative 3
151 #define Z_ScanPosInRsp_other 4
157 typedef struct Z_Sort
160 #define Z_SortD_sequence 0
161 #define Z_SortD_noRsName 1
162 #define Z_SortD_tooMany 2
163 #define Z_SortD_incompatible 3
164 #define Z_SortD_generic 4
165 #define Z_SortD_dbSpecific 5
166 #define Z_SortD_sortElement 6
167 #define Z_SortD_key 7
168 #define Z_SortD_action 8
169 #define Z_SortD_illegal 9
170 #define Z_SortD_inputTooLarge 10
171 #define Z_SortD_aggregateTooLarge 11
177 Odr_null *incompatible;
179 Odr_null *dbSpecific;
181 Z_SortElement *sortElement;
184 #define Z_SortKey_tooMany 1
185 #define Z_SortKey_duplicate 2
188 #define Z_SortIllegal_relation 1
189 #define Z_SortIllegal_case 2
190 #define Z_SortIllegal_action 3
191 #define Z_SortIllegal_sort 4
192 Z_StringList *inputTooLarge;
193 Odr_null *aggregateTooLarge;
197 typedef struct Z_Segmentation
200 #define Z_SegmentationD_segments 0
207 typedef struct Z_ExtServices
210 #define Z_ExtServicesD_req 0
211 #define Z_ExtServicesD_permission 1
212 #define Z_ExtServicesD_immediate 2
216 #define Z_ExtSrvReq_nameInUse 1
217 #define Z_ExtSrvReq_noSuchname 2
218 #define Z_ExtSrvReq_quota 3
219 #define Z_ExtSrvReq_type 4
221 #define Z_ExtSrvPerm_id 1
222 #define Z_ExtSrvPerm_modifyDelete 2
224 #define Z_ExtSrvImm_failed 1
225 #define Z_ExtSrvImm_service 2
226 #define Z_ExtSrvImm_parameters 3
230 typedef struct Z_OidList
236 typedef struct Z_AccessCtrl
239 #define Z_AccessCtrlD_noUser 0
240 #define Z_AccessCtrlD_refused 1
241 #define Z_AccessCtrlD_simple 2
242 #define Z_AccessCtrlD_oid 3
243 #define Z_AccessCtrlD_alternative 4
244 #define Z_AccessCtrlD_pwdInv 5
245 #define Z_AccessCtrlD_pwdExp 6
252 Z_OidList *alternative;
258 typedef struct Z_RecordSyntax
260 Odr_oid *unsupportedSyntax;
261 int num_suggestedAlternatives; /* OPTIONAL */
262 Odr_oid **suggestedAlternatives; /* OPTIONAL */
265 typedef struct Z_DiagFormat
268 #define Z_DiagFormat_tooMany 0
269 #define Z_DiagFormat_badSpec 1
270 #define Z_DiagFormat_dbUnavail 2
271 #define Z_DiagFormat_unSupOp 3
272 #define Z_DiagFormat_attribute 4
273 #define Z_DiagFormat_attCombo 5
274 #define Z_DiagFormat_term 6
275 #define Z_DiagFormat_proximity 7
276 #define Z_DiagFormat_scan 8
277 #define Z_DiagFormat_sort 9
278 #define Z_DiagFormat_segmentation 10
279 #define Z_DiagFormat_extServices 11
280 #define Z_DiagFormat_accessCtrl 12
281 #define Z_DiagFormat_recordSyntax 13
286 Z_DbUnavail *dbUnavail;
288 #define Z_UnSupOp_and 0
289 #define Z_UnSupOp_or 1
290 #define Z_UnSupOp_and_not 2
291 #define Z_UnSupOp_prox 3
292 Z_Attribute *attribute;
293 Z_AttributeList *attCombo;
295 Z_Proximity *proximity;
298 Z_Segmentation *segmentation;
299 Z_ExtServices *extServices;
300 Z_AccessCtrl *accessCtrl;
301 Z_RecordSyntax *recordSyntax;
305 typedef struct Z_Diagnostic
308 #define Z_Diagnostic_defaultDiagRec 0
309 #define Z_Diagnostic_explicitDiagnostic 1
312 Z_DefaultDiagFormat *defaultDiagRec;
313 Z_DiagFormat *explicitDiagnostic;
317 typedef struct Z_DiagnosticUnit
319 Z_Diagnostic *diagnostic; /* OPTIONAL */
320 char *message; /* OPTIONAL */
323 typedef struct Z_DiagnosticFormat
326 Z_DiagnosticUnit **diagnostics;
327 } Z_DiagnosticFormat;
329 int z_DiagnosticFormat(ODR o, Z_DiagnosticFormat **p, int opt);