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.25 1995-09-27 15:02:49 quinn
28 * Modified function heads & prototypes.
30 * Revision 1.24 1995/08/29 11:17:43 quinn
31 * *** empty log message ***
33 * Revision 1.23 1995/08/21 09:10:36 quinn
34 * Smallish fixes to suppport new formats.
36 * Revision 1.22 1995/08/17 12:45:14 quinn
37 * Fixed minor problems with GRS-1. Added support in c&s.
39 * Revision 1.21 1995/08/15 12:00:11 quinn
42 * Revision 1.20 1995/08/10 08:54:35 quinn
45 * Revision 1.19 1995/06/19 12:38:28 quinn
46 * Reorganized include-files. Added small features.
48 * Revision 1.18 1995/06/16 13:16:05 quinn
49 * Fixed Defaultdiagformat.
51 * Revision 1.17 1995/06/15 15:42:05 quinn
54 * Revision 1.16 1995/06/15 07:45:06 quinn
57 * Revision 1.15 1995/06/14 15:26:43 quinn
58 * *** empty log message ***
60 * Revision 1.14 1995/06/07 14:42:34 quinn
63 * Revision 1.13 1995/06/07 14:36:47 quinn
66 * Revision 1.12 1995/06/05 10:53:13 quinn
69 * Revision 1.11 1995/06/02 09:49:47 quinn
72 * Revision 1.10 1995/05/29 08:11:34 quinn
73 * Moved oid from odr/asn to util.
75 * Revision 1.9 1995/05/22 11:31:25 quinn
78 * Revision 1.8 1995/05/17 08:41:35 quinn
79 * Added delete to proto & other little things.
80 * Relaying auth info to backend.
82 * Revision 1.7 1995/05/16 08:50:37 quinn
83 * License, documentation, and memory fixes
85 * Revision 1.6 1995/05/15 11:55:55 quinn
86 * Work on asynchronous activity.
88 * Revision 1.5 1995/04/17 11:28:18 quinn
91 * Revision 1.4 1995/04/10 10:22:47 quinn
94 * Revision 1.3 1995/03/30 12:18:09 quinn
97 * Revision 1.2 1995/03/30 10:26:48 quinn
98 * Added Term structure
100 * Revision 1.1 1995/03/30 09:39:42 quinn
101 * Moved .h files to include directory
103 * Revision 1.11 1995/03/30 09:08:44 quinn
104 * Added Resource control protocol
106 * Revision 1.10 1995/03/29 15:39:39 quinn
107 * Adding some resource control elements, and a null-check to getentbyoid
109 * Revision 1.9 1995/03/29 08:06:18 quinn
110 * Added a few v3 elements
112 * Revision 1.8 1995/03/22 10:12:49 quinn
113 * Added Z_PRES constants.
115 * Revision 1.7 1995/03/20 09:45:12 quinn
118 * Revision 1.5 1995/03/07 16:29:34 quinn
119 * Added authentication stuff.
121 * Revision 1.4 1995/03/07 10:13:00 quinn
122 * Added prototype for z_APDU()
124 * Revision 1.3 1995/02/14 11:54:23 quinn
127 * Revision 1.2 1995/02/09 15:51:40 quinn
130 * Revision 1.1 1995/02/06 16:44:48 quinn
131 * First hack at Z/SR protocol
142 #include <yaz-version.h>
145 * Because we didn't have time to put all of the extra v3 elements in here
146 * before the first applications were written, we have to place them
147 * in #ifdefs in places where they would break existing code. If you are
148 * developing new stuff, we urge you to leave them in, even if you don't
149 * intend to use any v3 features. When we are comfortable that the old
150 * apps have been updated, we'll remove the #ifdefs.
155 /* ----------------- GLOBAL AUXILIARY DEFS ----------------*/
158 typedef struct Z_External Z_External;
160 typedef Odr_oct Z_ReferenceId;
161 typedef char Z_DatabaseName;
162 typedef char Z_ResultSetId;
163 typedef Odr_oct Z_ResultsetId;
165 typedef struct Z_InfoCategory
167 Odr_oid *categoryTypeId; /* OPTIONAL */
171 typedef struct Z_OtherInformationUnit
173 Z_InfoCategory *category; /* OPTIONAL */
176 Z_OtherInfo_characterInfo,
177 Z_OtherInfo_binaryInfo,
178 Z_OtherInfo_externallyDefinedInfo,
185 Z_External *externallyDefinedInfo;
188 } Z_OtherInformationUnit;
190 typedef struct Z_OtherInformation
193 Z_OtherInformationUnit **list;
194 } Z_OtherInformation;
196 typedef struct Z_StringOrNumeric
200 Z_StringOrNumeric_string,
201 Z_StringOrNumeric_numeric
210 typedef struct Z_Unit
212 char *unitSystem; /* OPTIONAL */
213 Z_StringOrNumeric *unitType; /* OPTIONAL */
214 Z_StringOrNumeric *unit; /* OPTIONAL */
215 int *scaleFactor; /* OPTIONAL */
218 typedef struct Z_IntUnit
224 typedef Odr_oct Z_SUTRS;
226 /* ----------------- INIT SERVICE ----------------*/
230 char *groupId; /* OPTIONAL */
231 char *userId; /* OPTIONAL */
232 char *password; /* OPTIONAL */
235 typedef struct Z_IdAuthentication
239 Z_IdAuthentication_open,
240 Z_IdAuthentication_idPass,
241 Z_IdAuthentication_anonymous,
242 Z_IdAuthentication_other
251 } Z_IdAuthentication;
253 #define Z_ProtocolVersion_1 0
254 #define Z_ProtocolVersion_2 1
255 #define Z_ProtocolVersion_3 2
257 #define Z_Options_search 0
258 #define Z_Options_present 1
259 #define Z_Options_delSet 2
260 #define Z_Options_resourceReport 3
261 #define Z_Options_triggerResourceCtrl 4
262 #define Z_Options_resourceCtrl 5
263 #define Z_Options_accessCtrl 6
264 #define Z_Options_scan 7
265 #define Z_Options_sort 8
266 #define Z_Options_reserved 9
267 #define Z_Options_extendedServices 10
268 #define Z_Options_level_1Segmentation 11
269 #define Z_Options_level_2Segmentation 12
270 #define Z_Options_concurrentOperations 13
271 #define Z_Options_namedResultSets 14
273 typedef struct Z_InitRequest
275 Z_ReferenceId *referenceId; /* OPTIONAL */
276 Odr_bitmask *protocolVersion;
277 Odr_bitmask *options;
278 int *preferredMessageSize;
279 int *maximumRecordSize;
280 Z_IdAuthentication* idAuthentication; /* OPTIONAL */
281 char *implementationId; /* OPTIONAL */
282 char *implementationName; /* OPTIONAL */
283 char *implementationVersion; /* OPTIONAL */
284 Z_External *userInformationField; /* OPTIONAL */
286 Z_OtherInformation *otherInfo; /* OPTIONAL */
290 typedef struct Z_InitResponse
292 Z_ReferenceId *referenceId; /* OPTIONAL */
293 Odr_bitmask *protocolVersion;
294 Odr_bitmask *options;
295 int *preferredMessageSize;
296 int *maximumRecordSize;
298 char *implementationId; /* OPTIONAL */
299 char *implementationName; /* OPTIONAL */
300 char *implementationVersion; /* OPTIONAL */
301 Z_External *userInformationField; /* OPTIONAL */
303 Z_OtherInformation *otherInfo; /* OPTIONAL */
307 typedef struct Z_NSRAuthentication
312 } Z_NSRAuthentication;
314 int MDF z_NSRAuthentication(ODR o, Z_NSRAuthentication **p, int opt);
316 int MDF z_StrAuthentication(ODR o, char **p, int opt);
318 /* ------------------ SEARCH SERVICE ----------------*/
320 typedef struct Z_DatabaseSpecificUnit
323 char *elementSetName;
324 } Z_DatabaseSpecificUnit;
326 typedef struct Z_DatabaseSpecific
329 Z_DatabaseSpecificUnit **elements;
330 } Z_DatabaseSpecific;
332 typedef struct Z_ElementSetNames
335 #define Z_ElementSetNames_generic 0
336 #define Z_ElementSetNames_databaseSpecific 1
340 Z_DatabaseSpecific *databaseSpecific;
344 /* ---------------------- RPN QUERY --------------------------- */
346 typedef struct Z_ComplexAttribute
349 Z_StringOrNumeric **list;
350 int num_semanticAction;
351 int **semanticAction; /* OPTIONAL */
352 } Z_ComplexAttribute;
354 typedef struct Z_AttributeElement
357 Odr_oid *attributeSet; /* OPTIONAL - v3 only */
363 Z_AttributeValue_numeric,
364 Z_AttributeValue_complex
369 Z_ComplexAttribute *complex;
374 } Z_AttributeElement;
376 typedef struct Z_Term
382 Z_Term_characterString,
386 Z_Term_integerAndUnit,
391 Odr_oct *general; /* this is required for v2 */
393 char *characterString;
396 Z_External *external;
397 /* Z_IntUnit *integerAndUnit; */
402 typedef struct Z_AttributesPlusTerm
405 Z_AttributeElement **attributeList;
407 } Z_AttributesPlusTerm;
409 typedef struct Z_ResultSetPlusAttributes
413 Z_AttributeElement **attributeList;
414 } Z_ResultSetPlusAttributes;
416 typedef struct Z_ProximityOperator
418 bool_t *exclusion; /* OPTIONAL */
422 #define Z_Prox_lessThan 1
423 #define Z_Prox_lessThanOrEqual 2
424 #define Z_Prox_equal 3
425 #define Z_Prox_greaterThanOrEqual 4
426 #define Z_Prox_greaterThan 5
427 #define Z_Prox_notEqual 6
433 int *proximityUnitCode;
434 #define Z_ProxUnit_character 1
435 #define Z_ProxUnit_word 2
436 #define Z_ProxUnit_sentence 3
437 #define Z_ProxUnit_paragraph 4
438 #define Z_ProxUnit_section 5
439 #define Z_ProxUnit_chapter 6
440 #define Z_ProxUnit_document 7
441 #define Z_ProxUnit_element 8
442 #define Z_ProxUnit_subelement 9
443 #define Z_ProxUnit_elementType 10
444 #define Z_ProxUnit_byte 11 /* v3 only */
445 } Z_ProximityOperator;
447 typedef struct Z_Operator
458 Odr_null *and; /* these guys are nulls. */
461 Z_ProximityOperator *prox;
465 typedef struct Z_Operand
470 Z_Operand_resultSetId,
471 Z_Operand_resultAttr /* v3 only */
475 Z_AttributesPlusTerm *attributesPlusTerm;
476 Z_ResultSetId *resultSetId;
477 Z_ResultSetPlusAttributes *resultAttr;
481 typedef struct Z_Complex
483 struct Z_RPNStructure *s1;
484 struct Z_RPNStructure *s2;
485 Z_Operator *operator;
488 typedef struct Z_RPNStructure
492 Z_RPNStructure_simple,
493 Z_RPNStructure_complex
502 typedef struct Z_RPNQuery
504 Odr_oid *attributeSetId;
505 Z_RPNStructure *RPNStructure;
508 /* -------------------------- SEARCHREQUEST -------------------------- */
510 typedef struct Z_Query
523 Z_RPNQuery *type_101;
527 typedef struct Z_SearchRequest
529 Z_ReferenceId *referenceId; /* OPTIONAL */
530 int *smallSetUpperBound;
531 int *largeSetLowerBound;
532 int *mediumSetPresentNumber;
533 bool_t *replaceIndicator;
535 int num_databaseNames;
536 char **databaseNames;
537 Z_ElementSetNames *smallSetElementSetNames; /* OPTIONAL */
538 Z_ElementSetNames *mediumSetElementSetNames; /* OPTIONAL */
539 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
542 Z_OtherInformation *additionalSearchInfo; /* OPTIONAL */
543 Z_OtherInformation *otherInfo; /* OPTIONAL */
547 /* ------------------------ RECORD -------------------------- */
549 typedef Z_External Z_DatabaseRecord;
553 typedef struct Z_DefaultDiagFormat
555 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
557 /* until the whole character set issue becomes more definite,
558 * you can probably ignore this on input. */
561 Z_DiagForm_v2AddInfo,
565 } Z_DefaultDiagFormat;
567 typedef struct Z_DiagRec
571 Z_DiagRec_defaultFormat,
572 Z_DiagRec_externallyDefined
576 Z_DefaultDiagFormat *defaultFormat;
577 Z_External *externallyDefined;
583 typedef struct Z_DiagRec
585 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
592 typedef struct Z_DiagRecs
595 Z_DiagRec **diagRecs;
598 typedef struct Z_NamePlusRecord
600 char *databaseName; /* OPTIONAL */
603 Z_NamePlusRecord_databaseRecord,
604 Z_NamePlusRecord_surrogateDiagnostic
609 Z_DatabaseRecord *databaseRecord;
610 Z_DiagRec *surrogateDiagnostic;
614 typedef struct Z_NamePlusRecordList
617 Z_NamePlusRecord **records;
618 } Z_NamePlusRecordList;
620 typedef struct Z_Records
626 Z_Records_multipleNSD
630 Z_NamePlusRecordList *databaseOrSurDiagnostics;
631 Z_DiagRec *nonSurrogateDiagnostic;
632 Z_DiagRecs *multipleNonSurDiagnostics;
636 /* ------------------------ SEARCHRESPONSE ------------------ */
638 typedef struct Z_SearchResponse
640 Z_ReferenceId *referenceId; /* OPTIONAL */
642 int *numberOfRecordsReturned;
643 int *nextResultSetPosition;
644 bool_t *searchStatus;
645 int *resultSetStatus; /* OPTIONAL */
646 #define Z_RES_SUBSET 1
647 #define Z_RES_INTERIM 2
649 int *presentStatus; /* OPTIONAL */
650 #define Z_PRES_SUCCESS 0
651 #define Z_PRES_PARTIAL_1 1
652 #define Z_PRES_PARTIAL_2 2
653 #define Z_PRES_PARTIAL_3 3
654 #define Z_PRES_PARTIAL_4 4
655 #define Z_PRES_FAILURE 5
656 Z_Records *records; /* OPTIONAL */
658 Z_OtherInformation *additionalSearchInfo;
659 Z_OtherInformation *otherInfo;
663 /* ------------------------- PRESENT SERVICE -----------------*/
665 typedef struct Z_ElementSpec
669 Z_ElementSpec_elementSetName,
670 Z_ElementSpec_externalSpec
674 char *elementSetName;
675 Z_External *externalSpec;
679 typedef struct Z_Specification
681 Odr_oid *schema; /* OPTIONAL */
682 Z_ElementSpec *elementSpec; /* OPTIONAL */
685 typedef struct Z_DbSpecific
688 Z_Specification *spec;
691 typedef struct Z_CompSpec
693 bool_t *selectAlternativeSyntax;
694 Z_Specification *generic; /* OPTIONAL */
696 Z_DbSpecific **dbSpecific; /* OPTIONAL */
697 int num_recordSyntax;
698 Odr_oid **recordSyntax; /* OPTIONAL */
701 typedef struct Z_RecordComposition
710 Z_ElementSetNames *simple;
713 } Z_RecordComposition;
715 typedef struct Z_Range
717 int *startingPosition;
718 int *numberOfRecords;
721 typedef struct Z_PresentRequest
723 Z_ReferenceId *referenceId; /* OPTIONAL */
724 Z_ResultSetId *resultSetId;
725 int *resultSetStartPoint;
726 int *numberOfRecordsRequested;
729 Z_Range **additionalRanges; /* OPTIONAL */
730 Z_RecordComposition *recordComposition; /* OPTIONAL */
732 Z_ElementSetNames *elementSetNames; /* OPTIONAL */
734 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
736 int *maxSegmentCount; /* OPTIONAL */
737 int *maxRecordSize; /* OPTIONAL */
738 int *maxSegmentSize; /* OPTIONAL */
739 Z_OtherInformation *otherInfo; /* OPTIONAL */
743 typedef struct Z_PresentResponse
745 Z_ReferenceId *referenceId; /* OPTIONAL */
746 int *numberOfRecordsReturned;
747 int *nextResultSetPosition;
751 Z_OtherInformation *otherInfo; /* OPTIONAL */
755 /* ------------------ RESOURCE CONTROL ----------------*/
757 typedef struct Z_TriggerResourceControlRequest
759 Z_ReferenceId *referenceId; /* OPTIONAL */
760 int *requestedAction;
761 #define Z_TriggerResourceCtrl_resourceReport 1
762 #define Z_TriggerResourceCtrl_resourceControl 2
763 #define Z_TriggerResourceCtrl_cancel 3
764 Odr_oid *prefResourceReportFormat; /* OPTIONAL */
765 bool_t *resultSetWanted; /* OPTIONAL */
767 Z_OtherInformation *otherInfo;
769 } Z_TriggerResourceControlRequest;
771 typedef struct Z_ResourceControlRequest
773 Z_ReferenceId *referenceId; /* OPTIONAL */
774 bool_t *suspendedFlag; /* OPTIONAL */
775 Z_External *resourceReport; /* OPTIONAL */
776 int *partialResultsAvailable; /* OPTIONAL */
777 #define Z_ResourceControlRequest_subset 1
778 #define Z_ResourceControlRequest_interim 2
779 #define Z_ResourceControlRequest_none 3
780 bool_t *responseRequired;
781 bool_t *triggeredRequestFlag; /* OPTIONAL */
783 Z_OtherInformation *otherInfo;
785 } Z_ResourceControlRequest;
787 typedef struct Z_ResourceControlResponse
789 Z_ReferenceId *referenceId; /* OPTIONAL */
790 bool_t *continueFlag;
791 bool_t *resultSetWanted; /* OPTIONAL */
793 Z_OtherInformation *otherInfo;
795 } Z_ResourceControlResponse;
798 /* ------------------ ACCESS CTRL SERVICE ----------------*/
800 typedef struct Z_AccessControlRequest
802 Z_ReferenceId *referenceId; /* OPTIONAL */
805 Z_AccessRequest_simpleForm,
806 Z_AccessRequest_externallyDefined
811 Z_External *externallyDefined;
814 Z_OtherInformation *otherInfo; /* OPTIONAL */
816 } Z_AccessControlRequest;
818 typedef struct Z_AccessControlResponse
820 Z_ReferenceId *referenceId; /* OPTIONAL */
823 Z_AccessResponse_simpleForm,
824 Z_AccessResponse_externallyDefined
829 Z_External *externallyDefined;
831 Z_DiagRec *diagnostic; /* OPTIONAL */
833 Z_OtherInformation *otherInfo; /* OPTIONAL */
835 } Z_AccessControlResponse;
837 /* ------------------------ SCAN SERVICE -------------------- */
839 typedef struct Z_AttributeList
842 Z_AttributeElement **attributes;
845 typedef struct Z_AlternativeTerm
848 Z_AttributesPlusTerm **terms;
851 typedef struct Z_OccurrenceByAttributes
853 Z_AttributeList *attributes;
865 /* Z_ByDatabase *byDatabase; */
868 } Z_OccurrenceByAttributes;
870 typedef struct Z_TermInfo
873 Z_AttributeList *suggestedAttributes; /* OPTIONAL */
874 Z_AlternativeTerm *alternativeTerm; /* OPTIONAL */
875 int *globalOccurrences; /* OPTIONAL */
876 Z_OccurrenceByAttributes *byAttributes; /* OPTIONAL */
879 typedef struct Z_Entry
884 Z_Entry_surrogateDiagnostic
888 Z_TermInfo *termInfo;
889 Z_DiagRec *surrogateDiagnostic;
893 typedef struct Z_Entries
899 typedef struct Z_ListEntries
903 Z_ListEntries_entries,
904 Z_ListEntries_nonSurrogateDiagnostics
909 Z_DiagRecs *nonSurrogateDiagnostics;
913 typedef struct Z_ScanRequest
915 Z_ReferenceId *referenceId; /* OPTIONAL */
916 int num_databaseNames;
917 char **databaseNames;
918 Odr_oid *attributeSet; /* OPTIONAL */
919 Z_AttributesPlusTerm *termListAndStartPoint;
920 int *stepSize; /* OPTIONAL */
921 int *numberOfTermsRequested;
922 int *preferredPositionInResponse; /* OPTIONAL */
924 Z_OtherInformation *otherInfo;
928 typedef struct Z_ScanResponse
930 Z_ReferenceId *referenceId; /* OPTIONAL */
931 int *stepSize; /* OPTIONAL */
933 #define Z_Scan_success 0
934 #define Z_Scan_partial_1 1
935 #define Z_Scan_partial_2 2
936 #define Z_Scan_partial_3 3
937 #define Z_Scan_partial_4 4
938 #define Z_Scan_partial_5 5
939 #define Z_Scan_failure 6
940 int *numberOfEntriesReturned;
941 int *positionOfTerm; /* OPTIONAL */
942 Z_ListEntries *entries; /* OPTIONAL */
943 Odr_oid *attributeSet; /* OPTIONAL */
945 Z_OtherInformation *otherInfo;
950 /* ------------------------ DELETE -------------------------- */
952 #define Z_DeleteStatus_success 0
953 #define Z_DeleteStatus_resultSetDidNotExist 1
954 #define Z_DeleteStatus_previouslyDeletedByTarget 2
955 #define Z_DeleteStatus_systemProblemAtTarget 3
956 #define Z_DeleteStatus_accessNotAllowed 4
957 #define Z_DeleteStatus_resourceControlAtOrigin 5
958 #define Z_DeleteStatus_resourceControlAtTarget 6
959 #define Z_DeleteStatus_bulkDeleteNotSupported 7
960 #define Z_DeleteStatus_notAllRsltSetsDeletedOnBulkDlte 8
961 #define Z_DeleteStatus_notAllRequestedResultSetsDeleted 9
962 #define Z_DeleteStatus_resultSetInUse 10
964 typedef struct Z_ListStatus
970 typedef struct Z_DeleteResultSetRequest
972 Z_ReferenceId *referenceId; /* OPTIONAL */
974 #define Z_DeleteRequest_list 0
975 #define Z_DeleteRequest_all 1
977 Z_ResultSetId **resultSetList; /* OPTIONAL */
979 Z_OtherInformation *otherInfo;
981 } Z_DeleteResultSetRequest;
983 typedef struct Z_DeleteResultSetResponse
985 Z_ReferenceId *referenceId; /* OPTIONAL */
986 int *deleteOperationStatus;
988 Z_ListStatus *deleteListStatuses; /* OPTIONAL */
989 int *numberNotDeleted; /* OPTIONAL */
990 int num_bulkStatuses;
991 Z_ListStatus *bulkStatuses; /* OPTIONAL */
992 char *deleteMessage; /* OPTIONAL */
994 Z_OtherInformation *otherInfo;
996 } Z_DeleteResultSetResponse;
998 /* ------------------------ CLOSE SERVICE ------------------- */
1000 typedef struct Z_Close
1002 Z_ReferenceId *referenceId; /* OPTIONAL */
1004 #define Z_Close_finished 0
1005 #define Z_Close_shutdown 1
1006 #define Z_Close_systemProblem 2
1007 #define Z_Close_costLimit 3
1008 #define Z_Close_resources 4
1009 #define Z_Close_securityViolation 5
1010 #define Z_Close_protocolError 6
1011 #define Z_Close_lackOfActivity 7
1012 #define Z_Close_peerAbort 8
1013 #define Z_Close_unspecified 9
1014 char *diagnosticInformation; /* OPTIONAL */
1015 Odr_oid *resourceReportFormat; /* OPTIONAL */
1016 Z_External *resourceReport; /* OPTIONAL */
1018 Z_OtherInformation *otherInfo; /* OPTIONAL */
1022 /* ------------------------ SEGMENTATION -------------------- */
1024 typedef struct Z_Segment
1026 Z_ReferenceId *referenceId; /* OPTIONAL */
1027 int *numberOfRecordsReturned;
1028 int num_segmentRecords;
1029 Z_NamePlusRecord **segmentRecords;
1030 Z_OtherInformation *otherInfo; /* OPTIONAL */
1033 /* ----------------------- Extended Services ---------------- */
1035 typedef struct Z_Permissions
1038 int num_allowableFunctions;
1039 int **allowableFunctions;
1040 #define Z_Permissions_delete 1
1041 #define Z_Permissions_modifyContents 2
1042 #define Z_Permissions_modifyPermissions 3
1043 #define Z_Permissions_present 4
1044 #define Z_Permissions_invoke 5
1047 typedef struct Z_ExtendedServicesRequest
1049 Z_ReferenceId *referenceId; /* OPTIONAL */
1051 #define Z_ExtendedServicesRequest_create 1
1052 #define Z_ExtendedServicesRequest_delete 2
1053 #define Z_ExtendedServicesRequest_modify 3
1054 Odr_oid *packageType;
1055 char *packageName; /* OPTIONAL */
1056 char *userId; /* OPTIONAL */
1057 Z_IntUnit *retentionTime; /* OPTIONAL */
1058 Z_Permissions *permissions; /* OPTIONAL */
1059 char *description; /* OPTIONAL */
1060 Z_External *taskSpecificParameters; /* OPTIONAL */
1062 #define Z_ExtendedServicesRequest_wait 1
1063 #define Z_ExtendedServicesRequest_waitIfPossible 2
1064 #define Z_ExtendedServicesRequest_dontWait 3
1065 #define Z_ExtendedServicesRequest_dontReturnPackage 4
1066 char *elements; /* OPTIONAL */
1067 Z_OtherInformation *otherInfo; /* OPTIONAL */
1068 } Z_ExtendedServicesRequest;
1070 typedef struct Z_ExtendedServicesResponse
1072 Z_ReferenceId *referenceId; /* OPTIONAL */
1073 int *operationStatus;
1074 #define Z_ExtendedServicesResponse_done 1
1075 #define Z_ExtendedServicesResponse_accepted 2
1076 #define Z_ExtendedServicesResponse_failure 3
1077 int num_diagnostics;
1078 Z_DiagRec **diagnostics; /* OPTIONAL */
1079 Z_External *taskPackage; /* OPTIONAL */
1080 Z_OtherInformation *otherInfo; /* OPTIONAL */
1081 } Z_ExtendedServicesResponse;
1083 /* ------------------------ APDU ---------------------------- */
1085 typedef struct Z_APDU
1090 Z_APDU_initResponse,
1091 Z_APDU_searchRequest,
1092 Z_APDU_searchResponse,
1093 Z_APDU_presentRequest,
1094 Z_APDU_presentResponse,
1095 Z_APDU_deleteResultSetRequest,
1096 Z_APDU_deleteResultSetResponse,
1097 Z_APDU_resourceControlRequest,
1098 Z_APDU_resourceControlResponse,
1099 Z_APDU_triggerResourceControlRequest,
1101 Z_APDU_scanResponse,
1102 Z_APDU_segmentRequest,
1103 Z_APDU_extendedServicesRequest,
1104 Z_APDU_extendedServicesResponse,
1109 Z_InitRequest *initRequest;
1110 Z_InitResponse *initResponse;
1111 Z_SearchRequest *searchRequest;
1112 Z_SearchResponse *searchResponse;
1113 Z_PresentRequest *presentRequest;
1114 Z_PresentResponse *presentResponse;
1115 Z_DeleteResultSetRequest *deleteResultSetRequest;
1116 Z_DeleteResultSetResponse *deleteResultSetResponse;
1117 Z_ResourceControlRequest *resourceControlRequest;
1118 Z_ResourceControlResponse *resourceControlResponse;
1119 Z_TriggerResourceControlRequest *triggerResourceControlRequest;
1120 Z_ScanRequest *scanRequest;
1121 Z_ScanResponse *scanResponse;
1122 Z_Segment *segmentRequest;
1123 Z_ExtendedServicesRequest *extendedServicesRequest;
1124 Z_ExtendedServicesResponse *extendedServicesResponse;
1129 int MDF z_APDU(ODR o, Z_APDU **p, int opt);
1130 int MDF z_SUTRS(ODR o, Odr_oct **p, int opt);
1132 Z_InitRequest MDF *zget_InitRequest(ODR o);
1133 Z_InitResponse MDF *zget_InitResponse(ODR o);
1134 Z_SearchRequest MDF *zget_SearchRequest(ODR o);
1135 Z_SearchResponse MDF *zget_SearchResponse(ODR o);
1136 Z_PresentRequest MDF *zget_PresentRequest(ODR o);
1137 Z_PresentResponse MDF *zget_PresentResponse(ODR o);
1138 Z_DeleteResultSetRequest MDF *zget_DeleteResultSetRequest(ODR o);
1139 Z_DeleteResultSetResponse MDF *zget_DeleteResultSetResponse(ODR o);
1140 Z_ScanRequest MDF *zget_ScanRequest(ODR o);
1141 Z_ScanResponse MDF *zget_ScanResponse(ODR o);
1142 Z_TriggerResourceControlRequest MDF *zget_TriggerResourceControlRequest(ODR o);
1143 Z_ResourceControlRequest MDF *zget_ResourceControlRequest(ODR o);
1144 Z_ResourceControlResponse MDF *zget_ResourceControlResponse(ODR o);
1145 Z_Close MDF *zget_Close(ODR o);
1146 int MDF z_InternationalString(ODR o, char **p, int opt);
1147 int MDF z_OtherInformation(ODR o, Z_OtherInformation **p, int opt);
1148 int MDF z_ElementSetName(ODR o, char **p, int opt);
1149 int MDF z_IntUnit(ODR o, Z_IntUnit **p, int opt);
1150 int MDF z_Unit(ODR o, Z_Unit **p, int opt);
1151 int MDF z_DatabaseName(ODR o, Z_DatabaseName **p, int opt);
1152 int MDF z_StringOrNumeric(ODR o, Z_StringOrNumeric **p, int opt);
1153 int MDF z_OtherInformationUnit(ODR o, Z_OtherInformationUnit **p, int opt);
1154 int MDF z_Term(ODR o, Z_Term **p, int opt);
1155 int MDF z_Specification(ODR o, Z_Specification **p, int opt);
1156 int MDF z_Permissions(ODR o, Z_Permissions **p, int opt);
1157 int MDF z_DiagRec(ODR o, Z_DiagRec **p, int opt);
1158 int MDF z_AttributeList(ODR o, Z_AttributeList **p, int opt);
1159 int MDF z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt);
1160 Z_APDU MDF *zget_APDU(ODR o, enum Z_APDU_which which);
1162 #include <prt-rsc.h>
1163 #include <prt-acc.h>
1164 #include <prt-exp.h>
1165 #include <prt-grs.h>
1166 #include <prt-exd.h>
1167 #include <prt-dia.h>
1169 #include <prt-ext.h>