00001
00007 #ifndef z_diag1_H
00008 #define z_diag1_H
00009
00010 #include <yaz/odr.h>
00011 #include <yaz/z-core.h>
00012 #ifdef __cplusplus
00013 extern "C" {
00014 #endif
00015
00016 typedef struct Z_DiagnosticFormat_s Z_DiagnosticFormat_s;
00017 YAZ_EXPORT int z_DiagnosticFormat_s (ODR o, Z_DiagnosticFormat_s **p, int opt, const char *name);
00018
00019 typedef struct Z_DiagnosticFormat Z_DiagnosticFormat;
00020 YAZ_EXPORT int z_DiagnosticFormat (ODR o, Z_DiagnosticFormat **p, int opt, const char *name);
00021
00022 typedef struct Z_TooMany Z_TooMany;
00023 YAZ_EXPORT int z_TooMany (ODR o, Z_TooMany **p, int opt, const char *name);
00024
00025 typedef struct Z_BadSpec Z_BadSpec;
00026 YAZ_EXPORT int z_BadSpec (ODR o, Z_BadSpec **p, int opt, const char *name);
00027
00028 typedef struct Z_DbUnavail_0 Z_DbUnavail_0;
00029 YAZ_EXPORT int z_DbUnavail_0 (ODR o, Z_DbUnavail_0 **p, int opt, const char *name);
00030
00031 typedef struct Z_DbUnavail Z_DbUnavail;
00032 YAZ_EXPORT int z_DbUnavail (ODR o, Z_DbUnavail **p, int opt, const char *name);
00033
00034 typedef struct Z_Attribute Z_Attribute;
00035 YAZ_EXPORT int z_Attribute (ODR o, Z_Attribute **p, int opt, const char *name);
00036
00037 typedef struct Z_AttCombo Z_AttCombo;
00038 YAZ_EXPORT int z_AttCombo (ODR o, Z_AttCombo **p, int opt, const char *name);
00039
00040 typedef struct Z_DiagTerm Z_DiagTerm;
00041 YAZ_EXPORT int z_DiagTerm (ODR o, Z_DiagTerm **p, int opt, const char *name);
00042
00043 typedef struct Z_Proximity Z_Proximity;
00044 YAZ_EXPORT int z_Proximity (ODR o, Z_Proximity **p, int opt, const char *name);
00045
00046 typedef struct Z_AttrListList Z_AttrListList;
00047 YAZ_EXPORT int z_AttrListList (ODR o, Z_AttrListList **p, int opt, const char *name);
00048
00049 typedef struct Z_Scan Z_Scan;
00050 YAZ_EXPORT int z_Scan (ODR o, Z_Scan **p, int opt, const char *name);
00051
00052 typedef struct Z_StringList Z_StringList;
00053 YAZ_EXPORT int z_StringList (ODR o, Z_StringList **p, int opt, const char *name);
00054
00055 typedef struct Z_Sort Z_Sort;
00056 YAZ_EXPORT int z_Sort (ODR o, Z_Sort **p, int opt, const char *name);
00057
00058 typedef struct Z_Segmentation Z_Segmentation;
00059 YAZ_EXPORT int z_Segmentation (ODR o, Z_Segmentation **p, int opt, const char *name);
00060
00061 typedef struct Z_ExtServices Z_ExtServices;
00062 YAZ_EXPORT int z_ExtServices (ODR o, Z_ExtServices **p, int opt, const char *name);
00063
00064 typedef struct Z_OidList Z_OidList;
00065 YAZ_EXPORT int z_OidList (ODR o, Z_OidList **p, int opt, const char *name);
00066
00067 typedef struct Z_AltOidList Z_AltOidList;
00068 YAZ_EXPORT int z_AltOidList (ODR o, Z_AltOidList **p, int opt, const char *name);
00069
00070 typedef struct Z_AccessCtrl Z_AccessCtrl;
00071 YAZ_EXPORT int z_AccessCtrl (ODR o, Z_AccessCtrl **p, int opt, const char *name);
00072
00073 typedef struct Z_RecordSyntax Z_RecordSyntax;
00074 YAZ_EXPORT int z_RecordSyntax (ODR o, Z_RecordSyntax **p, int opt, const char *name);
00075
00076 typedef struct Z_DiagFormat Z_DiagFormat;
00077 YAZ_EXPORT int z_DiagFormat (ODR o, Z_DiagFormat **p, int opt, const char *name);
00078 #ifdef __cplusplus
00079 }
00080 #endif
00081 #ifdef __cplusplus
00082 extern "C" {
00083 #endif
00084 struct Z_DiagnosticFormat_s {
00085 int which;
00086 union {
00087 Z_DefaultDiagFormat *defaultDiagRec;
00088 Z_DiagFormat *explicitDiagnostic;
00089 #define Z_DiagnosticFormat_s_defaultDiagRec 1
00090 #define Z_DiagnosticFormat_s_explicitDiagnostic 2
00091 } u;
00092 Z_InternationalString *message;
00093 };
00094
00095 struct Z_DiagnosticFormat {
00096 int num;
00097 Z_DiagnosticFormat_s **elements;
00098 };
00099
00100 struct Z_TooMany {
00101 #define Z_TooMany_argumentWords 1
00102 #define Z_TooMany_truncatedWords 2
00103 #define Z_TooMany_booleanOperators 3
00104 #define Z_TooMany_incompleteSubfields 4
00105 #define Z_TooMany_characters 5
00106 #define Z_TooMany_recordsRetrieved 6
00107 #define Z_TooMany_dataBasesSpecified 7
00108 #define Z_TooMany_resultSetsCreated 8
00109 #define Z_TooMany_indexTermsProcessed 9
00110 int *tooManyWhat;
00111 int *max;
00112 };
00113
00114 struct Z_BadSpec {
00115 Z_Specification *spec;
00116 Z_DatabaseName *db;
00117 int num_goodOnes;
00118 Z_Specification **goodOnes;
00119 };
00120
00121 struct Z_DbUnavail_0 {
00122 #define Z_DbUnavail_0_doesNotExist 0
00123 #define Z_DbUnavail_0_existsButUnavail 1
00124 #define Z_DbUnavail_0_locked 2
00125 #define Z_DbUnavail_0_accessDenied 3
00126 int *reasonCode;
00127 Z_InternationalString *message;
00128 };
00129
00130 struct Z_DbUnavail {
00131 Z_DatabaseName *db;
00132 Z_DbUnavail_0 *why;
00133 };
00134
00135 struct Z_Attribute {
00136 Odr_oid *id;
00137 int *type;
00138 int *value;
00139 Z_Term *term;
00140 };
00141
00142 struct Z_AttCombo {
00143 Z_AttributeList *unsupportedCombination;
00144 int num_recommendedAlternatives;
00145 Z_AttributeList **recommendedAlternatives;
00146 };
00147
00148 struct Z_DiagTerm {
00149 #define Z_DiagTerm_codedValue 1
00150 #define Z_DiagTerm_unparsable 2
00151 #define Z_DiagTerm_tooShort 3
00152 #define Z_DiagTerm_type 4
00153 int *problem;
00154 Z_Term *term;
00155 };
00156
00157 struct Z_Proximity {
00158 int which;
00159 union {
00160 Odr_null *resultSets;
00161 Z_InternationalString *badSet;
00162 int *relation;
00163 int *unit;
00164 int *distance;
00165 Z_AttributeList *attributes;
00166 Odr_null *ordered;
00167 Odr_null *exclusion;
00168 #define Z_Proximity_resultSets 1
00169 #define Z_Proximity_badSet 2
00170 #define Z_Proximity_relation 3
00171 #define Z_Proximity_unit 4
00172 #define Z_Proximity_distance 5
00173 #define Z_Proximity_attributes 6
00174 #define Z_Proximity_ordered 7
00175 #define Z_Proximity_exclusion 8
00176 } u;
00177 };
00178
00179 struct Z_AttrListList {
00180 int num;
00181 Z_AttributeList **elements;
00182 };
00183
00184 struct Z_Scan {
00185 int which;
00186 union {
00187 Odr_null *nonZeroStepSize;
00188 Odr_null *specifiedStepSize;
00189 Odr_null *termList1;
00190 Z_AttrListList *termList2;
00191 #define Z_Scan_mustBeOne 1
00192 #define Z_Scan_mustBePositive 2
00193 #define Z_Scan_mustBeNonNegative 3
00194 #define Z_Scan_other 4
00195 int *posInResponse;
00196 Odr_null *resources;
00197 Odr_null *endOfList;
00198 #define Z_Scan_nonZeroStepSize 1
00199 #define Z_Scan_specifiedStepSize 2
00200 #define Z_Scan_termList1 3
00201 #define Z_Scan_termList2 4
00202 #define Z_Scan_posInResponse 5
00203 #define Z_Scan_resources 6
00204 #define Z_Scan_endOfList 7
00205 } u;
00206 };
00207
00208 struct Z_StringList {
00209 int num;
00210 Z_InternationalString **elements;
00211 };
00212
00213 struct Z_Sort {
00214 int which;
00215 union {
00216 Odr_null *sequence;
00217 Odr_null *noRsName;
00218 int *tooMany;
00219 Odr_null *incompatible;
00220 Odr_null *generic;
00221 Odr_null *dbSpecific;
00222 Z_SortElement *sortElement;
00223 #define Z_Sort_tooMany 1
00224 #define Z_Sort_duplicate 2
00225 int *key;
00226 Odr_null *action;
00227 #define Z_Sort_relation 1
00228 #define Z_Sort_case 2
00229 #define Z_Sort_action 3
00230 #define Z_Sort_sort 4
00231 int *illegal;
00232 Z_StringList *inputTooLarge;
00233 Odr_null *aggregateTooLarge;
00234 #define Z_SortD_sequence 1
00235 #define Z_SortD_noRsName 2
00236 #define Z_SortD_tooMany 3
00237 #define Z_SortD_incompatible 4
00238 #define Z_SortD_generic 5
00239 #define Z_SortD_dbSpecific 6
00240 #define Z_SortD_sortElement 7
00241 #define Z_SortD_key 8
00242 #define Z_SortD_action 9
00243 #define Z_SortD_illegal 10
00244 #define Z_SortD_inputTooLarge 11
00245 #define Z_SortD_aggregateTooLarge 12
00246 } u;
00247 };
00248
00249 struct Z_Segmentation {
00250 int which;
00251 union {
00252 Odr_null *segmentCount;
00253 int *segmentSize;
00254 #define Z_Segmentation_segmentCount 1
00255 #define Z_Segmentation_segmentSize 2
00256 } u;
00257 };
00258
00259 struct Z_ExtServices {
00260 int which;
00261 union {
00262 #define Z_ExtServices_nameInUse 1
00263 #define Z_ExtServices_noSuchName 2
00264 #define Z_ExtServices_quota 3
00265 #define Z_ExtServices_type 4
00266 int *req;
00267 #define Z_ExtServices_id 1
00268 #define Z_ExtServices_modifyDelete 2
00269 int *permission;
00270 #define Z_ExtServices_failed 1
00271 #define Z_ExtServices_service 2
00272 #define Z_ExtServices_parameters 3
00273 int *immediate;
00274 #define Z_ExtServices_req 1
00275 #define Z_ExtServices_permission 2
00276 #define Z_ExtServices_immediate 3
00277 } u;
00278 };
00279
00280 struct Z_OidList {
00281 int num;
00282 Odr_oid **elements;
00283 };
00284
00285 struct Z_AltOidList {
00286 int num;
00287 Odr_oid **elements;
00288 };
00289
00290 struct Z_AccessCtrl {
00291 int which;
00292 union {
00293 Odr_null *noUser;
00294 Odr_null *refused;
00295 Odr_null *simple;
00296 Z_OidList *oid;
00297 Z_AltOidList *alternative;
00298 Odr_null *pwdInv;
00299 Odr_null *pwdExp;
00300 #define Z_AccessCtrl_noUser 1
00301 #define Z_AccessCtrl_refused 2
00302 #define Z_AccessCtrl_simple 3
00303 #define Z_AccessCtrl_oid 4
00304 #define Z_AccessCtrl_alternative 5
00305 #define Z_AccessCtrl_pwdInv 6
00306 #define Z_AccessCtrl_pwdExp 7
00307 } u;
00308 };
00309
00310 struct Z_RecordSyntax {
00311 Odr_oid *unsupportedSyntax;
00312 int num_suggestedAlternatives;
00313 Odr_oid **suggestedAlternatives;
00314 };
00315
00316 struct Z_DiagFormat {
00317 int which;
00318 union {
00319 Z_TooMany *tooMany;
00320 Z_BadSpec *badSpec;
00321 Z_DbUnavail *dbUnavail;
00322 #define Z_DiagFormat_and 0
00323 #define Z_DiagFormat_or 1
00324 #define Z_DiagFormat_and_not 2
00325 #define Z_DiagFormat_prox 3
00326 int *unSupOp;
00327 Z_Attribute *attribute;
00328 Z_AttCombo *attCombo;
00329 Z_DiagTerm *term;
00330 Z_Proximity *proximity;
00331 Z_Scan *scan;
00332 Z_Sort *sort;
00333 Z_Segmentation *segmentation;
00334 Z_ExtServices *extServices;
00335 Z_AccessCtrl *accessCtrl;
00336 Z_RecordSyntax *recordSyntax;
00337 #define Z_DiagFormat_tooMany 1
00338 #define Z_DiagFormat_badSpec 2
00339 #define Z_DiagFormat_dbUnavail 3
00340 #define Z_DiagFormat_unSupOp 4
00341 #define Z_DiagFormat_attribute 5
00342 #define Z_DiagFormat_attCombo 6
00343 #define Z_DiagFormat_term 7
00344 #define Z_DiagFormat_proximity 8
00345 #define Z_DiagFormat_scan 9
00346 #define Z_DiagFormat_sort 10
00347 #define Z_DiagFormat_segmentation 11
00348 #define Z_DiagFormat_extServices 12
00349 #define Z_DiagFormat_accessCtrl 13
00350 #define Z_DiagFormat_recordSyntax 14
00351 } u;
00352 };
00353
00354 #ifdef __cplusplus
00355 }
00356 #endif
00357 #endif