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.23 1995-08-21 09:10:36 quinn
28 * Smallish fixes to suppport new formats.
30 * Revision 1.22 1995/08/17 12:45:14 quinn
31 * Fixed minor problems with GRS-1. Added support in c&s.
33 * Revision 1.21 1995/08/15 12:00:11 quinn
36 * Revision 1.20 1995/08/10 08:54:35 quinn
39 * Revision 1.19 1995/06/19 12:38:28 quinn
40 * Reorganized include-files. Added small features.
42 * Revision 1.18 1995/06/16 13:16:05 quinn
43 * Fixed Defaultdiagformat.
45 * Revision 1.17 1995/06/15 15:42:05 quinn
48 * Revision 1.16 1995/06/15 07:45:06 quinn
51 * Revision 1.15 1995/06/14 15:26:43 quinn
52 * *** empty log message ***
54 * Revision 1.14 1995/06/07 14:42:34 quinn
57 * Revision 1.13 1995/06/07 14:36:47 quinn
60 * Revision 1.12 1995/06/05 10:53:13 quinn
63 * Revision 1.11 1995/06/02 09:49:47 quinn
66 * Revision 1.10 1995/05/29 08:11:34 quinn
67 * Moved oid from odr/asn to util.
69 * Revision 1.9 1995/05/22 11:31:25 quinn
72 * Revision 1.8 1995/05/17 08:41:35 quinn
73 * Added delete to proto & other little things.
74 * Relaying auth info to backend.
76 * Revision 1.7 1995/05/16 08:50:37 quinn
77 * License, documentation, and memory fixes
79 * Revision 1.6 1995/05/15 11:55:55 quinn
80 * Work on asynchronous activity.
82 * Revision 1.5 1995/04/17 11:28:18 quinn
85 * Revision 1.4 1995/04/10 10:22:47 quinn
88 * Revision 1.3 1995/03/30 12:18:09 quinn
91 * Revision 1.2 1995/03/30 10:26:48 quinn
92 * Added Term structure
94 * Revision 1.1 1995/03/30 09:39:42 quinn
95 * Moved .h files to include directory
97 * Revision 1.11 1995/03/30 09:08:44 quinn
98 * Added Resource control protocol
100 * Revision 1.10 1995/03/29 15:39:39 quinn
101 * Adding some resource control elements, and a null-check to getentbyoid
103 * Revision 1.9 1995/03/29 08:06:18 quinn
104 * Added a few v3 elements
106 * Revision 1.8 1995/03/22 10:12:49 quinn
107 * Added Z_PRES constants.
109 * Revision 1.7 1995/03/20 09:45:12 quinn
112 * Revision 1.5 1995/03/07 16:29:34 quinn
113 * Added authentication stuff.
115 * Revision 1.4 1995/03/07 10:13:00 quinn
116 * Added prototype for z_APDU()
118 * Revision 1.3 1995/02/14 11:54:23 quinn
121 * Revision 1.2 1995/02/09 15:51:40 quinn
124 * Revision 1.1 1995/02/06 16:44:48 quinn
125 * First hack at Z/SR protocol
135 #include <yaz-version.h>
138 * Because we didn't have time to put all of the extra v3 elements in here
139 * before the first applications were written, we have to place them
140 * in #ifdefs in places where they would break existing code. If you are
141 * developing new stuff, we urge you to leave them in, even if you don't
142 * intend to use any v3 features. When we are comfortable that the old
143 * apps have been updated, we'll remove the #ifdefs.
148 /* ----------------- GLOBAL AUXILIARY DEFS ----------------*/
151 typedef struct Z_External Z_External;
153 typedef Odr_oct Z_ReferenceId;
154 typedef char Z_DatabaseName;
155 typedef char Z_ResultSetId;
156 typedef Odr_oct Z_ResultsetId;
158 typedef struct Z_InfoCategory
160 Odr_oid *categoryTypeId; /* OPTIONAL */
164 typedef struct Z_OtherInformationUnit
166 Z_InfoCategory *category; /* OPTIONAL */
169 Z_OtherInfo_characterInfo,
170 Z_OtherInfo_binaryInfo,
171 Z_OtherInfo_externallyDefinedInfo,
178 Z_External *externallyDefinedInfo;
181 } Z_OtherInformationUnit;
183 typedef struct Z_OtherInformation
186 Z_OtherInformationUnit **list;
187 } Z_OtherInformation;
189 typedef struct Z_StringOrNumeric
193 Z_StringOrNumeric_string,
194 Z_StringOrNumeric_numeric
203 typedef struct Z_Unit
205 char *unitSystem; /* OPTIONAL */
206 Z_StringOrNumeric *unitType; /* OPTIONAL */
207 Z_StringOrNumeric *unit; /* OPTIONAL */
208 int *scaleFactor; /* OPTIONAL */
211 typedef struct Z_IntUnit
217 typedef Odr_oct Z_SUTRS;
219 /* ----------------- INIT SERVICE ----------------*/
223 char *groupId; /* OPTIONAL */
224 char *userId; /* OPTIONAL */
225 char *password; /* OPTIONAL */
228 typedef struct Z_IdAuthentication
232 Z_IdAuthentication_open,
233 Z_IdAuthentication_idPass,
234 Z_IdAuthentication_anonymous,
235 Z_IdAuthentication_other
244 } Z_IdAuthentication;
246 #define Z_ProtocolVersion_1 0
247 #define Z_ProtocolVersion_2 1
248 #define Z_ProtocolVersion_3 2
250 #define Z_Options_search 0
251 #define Z_Options_present 1
252 #define Z_Options_delSet 2
253 #define Z_Options_resourceReport 3
254 #define Z_Options_triggerResourceCtrl 4
255 #define Z_Options_resourceCtrl 5
256 #define Z_Options_accessCtrl 6
257 #define Z_Options_scan 7
258 #define Z_Options_sort 8
259 #define Z_Options_reserved 9
260 #define Z_Options_extendedServices 10
261 #define Z_Options_level_1Segmentation 11
262 #define Z_Options_level_2Segmentation 12
263 #define Z_Options_concurrentOperations 13
264 #define Z_Options_namedResultSets 14
266 typedef struct Z_InitRequest
268 Z_ReferenceId *referenceId; /* OPTIONAL */
269 Odr_bitmask *protocolVersion;
270 Odr_bitmask *options;
271 int *preferredMessageSize;
272 int *maximumRecordSize;
273 Z_IdAuthentication* idAuthentication; /* OPTIONAL */
274 char *implementationId; /* OPTIONAL */
275 char *implementationName; /* OPTIONAL */
276 char *implementationVersion; /* OPTIONAL */
277 Z_External *userInformationField; /* OPTIONAL */
279 Z_OtherInformation *otherInfo; /* OPTIONAL */
283 typedef struct Z_InitResponse
285 Z_ReferenceId *referenceId; /* OPTIONAL */
286 Odr_bitmask *protocolVersion;
287 Odr_bitmask *options;
288 int *preferredMessageSize;
289 int *maximumRecordSize;
291 char *implementationId; /* OPTIONAL */
292 char *implementationName; /* OPTIONAL */
293 char *implementationVersion; /* OPTIONAL */
294 Z_External *userInformationField; /* OPTIONAL */
296 Z_OtherInformation *otherInfo; /* OPTIONAL */
300 typedef struct Z_NSRAuthentication
305 } Z_NSRAuthentication;
307 int z_NSRAuthentication(ODR o, Z_NSRAuthentication **p, int opt);
309 int z_StrAuthentication(ODR o, char **p, int opt);
311 /* ------------------ SEARCH SERVICE ----------------*/
313 typedef struct Z_DatabaseSpecificUnit
316 char *elementSetName;
317 } Z_DatabaseSpecificUnit;
319 typedef struct Z_DatabaseSpecific
322 Z_DatabaseSpecificUnit **elements;
323 } Z_DatabaseSpecific;
325 typedef struct Z_ElementSetNames
328 #define Z_ElementSetNames_generic 0
329 #define Z_ElementSetNames_databaseSpecific 1
333 Z_DatabaseSpecific *databaseSpecific;
337 /* ---------------------- RPN QUERY --------------------------- */
339 typedef struct Z_ComplexAttribute
342 Z_StringOrNumeric **list;
343 int num_semanticAction;
344 int **semanticAction; /* OPTIONAL */
345 } Z_ComplexAttribute;
347 typedef struct Z_AttributeElement
350 Odr_oid *attributeSet; /* OPTIONAL - v3 only */
356 Z_AttributeValue_numeric,
357 Z_AttributeValue_complex
362 Z_ComplexAttribute *complex;
367 } Z_AttributeElement;
369 typedef struct Z_Term
375 Z_Term_characterString,
379 Z_Term_integerAndUnit,
384 Odr_oct *general; /* this is required for v2 */
386 char *characterString;
389 Z_External *external;
390 /* Z_IntUnit *integerAndUnit; */
395 typedef struct Z_AttributesPlusTerm
398 Z_AttributeElement **attributeList;
400 } Z_AttributesPlusTerm;
402 typedef struct Z_ResultSetPlusAttributes
406 Z_AttributeElement **attributeList;
407 } Z_ResultSetPlusAttributes;
409 typedef struct Z_ProximityOperator
411 bool_t *exclusion; /* OPTIONAL */
415 #define Z_Prox_lessThan 1
416 #define Z_Prox_lessThanOrEqual 2
417 #define Z_Prox_equal 3
418 #define Z_Prox_greaterThanOrEqual 4
419 #define Z_Prox_greaterThan 5
420 #define Z_Prox_notEqual 6
426 int *proximityUnitCode;
427 #define Z_ProxUnit_character 1
428 #define Z_ProxUnit_word 2
429 #define Z_ProxUnit_sentence 3
430 #define Z_ProxUnit_paragraph 4
431 #define Z_ProxUnit_section 5
432 #define Z_ProxUnit_chapter 6
433 #define Z_ProxUnit_document 7
434 #define Z_ProxUnit_element 8
435 #define Z_ProxUnit_subelement 9
436 #define Z_ProxUnit_elementType 10
437 #define Z_ProxUnit_byte 11 /* v3 only */
438 } Z_ProximityOperator;
440 typedef struct Z_Operator
451 Odr_null *and; /* these guys are nulls. */
454 Z_ProximityOperator *prox;
458 typedef struct Z_Operand
463 Z_Operand_resultSetId,
464 Z_Operand_resultAttr /* v3 only */
468 Z_AttributesPlusTerm *attributesPlusTerm;
469 Z_ResultSetId *resultSetId;
470 Z_ResultSetPlusAttributes *resultAttr;
474 typedef struct Z_Complex
476 struct Z_RPNStructure *s1;
477 struct Z_RPNStructure *s2;
478 Z_Operator *operator;
481 typedef struct Z_RPNStructure
485 Z_RPNStructure_simple,
486 Z_RPNStructure_complex
495 typedef struct Z_RPNQuery
497 Odr_oid *attributeSetId;
498 Z_RPNStructure *RPNStructure;
501 /* -------------------------- SEARCHREQUEST -------------------------- */
503 typedef struct Z_Query
516 Z_RPNQuery *type_101;
520 typedef struct Z_SearchRequest
522 Z_ReferenceId *referenceId; /* OPTIONAL */
523 int *smallSetUpperBound;
524 int *largeSetLowerBound;
525 int *mediumSetPresentNumber;
526 bool_t *replaceIndicator;
528 int num_databaseNames;
529 char **databaseNames;
530 Z_ElementSetNames *smallSetElementSetNames; /* OPTIONAL */
531 Z_ElementSetNames *mediumSetElementSetNames; /* OPTIONAL */
532 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
535 Z_OtherInformation *additionalSearchInfo; /* OPTIONAL */
536 Z_OtherInformation *otherInfo; /* OPTIONAL */
540 /* ------------------------ RECORD -------------------------- */
542 typedef Z_External Z_DatabaseRecord;
546 typedef struct Z_DefaultDiagFormat
548 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
550 /* until the whole character set issue becomes more definite,
551 * you can probably ignore this on input. */
554 Z_DiagForm_v2AddInfo,
558 } Z_DefaultDiagFormat;
560 typedef struct Z_DiagRec
564 Z_DiagRec_defaultFormat,
565 Z_DiagRec_externallyDefined
569 Z_DefaultDiagFormat *defaultFormat;
570 Z_External *externallyDefined;
576 typedef struct Z_DiagRec
578 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
585 typedef struct Z_DiagRecs
588 Z_DiagRec **diagRecs;
591 typedef struct Z_NamePlusRecord
593 char *databaseName; /* OPTIONAL */
596 Z_NamePlusRecord_databaseRecord,
597 Z_NamePlusRecord_surrogateDiagnostic
602 Z_DatabaseRecord *databaseRecord;
603 Z_DiagRec *surrogateDiagnostic;
607 typedef struct Z_NamePlusRecordList
610 Z_NamePlusRecord **records;
611 } Z_NamePlusRecordList;
613 typedef struct Z_Records
619 Z_Records_multipleNSD
623 Z_NamePlusRecordList *databaseOrSurDiagnostics;
624 Z_DiagRec *nonSurrogateDiagnostic;
625 Z_DiagRecs *multipleNonSurDiagnostics;
629 /* ------------------------ SEARCHRESPONSE ------------------ */
631 typedef struct Z_SearchResponse
633 Z_ReferenceId *referenceId; /* OPTIONAL */
635 int *numberOfRecordsReturned;
636 int *nextResultSetPosition;
637 bool_t *searchStatus;
638 int *resultSetStatus; /* OPTIONAL */
639 #define Z_RES_SUBSET 1
640 #define Z_RES_INTERIM 2
642 int *presentStatus; /* OPTIONAL */
643 #define Z_PRES_SUCCESS 0
644 #define Z_PRES_PARTIAL_1 1
645 #define Z_PRES_PARTIAL_2 2
646 #define Z_PRES_PARTIAL_3 3
647 #define Z_PRES_PARTIAL_4 4
648 #define Z_PRES_FAILURE 5
649 Z_Records *records; /* OPTIONAL */
651 Z_OtherInformation *additionalSearchInfo;
652 Z_OtherInformation *otherInfo;
656 /* ------------------------- PRESENT SERVICE -----------------*/
658 typedef struct Z_ElementSpec
662 Z_ElementSpec_elementSetName,
663 Z_ElementSpec_externalSpec
667 char *elementSetName;
668 Z_External *externalSpec;
672 typedef struct Z_Specification
674 Odr_oid *schema; /* OPTIONAL */
675 Z_ElementSpec *elementSpec; /* OPTIONAL */
678 typedef struct Z_DbSpecific
681 Z_Specification *spec;
684 typedef struct Z_CompSpec
686 bool_t *selectAlternativeSyntax;
687 Z_Specification *generic; /* OPTIONAL */
689 Z_DbSpecific **dbSpecific; /* OPTIONAL */
690 int num_recordSyntax;
691 Odr_oid **recordSyntax; /* OPTIONAL */
694 typedef struct Z_RecordComposition
703 Z_ElementSetNames *simple;
706 } Z_RecordComposition;
708 typedef struct Z_Range
710 int *startingPosition;
711 int *numberOfRecords;
714 typedef struct Z_PresentRequest
716 Z_ReferenceId *referenceId; /* OPTIONAL */
717 Z_ResultSetId *resultSetId;
718 int *resultSetStartPoint;
719 int *numberOfRecordsRequested;
722 Z_Range **additionalRanges; /* OPTIONAL */
723 Z_RecordComposition *recordComposition; /* OPTIONAL */
725 Z_ElementSetNames *elementSetNames; /* OPTIONAL */
727 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
729 int *maxSegmentCount; /* OPTIONAL */
730 int *maxRecordSize; /* OPTIONAL */
731 int *maxSegmentSize; /* OPTIONAL */
732 Z_OtherInformation *otherInfo; /* OPTIONAL */
736 typedef struct Z_PresentResponse
738 Z_ReferenceId *referenceId; /* OPTIONAL */
739 int *numberOfRecordsReturned;
740 int *nextResultSetPosition;
744 Z_OtherInformation *otherInfo; /* OPTIONAL */
748 /* ------------------ RESOURCE CONTROL ----------------*/
750 typedef struct Z_TriggerResourceControlRequest
752 Z_ReferenceId *referenceId; /* OPTIONAL */
753 int *requestedAction;
754 #define Z_TriggerResourceCtrl_resourceReport 1
755 #define Z_TriggerResourceCtrl_resourceControl 2
756 #define Z_TriggerResourceCtrl_cancel 3
757 Odr_oid *prefResourceReportFormat; /* OPTIONAL */
758 bool_t *resultSetWanted; /* OPTIONAL */
760 Z_OtherInformation *otherInfo;
762 } Z_TriggerResourceControlRequest;
764 typedef struct Z_ResourceControlRequest
766 Z_ReferenceId *referenceId; /* OPTIONAL */
767 bool_t *suspendedFlag; /* OPTIONAL */
768 Z_External *resourceReport; /* OPTIONAL */
769 int *partialResultsAvailable; /* OPTIONAL */
770 #define Z_ResourceControlRequest_subset 1
771 #define Z_ResourceControlRequest_interim 2
772 #define Z_ResourceControlRequest_none 3
773 bool_t *responseRequired;
774 bool_t *triggeredRequestFlag; /* OPTIONAL */
776 Z_OtherInformation *otherInfo;
778 } Z_ResourceControlRequest;
780 typedef struct Z_ResourceControlResponse
782 Z_ReferenceId *referenceId; /* OPTIONAL */
783 bool_t *continueFlag;
784 bool_t *resultSetWanted; /* OPTIONAL */
786 Z_OtherInformation *otherInfo;
788 } Z_ResourceControlResponse;
791 /* ------------------ ACCESS CTRL SERVICE ----------------*/
793 typedef struct Z_AccessControlRequest
795 Z_ReferenceId *referenceId; /* OPTIONAL */
798 Z_AccessRequest_simpleForm,
799 Z_AccessRequest_externallyDefined
804 Z_External *externallyDefined;
807 Z_OtherInformation *otherInfo; /* OPTIONAL */
809 } Z_AccessControlRequest;
811 typedef struct Z_AccessControlResponse
813 Z_ReferenceId *referenceId; /* OPTIONAL */
816 Z_AccessResponse_simpleForm,
817 Z_AccessResponse_externallyDefined
822 Z_External *externallyDefined;
824 Z_DiagRec *diagnostic; /* OPTIONAL */
826 Z_OtherInformation *otherInfo; /* OPTIONAL */
828 } Z_AccessControlResponse;
830 /* ------------------------ SCAN SERVICE -------------------- */
832 typedef struct Z_AttributeList
835 Z_AttributeElement **attributes;
838 typedef struct Z_AlternativeTerm
841 Z_AttributesPlusTerm **terms;
844 typedef struct Z_OccurrenceByAttributes
846 Z_AttributeList *attributes;
858 /* Z_ByDatabase *byDatabase; */
861 } Z_OccurrenceByAttributes;
863 typedef struct Z_TermInfo
866 Z_AttributeList *suggestedAttributes; /* OPTIONAL */
867 Z_AlternativeTerm *alternativeTerm; /* OPTIONAL */
868 int *globalOccurrences; /* OPTIONAL */
869 Z_OccurrenceByAttributes *byAttributes; /* OPTIONAL */
872 typedef struct Z_Entry
877 Z_Entry_surrogateDiagnostic
881 Z_TermInfo *termInfo;
882 Z_DiagRec *surrogateDiagnostic;
886 typedef struct Z_Entries
892 typedef struct Z_ListEntries
896 Z_ListEntries_entries,
897 Z_ListEntries_nonSurrogateDiagnostics
902 Z_DiagRecs *nonSurrogateDiagnostics;
906 typedef struct Z_ScanRequest
908 Z_ReferenceId *referenceId; /* OPTIONAL */
909 int num_databaseNames;
910 char **databaseNames;
911 Odr_oid *attributeSet; /* OPTIONAL */
912 Z_AttributesPlusTerm *termListAndStartPoint;
913 int *stepSize; /* OPTIONAL */
914 int *numberOfTermsRequested;
915 int *preferredPositionInResponse; /* OPTIONAL */
917 Z_OtherInformation *otherInfo;
921 typedef struct Z_ScanResponse
923 Z_ReferenceId *referenceId; /* OPTIONAL */
924 int *stepSize; /* OPTIONAL */
926 #define Z_Scan_success 0
927 #define Z_Scan_partial_1 1
928 #define Z_Scan_partial_2 2
929 #define Z_Scan_partial_3 3
930 #define Z_Scan_partial_4 4
931 #define Z_Scan_partial_5 5
932 #define Z_Scan_failure 6
933 int *numberOfEntriesReturned;
934 int *positionOfTerm; /* OPTIONAL */
935 Z_ListEntries *entries; /* OPTIONAL */
936 Odr_oid *attributeSet; /* OPTIONAL */
938 Z_OtherInformation *otherInfo;
943 /* ------------------------ DELETE -------------------------- */
945 #define Z_DeleteStatus_success 0
946 #define Z_DeleteStatus_resultSetDidNotExist 1
947 #define Z_DeleteStatus_previouslyDeletedByTarget 2
948 #define Z_DeleteStatus_systemProblemAtTarget 3
949 #define Z_DeleteStatus_accessNotAllowed 4
950 #define Z_DeleteStatus_resourceControlAtOrigin 5
951 #define Z_DeleteStatus_resourceControlAtTarget 6
952 #define Z_DeleteStatus_bulkDeleteNotSupported 7
953 #define Z_DeleteStatus_notAllRsltSetsDeletedOnBulkDlte 8
954 #define Z_DeleteStatus_notAllRequestedResultSetsDeleted 9
955 #define Z_DeleteStatus_resultSetInUse 10
957 typedef struct Z_ListStatus
963 typedef struct Z_DeleteResultSetRequest
965 Z_ReferenceId *referenceId; /* OPTIONAL */
967 #define Z_DeleteRequest_list 0
968 #define Z_DeleteRequest_all 1
970 Z_ResultSetId **resultSetList; /* OPTIONAL */
972 Z_OtherInformation *otherInfo;
974 } Z_DeleteResultSetRequest;
976 typedef struct Z_DeleteResultSetResponse
978 Z_ReferenceId *referenceId; /* OPTIONAL */
979 int *deleteOperationStatus;
981 Z_ListStatus *deleteListStatuses; /* OPTIONAL */
982 int *numberNotDeleted; /* OPTIONAL */
983 int num_bulkStatuses;
984 Z_ListStatus *bulkStatuses; /* OPTIONAL */
985 char *deleteMessage; /* OPTIONAL */
987 Z_OtherInformation *otherInfo;
989 } Z_DeleteResultSetResponse;
991 /* ------------------------ CLOSE SERVICE ------------------- */
993 typedef struct Z_Close
995 Z_ReferenceId *referenceId; /* OPTIONAL */
997 #define Z_Close_finished 0
998 #define Z_Close_shutdown 1
999 #define Z_Close_systemProblem 2
1000 #define Z_Close_costLimit 3
1001 #define Z_Close_resources 4
1002 #define Z_Close_securityViolation 5
1003 #define Z_Close_protocolError 6
1004 #define Z_Close_lackOfActivity 7
1005 #define Z_Close_peerAbort 8
1006 #define Z_Close_unspecified 9
1007 char *diagnosticInformation; /* OPTIONAL */
1008 Odr_oid *resourceReportFormat; /* OPTIONAL */
1009 Z_External *resourceReport; /* OPTIONAL */
1011 Z_OtherInformation *otherInfo; /* OPTIONAL */
1015 /* ------------------------ SEGMENTATION -------------------- */
1017 typedef struct Z_Segment
1019 Z_ReferenceId *referenceId; /* OPTIONAL */
1020 int *numberOfRecordsReturned;
1021 int num_segmentRecords;
1022 Z_NamePlusRecord **segmentRecords;
1023 Z_OtherInformation *otherInfo; /* OPTIONAL */
1026 /* ----------------------- Extended Services ---------------- */
1028 typedef struct Z_Permissions
1031 int num_allowableFunctions;
1032 int **allowableFunctions;
1033 #define Z_Permissions_delete 1
1034 #define Z_Permissions_modifyContents 2
1035 #define Z_Permissions_modifyPermissions 3
1036 #define Z_Permissions_present 4
1037 #define Z_Permissions_invoke 5
1040 typedef struct Z_ExtendedServicesRequest
1042 Z_ReferenceId *referenceId; /* OPTIONAL */
1044 #define Z_ExtendedServicesRequest_create 1
1045 #define Z_ExtendedServicesRequest_delete 2
1046 #define Z_ExtendedServicesRequest_modify 3
1047 Odr_oid *packageType;
1048 char *packageName; /* OPTIONAL */
1049 char *userId; /* OPTIONAL */
1050 Z_IntUnit *retentionTime; /* OPTIONAL */
1051 Z_Permissions *permissions; /* OPTIONAL */
1052 char *description; /* OPTIONAL */
1053 Z_External *taskSpecificParameters; /* OPTIONAL */
1055 #define Z_ExtendedServicesRequest_wait 1
1056 #define Z_ExtendedServicesRequest_waitIfPossible 2
1057 #define Z_ExtendedServicesRequest_dontWait 3
1058 #define Z_ExtendedServicesRequest_dontReturnPackage 4
1059 char *elements; /* OPTIONAL */
1060 Z_OtherInformation *otherInfo; /* OPTIONAL */
1061 } Z_ExtendedServicesRequest;
1063 typedef struct Z_ExtendedServicesResponse
1065 Z_ReferenceId *referenceId; /* OPTIONAL */
1066 int *operationStatus;
1067 #define Z_ExtendedServicesResponse_done 1
1068 #define Z_ExtendedServicesResponse_accepted 2
1069 #define Z_ExtendedServicesResponse_failure 3
1070 int num_diagnostics;
1071 Z_DiagRec **diagnostics; /* OPTIONAL */
1072 Z_External *taskPackage; /* OPTIONAL */
1073 Z_OtherInformation *otherInfo; /* OPTIONAL */
1074 } Z_ExtendedServicesResponse;
1076 /* ------------------------ APDU ---------------------------- */
1078 typedef struct Z_APDU
1083 Z_APDU_initResponse,
1084 Z_APDU_searchRequest,
1085 Z_APDU_searchResponse,
1086 Z_APDU_presentRequest,
1087 Z_APDU_presentResponse,
1088 Z_APDU_deleteResultSetRequest,
1089 Z_APDU_deleteResultSetResponse,
1090 Z_APDU_resourceControlRequest,
1091 Z_APDU_resourceControlResponse,
1092 Z_APDU_triggerResourceControlRequest,
1094 Z_APDU_scanResponse,
1095 Z_APDU_segmentRequest,
1096 Z_APDU_extendedServicesRequest,
1097 Z_APDU_extendedServicesResponse,
1102 Z_InitRequest *initRequest;
1103 Z_InitResponse *initResponse;
1104 Z_SearchRequest *searchRequest;
1105 Z_SearchResponse *searchResponse;
1106 Z_PresentRequest *presentRequest;
1107 Z_PresentResponse *presentResponse;
1108 Z_DeleteResultSetRequest *deleteResultSetRequest;
1109 Z_DeleteResultSetResponse *deleteResultSetResponse;
1110 Z_ResourceControlRequest *resourceControlRequest;
1111 Z_ResourceControlResponse *resourceControlResponse;
1112 Z_TriggerResourceControlRequest *triggerResourceControlRequest;
1113 Z_ScanRequest *scanRequest;
1114 Z_ScanResponse *scanResponse;
1115 Z_Segment *segmentRequest;
1116 Z_ExtendedServicesRequest *extendedServicesRequest;
1117 Z_ExtendedServicesResponse *extendedServicesResponse;
1122 int z_APDU(ODR o, Z_APDU **p, int opt);
1123 int z_SUTRS(ODR o, Odr_oct **p, int opt);
1125 Z_InitRequest *zget_InitRequest(ODR o);
1126 Z_InitResponse *zget_InitResponse(ODR o);
1127 Z_SearchRequest *zget_SearchRequest(ODR o);
1128 Z_SearchResponse *zget_SearchResponse(ODR o);
1129 Z_PresentRequest *zget_PresentRequest(ODR o);
1130 Z_PresentResponse *zget_PresentResponse(ODR o);
1131 Z_DeleteResultSetRequest *zget_DeleteResultSetRequest(ODR o);
1132 Z_DeleteResultSetResponse *zget_DeleteResultSetResponse(ODR o);
1133 Z_ScanRequest *zget_ScanRequest(ODR o);
1134 Z_ScanResponse *zget_ScanResponse(ODR o);
1135 Z_TriggerResourceControlRequest *zget_TriggerResourceControlRequest(ODR o);
1136 Z_ResourceControlRequest *zget_ResourceControlRequest(ODR o);
1137 Z_ResourceControlResponse *zget_ResourceControlResponse(ODR o);
1138 Z_Close *zget_Close(ODR o);
1139 int z_InternationalString(ODR o, char **p, int opt);
1140 int z_OtherInformation(ODR o, Z_OtherInformation **p, int opt);
1141 int z_ElementSetName(ODR o, char **p, int opt);
1142 int z_IntUnit(ODR o, Z_IntUnit **p, int opt);
1143 int z_Unit(ODR o, Z_Unit **p, int opt);
1144 int z_DatabaseName(ODR o, Z_DatabaseName **p, int opt);
1145 int z_StringOrNumeric(ODR o, Z_StringOrNumeric **p, int opt);
1146 int z_OtherInformationUnit(ODR o, Z_OtherInformationUnit **p, int opt);
1147 int z_Term(ODR o, Z_Term **p, int opt);
1148 int z_Specification(ODR o, Z_Specification **p, int opt);
1149 int z_Permissions(ODR o, Z_Permissions **p, int opt);
1150 int z_DiagRec(ODR o, Z_DiagRec **p, int opt);
1151 Z_APDU *zget_APDU(ODR o, enum Z_APDU_which which);
1153 #include <prt-rsc.h>
1154 #include <prt-acc.h>
1155 #include <prt-exp.h>
1156 #include <prt-grs.h>
1157 #include <prt-exd.h>
1159 #include <prt-ext.h>