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
101 Z_Proximity_resultSets,
103 Z_Proximity_relation,
105 Z_Proximity_distance,
106 Z_Proximity_attributes,
108 Z_Proximity_exclusion
112 Odr_null *resultSets;
117 Z_AttributeList *attributes;
123 typedef struct Z_AttrListList
126 Z_AttributeList *lists;
129 typedef struct Z_Scan
133 Z_ScanD_nonZeroStepSize,
134 Z_ScanD_specifiedStepSize,
137 Z_ScanD_posInResponse,
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_StringList
163 typedef struct Z_Sort
170 Z_SortD_incompatible,
177 Z_SortD_inputTooLarge,
178 Z_SortD_aggregateTooLarge
185 Odr_null *incompatible;
187 Odr_null *dbSpecific;
189 Z_SortElement *sortElement;
192 #define Z_SortKey_tooMany 1
193 #define Z_SortKey_duplicate 2
196 #define Z_SortIllegal_relation 1
197 #define Z_SortIllegal_case 2
198 #define Z_SortIllegal_action 3
199 #define Z_SortIllegal_sort 4
200 Z_StringList *inputTooLarge;
201 Odr_null *aggregateTooLarge;
205 typedef struct Z_Segmentation
209 Z_SegmentationD_segments
217 typedef struct Z_ExtServices
222 Z_ExtServicesD_permission,
223 Z_ExtServicesD_immediate
228 #define Z_ExtSrvReq_nameInUse 1
229 #define Z_ExtSrvReq_noSuchname 2
230 #define Z_ExtSrvReq_quota 3
231 #define Z_ExtSrvReq_type 4
233 #define Z_ExtSrvPerm_id 1
234 #define Z_ExtSrvPerm_modifyDelete 2
236 #define Z_ExtSrvImm_failed 1
237 #define Z_ExtSrvImm_service 2
238 #define Z_ExtSrvImm_parameters 3
242 typedef struct Z_OidList
248 typedef struct Z_AccessCtrl
252 Z_AccessCtrlD_noUser,
253 Z_AccessCtrlD_refused,
254 Z_AccessCtrlD_simple,
256 Z_AccessCtrlD_alternative,
257 Z_AccessCtrlD_pwdInv,
266 Z_OidList *alternative;
272 typedef struct Z_RecordSyntax
274 Odr_oid *unsupportedSyntax;
275 int num_suggestedAlternatives; /* OPTIONAL */
276 Odr_oid **suggestedAlternatives; /* OPTIONAL */
279 typedef struct Z_DiagFormat
283 Z_DiagFormat_tooMany,
284 Z_DiagFormat_badSpec,
285 Z_DiagFormat_dbUnavail,
286 Z_DiagFormat_unSupOp,
287 Z_DiagFormat_attribute,
288 Z_DiagFormat_attCombo,
290 Z_DiagFormat_proximity,
293 Z_DiagFormat_segmentation,
294 Z_DiagFormat_extServices,
295 Z_DiagFormat_accessCtrl,
296 Z_DiagFormat_recordSyntax
302 Z_DbUnavail *dbUnavail;
304 #define Z_UnSupOp_and 0
305 #define Z_UnSupOp_or 1
306 #define Z_UnSupOp_and_not 2
307 #define Z_UnSupOp_prox 3
308 Z_Attribute *attribute;
309 Z_AttributeList *attCombo;
311 Z_Proximity *proximity;
314 Z_Segmentation *segmentation;
315 Z_ExtServices *extServices;
316 Z_AccessCtrl *accessCtrl;
317 Z_RecordSyntax *recordSyntax;
321 typedef struct Z_Diagnostic
325 Z_Diagnostic_defaultDiagRec,
326 Z_Diagnostic_explicitDiagnostic
330 Z_DefaultDiagFormat *defaultDiagRec;
331 Z_DiagFormat *explicitDiagnostic;
335 typedef struct Z_DiagnosticUnit
337 Z_Diagnostic *diagnostic; /* OPTIONAL */
338 char *message; /* OPTIONAL */
341 typedef struct Z_DiagnosticFormat
344 Z_DiagnosticUnit **diagnostics;
345 } Z_DiagnosticFormat;
347 int z_DiagnosticFormat(ODR o, Z_DiagnosticFormat **p, int opt);