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 name 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
27 * Revision 1.27 1995-10-12 10:34:46 quinn
30 * Revision 1.26 1995/09/29 17:12:08 quinn
33 * Revision 1.25 1995/09/27 15:02:49 quinn
34 * Modified function heads & prototypes.
36 * Revision 1.24 1995/08/29 11:17:43 quinn
37 * *** empty log message ***
39 * Revision 1.23 1995/08/21 09:10:36 quinn
40 * Smallish fixes to suppport new formats.
42 * Revision 1.22 1995/08/17 12:45:14 quinn
43 * Fixed minor problems with GRS-1. Added support in c&s.
45 * Revision 1.21 1995/08/15 12:00:11 quinn
48 * Revision 1.20 1995/08/10 08:54:35 quinn
51 * Revision 1.19 1995/06/19 12:38:28 quinn
52 * Reorganized include-files. Added small features.
54 * Revision 1.18 1995/06/16 13:16:05 quinn
55 * Fixed Defaultdiagformat.
57 * Revision 1.17 1995/06/15 15:42:05 quinn
60 * Revision 1.16 1995/06/15 07:45:06 quinn
63 * Revision 1.15 1995/06/14 15:26:43 quinn
64 * *** empty log message ***
66 * Revision 1.14 1995/06/07 14:42:34 quinn
69 * Revision 1.13 1995/06/07 14:36:47 quinn
72 * Revision 1.12 1995/06/05 10:53:13 quinn
75 * Revision 1.11 1995/06/02 09:49:47 quinn
78 * Revision 1.10 1995/05/29 08:11:34 quinn
79 * Moved oid from odr/asn to util.
81 * Revision 1.9 1995/05/22 11:31:25 quinn
84 * Revision 1.8 1995/05/17 08:41:35 quinn
85 * Added delete to proto & other little things.
86 * Relaying auth info to backend.
88 * Revision 1.7 1995/05/16 08:50:37 quinn
89 * License, documentation, and memory fixes
91 * Revision 1.6 1995/05/15 11:55:55 quinn
92 * Work on asynchronous activity.
94 * Revision 1.5 1995/04/17 11:28:18 quinn
97 * Revision 1.4 1995/04/10 10:22:47 quinn
100 * Revision 1.3 1995/03/30 12:18:09 quinn
103 * Revision 1.2 1995/03/30 10:26:48 quinn
104 * Added Term structure
106 * Revision 1.1 1995/03/30 09:39:42 quinn
107 * Moved .h files to include directory
109 * Revision 1.11 1995/03/30 09:08:44 quinn
110 * Added Resource control protocol
112 * Revision 1.10 1995/03/29 15:39:39 quinn
113 * Adding some resource control elements, and a null-check to getentbyoid
115 * Revision 1.9 1995/03/29 08:06:18 quinn
116 * Added a few v3 elements
118 * Revision 1.8 1995/03/22 10:12:49 quinn
119 * Added Z_PRES constants.
121 * Revision 1.7 1995/03/20 09:45:12 quinn
124 * Revision 1.5 1995/03/07 16:29:34 quinn
125 * Added authentication stuff.
127 * Revision 1.4 1995/03/07 10:13:00 quinn
128 * Added prototype for z_APDU()
130 * Revision 1.3 1995/02/14 11:54:23 quinn
133 * Revision 1.2 1995/02/09 15:51:40 quinn
136 * Revision 1.1 1995/02/06 16:44:48 quinn
137 * First hack at Z/SR protocol
148 #include <yaz-version.h>
151 * Because we didn't have time to put all of the extra v3 elements in here
152 * before the first applications were written, we have to place them
153 * in #ifdefs in places where they would break existing code. If you are
154 * developing new stuff, we urge you to leave them in, even if you don't
155 * intend to use any v3 features. When we are comfortable that the old
156 * apps have been updated, we'll remove the #ifdefs.
161 /* ----------------- GLOBAL AUXILIARY DEFS ----------------*/
164 typedef struct Z_External Z_External;
166 typedef Odr_oct Z_ReferenceId;
167 typedef char Z_DatabaseName;
168 typedef char Z_ResultSetId;
169 typedef Odr_oct Z_ResultsetId;
171 typedef struct Z_InfoCategory
173 Odr_oid *categoryTypeId; /* OPTIONAL */
177 typedef struct Z_OtherInformationUnit
179 Z_InfoCategory *category; /* OPTIONAL */
182 Z_OtherInfo_characterInfo,
183 Z_OtherInfo_binaryInfo,
184 Z_OtherInfo_externallyDefinedInfo,
191 Z_External *externallyDefinedInfo;
194 } Z_OtherInformationUnit;
196 typedef struct Z_OtherInformation
199 Z_OtherInformationUnit **list;
200 } Z_OtherInformation;
202 typedef struct Z_StringOrNumeric
206 Z_StringOrNumeric_string,
207 Z_StringOrNumeric_numeric
216 typedef struct Z_Unit
218 char *unitSystem; /* OPTIONAL */
219 Z_StringOrNumeric *unitType; /* OPTIONAL */
220 Z_StringOrNumeric *unit; /* OPTIONAL */
221 int *scaleFactor; /* OPTIONAL */
224 typedef struct Z_IntUnit
230 typedef Odr_oct Z_SUTRS;
232 /* ----------------- INIT SERVICE ----------------*/
236 char *groupId; /* OPTIONAL */
237 char *userId; /* OPTIONAL */
238 char *password; /* OPTIONAL */
241 typedef struct Z_IdAuthentication
245 Z_IdAuthentication_open,
246 Z_IdAuthentication_idPass,
247 Z_IdAuthentication_anonymous,
248 Z_IdAuthentication_other
257 } Z_IdAuthentication;
259 #define Z_ProtocolVersion_1 0
260 #define Z_ProtocolVersion_2 1
261 #define Z_ProtocolVersion_3 2
263 #define Z_Options_search 0
264 #define Z_Options_present 1
265 #define Z_Options_delSet 2
266 #define Z_Options_resourceReport 3
267 #define Z_Options_triggerResourceCtrl 4
268 #define Z_Options_resourceCtrl 5
269 #define Z_Options_accessCtrl 6
270 #define Z_Options_scan 7
271 #define Z_Options_sort 8
272 #define Z_Options_reserved 9
273 #define Z_Options_extendedServices 10
274 #define Z_Options_level_1Segmentation 11
275 #define Z_Options_level_2Segmentation 12
276 #define Z_Options_concurrentOperations 13
277 #define Z_Options_namedResultSets 14
279 typedef struct Z_InitRequest
281 Z_ReferenceId *referenceId; /* OPTIONAL */
282 Odr_bitmask *protocolVersion;
283 Odr_bitmask *options;
284 int *preferredMessageSize;
285 int *maximumRecordSize;
286 Z_IdAuthentication* idAuthentication; /* OPTIONAL */
287 char *implementationId; /* OPTIONAL */
288 char *implementationName; /* OPTIONAL */
289 char *implementationVersion; /* OPTIONAL */
290 Z_External *userInformationField; /* OPTIONAL */
292 Z_OtherInformation *otherInfo; /* OPTIONAL */
296 typedef struct Z_InitResponse
298 Z_ReferenceId *referenceId; /* OPTIONAL */
299 Odr_bitmask *protocolVersion;
300 Odr_bitmask *options;
301 int *preferredMessageSize;
302 int *maximumRecordSize;
304 char *implementationId; /* OPTIONAL */
305 char *implementationName; /* OPTIONAL */
306 char *implementationVersion; /* OPTIONAL */
307 Z_External *userInformationField; /* OPTIONAL */
309 Z_OtherInformation *otherInfo; /* OPTIONAL */
313 typedef struct Z_NSRAuthentication
318 } Z_NSRAuthentication;
320 int z_NSRAuthentication(ODR o, Z_NSRAuthentication **p, int opt);
322 int z_StrAuthentication(ODR o, char **p, int opt);
324 /* ------------------ SEARCH SERVICE ----------------*/
326 typedef struct Z_DatabaseSpecificUnit
329 char *elementSetName;
330 } Z_DatabaseSpecificUnit;
332 typedef struct Z_DatabaseSpecific
335 Z_DatabaseSpecificUnit **elements;
336 } Z_DatabaseSpecific;
338 typedef struct Z_ElementSetNames
341 #define Z_ElementSetNames_generic 0
342 #define Z_ElementSetNames_databaseSpecific 1
346 Z_DatabaseSpecific *databaseSpecific;
350 /* ---------------------- RPN QUERY --------------------------- */
352 typedef struct Z_ComplexAttribute
355 Z_StringOrNumeric **list;
356 int num_semanticAction;
357 int **semanticAction; /* OPTIONAL */
358 } Z_ComplexAttribute;
360 typedef struct Z_AttributeElement
363 Odr_oid *attributeSet; /* OPTIONAL - v3 only */
369 Z_AttributeValue_numeric,
370 Z_AttributeValue_complex
375 Z_ComplexAttribute *complex;
380 } Z_AttributeElement;
382 typedef struct Z_Term
388 Z_Term_characterString,
392 Z_Term_integerAndUnit,
397 Odr_oct *general; /* this is required for v2 */
399 char *characterString;
402 Z_External *external;
403 /* Z_IntUnit *integerAndUnit; */
408 typedef struct Z_AttributesPlusTerm
411 Z_AttributeElement **attributeList;
413 } Z_AttributesPlusTerm;
415 typedef struct Z_ResultSetPlusAttributes
419 Z_AttributeElement **attributeList;
420 } Z_ResultSetPlusAttributes;
422 typedef struct Z_ProximityOperator
424 bool_t *exclusion; /* OPTIONAL */
428 #define Z_Prox_lessThan 1
429 #define Z_Prox_lessThanOrEqual 2
430 #define Z_Prox_equal 3
431 #define Z_Prox_greaterThanOrEqual 4
432 #define Z_Prox_greaterThan 5
433 #define Z_Prox_notEqual 6
439 int *proximityUnitCode;
440 #define Z_ProxUnit_character 1
441 #define Z_ProxUnit_word 2
442 #define Z_ProxUnit_sentence 3
443 #define Z_ProxUnit_paragraph 4
444 #define Z_ProxUnit_section 5
445 #define Z_ProxUnit_chapter 6
446 #define Z_ProxUnit_document 7
447 #define Z_ProxUnit_element 8
448 #define Z_ProxUnit_subelement 9
449 #define Z_ProxUnit_elementType 10
450 #define Z_ProxUnit_byte 11 /* v3 only */
451 } Z_ProximityOperator;
453 typedef struct Z_Operator
464 Odr_null *and; /* these guys are nulls. */
467 Z_ProximityOperator *prox;
471 typedef struct Z_Operand
476 Z_Operand_resultSetId,
477 Z_Operand_resultAttr /* v3 only */
481 Z_AttributesPlusTerm *attributesPlusTerm;
482 Z_ResultSetId *resultSetId;
483 Z_ResultSetPlusAttributes *resultAttr;
487 typedef struct Z_Complex
489 struct Z_RPNStructure *s1;
490 struct Z_RPNStructure *s2;
491 Z_Operator *operator;
494 typedef struct Z_RPNStructure
498 Z_RPNStructure_simple,
499 Z_RPNStructure_complex
508 typedef struct Z_RPNQuery
510 Odr_oid *attributeSetId;
511 Z_RPNStructure *RPNStructure;
514 /* -------------------------- SEARCHREQUEST -------------------------- */
516 typedef struct Z_Query
529 Z_RPNQuery *type_101;
533 typedef struct Z_SearchRequest
535 Z_ReferenceId *referenceId; /* OPTIONAL */
536 int *smallSetUpperBound;
537 int *largeSetLowerBound;
538 int *mediumSetPresentNumber;
539 bool_t *replaceIndicator;
541 int num_databaseNames;
542 char **databaseNames;
543 Z_ElementSetNames *smallSetElementSetNames; /* OPTIONAL */
544 Z_ElementSetNames *mediumSetElementSetNames; /* OPTIONAL */
545 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
548 Z_OtherInformation *additionalSearchInfo; /* OPTIONAL */
549 Z_OtherInformation *otherInfo; /* OPTIONAL */
553 /* ------------------------ RECORD -------------------------- */
555 typedef Z_External Z_DatabaseRecord;
559 typedef struct Z_DefaultDiagFormat
561 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
563 /* until the whole character set issue becomes more definite,
564 * you can probably ignore this on input. */
567 Z_DiagForm_v2AddInfo,
571 } Z_DefaultDiagFormat;
573 typedef struct Z_DiagRec
577 Z_DiagRec_defaultFormat,
578 Z_DiagRec_externallyDefined
582 Z_DefaultDiagFormat *defaultFormat;
583 Z_External *externallyDefined;
589 typedef struct Z_DiagRec
591 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
598 typedef struct Z_DiagRecs
601 Z_DiagRec **diagRecs;
604 typedef struct Z_NamePlusRecord
606 char *databaseName; /* OPTIONAL */
609 Z_NamePlusRecord_databaseRecord,
610 Z_NamePlusRecord_surrogateDiagnostic
615 Z_DatabaseRecord *databaseRecord;
616 Z_DiagRec *surrogateDiagnostic;
620 typedef struct Z_NamePlusRecordList
623 Z_NamePlusRecord **records;
624 } Z_NamePlusRecordList;
626 typedef struct Z_Records
632 Z_Records_multipleNSD
636 Z_NamePlusRecordList *databaseOrSurDiagnostics;
637 Z_DiagRec *nonSurrogateDiagnostic;
638 Z_DiagRecs *multipleNonSurDiagnostics;
642 /* ------------------------ SEARCHRESPONSE ------------------ */
644 typedef struct Z_SearchResponse
646 Z_ReferenceId *referenceId; /* OPTIONAL */
648 int *numberOfRecordsReturned;
649 int *nextResultSetPosition;
650 bool_t *searchStatus;
651 int *resultSetStatus; /* OPTIONAL */
652 #define Z_RES_SUBSET 1
653 #define Z_RES_INTERIM 2
655 int *presentStatus; /* OPTIONAL */
656 #define Z_PRES_SUCCESS 0
657 #define Z_PRES_PARTIAL_1 1
658 #define Z_PRES_PARTIAL_2 2
659 #define Z_PRES_PARTIAL_3 3
660 #define Z_PRES_PARTIAL_4 4
661 #define Z_PRES_FAILURE 5
662 Z_Records *records; /* OPTIONAL */
664 Z_OtherInformation *additionalSearchInfo;
665 Z_OtherInformation *otherInfo;
669 /* ------------------------- PRESENT SERVICE -----------------*/
671 typedef struct Z_ElementSpec
675 Z_ElementSpec_elementSetName,
676 Z_ElementSpec_externalSpec
680 char *elementSetName;
681 Z_External *externalSpec;
685 typedef struct Z_Specification
687 Odr_oid *schema; /* OPTIONAL */
688 Z_ElementSpec *elementSpec; /* OPTIONAL */
691 typedef struct Z_DbSpecific
694 Z_Specification *spec;
697 typedef struct Z_CompSpec
699 bool_t *selectAlternativeSyntax;
700 Z_Specification *generic; /* OPTIONAL */
702 Z_DbSpecific **dbSpecific; /* OPTIONAL */
703 int num_recordSyntax;
704 Odr_oid **recordSyntax; /* OPTIONAL */
707 typedef struct Z_RecordComposition
716 Z_ElementSetNames *simple;
719 } Z_RecordComposition;
721 typedef struct Z_Range
723 int *startingPosition;
724 int *numberOfRecords;
727 typedef struct Z_PresentRequest
729 Z_ReferenceId *referenceId; /* OPTIONAL */
730 Z_ResultSetId *resultSetId;
731 int *resultSetStartPoint;
732 int *numberOfRecordsRequested;
735 Z_Range **additionalRanges; /* OPTIONAL */
736 Z_RecordComposition *recordComposition; /* OPTIONAL */
738 Z_ElementSetNames *elementSetNames; /* OPTIONAL */
740 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
742 int *maxSegmentCount; /* OPTIONAL */
743 int *maxRecordSize; /* OPTIONAL */
744 int *maxSegmentSize; /* OPTIONAL */
745 Z_OtherInformation *otherInfo; /* OPTIONAL */
749 typedef struct Z_PresentResponse
751 Z_ReferenceId *referenceId; /* OPTIONAL */
752 int *numberOfRecordsReturned;
753 int *nextResultSetPosition;
757 Z_OtherInformation *otherInfo; /* OPTIONAL */
761 /* ------------------ RESOURCE CONTROL ----------------*/
763 typedef struct Z_TriggerResourceControlRequest
765 Z_ReferenceId *referenceId; /* OPTIONAL */
766 int *requestedAction;
767 #define Z_TriggerResourceCtrl_resourceReport 1
768 #define Z_TriggerResourceCtrl_resourceControl 2
769 #define Z_TriggerResourceCtrl_cancel 3
770 Odr_oid *prefResourceReportFormat; /* OPTIONAL */
771 bool_t *resultSetWanted; /* OPTIONAL */
773 Z_OtherInformation *otherInfo;
775 } Z_TriggerResourceControlRequest;
777 typedef struct Z_ResourceControlRequest
779 Z_ReferenceId *referenceId; /* OPTIONAL */
780 bool_t *suspendedFlag; /* OPTIONAL */
781 Z_External *resourceReport; /* OPTIONAL */
782 int *partialResultsAvailable; /* OPTIONAL */
783 #define Z_ResourceControlRequest_subset 1
784 #define Z_ResourceControlRequest_interim 2
785 #define Z_ResourceControlRequest_none 3
786 bool_t *responseRequired;
787 bool_t *triggeredRequestFlag; /* OPTIONAL */
789 Z_OtherInformation *otherInfo;
791 } Z_ResourceControlRequest;
793 typedef struct Z_ResourceControlResponse
795 Z_ReferenceId *referenceId; /* OPTIONAL */
796 bool_t *continueFlag;
797 bool_t *resultSetWanted; /* OPTIONAL */
799 Z_OtherInformation *otherInfo;
801 } Z_ResourceControlResponse;
804 /* ------------------ ACCESS CTRL SERVICE ----------------*/
806 typedef struct Z_AccessControlRequest
808 Z_ReferenceId *referenceId; /* OPTIONAL */
811 Z_AccessRequest_simpleForm,
812 Z_AccessRequest_externallyDefined
817 Z_External *externallyDefined;
820 Z_OtherInformation *otherInfo; /* OPTIONAL */
822 } Z_AccessControlRequest;
824 typedef struct Z_AccessControlResponse
826 Z_ReferenceId *referenceId; /* OPTIONAL */
829 Z_AccessResponse_simpleForm,
830 Z_AccessResponse_externallyDefined
835 Z_External *externallyDefined;
837 Z_DiagRec *diagnostic; /* OPTIONAL */
839 Z_OtherInformation *otherInfo; /* OPTIONAL */
841 } Z_AccessControlResponse;
843 /* ------------------------ SCAN SERVICE -------------------- */
845 typedef struct Z_AttributeList
848 Z_AttributeElement **attributes;
851 typedef struct Z_AlternativeTerm
854 Z_AttributesPlusTerm **terms;
857 typedef struct Z_OccurrenceByAttributes
859 Z_AttributeList *attributes;
871 /* Z_ByDatabase *byDatabase; */
874 } Z_OccurrenceByAttributes;
876 typedef struct Z_TermInfo
879 Z_AttributeList *suggestedAttributes; /* OPTIONAL */
880 Z_AlternativeTerm *alternativeTerm; /* OPTIONAL */
881 int *globalOccurrences; /* OPTIONAL */
882 Z_OccurrenceByAttributes *byAttributes; /* OPTIONAL */
885 typedef struct Z_Entry
890 Z_Entry_surrogateDiagnostic
894 Z_TermInfo *termInfo;
895 Z_DiagRec *surrogateDiagnostic;
899 typedef struct Z_Entries
905 typedef struct Z_ListEntries
909 Z_ListEntries_entries,
910 Z_ListEntries_nonSurrogateDiagnostics
915 Z_DiagRecs *nonSurrogateDiagnostics;
919 typedef struct Z_ScanRequest
921 Z_ReferenceId *referenceId; /* OPTIONAL */
922 int num_databaseNames;
923 char **databaseNames;
924 Odr_oid *attributeSet; /* OPTIONAL */
925 Z_AttributesPlusTerm *termListAndStartPoint;
926 int *stepSize; /* OPTIONAL */
927 int *numberOfTermsRequested;
928 int *preferredPositionInResponse; /* OPTIONAL */
930 Z_OtherInformation *otherInfo;
934 typedef struct Z_ScanResponse
936 Z_ReferenceId *referenceId; /* OPTIONAL */
937 int *stepSize; /* OPTIONAL */
939 #define Z_Scan_success 0
940 #define Z_Scan_partial_1 1
941 #define Z_Scan_partial_2 2
942 #define Z_Scan_partial_3 3
943 #define Z_Scan_partial_4 4
944 #define Z_Scan_partial_5 5
945 #define Z_Scan_failure 6
946 int *numberOfEntriesReturned;
947 int *positionOfTerm; /* OPTIONAL */
948 Z_ListEntries *entries; /* OPTIONAL */
949 Odr_oid *attributeSet; /* OPTIONAL */
951 Z_OtherInformation *otherInfo;
956 /* ------------------------ DELETE -------------------------- */
958 #define Z_DeleteStatus_success 0
959 #define Z_DeleteStatus_resultSetDidNotExist 1
960 #define Z_DeleteStatus_previouslyDeletedByTarget 2
961 #define Z_DeleteStatus_systemProblemAtTarget 3
962 #define Z_DeleteStatus_accessNotAllowed 4
963 #define Z_DeleteStatus_resourceControlAtOrigin 5
964 #define Z_DeleteStatus_resourceControlAtTarget 6
965 #define Z_DeleteStatus_bulkDeleteNotSupported 7
966 #define Z_DeleteStatus_notAllRsltSetsDeletedOnBulkDlte 8
967 #define Z_DeleteStatus_notAllRequestedResultSetsDeleted 9
968 #define Z_DeleteStatus_resultSetInUse 10
970 typedef struct Z_ListStatus
976 typedef struct Z_DeleteResultSetRequest
978 Z_ReferenceId *referenceId; /* OPTIONAL */
980 #define Z_DeleteRequest_list 0
981 #define Z_DeleteRequest_all 1
983 Z_ResultSetId **resultSetList; /* OPTIONAL */
985 Z_OtherInformation *otherInfo;
987 } Z_DeleteResultSetRequest;
989 typedef struct Z_DeleteResultSetResponse
991 Z_ReferenceId *referenceId; /* OPTIONAL */
992 int *deleteOperationStatus;
994 Z_ListStatus *deleteListStatuses; /* OPTIONAL */
995 int *numberNotDeleted; /* OPTIONAL */
996 int num_bulkStatuses;
997 Z_ListStatus *bulkStatuses; /* OPTIONAL */
998 char *deleteMessage; /* OPTIONAL */
1000 Z_OtherInformation *otherInfo;
1002 } Z_DeleteResultSetResponse;
1004 /* ------------------------ CLOSE SERVICE ------------------- */
1006 typedef struct Z_Close
1008 Z_ReferenceId *referenceId; /* OPTIONAL */
1010 #define Z_Close_finished 0
1011 #define Z_Close_shutdown 1
1012 #define Z_Close_systemProblem 2
1013 #define Z_Close_costLimit 3
1014 #define Z_Close_resources 4
1015 #define Z_Close_securityViolation 5
1016 #define Z_Close_protocolError 6
1017 #define Z_Close_lackOfActivity 7
1018 #define Z_Close_peerAbort 8
1019 #define Z_Close_unspecified 9
1020 char *diagnosticInformation; /* OPTIONAL */
1021 Odr_oid *resourceReportFormat; /* OPTIONAL */
1022 Z_External *resourceReport; /* OPTIONAL */
1024 Z_OtherInformation *otherInfo; /* OPTIONAL */
1028 /* ------------------------ SEGMENTATION -------------------- */
1030 typedef struct Z_Segment
1032 Z_ReferenceId *referenceId; /* OPTIONAL */
1033 int *numberOfRecordsReturned;
1034 int num_segmentRecords;
1035 Z_NamePlusRecord **segmentRecords;
1036 Z_OtherInformation *otherInfo; /* OPTIONAL */
1039 /* ----------------------- Extended Services ---------------- */
1041 typedef struct Z_Permissions
1044 int num_allowableFunctions;
1045 int **allowableFunctions;
1046 #define Z_Permissions_delete 1
1047 #define Z_Permissions_modifyContents 2
1048 #define Z_Permissions_modifyPermissions 3
1049 #define Z_Permissions_present 4
1050 #define Z_Permissions_invoke 5
1053 typedef struct Z_ExtendedServicesRequest
1055 Z_ReferenceId *referenceId; /* OPTIONAL */
1057 #define Z_ExtendedServicesRequest_create 1
1058 #define Z_ExtendedServicesRequest_delete 2
1059 #define Z_ExtendedServicesRequest_modify 3
1060 Odr_oid *packageType;
1061 char *packageName; /* OPTIONAL */
1062 char *userId; /* OPTIONAL */
1063 Z_IntUnit *retentionTime; /* OPTIONAL */
1064 Z_Permissions *permissions; /* OPTIONAL */
1065 char *description; /* OPTIONAL */
1066 Z_External *taskSpecificParameters; /* OPTIONAL */
1068 #define Z_ExtendedServicesRequest_wait 1
1069 #define Z_ExtendedServicesRequest_waitIfPossible 2
1070 #define Z_ExtendedServicesRequest_dontWait 3
1071 #define Z_ExtendedServicesRequest_dontReturnPackage 4
1072 char *elements; /* OPTIONAL */
1073 Z_OtherInformation *otherInfo; /* OPTIONAL */
1074 } Z_ExtendedServicesRequest;
1076 typedef struct Z_ExtendedServicesResponse
1078 Z_ReferenceId *referenceId; /* OPTIONAL */
1079 int *operationStatus;
1080 #define Z_ExtendedServicesResponse_done 1
1081 #define Z_ExtendedServicesResponse_accepted 2
1082 #define Z_ExtendedServicesResponse_failure 3
1083 int num_diagnostics;
1084 Z_DiagRec **diagnostics; /* OPTIONAL */
1085 Z_External *taskPackage; /* OPTIONAL */
1086 Z_OtherInformation *otherInfo; /* OPTIONAL */
1087 } Z_ExtendedServicesResponse;
1089 /* ------------------------ APDU ---------------------------- */
1091 typedef struct Z_APDU
1096 Z_APDU_initResponse,
1097 Z_APDU_searchRequest,
1098 Z_APDU_searchResponse,
1099 Z_APDU_presentRequest,
1100 Z_APDU_presentResponse,
1101 Z_APDU_deleteResultSetRequest,
1102 Z_APDU_deleteResultSetResponse,
1103 Z_APDU_resourceControlRequest,
1104 Z_APDU_resourceControlResponse,
1105 Z_APDU_triggerResourceControlRequest,
1107 Z_APDU_scanResponse,
1108 Z_APDU_segmentRequest,
1109 Z_APDU_extendedServicesRequest,
1110 Z_APDU_extendedServicesResponse,
1115 Z_InitRequest *initRequest;
1116 Z_InitResponse *initResponse;
1117 Z_SearchRequest *searchRequest;
1118 Z_SearchResponse *searchResponse;
1119 Z_PresentRequest *presentRequest;
1120 Z_PresentResponse *presentResponse;
1121 Z_DeleteResultSetRequest *deleteResultSetRequest;
1122 Z_DeleteResultSetResponse *deleteResultSetResponse;
1123 Z_ResourceControlRequest *resourceControlRequest;
1124 Z_ResourceControlResponse *resourceControlResponse;
1125 Z_TriggerResourceControlRequest *triggerResourceControlRequest;
1126 Z_ScanRequest *scanRequest;
1127 Z_ScanResponse *scanResponse;
1128 Z_Segment *segmentRequest;
1129 Z_ExtendedServicesRequest *extendedServicesRequest;
1130 Z_ExtendedServicesResponse *extendedServicesResponse;
1135 int z_APDU(ODR o, Z_APDU **p, int opt);
1136 int z_SUTRS(ODR o, Odr_oct **p, int opt);
1138 Z_InitRequest *zget_InitRequest(ODR o);
1139 Z_InitResponse *zget_InitResponse(ODR o);
1140 Z_SearchRequest *zget_SearchRequest(ODR o);
1141 Z_SearchResponse *zget_SearchResponse(ODR o);
1142 Z_PresentRequest *zget_PresentRequest(ODR o);
1143 Z_PresentResponse *zget_PresentResponse(ODR o);
1144 Z_DeleteResultSetRequest *zget_DeleteResultSetRequest(ODR o);
1145 Z_DeleteResultSetResponse *zget_DeleteResultSetResponse(ODR o);
1146 Z_ScanRequest *zget_ScanRequest(ODR o);
1147 Z_ScanResponse *zget_ScanResponse(ODR o);
1148 Z_TriggerResourceControlRequest *zget_TriggerResourceControlRequest(ODR o);
1149 Z_ResourceControlRequest *zget_ResourceControlRequest(ODR o);
1150 Z_ResourceControlResponse *zget_ResourceControlResponse(ODR o);
1151 Z_Close *zget_Close(ODR o);
1152 int z_InternationalString(ODR o, char **p, int opt);
1153 int z_OtherInformation(ODR o, Z_OtherInformation **p, int opt);
1154 int z_ElementSetName(ODR o, char **p, int opt);
1155 int z_IntUnit(ODR o, Z_IntUnit **p, int opt);
1156 int z_Unit(ODR o, Z_Unit **p, int opt);
1157 int z_DatabaseName(ODR o, Z_DatabaseName **p, int opt);
1158 int z_StringOrNumeric(ODR o, Z_StringOrNumeric **p, int opt);
1159 int z_OtherInformationUnit(ODR o, Z_OtherInformationUnit **p, int opt);
1160 int z_Term(ODR o, Z_Term **p, int opt);
1161 int z_Specification(ODR o, Z_Specification **p, int opt);
1162 int z_Permissions(ODR o, Z_Permissions **p, int opt);
1163 int z_DiagRec(ODR o, Z_DiagRec **p, int opt);
1164 int z_AttributeList(ODR o, Z_AttributeList **p, int opt);
1165 int z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt);
1166 Z_APDU *zget_APDU(ODR o, enum Z_APDU_which which);
1168 #include <prt-rsc.h>
1169 #include <prt-acc.h>
1170 #include <prt-exp.h>
1171 #include <prt-grs.h>
1172 #include <prt-exd.h>
1173 #include <prt-dia.h>
1174 #include <prt-esp.h>
1176 #include <prt-ext.h>