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_Sort
156 #define Z_SortD_sequence 0
157 #define Z_SortD_noRsName 1
158 #define Z_SortD_tooMany 2
159 #define Z_SortD_incompatible 3
160 #define Z_SortD_generic 4
161 #define Z_SortD_dbSpecific 5
162 #define Z_SortD_sortElement 6
163 #define Z_SortD_key 7
164 #define Z_SortD_action 8
165 #define Z_SortD_illegal 9
166 #define Z_SortD_inputTooLarge 10
167 #define Z_SortD_aggregateTooLarge 11
173 Odr_null *incompatible;
175 Odr_null *dbSpecific;
177 Z_SortElement *sortElement;
180 #define Z_SortKey_tooMany 1
181 #define Z_SortKey_duplicate 2
184 #define Z_SortIllegal_relation 1
185 #define Z_SortIllegal_case 2
186 #define Z_SortIllegal_action 3
187 #define Z_SortIllegal_sort 4
188 Z_StringList *inputTooLarge;
189 Odr_null *aggregateTooLarge;
193 typedef struct Z_Segmentation
196 #define Z_SegmentationD_segments 0
203 typedef struct Z_ExtServices
206 #define Z_ExtServicesD_req 0
207 #define Z_ExtServicesD_permission 1
208 #define Z_ExtServicesD_immediate 2
212 #define Z_ExtSrvReq_nameInUse 1
213 #define Z_ExtSrvReq_noSuchname 2
214 #define Z_ExtSrvReq_quota 3
215 #define Z_ExtSrvReq_type 4
217 #define Z_ExtSrvPerm_id 1
218 #define Z_ExtSrvPerm_modifyDelete 2
220 #define Z_ExtSrvImm_failed 1
221 #define Z_ExtSrvImm_service 2
222 #define Z_ExtSrvImm_parameters 3
226 typedef struct Z_OidList
232 typedef struct Z_AccessCtrl
235 #define Z_AccessCtrlD_noUser 0
236 #define Z_AccessCtrlD_refused 1
237 #define Z_AccessCtrlD_simple 2
238 #define Z_AccessCtrlD_oid 3
239 #define Z_AccessCtrlD_alternative 4
240 #define Z_AccessCtrlD_pwdInv 5
241 #define Z_AccessCtrlD_pwdExp 6
248 Z_OidList *alternative;
254 typedef struct Z_RecordSyntax
256 Odr_oid *unsupportedSyntax;
257 int num_suggestedAlternatives; /* OPTIONAL */
258 Odr_oid **suggestedAlternatives; /* OPTIONAL */
261 typedef struct Z_DiagFormat
264 #define Z_DiagFormat_tooMany 0
265 #define Z_DiagFormat_badSpec 1
266 #define Z_DiagFormat_dbUnavail 2
267 #define Z_DiagFormat_unSupOp 3
268 #define Z_DiagFormat_attribute 4
269 #define Z_DiagFormat_attCombo 5
270 #define Z_DiagFormat_term 6
271 #define Z_DiagFormat_proximity 7
272 #define Z_DiagFormat_scan 8
273 #define Z_DiagFormat_sort 9
274 #define Z_DiagFormat_segmentation 10
275 #define Z_DiagFormat_extServices 11
276 #define Z_DiagFormat_accessCtrl 12
277 #define Z_DiagFormat_recordSyntax 13
282 Z_DbUnavail *dbUnavail;
284 #define Z_UnSupOp_and 0
285 #define Z_UnSupOp_or 1
286 #define Z_UnSupOp_and_not 2
287 #define Z_UnSupOp_prox 3
288 Z_Attribute *attribute;
289 Z_AttributeList *attCombo;
291 Z_Proximity *proximity;
294 Z_Segmentation *segmentation;
295 Z_ExtServices *extServices;
296 Z_AccessCtrl *accessCtrl;
297 Z_RecordSyntax *recordSyntax;
301 typedef struct Z_Diagnostic
304 #define Z_Diagnostic_defaultDiagRec 0
305 #define Z_Diagnostic_explicitDiagnostic 1
308 Z_DefaultDiagFormat *defaultDiagRec;
309 Z_DiagFormat *explicitDiagnostic;
313 typedef struct Z_DiagnosticUnit
315 Z_Diagnostic *diagnostic; /* OPTIONAL */
316 char *message; /* OPTIONAL */
319 typedef struct Z_DiagnosticFormat
322 Z_DiagnosticUnit **diagnostics;
323 } Z_DiagnosticFormat;
325 int z_DiagnosticFormat(ODR o, Z_DiagnosticFormat **p, int opt);