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.24 1995-08-29 11:17:43 quinn
28 * *** empty log message ***
30 * Revision 1.23 1995/08/21 09:10:36 quinn
31 * Smallish fixes to suppport new formats.
33 * Revision 1.22 1995/08/17 12:45:14 quinn
34 * Fixed minor problems with GRS-1. Added support in c&s.
36 * Revision 1.21 1995/08/15 12:00:11 quinn
39 * Revision 1.20 1995/08/10 08:54:35 quinn
42 * Revision 1.19 1995/06/19 12:38:28 quinn
43 * Reorganized include-files. Added small features.
45 * Revision 1.18 1995/06/16 13:16:05 quinn
46 * Fixed Defaultdiagformat.
48 * Revision 1.17 1995/06/15 15:42:05 quinn
51 * Revision 1.16 1995/06/15 07:45:06 quinn
54 * Revision 1.15 1995/06/14 15:26:43 quinn
55 * *** empty log message ***
57 * Revision 1.14 1995/06/07 14:42:34 quinn
60 * Revision 1.13 1995/06/07 14:36:47 quinn
63 * Revision 1.12 1995/06/05 10:53:13 quinn
66 * Revision 1.11 1995/06/02 09:49:47 quinn
69 * Revision 1.10 1995/05/29 08:11:34 quinn
70 * Moved oid from odr/asn to util.
72 * Revision 1.9 1995/05/22 11:31:25 quinn
75 * Revision 1.8 1995/05/17 08:41:35 quinn
76 * Added delete to proto & other little things.
77 * Relaying auth info to backend.
79 * Revision 1.7 1995/05/16 08:50:37 quinn
80 * License, documentation, and memory fixes
82 * Revision 1.6 1995/05/15 11:55:55 quinn
83 * Work on asynchronous activity.
85 * Revision 1.5 1995/04/17 11:28:18 quinn
88 * Revision 1.4 1995/04/10 10:22:47 quinn
91 * Revision 1.3 1995/03/30 12:18:09 quinn
94 * Revision 1.2 1995/03/30 10:26:48 quinn
95 * Added Term structure
97 * Revision 1.1 1995/03/30 09:39:42 quinn
98 * Moved .h files to include directory
100 * Revision 1.11 1995/03/30 09:08:44 quinn
101 * Added Resource control protocol
103 * Revision 1.10 1995/03/29 15:39:39 quinn
104 * Adding some resource control elements, and a null-check to getentbyoid
106 * Revision 1.9 1995/03/29 08:06:18 quinn
107 * Added a few v3 elements
109 * Revision 1.8 1995/03/22 10:12:49 quinn
110 * Added Z_PRES constants.
112 * Revision 1.7 1995/03/20 09:45:12 quinn
115 * Revision 1.5 1995/03/07 16:29:34 quinn
116 * Added authentication stuff.
118 * Revision 1.4 1995/03/07 10:13:00 quinn
119 * Added prototype for z_APDU()
121 * Revision 1.3 1995/02/14 11:54:23 quinn
124 * Revision 1.2 1995/02/09 15:51:40 quinn
127 * Revision 1.1 1995/02/06 16:44:48 quinn
128 * First hack at Z/SR protocol
138 #include <yaz-version.h>
141 * Because we didn't have time to put all of the extra v3 elements in here
142 * before the first applications were written, we have to place them
143 * in #ifdefs in places where they would break existing code. If you are
144 * developing new stuff, we urge you to leave them in, even if you don't
145 * intend to use any v3 features. When we are comfortable that the old
146 * apps have been updated, we'll remove the #ifdefs.
151 /* ----------------- GLOBAL AUXILIARY DEFS ----------------*/
154 typedef struct Z_External Z_External;
156 typedef Odr_oct Z_ReferenceId;
157 typedef char Z_DatabaseName;
158 typedef char Z_ResultSetId;
159 typedef Odr_oct Z_ResultsetId;
161 typedef struct Z_InfoCategory
163 Odr_oid *categoryTypeId; /* OPTIONAL */
167 typedef struct Z_OtherInformationUnit
169 Z_InfoCategory *category; /* OPTIONAL */
172 Z_OtherInfo_characterInfo,
173 Z_OtherInfo_binaryInfo,
174 Z_OtherInfo_externallyDefinedInfo,
181 Z_External *externallyDefinedInfo;
184 } Z_OtherInformationUnit;
186 typedef struct Z_OtherInformation
189 Z_OtherInformationUnit **list;
190 } Z_OtherInformation;
192 typedef struct Z_StringOrNumeric
196 Z_StringOrNumeric_string,
197 Z_StringOrNumeric_numeric
206 typedef struct Z_Unit
208 char *unitSystem; /* OPTIONAL */
209 Z_StringOrNumeric *unitType; /* OPTIONAL */
210 Z_StringOrNumeric *unit; /* OPTIONAL */
211 int *scaleFactor; /* OPTIONAL */
214 typedef struct Z_IntUnit
220 typedef Odr_oct Z_SUTRS;
222 /* ----------------- INIT SERVICE ----------------*/
226 char *groupId; /* OPTIONAL */
227 char *userId; /* OPTIONAL */
228 char *password; /* OPTIONAL */
231 typedef struct Z_IdAuthentication
235 Z_IdAuthentication_open,
236 Z_IdAuthentication_idPass,
237 Z_IdAuthentication_anonymous,
238 Z_IdAuthentication_other
247 } Z_IdAuthentication;
249 #define Z_ProtocolVersion_1 0
250 #define Z_ProtocolVersion_2 1
251 #define Z_ProtocolVersion_3 2
253 #define Z_Options_search 0
254 #define Z_Options_present 1
255 #define Z_Options_delSet 2
256 #define Z_Options_resourceReport 3
257 #define Z_Options_triggerResourceCtrl 4
258 #define Z_Options_resourceCtrl 5
259 #define Z_Options_accessCtrl 6
260 #define Z_Options_scan 7
261 #define Z_Options_sort 8
262 #define Z_Options_reserved 9
263 #define Z_Options_extendedServices 10
264 #define Z_Options_level_1Segmentation 11
265 #define Z_Options_level_2Segmentation 12
266 #define Z_Options_concurrentOperations 13
267 #define Z_Options_namedResultSets 14
269 typedef struct Z_InitRequest
271 Z_ReferenceId *referenceId; /* OPTIONAL */
272 Odr_bitmask *protocolVersion;
273 Odr_bitmask *options;
274 int *preferredMessageSize;
275 int *maximumRecordSize;
276 Z_IdAuthentication* idAuthentication; /* OPTIONAL */
277 char *implementationId; /* OPTIONAL */
278 char *implementationName; /* OPTIONAL */
279 char *implementationVersion; /* OPTIONAL */
280 Z_External *userInformationField; /* OPTIONAL */
282 Z_OtherInformation *otherInfo; /* OPTIONAL */
286 typedef struct Z_InitResponse
288 Z_ReferenceId *referenceId; /* OPTIONAL */
289 Odr_bitmask *protocolVersion;
290 Odr_bitmask *options;
291 int *preferredMessageSize;
292 int *maximumRecordSize;
294 char *implementationId; /* OPTIONAL */
295 char *implementationName; /* OPTIONAL */
296 char *implementationVersion; /* OPTIONAL */
297 Z_External *userInformationField; /* OPTIONAL */
299 Z_OtherInformation *otherInfo; /* OPTIONAL */
303 typedef struct Z_NSRAuthentication
308 } Z_NSRAuthentication;
310 int z_NSRAuthentication(ODR o, Z_NSRAuthentication **p, int opt);
312 int z_StrAuthentication(ODR o, char **p, int opt);
314 /* ------------------ SEARCH SERVICE ----------------*/
316 typedef struct Z_DatabaseSpecificUnit
319 char *elementSetName;
320 } Z_DatabaseSpecificUnit;
322 typedef struct Z_DatabaseSpecific
325 Z_DatabaseSpecificUnit **elements;
326 } Z_DatabaseSpecific;
328 typedef struct Z_ElementSetNames
331 #define Z_ElementSetNames_generic 0
332 #define Z_ElementSetNames_databaseSpecific 1
336 Z_DatabaseSpecific *databaseSpecific;
340 /* ---------------------- RPN QUERY --------------------------- */
342 typedef struct Z_ComplexAttribute
345 Z_StringOrNumeric **list;
346 int num_semanticAction;
347 int **semanticAction; /* OPTIONAL */
348 } Z_ComplexAttribute;
350 typedef struct Z_AttributeElement
353 Odr_oid *attributeSet; /* OPTIONAL - v3 only */
359 Z_AttributeValue_numeric,
360 Z_AttributeValue_complex
365 Z_ComplexAttribute *complex;
370 } Z_AttributeElement;
372 typedef struct Z_Term
378 Z_Term_characterString,
382 Z_Term_integerAndUnit,
387 Odr_oct *general; /* this is required for v2 */
389 char *characterString;
392 Z_External *external;
393 /* Z_IntUnit *integerAndUnit; */
398 typedef struct Z_AttributesPlusTerm
401 Z_AttributeElement **attributeList;
403 } Z_AttributesPlusTerm;
405 typedef struct Z_ResultSetPlusAttributes
409 Z_AttributeElement **attributeList;
410 } Z_ResultSetPlusAttributes;
412 typedef struct Z_ProximityOperator
414 bool_t *exclusion; /* OPTIONAL */
418 #define Z_Prox_lessThan 1
419 #define Z_Prox_lessThanOrEqual 2
420 #define Z_Prox_equal 3
421 #define Z_Prox_greaterThanOrEqual 4
422 #define Z_Prox_greaterThan 5
423 #define Z_Prox_notEqual 6
429 int *proximityUnitCode;
430 #define Z_ProxUnit_character 1
431 #define Z_ProxUnit_word 2
432 #define Z_ProxUnit_sentence 3
433 #define Z_ProxUnit_paragraph 4
434 #define Z_ProxUnit_section 5
435 #define Z_ProxUnit_chapter 6
436 #define Z_ProxUnit_document 7
437 #define Z_ProxUnit_element 8
438 #define Z_ProxUnit_subelement 9
439 #define Z_ProxUnit_elementType 10
440 #define Z_ProxUnit_byte 11 /* v3 only */
441 } Z_ProximityOperator;
443 typedef struct Z_Operator
454 Odr_null *and; /* these guys are nulls. */
457 Z_ProximityOperator *prox;
461 typedef struct Z_Operand
466 Z_Operand_resultSetId,
467 Z_Operand_resultAttr /* v3 only */
471 Z_AttributesPlusTerm *attributesPlusTerm;
472 Z_ResultSetId *resultSetId;
473 Z_ResultSetPlusAttributes *resultAttr;
477 typedef struct Z_Complex
479 struct Z_RPNStructure *s1;
480 struct Z_RPNStructure *s2;
481 Z_Operator *operator;
484 typedef struct Z_RPNStructure
488 Z_RPNStructure_simple,
489 Z_RPNStructure_complex
498 typedef struct Z_RPNQuery
500 Odr_oid *attributeSetId;
501 Z_RPNStructure *RPNStructure;
504 /* -------------------------- SEARCHREQUEST -------------------------- */
506 typedef struct Z_Query
519 Z_RPNQuery *type_101;
523 typedef struct Z_SearchRequest
525 Z_ReferenceId *referenceId; /* OPTIONAL */
526 int *smallSetUpperBound;
527 int *largeSetLowerBound;
528 int *mediumSetPresentNumber;
529 bool_t *replaceIndicator;
531 int num_databaseNames;
532 char **databaseNames;
533 Z_ElementSetNames *smallSetElementSetNames; /* OPTIONAL */
534 Z_ElementSetNames *mediumSetElementSetNames; /* OPTIONAL */
535 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
538 Z_OtherInformation *additionalSearchInfo; /* OPTIONAL */
539 Z_OtherInformation *otherInfo; /* OPTIONAL */
543 /* ------------------------ RECORD -------------------------- */
545 typedef Z_External Z_DatabaseRecord;
549 typedef struct Z_DefaultDiagFormat
551 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
553 /* until the whole character set issue becomes more definite,
554 * you can probably ignore this on input. */
557 Z_DiagForm_v2AddInfo,
561 } Z_DefaultDiagFormat;
563 typedef struct Z_DiagRec
567 Z_DiagRec_defaultFormat,
568 Z_DiagRec_externallyDefined
572 Z_DefaultDiagFormat *defaultFormat;
573 Z_External *externallyDefined;
579 typedef struct Z_DiagRec
581 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
588 typedef struct Z_DiagRecs
591 Z_DiagRec **diagRecs;
594 typedef struct Z_NamePlusRecord
596 char *databaseName; /* OPTIONAL */
599 Z_NamePlusRecord_databaseRecord,
600 Z_NamePlusRecord_surrogateDiagnostic
605 Z_DatabaseRecord *databaseRecord;
606 Z_DiagRec *surrogateDiagnostic;
610 typedef struct Z_NamePlusRecordList
613 Z_NamePlusRecord **records;
614 } Z_NamePlusRecordList;
616 typedef struct Z_Records
622 Z_Records_multipleNSD
626 Z_NamePlusRecordList *databaseOrSurDiagnostics;
627 Z_DiagRec *nonSurrogateDiagnostic;
628 Z_DiagRecs *multipleNonSurDiagnostics;
632 /* ------------------------ SEARCHRESPONSE ------------------ */
634 typedef struct Z_SearchResponse
636 Z_ReferenceId *referenceId; /* OPTIONAL */
638 int *numberOfRecordsReturned;
639 int *nextResultSetPosition;
640 bool_t *searchStatus;
641 int *resultSetStatus; /* OPTIONAL */
642 #define Z_RES_SUBSET 1
643 #define Z_RES_INTERIM 2
645 int *presentStatus; /* OPTIONAL */
646 #define Z_PRES_SUCCESS 0
647 #define Z_PRES_PARTIAL_1 1
648 #define Z_PRES_PARTIAL_2 2
649 #define Z_PRES_PARTIAL_3 3
650 #define Z_PRES_PARTIAL_4 4
651 #define Z_PRES_FAILURE 5
652 Z_Records *records; /* OPTIONAL */
654 Z_OtherInformation *additionalSearchInfo;
655 Z_OtherInformation *otherInfo;
659 /* ------------------------- PRESENT SERVICE -----------------*/
661 typedef struct Z_ElementSpec
665 Z_ElementSpec_elementSetName,
666 Z_ElementSpec_externalSpec
670 char *elementSetName;
671 Z_External *externalSpec;
675 typedef struct Z_Specification
677 Odr_oid *schema; /* OPTIONAL */
678 Z_ElementSpec *elementSpec; /* OPTIONAL */
681 typedef struct Z_DbSpecific
684 Z_Specification *spec;
687 typedef struct Z_CompSpec
689 bool_t *selectAlternativeSyntax;
690 Z_Specification *generic; /* OPTIONAL */
692 Z_DbSpecific **dbSpecific; /* OPTIONAL */
693 int num_recordSyntax;
694 Odr_oid **recordSyntax; /* OPTIONAL */
697 typedef struct Z_RecordComposition
706 Z_ElementSetNames *simple;
709 } Z_RecordComposition;
711 typedef struct Z_Range
713 int *startingPosition;
714 int *numberOfRecords;
717 typedef struct Z_PresentRequest
719 Z_ReferenceId *referenceId; /* OPTIONAL */
720 Z_ResultSetId *resultSetId;
721 int *resultSetStartPoint;
722 int *numberOfRecordsRequested;
725 Z_Range **additionalRanges; /* OPTIONAL */
726 Z_RecordComposition *recordComposition; /* OPTIONAL */
728 Z_ElementSetNames *elementSetNames; /* OPTIONAL */
730 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
732 int *maxSegmentCount; /* OPTIONAL */
733 int *maxRecordSize; /* OPTIONAL */
734 int *maxSegmentSize; /* OPTIONAL */
735 Z_OtherInformation *otherInfo; /* OPTIONAL */
739 typedef struct Z_PresentResponse
741 Z_ReferenceId *referenceId; /* OPTIONAL */
742 int *numberOfRecordsReturned;
743 int *nextResultSetPosition;
747 Z_OtherInformation *otherInfo; /* OPTIONAL */
751 /* ------------------ RESOURCE CONTROL ----------------*/
753 typedef struct Z_TriggerResourceControlRequest
755 Z_ReferenceId *referenceId; /* OPTIONAL */
756 int *requestedAction;
757 #define Z_TriggerResourceCtrl_resourceReport 1
758 #define Z_TriggerResourceCtrl_resourceControl 2
759 #define Z_TriggerResourceCtrl_cancel 3
760 Odr_oid *prefResourceReportFormat; /* OPTIONAL */
761 bool_t *resultSetWanted; /* OPTIONAL */
763 Z_OtherInformation *otherInfo;
765 } Z_TriggerResourceControlRequest;
767 typedef struct Z_ResourceControlRequest
769 Z_ReferenceId *referenceId; /* OPTIONAL */
770 bool_t *suspendedFlag; /* OPTIONAL */
771 Z_External *resourceReport; /* OPTIONAL */
772 int *partialResultsAvailable; /* OPTIONAL */
773 #define Z_ResourceControlRequest_subset 1
774 #define Z_ResourceControlRequest_interim 2
775 #define Z_ResourceControlRequest_none 3
776 bool_t *responseRequired;
777 bool_t *triggeredRequestFlag; /* OPTIONAL */
779 Z_OtherInformation *otherInfo;
781 } Z_ResourceControlRequest;
783 typedef struct Z_ResourceControlResponse
785 Z_ReferenceId *referenceId; /* OPTIONAL */
786 bool_t *continueFlag;
787 bool_t *resultSetWanted; /* OPTIONAL */
789 Z_OtherInformation *otherInfo;
791 } Z_ResourceControlResponse;
794 /* ------------------ ACCESS CTRL SERVICE ----------------*/
796 typedef struct Z_AccessControlRequest
798 Z_ReferenceId *referenceId; /* OPTIONAL */
801 Z_AccessRequest_simpleForm,
802 Z_AccessRequest_externallyDefined
807 Z_External *externallyDefined;
810 Z_OtherInformation *otherInfo; /* OPTIONAL */
812 } Z_AccessControlRequest;
814 typedef struct Z_AccessControlResponse
816 Z_ReferenceId *referenceId; /* OPTIONAL */
819 Z_AccessResponse_simpleForm,
820 Z_AccessResponse_externallyDefined
825 Z_External *externallyDefined;
827 Z_DiagRec *diagnostic; /* OPTIONAL */
829 Z_OtherInformation *otherInfo; /* OPTIONAL */
831 } Z_AccessControlResponse;
833 /* ------------------------ SCAN SERVICE -------------------- */
835 typedef struct Z_AttributeList
838 Z_AttributeElement **attributes;
841 typedef struct Z_AlternativeTerm
844 Z_AttributesPlusTerm **terms;
847 typedef struct Z_OccurrenceByAttributes
849 Z_AttributeList *attributes;
861 /* Z_ByDatabase *byDatabase; */
864 } Z_OccurrenceByAttributes;
866 typedef struct Z_TermInfo
869 Z_AttributeList *suggestedAttributes; /* OPTIONAL */
870 Z_AlternativeTerm *alternativeTerm; /* OPTIONAL */
871 int *globalOccurrences; /* OPTIONAL */
872 Z_OccurrenceByAttributes *byAttributes; /* OPTIONAL */
875 typedef struct Z_Entry
880 Z_Entry_surrogateDiagnostic
884 Z_TermInfo *termInfo;
885 Z_DiagRec *surrogateDiagnostic;
889 typedef struct Z_Entries
895 typedef struct Z_ListEntries
899 Z_ListEntries_entries,
900 Z_ListEntries_nonSurrogateDiagnostics
905 Z_DiagRecs *nonSurrogateDiagnostics;
909 typedef struct Z_ScanRequest
911 Z_ReferenceId *referenceId; /* OPTIONAL */
912 int num_databaseNames;
913 char **databaseNames;
914 Odr_oid *attributeSet; /* OPTIONAL */
915 Z_AttributesPlusTerm *termListAndStartPoint;
916 int *stepSize; /* OPTIONAL */
917 int *numberOfTermsRequested;
918 int *preferredPositionInResponse; /* OPTIONAL */
920 Z_OtherInformation *otherInfo;
924 typedef struct Z_ScanResponse
926 Z_ReferenceId *referenceId; /* OPTIONAL */
927 int *stepSize; /* OPTIONAL */
929 #define Z_Scan_success 0
930 #define Z_Scan_partial_1 1
931 #define Z_Scan_partial_2 2
932 #define Z_Scan_partial_3 3
933 #define Z_Scan_partial_4 4
934 #define Z_Scan_partial_5 5
935 #define Z_Scan_failure 6
936 int *numberOfEntriesReturned;
937 int *positionOfTerm; /* OPTIONAL */
938 Z_ListEntries *entries; /* OPTIONAL */
939 Odr_oid *attributeSet; /* OPTIONAL */
941 Z_OtherInformation *otherInfo;
946 /* ------------------------ DELETE -------------------------- */
948 #define Z_DeleteStatus_success 0
949 #define Z_DeleteStatus_resultSetDidNotExist 1
950 #define Z_DeleteStatus_previouslyDeletedByTarget 2
951 #define Z_DeleteStatus_systemProblemAtTarget 3
952 #define Z_DeleteStatus_accessNotAllowed 4
953 #define Z_DeleteStatus_resourceControlAtOrigin 5
954 #define Z_DeleteStatus_resourceControlAtTarget 6
955 #define Z_DeleteStatus_bulkDeleteNotSupported 7
956 #define Z_DeleteStatus_notAllRsltSetsDeletedOnBulkDlte 8
957 #define Z_DeleteStatus_notAllRequestedResultSetsDeleted 9
958 #define Z_DeleteStatus_resultSetInUse 10
960 typedef struct Z_ListStatus
966 typedef struct Z_DeleteResultSetRequest
968 Z_ReferenceId *referenceId; /* OPTIONAL */
970 #define Z_DeleteRequest_list 0
971 #define Z_DeleteRequest_all 1
973 Z_ResultSetId **resultSetList; /* OPTIONAL */
975 Z_OtherInformation *otherInfo;
977 } Z_DeleteResultSetRequest;
979 typedef struct Z_DeleteResultSetResponse
981 Z_ReferenceId *referenceId; /* OPTIONAL */
982 int *deleteOperationStatus;
984 Z_ListStatus *deleteListStatuses; /* OPTIONAL */
985 int *numberNotDeleted; /* OPTIONAL */
986 int num_bulkStatuses;
987 Z_ListStatus *bulkStatuses; /* OPTIONAL */
988 char *deleteMessage; /* OPTIONAL */
990 Z_OtherInformation *otherInfo;
992 } Z_DeleteResultSetResponse;
994 /* ------------------------ CLOSE SERVICE ------------------- */
996 typedef struct Z_Close
998 Z_ReferenceId *referenceId; /* OPTIONAL */
1000 #define Z_Close_finished 0
1001 #define Z_Close_shutdown 1
1002 #define Z_Close_systemProblem 2
1003 #define Z_Close_costLimit 3
1004 #define Z_Close_resources 4
1005 #define Z_Close_securityViolation 5
1006 #define Z_Close_protocolError 6
1007 #define Z_Close_lackOfActivity 7
1008 #define Z_Close_peerAbort 8
1009 #define Z_Close_unspecified 9
1010 char *diagnosticInformation; /* OPTIONAL */
1011 Odr_oid *resourceReportFormat; /* OPTIONAL */
1012 Z_External *resourceReport; /* OPTIONAL */
1014 Z_OtherInformation *otherInfo; /* OPTIONAL */
1018 /* ------------------------ SEGMENTATION -------------------- */
1020 typedef struct Z_Segment
1022 Z_ReferenceId *referenceId; /* OPTIONAL */
1023 int *numberOfRecordsReturned;
1024 int num_segmentRecords;
1025 Z_NamePlusRecord **segmentRecords;
1026 Z_OtherInformation *otherInfo; /* OPTIONAL */
1029 /* ----------------------- Extended Services ---------------- */
1031 typedef struct Z_Permissions
1034 int num_allowableFunctions;
1035 int **allowableFunctions;
1036 #define Z_Permissions_delete 1
1037 #define Z_Permissions_modifyContents 2
1038 #define Z_Permissions_modifyPermissions 3
1039 #define Z_Permissions_present 4
1040 #define Z_Permissions_invoke 5
1043 typedef struct Z_ExtendedServicesRequest
1045 Z_ReferenceId *referenceId; /* OPTIONAL */
1047 #define Z_ExtendedServicesRequest_create 1
1048 #define Z_ExtendedServicesRequest_delete 2
1049 #define Z_ExtendedServicesRequest_modify 3
1050 Odr_oid *packageType;
1051 char *packageName; /* OPTIONAL */
1052 char *userId; /* OPTIONAL */
1053 Z_IntUnit *retentionTime; /* OPTIONAL */
1054 Z_Permissions *permissions; /* OPTIONAL */
1055 char *description; /* OPTIONAL */
1056 Z_External *taskSpecificParameters; /* OPTIONAL */
1058 #define Z_ExtendedServicesRequest_wait 1
1059 #define Z_ExtendedServicesRequest_waitIfPossible 2
1060 #define Z_ExtendedServicesRequest_dontWait 3
1061 #define Z_ExtendedServicesRequest_dontReturnPackage 4
1062 char *elements; /* OPTIONAL */
1063 Z_OtherInformation *otherInfo; /* OPTIONAL */
1064 } Z_ExtendedServicesRequest;
1066 typedef struct Z_ExtendedServicesResponse
1068 Z_ReferenceId *referenceId; /* OPTIONAL */
1069 int *operationStatus;
1070 #define Z_ExtendedServicesResponse_done 1
1071 #define Z_ExtendedServicesResponse_accepted 2
1072 #define Z_ExtendedServicesResponse_failure 3
1073 int num_diagnostics;
1074 Z_DiagRec **diagnostics; /* OPTIONAL */
1075 Z_External *taskPackage; /* OPTIONAL */
1076 Z_OtherInformation *otherInfo; /* OPTIONAL */
1077 } Z_ExtendedServicesResponse;
1079 /* ------------------------ APDU ---------------------------- */
1081 typedef struct Z_APDU
1086 Z_APDU_initResponse,
1087 Z_APDU_searchRequest,
1088 Z_APDU_searchResponse,
1089 Z_APDU_presentRequest,
1090 Z_APDU_presentResponse,
1091 Z_APDU_deleteResultSetRequest,
1092 Z_APDU_deleteResultSetResponse,
1093 Z_APDU_resourceControlRequest,
1094 Z_APDU_resourceControlResponse,
1095 Z_APDU_triggerResourceControlRequest,
1097 Z_APDU_scanResponse,
1098 Z_APDU_segmentRequest,
1099 Z_APDU_extendedServicesRequest,
1100 Z_APDU_extendedServicesResponse,
1105 Z_InitRequest *initRequest;
1106 Z_InitResponse *initResponse;
1107 Z_SearchRequest *searchRequest;
1108 Z_SearchResponse *searchResponse;
1109 Z_PresentRequest *presentRequest;
1110 Z_PresentResponse *presentResponse;
1111 Z_DeleteResultSetRequest *deleteResultSetRequest;
1112 Z_DeleteResultSetResponse *deleteResultSetResponse;
1113 Z_ResourceControlRequest *resourceControlRequest;
1114 Z_ResourceControlResponse *resourceControlResponse;
1115 Z_TriggerResourceControlRequest *triggerResourceControlRequest;
1116 Z_ScanRequest *scanRequest;
1117 Z_ScanResponse *scanResponse;
1118 Z_Segment *segmentRequest;
1119 Z_ExtendedServicesRequest *extendedServicesRequest;
1120 Z_ExtendedServicesResponse *extendedServicesResponse;
1125 int z_APDU(ODR o, Z_APDU **p, int opt);
1126 int z_SUTRS(ODR o, Odr_oct **p, int opt);
1128 Z_InitRequest *zget_InitRequest(ODR o);
1129 Z_InitResponse *zget_InitResponse(ODR o);
1130 Z_SearchRequest *zget_SearchRequest(ODR o);
1131 Z_SearchResponse *zget_SearchResponse(ODR o);
1132 Z_PresentRequest *zget_PresentRequest(ODR o);
1133 Z_PresentResponse *zget_PresentResponse(ODR o);
1134 Z_DeleteResultSetRequest *zget_DeleteResultSetRequest(ODR o);
1135 Z_DeleteResultSetResponse *zget_DeleteResultSetResponse(ODR o);
1136 Z_ScanRequest *zget_ScanRequest(ODR o);
1137 Z_ScanResponse *zget_ScanResponse(ODR o);
1138 Z_TriggerResourceControlRequest *zget_TriggerResourceControlRequest(ODR o);
1139 Z_ResourceControlRequest *zget_ResourceControlRequest(ODR o);
1140 Z_ResourceControlResponse *zget_ResourceControlResponse(ODR o);
1141 Z_Close *zget_Close(ODR o);
1142 int z_InternationalString(ODR o, char **p, int opt);
1143 int z_OtherInformation(ODR o, Z_OtherInformation **p, int opt);
1144 int z_ElementSetName(ODR o, char **p, int opt);
1145 int z_IntUnit(ODR o, Z_IntUnit **p, int opt);
1146 int z_Unit(ODR o, Z_Unit **p, int opt);
1147 int z_DatabaseName(ODR o, Z_DatabaseName **p, int opt);
1148 int z_StringOrNumeric(ODR o, Z_StringOrNumeric **p, int opt);
1149 int z_OtherInformationUnit(ODR o, Z_OtherInformationUnit **p, int opt);
1150 int z_Term(ODR o, Z_Term **p, int opt);
1151 int z_Specification(ODR o, Z_Specification **p, int opt);
1152 int z_Permissions(ODR o, Z_Permissions **p, int opt);
1153 int z_DiagRec(ODR o, Z_DiagRec **p, int opt);
1154 int z_AttributeList(ODR o, Z_AttributeList **p, int opt);
1155 int z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt);
1156 Z_APDU *zget_APDU(ODR o, enum Z_APDU_which which);
1158 #include <prt-rsc.h>
1159 #include <prt-acc.h>
1160 #include <prt-exp.h>
1161 #include <prt-grs.h>
1162 #include <prt-exd.h>
1163 #include <prt-dia.h>
1165 #include <prt-ext.h>