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
28 typedef struct Z_TooMany
31 #define Z_TooMany_argumentWords 1
32 #define Z_TooMany_truncatedWords 2
33 #define Z_TooMany_booleanOperators 3
34 #define Z_TooMany_incompleteSubfields 4
35 #define Z_TooMany_characters 5
36 #define Z_TooMany_recordsRetrieved 6
37 #define Z_TooMany_databasesSpecified 7
38 #define Z_TooMany_resultSetsCreated 8
39 #define Z_TooMany_indexTermsProcessed 9
40 int *max; /* OPTIONAL */
43 typedef struct Z_BadSpec
45 Z_Specification *spec;
46 char *db; /* OPTIONAL */
48 Z_Specification **goodOnes; /* OPTIONAL */
51 typedef struct Z_DbUnavailWhy
53 int *reasonCode; /* OPTIONAL */
54 #define Z_DbUnavail_doesNotExist 0
55 #define Z_DbUnavail_existsButUnavail 1
56 #define Z_DbUnavail_locked 2
57 #define Z_DbUnavail_accessDenied 3
58 char *message; /* OPTIONAL */
61 typedef struct Z_DbUnavail
64 Z_DbUnavailWhy *why; /* OPTIONAL */
67 typedef struct Z_Attribute
70 int *type; /* OPTIONAL */
71 int *value; /* OPTIONAL */
72 Z_Term *term; /* OPTIONAL */
75 typedef struct Z_AttCombo
77 Z_AttributeList *unsupportedCombination;
79 Z_AttributeList **alternatives; /* OPTIONAL */
82 typedef struct Z_DiagTerm
84 int *problem; /* OPTIONAL */
85 #define Z_DiagtermProb_codedValue 1
86 #define Z_DiagtermProb_unparsable 2
87 #define Z_DiagtermProb_tooShort 3
88 #define Z_DiagtermProb_type 4
92 typedef struct Z_Proximity
96 Z_Proximity_resultSets,
100 Z_Proximity_distance,
101 Z_Proximity_attributes,
103 Z_Proximity_exclusion
107 Odr_null *resultSets;
112 Z_AttributeList *attributes;
118 typedef struct Z_AttrListList
121 Z_AttributeList *lists;
124 typedef struct Z_Scan
128 Z_ScanD_nonZeroStepSize,
129 Z_ScanD_specifiedStepSize,
132 Z_ScanD_posInResponse,
138 Odr_null *nonZeroStepSize;
139 Odr_null *specifiedStepSize;
141 Z_AttrListList *termList2;
143 #define Z_ScanPosInRsp_mustBeOne 1
144 #define Z_ScanPosInRsp_mustBePositive 2
145 #define Z_ScanPosInRsp_mustBeNonNegative 3
146 #define Z_ScanPosInRsp_other 4
152 typedef struct Z_StringList
158 typedef struct Z_Sort
165 Z_SortD_incompatible,
172 Z_SortD_inputTooLarge,
173 Z_SortD_aggregateTooLarge
180 Odr_null *incompatible;
182 Odr_null *dbSpecific;
184 Z_SortElement *sortElement;
187 #define Z_SortKey_tooMany 1
188 #define Z_SortKey_duplicate 2
191 #define Z_SortIllegal_relation 1
192 #define Z_SortIllegal_case 2
193 #define Z_SortIllegal_action 3
194 #define Z_SortIllegal_sort 4
195 Z_StringList *inputTooLarge;
196 Odr_null *aggregateTooLarge;
200 typedef struct Z_Segmentation
204 Z_SegmentationD_segments
212 typedef struct Z_ExtServices
217 Z_ExtServicesD_permission,
218 Z_ExtServicesD_immediate
223 #define Z_ExtSrvReq_nameInUse 1
224 #define Z_ExtSrvReq_noSuchname 2
225 #define Z_ExtSrvReq_quota 3
226 #define Z_ExtSrvReq_type 4
228 #define Z_ExtSrvPerm_id 1
229 #define Z_ExtSrvPerm_modifyDelete 2
231 #define Z_ExtSrvImm_failed 1
232 #define Z_ExtSrvImm_service 2
233 #define Z_ExtSrvImm_parameters 3
237 typedef struct Z_OidList
243 typedef struct Z_AccessCtrl
247 Z_AccessCtrlD_noUser,
248 Z_AccessCtrlD_refused,
249 Z_AccessCtrlD_simple,
251 Z_AccessCtrlD_alternative,
252 Z_AccessCtrlD_pwdInv,
261 Z_OidList *alternative;
267 typedef struct Z_RecordSyntax
269 Odr_oid *unsupportedSyntax;
270 int num_suggestedAlternatives; /* OPTIONAL */
271 Odr_oid **suggestedAlternatives; /* OPTIONAL */
274 typedef struct Z_DiagFormat
278 Z_DiagFormat_tooMany,
279 Z_DiagFormat_badSpec,
280 Z_DiagFormat_dbUnavail,
281 Z_DiagFormat_unSupOp,
282 Z_DiagFormat_attribute,
283 Z_DiagFormat_attCombo,
285 Z_DiagFormat_proximity,
288 Z_DiagFormat_segmentation,
289 Z_DiagFormat_extServices,
290 Z_DiagFormat_accessCtrl,
291 Z_DiagFormat_recordSyntax
297 Z_DbUnavail *dbUnavail;
299 #define Z_UnSupOp_and 0
300 #define Z_UnSupOp_or 1
301 #define Z_UnSupOp_and_not 2
302 #define Z_UnSupOp_prox 3
303 Z_Attribute *attribute;
304 Z_AttributeList *attCombo;
306 Z_Proximity *proximity;
309 Z_Segmentation *segmentation;
310 Z_ExtServices *extServices;
311 Z_AccessCtrl *accessCtrl;
312 Z_RecordSyntax *recordSyntax;
316 typedef struct Z_Diagnostic
320 Z_Diagnostic_defaultDiagRec,
321 Z_Diagnostic_explicitDiagnostic
325 Z_DefaultDiagFormat *defaultDiagRec;
326 Z_DiagFormat *explicitDiagnostic;
330 typedef struct Z_DiagnosticUnit
332 Z_Diagnostic *diagnostic; /* OPTIONAL */
333 char *message; /* OPTIONAL */
336 typedef struct Z_DiagnosticFormat
339 Z_DiagnosticUnit **diagnostics;
340 } Z_DiagnosticFormat;
342 int z_DiagnosticFormat(ODR o, Z_DiagnosticFormat **p, int opt);