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.26 1995-09-29 17:12:08 quinn
30 * Revision 1.25 1995/09/27 15:02:49 quinn
31 * Modified function heads & prototypes.
33 * Revision 1.24 1995/08/29 11:17:43 quinn
34 * *** empty log message ***
36 * Revision 1.23 1995/08/21 09:10:36 quinn
37 * Smallish fixes to suppport new formats.
39 * Revision 1.22 1995/08/17 12:45:14 quinn
40 * Fixed minor problems with GRS-1. Added support in c&s.
42 * Revision 1.21 1995/08/15 12:00:11 quinn
45 * Revision 1.20 1995/08/10 08:54:35 quinn
48 * Revision 1.19 1995/06/19 12:38:28 quinn
49 * Reorganized include-files. Added small features.
51 * Revision 1.18 1995/06/16 13:16:05 quinn
52 * Fixed Defaultdiagformat.
54 * Revision 1.17 1995/06/15 15:42:05 quinn
57 * Revision 1.16 1995/06/15 07:45:06 quinn
60 * Revision 1.15 1995/06/14 15:26:43 quinn
61 * *** empty log message ***
63 * Revision 1.14 1995/06/07 14:42:34 quinn
66 * Revision 1.13 1995/06/07 14:36:47 quinn
69 * Revision 1.12 1995/06/05 10:53:13 quinn
72 * Revision 1.11 1995/06/02 09:49:47 quinn
75 * Revision 1.10 1995/05/29 08:11:34 quinn
76 * Moved oid from odr/asn to util.
78 * Revision 1.9 1995/05/22 11:31:25 quinn
81 * Revision 1.8 1995/05/17 08:41:35 quinn
82 * Added delete to proto & other little things.
83 * Relaying auth info to backend.
85 * Revision 1.7 1995/05/16 08:50:37 quinn
86 * License, documentation, and memory fixes
88 * Revision 1.6 1995/05/15 11:55:55 quinn
89 * Work on asynchronous activity.
91 * Revision 1.5 1995/04/17 11:28:18 quinn
94 * Revision 1.4 1995/04/10 10:22:47 quinn
97 * Revision 1.3 1995/03/30 12:18:09 quinn
100 * Revision 1.2 1995/03/30 10:26:48 quinn
101 * Added Term structure
103 * Revision 1.1 1995/03/30 09:39:42 quinn
104 * Moved .h files to include directory
106 * Revision 1.11 1995/03/30 09:08:44 quinn
107 * Added Resource control protocol
109 * Revision 1.10 1995/03/29 15:39:39 quinn
110 * Adding some resource control elements, and a null-check to getentbyoid
112 * Revision 1.9 1995/03/29 08:06:18 quinn
113 * Added a few v3 elements
115 * Revision 1.8 1995/03/22 10:12:49 quinn
116 * Added Z_PRES constants.
118 * Revision 1.7 1995/03/20 09:45:12 quinn
121 * Revision 1.5 1995/03/07 16:29:34 quinn
122 * Added authentication stuff.
124 * Revision 1.4 1995/03/07 10:13:00 quinn
125 * Added prototype for z_APDU()
127 * Revision 1.3 1995/02/14 11:54:23 quinn
130 * Revision 1.2 1995/02/09 15:51:40 quinn
133 * Revision 1.1 1995/02/06 16:44:48 quinn
134 * First hack at Z/SR protocol
145 #include <yaz-version.h>
148 * Because we didn't have time to put all of the extra v3 elements in here
149 * before the first applications were written, we have to place them
150 * in #ifdefs in places where they would break existing code. If you are
151 * developing new stuff, we urge you to leave them in, even if you don't
152 * intend to use any v3 features. When we are comfortable that the old
153 * apps have been updated, we'll remove the #ifdefs.
158 /* ----------------- GLOBAL AUXILIARY DEFS ----------------*/
161 typedef struct Z_External Z_External;
163 typedef Odr_oct Z_ReferenceId;
164 typedef char Z_DatabaseName;
165 typedef char Z_ResultSetId;
166 typedef Odr_oct Z_ResultsetId;
168 typedef struct Z_InfoCategory
170 Odr_oid *categoryTypeId; /* OPTIONAL */
174 typedef struct Z_OtherInformationUnit
176 Z_InfoCategory *category; /* OPTIONAL */
179 Z_OtherInfo_characterInfo,
180 Z_OtherInfo_binaryInfo,
181 Z_OtherInfo_externallyDefinedInfo,
188 Z_External *externallyDefinedInfo;
191 } Z_OtherInformationUnit;
193 typedef struct Z_OtherInformation
196 Z_OtherInformationUnit **list;
197 } Z_OtherInformation;
199 typedef struct Z_StringOrNumeric
203 Z_StringOrNumeric_string,
204 Z_StringOrNumeric_numeric
213 typedef struct Z_Unit
215 char *unitSystem; /* OPTIONAL */
216 Z_StringOrNumeric *unitType; /* OPTIONAL */
217 Z_StringOrNumeric *unit; /* OPTIONAL */
218 int *scaleFactor; /* OPTIONAL */
221 typedef struct Z_IntUnit
227 typedef Odr_oct Z_SUTRS;
229 /* ----------------- INIT SERVICE ----------------*/
233 char *groupId; /* OPTIONAL */
234 char *userId; /* OPTIONAL */
235 char *password; /* OPTIONAL */
238 typedef struct Z_IdAuthentication
242 Z_IdAuthentication_open,
243 Z_IdAuthentication_idPass,
244 Z_IdAuthentication_anonymous,
245 Z_IdAuthentication_other
254 } Z_IdAuthentication;
256 #define Z_ProtocolVersion_1 0
257 #define Z_ProtocolVersion_2 1
258 #define Z_ProtocolVersion_3 2
260 #define Z_Options_search 0
261 #define Z_Options_present 1
262 #define Z_Options_delSet 2
263 #define Z_Options_resourceReport 3
264 #define Z_Options_triggerResourceCtrl 4
265 #define Z_Options_resourceCtrl 5
266 #define Z_Options_accessCtrl 6
267 #define Z_Options_scan 7
268 #define Z_Options_sort 8
269 #define Z_Options_reserved 9
270 #define Z_Options_extendedServices 10
271 #define Z_Options_level_1Segmentation 11
272 #define Z_Options_level_2Segmentation 12
273 #define Z_Options_concurrentOperations 13
274 #define Z_Options_namedResultSets 14
276 typedef struct Z_InitRequest
278 Z_ReferenceId *referenceId; /* OPTIONAL */
279 Odr_bitmask *protocolVersion;
280 Odr_bitmask *options;
281 int *preferredMessageSize;
282 int *maximumRecordSize;
283 Z_IdAuthentication* idAuthentication; /* OPTIONAL */
284 char *implementationId; /* OPTIONAL */
285 char *implementationName; /* OPTIONAL */
286 char *implementationVersion; /* OPTIONAL */
287 Z_External *userInformationField; /* OPTIONAL */
289 Z_OtherInformation *otherInfo; /* OPTIONAL */
293 typedef struct Z_InitResponse
295 Z_ReferenceId *referenceId; /* OPTIONAL */
296 Odr_bitmask *protocolVersion;
297 Odr_bitmask *options;
298 int *preferredMessageSize;
299 int *maximumRecordSize;
301 char *implementationId; /* OPTIONAL */
302 char *implementationName; /* OPTIONAL */
303 char *implementationVersion; /* OPTIONAL */
304 Z_External *userInformationField; /* OPTIONAL */
306 Z_OtherInformation *otherInfo; /* OPTIONAL */
310 typedef struct Z_NSRAuthentication
315 } Z_NSRAuthentication;
317 int z_NSRAuthentication(ODR o, Z_NSRAuthentication **p, int opt);
319 int z_StrAuthentication(ODR o, char **p, int opt);
321 /* ------------------ SEARCH SERVICE ----------------*/
323 typedef struct Z_DatabaseSpecificUnit
326 char *elementSetName;
327 } Z_DatabaseSpecificUnit;
329 typedef struct Z_DatabaseSpecific
332 Z_DatabaseSpecificUnit **elements;
333 } Z_DatabaseSpecific;
335 typedef struct Z_ElementSetNames
338 #define Z_ElementSetNames_generic 0
339 #define Z_ElementSetNames_databaseSpecific 1
343 Z_DatabaseSpecific *databaseSpecific;
347 /* ---------------------- RPN QUERY --------------------------- */
349 typedef struct Z_ComplexAttribute
352 Z_StringOrNumeric **list;
353 int num_semanticAction;
354 int **semanticAction; /* OPTIONAL */
355 } Z_ComplexAttribute;
357 typedef struct Z_AttributeElement
360 Odr_oid *attributeSet; /* OPTIONAL - v3 only */
366 Z_AttributeValue_numeric,
367 Z_AttributeValue_complex
372 Z_ComplexAttribute *complex;
377 } Z_AttributeElement;
379 typedef struct Z_Term
385 Z_Term_characterString,
389 Z_Term_integerAndUnit,
394 Odr_oct *general; /* this is required for v2 */
396 char *characterString;
399 Z_External *external;
400 /* Z_IntUnit *integerAndUnit; */
405 typedef struct Z_AttributesPlusTerm
408 Z_AttributeElement **attributeList;
410 } Z_AttributesPlusTerm;
412 typedef struct Z_ResultSetPlusAttributes
416 Z_AttributeElement **attributeList;
417 } Z_ResultSetPlusAttributes;
419 typedef struct Z_ProximityOperator
421 bool_t *exclusion; /* OPTIONAL */
425 #define Z_Prox_lessThan 1
426 #define Z_Prox_lessThanOrEqual 2
427 #define Z_Prox_equal 3
428 #define Z_Prox_greaterThanOrEqual 4
429 #define Z_Prox_greaterThan 5
430 #define Z_Prox_notEqual 6
436 int *proximityUnitCode;
437 #define Z_ProxUnit_character 1
438 #define Z_ProxUnit_word 2
439 #define Z_ProxUnit_sentence 3
440 #define Z_ProxUnit_paragraph 4
441 #define Z_ProxUnit_section 5
442 #define Z_ProxUnit_chapter 6
443 #define Z_ProxUnit_document 7
444 #define Z_ProxUnit_element 8
445 #define Z_ProxUnit_subelement 9
446 #define Z_ProxUnit_elementType 10
447 #define Z_ProxUnit_byte 11 /* v3 only */
448 } Z_ProximityOperator;
450 typedef struct Z_Operator
461 Odr_null *and; /* these guys are nulls. */
464 Z_ProximityOperator *prox;
468 typedef struct Z_Operand
473 Z_Operand_resultSetId,
474 Z_Operand_resultAttr /* v3 only */
478 Z_AttributesPlusTerm *attributesPlusTerm;
479 Z_ResultSetId *resultSetId;
480 Z_ResultSetPlusAttributes *resultAttr;
484 typedef struct Z_Complex
486 struct Z_RPNStructure *s1;
487 struct Z_RPNStructure *s2;
488 Z_Operator *operator;
491 typedef struct Z_RPNStructure
495 Z_RPNStructure_simple,
496 Z_RPNStructure_complex
505 typedef struct Z_RPNQuery
507 Odr_oid *attributeSetId;
508 Z_RPNStructure *RPNStructure;
511 /* -------------------------- SEARCHREQUEST -------------------------- */
513 typedef struct Z_Query
526 Z_RPNQuery *type_101;
530 typedef struct Z_SearchRequest
532 Z_ReferenceId *referenceId; /* OPTIONAL */
533 int *smallSetUpperBound;
534 int *largeSetLowerBound;
535 int *mediumSetPresentNumber;
536 bool_t *replaceIndicator;
538 int num_databaseNames;
539 char **databaseNames;
540 Z_ElementSetNames *smallSetElementSetNames; /* OPTIONAL */
541 Z_ElementSetNames *mediumSetElementSetNames; /* OPTIONAL */
542 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
545 Z_OtherInformation *additionalSearchInfo; /* OPTIONAL */
546 Z_OtherInformation *otherInfo; /* OPTIONAL */
550 /* ------------------------ RECORD -------------------------- */
552 typedef Z_External Z_DatabaseRecord;
556 typedef struct Z_DefaultDiagFormat
558 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
560 /* until the whole character set issue becomes more definite,
561 * you can probably ignore this on input. */
564 Z_DiagForm_v2AddInfo,
568 } Z_DefaultDiagFormat;
570 typedef struct Z_DiagRec
574 Z_DiagRec_defaultFormat,
575 Z_DiagRec_externallyDefined
579 Z_DefaultDiagFormat *defaultFormat;
580 Z_External *externallyDefined;
586 typedef struct Z_DiagRec
588 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
595 typedef struct Z_DiagRecs
598 Z_DiagRec **diagRecs;
601 typedef struct Z_NamePlusRecord
603 char *databaseName; /* OPTIONAL */
606 Z_NamePlusRecord_databaseRecord,
607 Z_NamePlusRecord_surrogateDiagnostic
612 Z_DatabaseRecord *databaseRecord;
613 Z_DiagRec *surrogateDiagnostic;
617 typedef struct Z_NamePlusRecordList
620 Z_NamePlusRecord **records;
621 } Z_NamePlusRecordList;
623 typedef struct Z_Records
629 Z_Records_multipleNSD
633 Z_NamePlusRecordList *databaseOrSurDiagnostics;
634 Z_DiagRec *nonSurrogateDiagnostic;
635 Z_DiagRecs *multipleNonSurDiagnostics;
639 /* ------------------------ SEARCHRESPONSE ------------------ */
641 typedef struct Z_SearchResponse
643 Z_ReferenceId *referenceId; /* OPTIONAL */
645 int *numberOfRecordsReturned;
646 int *nextResultSetPosition;
647 bool_t *searchStatus;
648 int *resultSetStatus; /* OPTIONAL */
649 #define Z_RES_SUBSET 1
650 #define Z_RES_INTERIM 2
652 int *presentStatus; /* OPTIONAL */
653 #define Z_PRES_SUCCESS 0
654 #define Z_PRES_PARTIAL_1 1
655 #define Z_PRES_PARTIAL_2 2
656 #define Z_PRES_PARTIAL_3 3
657 #define Z_PRES_PARTIAL_4 4
658 #define Z_PRES_FAILURE 5
659 Z_Records *records; /* OPTIONAL */
661 Z_OtherInformation *additionalSearchInfo;
662 Z_OtherInformation *otherInfo;
666 /* ------------------------- PRESENT SERVICE -----------------*/
668 typedef struct Z_ElementSpec
672 Z_ElementSpec_elementSetName,
673 Z_ElementSpec_externalSpec
677 char *elementSetName;
678 Z_External *externalSpec;
682 typedef struct Z_Specification
684 Odr_oid *schema; /* OPTIONAL */
685 Z_ElementSpec *elementSpec; /* OPTIONAL */
688 typedef struct Z_DbSpecific
691 Z_Specification *spec;
694 typedef struct Z_CompSpec
696 bool_t *selectAlternativeSyntax;
697 Z_Specification *generic; /* OPTIONAL */
699 Z_DbSpecific **dbSpecific; /* OPTIONAL */
700 int num_recordSyntax;
701 Odr_oid **recordSyntax; /* OPTIONAL */
704 typedef struct Z_RecordComposition
713 Z_ElementSetNames *simple;
716 } Z_RecordComposition;
718 typedef struct Z_Range
720 int *startingPosition;
721 int *numberOfRecords;
724 typedef struct Z_PresentRequest
726 Z_ReferenceId *referenceId; /* OPTIONAL */
727 Z_ResultSetId *resultSetId;
728 int *resultSetStartPoint;
729 int *numberOfRecordsRequested;
732 Z_Range **additionalRanges; /* OPTIONAL */
733 Z_RecordComposition *recordComposition; /* OPTIONAL */
735 Z_ElementSetNames *elementSetNames; /* OPTIONAL */
737 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
739 int *maxSegmentCount; /* OPTIONAL */
740 int *maxRecordSize; /* OPTIONAL */
741 int *maxSegmentSize; /* OPTIONAL */
742 Z_OtherInformation *otherInfo; /* OPTIONAL */
746 typedef struct Z_PresentResponse
748 Z_ReferenceId *referenceId; /* OPTIONAL */
749 int *numberOfRecordsReturned;
750 int *nextResultSetPosition;
754 Z_OtherInformation *otherInfo; /* OPTIONAL */
758 /* ------------------ RESOURCE CONTROL ----------------*/
760 typedef struct Z_TriggerResourceControlRequest
762 Z_ReferenceId *referenceId; /* OPTIONAL */
763 int *requestedAction;
764 #define Z_TriggerResourceCtrl_resourceReport 1
765 #define Z_TriggerResourceCtrl_resourceControl 2
766 #define Z_TriggerResourceCtrl_cancel 3
767 Odr_oid *prefResourceReportFormat; /* OPTIONAL */
768 bool_t *resultSetWanted; /* OPTIONAL */
770 Z_OtherInformation *otherInfo;
772 } Z_TriggerResourceControlRequest;
774 typedef struct Z_ResourceControlRequest
776 Z_ReferenceId *referenceId; /* OPTIONAL */
777 bool_t *suspendedFlag; /* OPTIONAL */
778 Z_External *resourceReport; /* OPTIONAL */
779 int *partialResultsAvailable; /* OPTIONAL */
780 #define Z_ResourceControlRequest_subset 1
781 #define Z_ResourceControlRequest_interim 2
782 #define Z_ResourceControlRequest_none 3
783 bool_t *responseRequired;
784 bool_t *triggeredRequestFlag; /* OPTIONAL */
786 Z_OtherInformation *otherInfo;
788 } Z_ResourceControlRequest;
790 typedef struct Z_ResourceControlResponse
792 Z_ReferenceId *referenceId; /* OPTIONAL */
793 bool_t *continueFlag;
794 bool_t *resultSetWanted; /* OPTIONAL */
796 Z_OtherInformation *otherInfo;
798 } Z_ResourceControlResponse;
801 /* ------------------ ACCESS CTRL SERVICE ----------------*/
803 typedef struct Z_AccessControlRequest
805 Z_ReferenceId *referenceId; /* OPTIONAL */
808 Z_AccessRequest_simpleForm,
809 Z_AccessRequest_externallyDefined
814 Z_External *externallyDefined;
817 Z_OtherInformation *otherInfo; /* OPTIONAL */
819 } Z_AccessControlRequest;
821 typedef struct Z_AccessControlResponse
823 Z_ReferenceId *referenceId; /* OPTIONAL */
826 Z_AccessResponse_simpleForm,
827 Z_AccessResponse_externallyDefined
832 Z_External *externallyDefined;
834 Z_DiagRec *diagnostic; /* OPTIONAL */
836 Z_OtherInformation *otherInfo; /* OPTIONAL */
838 } Z_AccessControlResponse;
840 /* ------------------------ SCAN SERVICE -------------------- */
842 typedef struct Z_AttributeList
845 Z_AttributeElement **attributes;
848 typedef struct Z_AlternativeTerm
851 Z_AttributesPlusTerm **terms;
854 typedef struct Z_OccurrenceByAttributes
856 Z_AttributeList *attributes;
868 /* Z_ByDatabase *byDatabase; */
871 } Z_OccurrenceByAttributes;
873 typedef struct Z_TermInfo
876 Z_AttributeList *suggestedAttributes; /* OPTIONAL */
877 Z_AlternativeTerm *alternativeTerm; /* OPTIONAL */
878 int *globalOccurrences; /* OPTIONAL */
879 Z_OccurrenceByAttributes *byAttributes; /* OPTIONAL */
882 typedef struct Z_Entry
887 Z_Entry_surrogateDiagnostic
891 Z_TermInfo *termInfo;
892 Z_DiagRec *surrogateDiagnostic;
896 typedef struct Z_Entries
902 typedef struct Z_ListEntries
906 Z_ListEntries_entries,
907 Z_ListEntries_nonSurrogateDiagnostics
912 Z_DiagRecs *nonSurrogateDiagnostics;
916 typedef struct Z_ScanRequest
918 Z_ReferenceId *referenceId; /* OPTIONAL */
919 int num_databaseNames;
920 char **databaseNames;
921 Odr_oid *attributeSet; /* OPTIONAL */
922 Z_AttributesPlusTerm *termListAndStartPoint;
923 int *stepSize; /* OPTIONAL */
924 int *numberOfTermsRequested;
925 int *preferredPositionInResponse; /* OPTIONAL */
927 Z_OtherInformation *otherInfo;
931 typedef struct Z_ScanResponse
933 Z_ReferenceId *referenceId; /* OPTIONAL */
934 int *stepSize; /* OPTIONAL */
936 #define Z_Scan_success 0
937 #define Z_Scan_partial_1 1
938 #define Z_Scan_partial_2 2
939 #define Z_Scan_partial_3 3
940 #define Z_Scan_partial_4 4
941 #define Z_Scan_partial_5 5
942 #define Z_Scan_failure 6
943 int *numberOfEntriesReturned;
944 int *positionOfTerm; /* OPTIONAL */
945 Z_ListEntries *entries; /* OPTIONAL */
946 Odr_oid *attributeSet; /* OPTIONAL */
948 Z_OtherInformation *otherInfo;
953 /* ------------------------ DELETE -------------------------- */
955 #define Z_DeleteStatus_success 0
956 #define Z_DeleteStatus_resultSetDidNotExist 1
957 #define Z_DeleteStatus_previouslyDeletedByTarget 2
958 #define Z_DeleteStatus_systemProblemAtTarget 3
959 #define Z_DeleteStatus_accessNotAllowed 4
960 #define Z_DeleteStatus_resourceControlAtOrigin 5
961 #define Z_DeleteStatus_resourceControlAtTarget 6
962 #define Z_DeleteStatus_bulkDeleteNotSupported 7
963 #define Z_DeleteStatus_notAllRsltSetsDeletedOnBulkDlte 8
964 #define Z_DeleteStatus_notAllRequestedResultSetsDeleted 9
965 #define Z_DeleteStatus_resultSetInUse 10
967 typedef struct Z_ListStatus
973 typedef struct Z_DeleteResultSetRequest
975 Z_ReferenceId *referenceId; /* OPTIONAL */
977 #define Z_DeleteRequest_list 0
978 #define Z_DeleteRequest_all 1
980 Z_ResultSetId **resultSetList; /* OPTIONAL */
982 Z_OtherInformation *otherInfo;
984 } Z_DeleteResultSetRequest;
986 typedef struct Z_DeleteResultSetResponse
988 Z_ReferenceId *referenceId; /* OPTIONAL */
989 int *deleteOperationStatus;
991 Z_ListStatus *deleteListStatuses; /* OPTIONAL */
992 int *numberNotDeleted; /* OPTIONAL */
993 int num_bulkStatuses;
994 Z_ListStatus *bulkStatuses; /* OPTIONAL */
995 char *deleteMessage; /* OPTIONAL */
997 Z_OtherInformation *otherInfo;
999 } Z_DeleteResultSetResponse;
1001 /* ------------------------ CLOSE SERVICE ------------------- */
1003 typedef struct Z_Close
1005 Z_ReferenceId *referenceId; /* OPTIONAL */
1007 #define Z_Close_finished 0
1008 #define Z_Close_shutdown 1
1009 #define Z_Close_systemProblem 2
1010 #define Z_Close_costLimit 3
1011 #define Z_Close_resources 4
1012 #define Z_Close_securityViolation 5
1013 #define Z_Close_protocolError 6
1014 #define Z_Close_lackOfActivity 7
1015 #define Z_Close_peerAbort 8
1016 #define Z_Close_unspecified 9
1017 char *diagnosticInformation; /* OPTIONAL */
1018 Odr_oid *resourceReportFormat; /* OPTIONAL */
1019 Z_External *resourceReport; /* OPTIONAL */
1021 Z_OtherInformation *otherInfo; /* OPTIONAL */
1025 /* ------------------------ SEGMENTATION -------------------- */
1027 typedef struct Z_Segment
1029 Z_ReferenceId *referenceId; /* OPTIONAL */
1030 int *numberOfRecordsReturned;
1031 int num_segmentRecords;
1032 Z_NamePlusRecord **segmentRecords;
1033 Z_OtherInformation *otherInfo; /* OPTIONAL */
1036 /* ----------------------- Extended Services ---------------- */
1038 typedef struct Z_Permissions
1041 int num_allowableFunctions;
1042 int **allowableFunctions;
1043 #define Z_Permissions_delete 1
1044 #define Z_Permissions_modifyContents 2
1045 #define Z_Permissions_modifyPermissions 3
1046 #define Z_Permissions_present 4
1047 #define Z_Permissions_invoke 5
1050 typedef struct Z_ExtendedServicesRequest
1052 Z_ReferenceId *referenceId; /* OPTIONAL */
1054 #define Z_ExtendedServicesRequest_create 1
1055 #define Z_ExtendedServicesRequest_delete 2
1056 #define Z_ExtendedServicesRequest_modify 3
1057 Odr_oid *packageType;
1058 char *packageName; /* OPTIONAL */
1059 char *userId; /* OPTIONAL */
1060 Z_IntUnit *retentionTime; /* OPTIONAL */
1061 Z_Permissions *permissions; /* OPTIONAL */
1062 char *description; /* OPTIONAL */
1063 Z_External *taskSpecificParameters; /* OPTIONAL */
1065 #define Z_ExtendedServicesRequest_wait 1
1066 #define Z_ExtendedServicesRequest_waitIfPossible 2
1067 #define Z_ExtendedServicesRequest_dontWait 3
1068 #define Z_ExtendedServicesRequest_dontReturnPackage 4
1069 char *elements; /* OPTIONAL */
1070 Z_OtherInformation *otherInfo; /* OPTIONAL */
1071 } Z_ExtendedServicesRequest;
1073 typedef struct Z_ExtendedServicesResponse
1075 Z_ReferenceId *referenceId; /* OPTIONAL */
1076 int *operationStatus;
1077 #define Z_ExtendedServicesResponse_done 1
1078 #define Z_ExtendedServicesResponse_accepted 2
1079 #define Z_ExtendedServicesResponse_failure 3
1080 int num_diagnostics;
1081 Z_DiagRec **diagnostics; /* OPTIONAL */
1082 Z_External *taskPackage; /* OPTIONAL */
1083 Z_OtherInformation *otherInfo; /* OPTIONAL */
1084 } Z_ExtendedServicesResponse;
1086 /* ------------------------ APDU ---------------------------- */
1088 typedef struct Z_APDU
1093 Z_APDU_initResponse,
1094 Z_APDU_searchRequest,
1095 Z_APDU_searchResponse,
1096 Z_APDU_presentRequest,
1097 Z_APDU_presentResponse,
1098 Z_APDU_deleteResultSetRequest,
1099 Z_APDU_deleteResultSetResponse,
1100 Z_APDU_resourceControlRequest,
1101 Z_APDU_resourceControlResponse,
1102 Z_APDU_triggerResourceControlRequest,
1104 Z_APDU_scanResponse,
1105 Z_APDU_segmentRequest,
1106 Z_APDU_extendedServicesRequest,
1107 Z_APDU_extendedServicesResponse,
1112 Z_InitRequest *initRequest;
1113 Z_InitResponse *initResponse;
1114 Z_SearchRequest *searchRequest;
1115 Z_SearchResponse *searchResponse;
1116 Z_PresentRequest *presentRequest;
1117 Z_PresentResponse *presentResponse;
1118 Z_DeleteResultSetRequest *deleteResultSetRequest;
1119 Z_DeleteResultSetResponse *deleteResultSetResponse;
1120 Z_ResourceControlRequest *resourceControlRequest;
1121 Z_ResourceControlResponse *resourceControlResponse;
1122 Z_TriggerResourceControlRequest *triggerResourceControlRequest;
1123 Z_ScanRequest *scanRequest;
1124 Z_ScanResponse *scanResponse;
1125 Z_Segment *segmentRequest;
1126 Z_ExtendedServicesRequest *extendedServicesRequest;
1127 Z_ExtendedServicesResponse *extendedServicesResponse;
1132 int z_APDU(ODR o, Z_APDU **p, int opt);
1133 int z_SUTRS(ODR o, Odr_oct **p, int opt);
1135 Z_InitRequest *zget_InitRequest(ODR o);
1136 Z_InitResponse *zget_InitResponse(ODR o);
1137 Z_SearchRequest *zget_SearchRequest(ODR o);
1138 Z_SearchResponse *zget_SearchResponse(ODR o);
1139 Z_PresentRequest *zget_PresentRequest(ODR o);
1140 Z_PresentResponse *zget_PresentResponse(ODR o);
1141 Z_DeleteResultSetRequest *zget_DeleteResultSetRequest(ODR o);
1142 Z_DeleteResultSetResponse *zget_DeleteResultSetResponse(ODR o);
1143 Z_ScanRequest *zget_ScanRequest(ODR o);
1144 Z_ScanResponse *zget_ScanResponse(ODR o);
1145 Z_TriggerResourceControlRequest *zget_TriggerResourceControlRequest(ODR o);
1146 Z_ResourceControlRequest *zget_ResourceControlRequest(ODR o);
1147 Z_ResourceControlResponse *zget_ResourceControlResponse(ODR o);
1148 Z_Close *zget_Close(ODR o);
1149 int z_InternationalString(ODR o, char **p, int opt);
1150 int z_OtherInformation(ODR o, Z_OtherInformation **p, int opt);
1151 int z_ElementSetName(ODR o, char **p, int opt);
1152 int z_IntUnit(ODR o, Z_IntUnit **p, int opt);
1153 int z_Unit(ODR o, Z_Unit **p, int opt);
1154 int z_DatabaseName(ODR o, Z_DatabaseName **p, int opt);
1155 int z_StringOrNumeric(ODR o, Z_StringOrNumeric **p, int opt);
1156 int z_OtherInformationUnit(ODR o, Z_OtherInformationUnit **p, int opt);
1157 int z_Term(ODR o, Z_Term **p, int opt);
1158 int z_Specification(ODR o, Z_Specification **p, int opt);
1159 int z_Permissions(ODR o, Z_Permissions **p, int opt);
1160 int z_DiagRec(ODR o, Z_DiagRec **p, int opt);
1161 int z_AttributeList(ODR o, Z_AttributeList **p, int opt);
1162 int z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt);
1163 Z_APDU *zget_APDU(ODR o, enum Z_APDU_which which);
1165 #include <prt-rsc.h>
1166 #include <prt-acc.h>
1167 #include <prt-exp.h>
1168 #include <prt-grs.h>
1169 #include <prt-exd.h>
1170 #include <prt-dia.h>
1172 #include <prt-ext.h>