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
33 typedef struct Z_TooMany
36 #define Z_TooMany_argumentWords 1
37 #define Z_TooMany_truncatedWords 2
38 #define Z_TooMany_booleanOperators 3
39 #define Z_TooMany_incompleteSubfields 4
40 #define Z_TooMany_characters 5
41 #define Z_TooMany_recordsRetrieved 6
42 #define Z_TooMany_databasesSpecified 7
43 #define Z_TooMany_resultSetsCreated 8
44 #define Z_TooMany_indexTermsProcessed 9
45 int *max; /* OPTIONAL */
48 typedef struct Z_BadSpec
50 Z_Specification *spec;
51 char *db; /* OPTIONAL */
53 Z_Specification **goodOnes; /* OPTIONAL */
56 typedef struct Z_DbUnavailWhy
58 int *reasonCode; /* OPTIONAL */
59 #define Z_DbUnavail_doesNotExist 0
60 #define Z_DbUnavail_existsButUnavail 1
61 #define Z_DbUnavail_locked 2
62 #define Z_DbUnavail_accessDenied 3
63 char *message; /* OPTIONAL */
66 typedef struct Z_DbUnavail
69 Z_DbUnavailWhy *why; /* OPTIONAL */
72 typedef struct Z_Attribute
75 int *type; /* OPTIONAL */
76 int *value; /* OPTIONAL */
77 Z_Term *term; /* OPTIONAL */
80 typedef struct Z_AttCombo
82 Z_AttributeList *unsupportedCombination;
84 Z_AttributeList **alternatives; /* OPTIONAL */
87 typedef struct Z_DiagTerm
89 int *problem; /* OPTIONAL */
90 #define Z_DiagtermProb_codedValue 1
91 #define Z_DiagtermProb_unparsable 2
92 #define Z_DiagtermProb_tooShort 3
93 #define Z_DiagtermProb_type 4
97 typedef struct Z_Proximity
100 #define Z_Proximity_resultSets 0
101 #define Z_Proximity_badSet 1
102 #define Z_Proximity_relation 2
103 #define Z_Proximity_unit 3
104 #define Z_Proximity_distance 4
105 #define Z_Proximity_attributes 5
106 #define Z_Proximity_ordered 6
107 #define Z_Proximity_exclusion 7
110 Odr_null *resultSets;
115 Z_AttributeList *attributes;
121 typedef struct Z_AttrListList
124 Z_AttributeList *lists;
127 typedef struct Z_Scan
130 #define Z_ScanD_nonZeroStepSize 0
131 #define Z_ScanD_specifiedStepSize 1
132 #define Z_ScanD_termList1 2
133 #define Z_ScanD_termList2 3
134 #define Z_ScanD_posInResponse 4
135 #define Z_ScanD_resources 5
136 #define Z_ScanD_endOfList 6
139 Odr_null *nonZeroStepSize;
140 Odr_null *specifiedStepSize;
142 Z_AttrListList *termList2;
144 #define Z_ScanPosInRsp_mustBeOne 1
145 #define Z_ScanPosInRsp_mustBePositive 2
146 #define Z_ScanPosInRsp_mustBeNonNegative 3
147 #define Z_ScanPosInRsp_other 4
153 typedef struct Z_StringList
159 typedef struct Z_Sort
162 #define Z_SortD_sequence 0
163 #define Z_SortD_noRsName 1
164 #define Z_SortD_tooMany 2
165 #define Z_SortD_incompatible 3
166 #define Z_SortD_generic 4
167 #define Z_SortD_dbSpecific 5
168 #define Z_SortD_sortElement 6
169 #define Z_SortD_key 7
170 #define Z_SortD_action 8
171 #define Z_SortD_illegal 9
172 #define Z_SortD_inputTooLarge 10
173 #define Z_SortD_aggregateTooLarge 11
179 Odr_null *incompatible;
181 Odr_null *dbSpecific;
183 Z_SortElement *sortElement;
186 #define Z_SortKey_tooMany 1
187 #define Z_SortKey_duplicate 2
190 #define Z_SortIllegal_relation 1
191 #define Z_SortIllegal_case 2
192 #define Z_SortIllegal_action 3
193 #define Z_SortIllegal_sort 4
194 Z_StringList *inputTooLarge;
195 Odr_null *aggregateTooLarge;
199 typedef struct Z_Segmentation
202 #define Z_SegmentationD_segments 0
209 typedef struct Z_ExtServices
212 #define Z_ExtServicesD_req 0
213 #define Z_ExtServicesD_permission 1
214 #define Z_ExtServicesD_immediate 2
218 #define Z_ExtSrvReq_nameInUse 1
219 #define Z_ExtSrvReq_noSuchname 2
220 #define Z_ExtSrvReq_quota 3
221 #define Z_ExtSrvReq_type 4
223 #define Z_ExtSrvPerm_id 1
224 #define Z_ExtSrvPerm_modifyDelete 2
226 #define Z_ExtSrvImm_failed 1
227 #define Z_ExtSrvImm_service 2
228 #define Z_ExtSrvImm_parameters 3
232 typedef struct Z_OidList
238 typedef struct Z_AccessCtrl
241 #define Z_AccessCtrlD_noUser 0
242 #define Z_AccessCtrlD_refused 1
243 #define Z_AccessCtrlD_simple 2
244 #define Z_AccessCtrlD_oid 3
245 #define Z_AccessCtrlD_alternative 4
246 #define Z_AccessCtrlD_pwdInv 5
247 #define Z_AccessCtrlD_pwdExp 6
254 Z_OidList *alternative;
260 typedef struct Z_RecordSyntax
262 Odr_oid *unsupportedSyntax;
263 int num_suggestedAlternatives; /* OPTIONAL */
264 Odr_oid **suggestedAlternatives; /* OPTIONAL */
267 typedef struct Z_DiagFormat
270 #define Z_DiagFormat_tooMany 0
271 #define Z_DiagFormat_badSpec 1
272 #define Z_DiagFormat_dbUnavail 2
273 #define Z_DiagFormat_unSupOp 3
274 #define Z_DiagFormat_attribute 4
275 #define Z_DiagFormat_attCombo 5
276 #define Z_DiagFormat_term 6
277 #define Z_DiagFormat_proximity 7
278 #define Z_DiagFormat_scan 8
279 #define Z_DiagFormat_sort 9
280 #define Z_DiagFormat_segmentation 10
281 #define Z_DiagFormat_extServices 11
282 #define Z_DiagFormat_accessCtrl 12
283 #define Z_DiagFormat_recordSyntax 13
288 Z_DbUnavail *dbUnavail;
290 #define Z_UnSupOp_and 0
291 #define Z_UnSupOp_or 1
292 #define Z_UnSupOp_and_not 2
293 #define Z_UnSupOp_prox 3
294 Z_Attribute *attribute;
295 Z_AttributeList *attCombo;
297 Z_Proximity *proximity;
300 Z_Segmentation *segmentation;
301 Z_ExtServices *extServices;
302 Z_AccessCtrl *accessCtrl;
303 Z_RecordSyntax *recordSyntax;
307 typedef struct Z_Diagnostic
310 #define Z_Diagnostic_defaultDiagRec 0
311 #define Z_Diagnostic_explicitDiagnostic 1
314 Z_DefaultDiagFormat *defaultDiagRec;
315 Z_DiagFormat *explicitDiagnostic;
319 typedef struct Z_DiagnosticUnit
321 Z_Diagnostic *diagnostic; /* OPTIONAL */
322 char *message; /* OPTIONAL */
325 typedef struct Z_DiagnosticFormat
328 Z_DiagnosticUnit **diagnostics;
329 } Z_DiagnosticFormat;
331 int z_DiagnosticFormat(ODR o, Z_DiagnosticFormat **p, int opt);