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.30 1996-01-10 15:21:32 quinn
28 * Added links to access control PDUs
30 * Revision 1.29 1996/01/02 11:46:49 quinn
31 * Changed 'operator' to 'roperator' to avoid C++ conflict.
34 * Revision 1.28 1996/01/02 08:57:32 quinn
35 * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
37 * Revision 1.27 1995/10/12 10:34:46 quinn
40 * Revision 1.26 1995/09/29 17:12:08 quinn
43 * Revision 1.25 1995/09/27 15:02:49 quinn
44 * Modified function heads & prototypes.
46 * Revision 1.24 1995/08/29 11:17:43 quinn
47 * *** empty log message ***
49 * Revision 1.23 1995/08/21 09:10:36 quinn
50 * Smallish fixes to suppport new formats.
52 * Revision 1.22 1995/08/17 12:45:14 quinn
53 * Fixed minor problems with GRS-1. Added support in c&s.
55 * Revision 1.21 1995/08/15 12:00:11 quinn
58 * Revision 1.20 1995/08/10 08:54:35 quinn
61 * Revision 1.19 1995/06/19 12:38:28 quinn
62 * Reorganized include-files. Added small features.
64 * Revision 1.18 1995/06/16 13:16:05 quinn
65 * Fixed Defaultdiagformat.
67 * Revision 1.17 1995/06/15 15:42:05 quinn
70 * Revision 1.16 1995/06/15 07:45:06 quinn
73 * Revision 1.15 1995/06/14 15:26:43 quinn
74 * *** empty log message ***
76 * Revision 1.14 1995/06/07 14:42:34 quinn
79 * Revision 1.13 1995/06/07 14:36:47 quinn
82 * Revision 1.12 1995/06/05 10:53:13 quinn
85 * Revision 1.11 1995/06/02 09:49:47 quinn
88 * Revision 1.10 1995/05/29 08:11:34 quinn
89 * Moved oid from odr/asn to util.
91 * Revision 1.9 1995/05/22 11:31:25 quinn
94 * Revision 1.8 1995/05/17 08:41:35 quinn
95 * Added delete to proto & other little things.
96 * Relaying auth info to backend.
98 * Revision 1.7 1995/05/16 08:50:37 quinn
99 * License, documentation, and memory fixes
101 * Revision 1.6 1995/05/15 11:55:55 quinn
102 * Work on asynchronous activity.
104 * Revision 1.5 1995/04/17 11:28:18 quinn
107 * Revision 1.4 1995/04/10 10:22:47 quinn
110 * Revision 1.3 1995/03/30 12:18:09 quinn
113 * Revision 1.2 1995/03/30 10:26:48 quinn
114 * Added Term structure
116 * Revision 1.1 1995/03/30 09:39:42 quinn
117 * Moved .h files to include directory
119 * Revision 1.11 1995/03/30 09:08:44 quinn
120 * Added Resource control protocol
122 * Revision 1.10 1995/03/29 15:39:39 quinn
123 * Adding some resource control elements, and a null-check to getentbyoid
125 * Revision 1.9 1995/03/29 08:06:18 quinn
126 * Added a few v3 elements
128 * Revision 1.8 1995/03/22 10:12:49 quinn
129 * Added Z_PRES constants.
131 * Revision 1.7 1995/03/20 09:45:12 quinn
134 * Revision 1.5 1995/03/07 16:29:34 quinn
135 * Added authentication stuff.
137 * Revision 1.4 1995/03/07 10:13:00 quinn
138 * Added prototype for z_APDU()
140 * Revision 1.3 1995/02/14 11:54:23 quinn
143 * Revision 1.2 1995/02/09 15:51:40 quinn
146 * Revision 1.1 1995/02/06 16:44:48 quinn
147 * First hack at Z/SR protocol
158 #include <yaz-version.h>
161 * Because we didn't have time to put all of the extra v3 elements in here
162 * before the first applications were written, we have to place them
163 * in #ifdefs in places where they would break existing code. If you are
164 * developing new stuff, we urge you to leave them in, even if you don't
165 * intend to use any v3 features. When we are comfortable that the old
166 * apps have been updated, we'll remove the #ifdefs.
171 /* ----------------- GLOBAL AUXILIARY DEFS ----------------*/
174 typedef struct Z_External Z_External;
176 typedef Odr_oct Z_ReferenceId;
177 typedef char Z_DatabaseName;
178 typedef char Z_ResultSetId;
179 typedef Odr_oct Z_ResultsetId;
181 typedef struct Z_InfoCategory
183 Odr_oid *categoryTypeId; /* OPTIONAL */
187 typedef struct Z_OtherInformationUnit
189 Z_InfoCategory *category; /* OPTIONAL */
191 #define Z_OtherInfo_characterInfo 0
192 #define Z_OtherInfo_binaryInfo 1
193 #define Z_OtherInfo_externallyDefinedInfo 2
194 #define Z_OtherInfo_oid 3
199 Z_External *externallyDefinedInfo;
202 } Z_OtherInformationUnit;
204 typedef struct Z_OtherInformation
207 Z_OtherInformationUnit **list;
208 } Z_OtherInformation;
210 typedef struct Z_StringOrNumeric
213 #define Z_StringOrNumeric_string 0
214 #define Z_StringOrNumeric_numeric 1
222 typedef struct Z_Unit
224 char *unitSystem; /* OPTIONAL */
225 Z_StringOrNumeric *unitType; /* OPTIONAL */
226 Z_StringOrNumeric *unit; /* OPTIONAL */
227 int *scaleFactor; /* OPTIONAL */
230 typedef struct Z_IntUnit
236 typedef Odr_oct Z_SUTRS;
238 /* ----------------- INIT SERVICE ----------------*/
242 char *groupId; /* OPTIONAL */
243 char *userId; /* OPTIONAL */
244 char *password; /* OPTIONAL */
247 typedef struct Z_IdAuthentication
250 #define Z_IdAuthentication_open 0
251 #define Z_IdAuthentication_idPass 1
252 #define Z_IdAuthentication_anonymous 2
253 #define Z_IdAuthentication_other 3
261 } Z_IdAuthentication;
263 #define Z_ProtocolVersion_1 0
264 #define Z_ProtocolVersion_2 1
265 #define Z_ProtocolVersion_3 2
267 #define Z_Options_search 0
268 #define Z_Options_present 1
269 #define Z_Options_delSet 2
270 #define Z_Options_resourceReport 3
271 #define Z_Options_triggerResourceCtrl 4
272 #define Z_Options_resourceCtrl 5
273 #define Z_Options_accessCtrl 6
274 #define Z_Options_scan 7
275 #define Z_Options_sort 8
276 #define Z_Options_reserved 9
277 #define Z_Options_extendedServices 10
278 #define Z_Options_level_1Segmentation 11
279 #define Z_Options_level_2Segmentation 12
280 #define Z_Options_concurrentOperations 13
281 #define Z_Options_namedResultSets 14
283 typedef struct Z_InitRequest
285 Z_ReferenceId *referenceId; /* OPTIONAL */
286 Odr_bitmask *protocolVersion;
287 Odr_bitmask *options;
288 int *preferredMessageSize;
289 int *maximumRecordSize;
290 Z_IdAuthentication* idAuthentication; /* OPTIONAL */
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_InitResponse
302 Z_ReferenceId *referenceId; /* OPTIONAL */
303 Odr_bitmask *protocolVersion;
304 Odr_bitmask *options;
305 int *preferredMessageSize;
306 int *maximumRecordSize;
308 char *implementationId; /* OPTIONAL */
309 char *implementationName; /* OPTIONAL */
310 char *implementationVersion; /* OPTIONAL */
311 Z_External *userInformationField; /* OPTIONAL */
313 Z_OtherInformation *otherInfo; /* OPTIONAL */
317 typedef struct Z_NSRAuthentication
322 } Z_NSRAuthentication;
324 int z_NSRAuthentication(ODR o, Z_NSRAuthentication **p, int opt);
326 int z_StrAuthentication(ODR o, char **p, int opt);
328 /* ------------------ SEARCH SERVICE ----------------*/
330 typedef struct Z_DatabaseSpecificUnit
333 char *elementSetName;
334 } Z_DatabaseSpecificUnit;
336 typedef struct Z_DatabaseSpecific
339 Z_DatabaseSpecificUnit **elements;
340 } Z_DatabaseSpecific;
342 typedef struct Z_ElementSetNames
345 #define Z_ElementSetNames_generic 0
346 #define Z_ElementSetNames_databaseSpecific 1
350 Z_DatabaseSpecific *databaseSpecific;
354 /* ---------------------- RPN QUERY --------------------------- */
356 typedef struct Z_ComplexAttribute
359 Z_StringOrNumeric **list;
360 int num_semanticAction;
361 int **semanticAction; /* OPTIONAL */
362 } Z_ComplexAttribute;
364 typedef struct Z_AttributeElement
367 Odr_oid *attributeSet; /* OPTIONAL - v3 only */
372 #define Z_AttributeValue_numeric 0
373 #define Z_AttributeValue_complex 1
377 Z_ComplexAttribute *complex;
382 } Z_AttributeElement;
384 typedef struct Z_Term
387 #define Z_Term_general 0
388 #define Z_Term_numeric 1
389 #define Z_Term_characterString 2
391 #define Z_Term_dateTime 4
392 #define Z_Term_external 5
393 #define Z_Term_integerAndUnit 6
394 #define Z_Term_null 7
397 Odr_oct *general; /* this is required for v2 */
399 char *characterString;
402 Z_External *external;
403 /* Z_IntUnit *integerAndUnit; */
408 typedef struct Z_AttributesPlusTerm
411 Z_AttributeElement **attributeList;
413 } Z_AttributesPlusTerm;
415 typedef struct Z_ResultSetPlusAttributes
419 Z_AttributeElement **attributeList;
420 } Z_ResultSetPlusAttributes;
422 typedef struct Z_ProximityOperator
424 bool_t *exclusion; /* OPTIONAL */
428 #define Z_Prox_lessThan 1
429 #define Z_Prox_lessThanOrEqual 2
430 #define Z_Prox_equal 3
431 #define Z_Prox_greaterThanOrEqual 4
432 #define Z_Prox_greaterThan 5
433 #define Z_Prox_notEqual 6
435 #define Z_ProxCode_known 0
436 #define Z_ProxCode_private 1
437 int *proximityUnitCode;
438 #define Z_ProxUnit_character 1
439 #define Z_ProxUnit_word 2
440 #define Z_ProxUnit_sentence 3
441 #define Z_ProxUnit_paragraph 4
442 #define Z_ProxUnit_section 5
443 #define Z_ProxUnit_chapter 6
444 #define Z_ProxUnit_document 7
445 #define Z_ProxUnit_element 8
446 #define Z_ProxUnit_subelement 9
447 #define Z_ProxUnit_elementType 10
448 #define Z_ProxUnit_byte 11 /* v3 only */
449 } Z_ProximityOperator;
451 typedef struct Z_Operator
454 #define Z_Operator_and 0
455 #define Z_Operator_or 1
456 #define Z_Operator_and_not 2
457 #define Z_Operator_prox 3
460 Odr_null *and; /* these guys are nulls. */
463 Z_ProximityOperator *prox;
467 typedef struct Z_Operand
470 #define Z_Operand_APT 0
471 #define Z_Operand_resultSetId 1
472 #define Z_Operand_resultAttr /* v3 only */ 2
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 *roperator;
488 typedef struct Z_RPNStructure
491 #define Z_RPNStructure_simple 0
492 #define Z_RPNStructure_complex 1
500 typedef struct Z_RPNQuery
502 Odr_oid *attributeSetId;
503 Z_RPNStructure *RPNStructure;
506 /* -------------------------- SEARCHREQUEST -------------------------- */
508 typedef struct Z_Query
511 #define Z_Query_type_1 1
512 #define Z_Query_type_2 2
513 #define Z_Query_type_101 3
518 Z_RPNQuery *type_101;
522 typedef struct Z_SearchRequest
524 Z_ReferenceId *referenceId; /* OPTIONAL */
525 int *smallSetUpperBound;
526 int *largeSetLowerBound;
527 int *mediumSetPresentNumber;
528 bool_t *replaceIndicator;
530 int num_databaseNames;
531 char **databaseNames;
532 Z_ElementSetNames *smallSetElementSetNames; /* OPTIONAL */
533 Z_ElementSetNames *mediumSetElementSetNames; /* OPTIONAL */
534 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
537 Z_OtherInformation *additionalSearchInfo; /* OPTIONAL */
538 Z_OtherInformation *otherInfo; /* OPTIONAL */
542 /* ------------------------ RECORD -------------------------- */
544 typedef Z_External Z_DatabaseRecord;
548 typedef struct Z_DefaultDiagFormat
550 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
552 /* until the whole character set issue becomes more definite,
553 * you can probably ignore this on input. */
555 #define Z_DiagForm_v2AddInfo 0
556 #define Z_DiagForm_v3AddInfo 1
558 } Z_DefaultDiagFormat;
560 typedef struct Z_DiagRec
563 #define Z_DiagRec_defaultFormat 0
564 #define Z_DiagRec_externallyDefined 1
567 Z_DefaultDiagFormat *defaultFormat;
568 Z_External *externallyDefined;
574 typedef struct Z_DiagRec
576 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
583 typedef struct Z_DiagRecs
586 Z_DiagRec **diagRecs;
589 typedef struct Z_NamePlusRecord
591 char *databaseName; /* OPTIONAL */
593 #define Z_NamePlusRecord_databaseRecord 0
594 #define Z_NamePlusRecord_surrogateDiagnostic 1
597 Z_DatabaseRecord *databaseRecord;
598 Z_DiagRec *surrogateDiagnostic;
602 typedef struct Z_NamePlusRecordList
605 Z_NamePlusRecord **records;
606 } Z_NamePlusRecordList;
608 typedef struct Z_Records
611 #define Z_Records_DBOSD 0
612 #define Z_Records_NSD 1
613 #define Z_Records_multipleNSD 2
616 Z_NamePlusRecordList *databaseOrSurDiagnostics;
617 Z_DiagRec *nonSurrogateDiagnostic;
618 Z_DiagRecs *multipleNonSurDiagnostics;
622 /* ------------------------ SEARCHRESPONSE ------------------ */
624 typedef struct Z_SearchResponse
626 Z_ReferenceId *referenceId; /* OPTIONAL */
628 int *numberOfRecordsReturned;
629 int *nextResultSetPosition;
630 bool_t *searchStatus;
631 int *resultSetStatus; /* OPTIONAL */
632 #define Z_RES_SUBSET 1
633 #define Z_RES_INTERIM 2
635 int *presentStatus; /* OPTIONAL */
636 #define Z_PRES_SUCCESS 0
637 #define Z_PRES_PARTIAL_1 1
638 #define Z_PRES_PARTIAL_2 2
639 #define Z_PRES_PARTIAL_3 3
640 #define Z_PRES_PARTIAL_4 4
641 #define Z_PRES_FAILURE 5
642 Z_Records *records; /* OPTIONAL */
644 Z_OtherInformation *additionalSearchInfo;
645 Z_OtherInformation *otherInfo;
649 /* ------------------------- PRESENT SERVICE -----------------*/
651 typedef struct Z_ElementSpec
654 #define Z_ElementSpec_elementSetName 0
655 #define Z_ElementSpec_externalSpec 1
658 char *elementSetName;
659 Z_External *externalSpec;
663 typedef struct Z_Specification
665 Odr_oid *schema; /* OPTIONAL */
666 Z_ElementSpec *elementSpec; /* OPTIONAL */
669 typedef struct Z_DbSpecific
672 Z_Specification *spec;
675 typedef struct Z_CompSpec
677 bool_t *selectAlternativeSyntax;
678 Z_Specification *generic; /* OPTIONAL */
680 Z_DbSpecific **dbSpecific; /* OPTIONAL */
681 int num_recordSyntax;
682 Odr_oid **recordSyntax; /* OPTIONAL */
685 typedef struct Z_RecordComposition
688 #define Z_RecordComp_simple 0
689 #define Z_RecordComp_complex 1
692 Z_ElementSetNames *simple;
695 } Z_RecordComposition;
697 typedef struct Z_Range
699 int *startingPosition;
700 int *numberOfRecords;
703 typedef struct Z_PresentRequest
705 Z_ReferenceId *referenceId; /* OPTIONAL */
706 Z_ResultSetId *resultSetId;
707 int *resultSetStartPoint;
708 int *numberOfRecordsRequested;
711 Z_Range **additionalRanges; /* OPTIONAL */
712 Z_RecordComposition *recordComposition; /* OPTIONAL */
714 Z_ElementSetNames *elementSetNames; /* OPTIONAL */
716 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
718 int *maxSegmentCount; /* OPTIONAL */
719 int *maxRecordSize; /* OPTIONAL */
720 int *maxSegmentSize; /* OPTIONAL */
721 Z_OtherInformation *otherInfo; /* OPTIONAL */
725 typedef struct Z_PresentResponse
727 Z_ReferenceId *referenceId; /* OPTIONAL */
728 int *numberOfRecordsReturned;
729 int *nextResultSetPosition;
733 Z_OtherInformation *otherInfo; /* OPTIONAL */
737 /* ------------------ RESOURCE CONTROL ----------------*/
739 typedef struct Z_TriggerResourceControlRequest
741 Z_ReferenceId *referenceId; /* OPTIONAL */
742 int *requestedAction;
743 #define Z_TriggerResourceCtrl_resourceReport 1
744 #define Z_TriggerResourceCtrl_resourceControl 2
745 #define Z_TriggerResourceCtrl_cancel 3
746 Odr_oid *prefResourceReportFormat; /* OPTIONAL */
747 bool_t *resultSetWanted; /* OPTIONAL */
749 Z_OtherInformation *otherInfo;
751 } Z_TriggerResourceControlRequest;
753 typedef struct Z_ResourceControlRequest
755 Z_ReferenceId *referenceId; /* OPTIONAL */
756 bool_t *suspendedFlag; /* OPTIONAL */
757 Z_External *resourceReport; /* OPTIONAL */
758 int *partialResultsAvailable; /* OPTIONAL */
759 #define Z_ResourceControlRequest_subset 1
760 #define Z_ResourceControlRequest_interim 2
761 #define Z_ResourceControlRequest_none 3
762 bool_t *responseRequired;
763 bool_t *triggeredRequestFlag; /* OPTIONAL */
765 Z_OtherInformation *otherInfo;
767 } Z_ResourceControlRequest;
769 typedef struct Z_ResourceControlResponse
771 Z_ReferenceId *referenceId; /* OPTIONAL */
772 bool_t *continueFlag;
773 bool_t *resultSetWanted; /* OPTIONAL */
775 Z_OtherInformation *otherInfo;
777 } Z_ResourceControlResponse;
780 /* ------------------ ACCESS CTRL SERVICE ----------------*/
782 typedef struct Z_AccessControlRequest
784 Z_ReferenceId *referenceId; /* OPTIONAL */
786 #define Z_AccessRequest_simpleForm 0
787 #define Z_AccessRequest_externallyDefined 1
791 Z_External *externallyDefined;
794 Z_OtherInformation *otherInfo; /* OPTIONAL */
796 } Z_AccessControlRequest;
798 typedef struct Z_AccessControlResponse
800 Z_ReferenceId *referenceId; /* OPTIONAL */
802 #define Z_AccessResponse_simpleForm 0
803 #define Z_AccessResponse_externallyDefined 1
807 Z_External *externallyDefined;
809 Z_DiagRec *diagnostic; /* OPTIONAL */
811 Z_OtherInformation *otherInfo; /* OPTIONAL */
813 } Z_AccessControlResponse;
815 /* ------------------------ SCAN SERVICE -------------------- */
817 typedef struct Z_AttributeList
820 Z_AttributeElement **attributes;
823 typedef struct Z_AlternativeTerm
826 Z_AttributesPlusTerm **terms;
829 typedef struct Z_OccurrenceByAttributes
831 Z_AttributeList *attributes;
834 #define Z_OByAtt_global 0
835 #define Z_ObyAtt_byDatabase 1
841 /* Z_ByDatabase *byDatabase; */
844 } Z_OccurrenceByAttributes;
846 typedef struct Z_TermInfo
849 Z_AttributeList *suggestedAttributes; /* OPTIONAL */
850 Z_AlternativeTerm *alternativeTerm; /* OPTIONAL */
851 int *globalOccurrences; /* OPTIONAL */
852 Z_OccurrenceByAttributes *byAttributes; /* OPTIONAL */
855 typedef struct Z_Entry
858 #define Z_Entry_termInfo 0
859 #define Z_Entry_surrogateDiagnostic 1
862 Z_TermInfo *termInfo;
863 Z_DiagRec *surrogateDiagnostic;
867 typedef struct Z_Entries
873 typedef struct Z_ListEntries
876 #define Z_ListEntries_entries 0
877 #define Z_ListEntries_nonSurrogateDiagnostics 1
881 Z_DiagRecs *nonSurrogateDiagnostics;
885 typedef struct Z_ScanRequest
887 Z_ReferenceId *referenceId; /* OPTIONAL */
888 int num_databaseNames;
889 char **databaseNames;
890 Odr_oid *attributeSet; /* OPTIONAL */
891 Z_AttributesPlusTerm *termListAndStartPoint;
892 int *stepSize; /* OPTIONAL */
893 int *numberOfTermsRequested;
894 int *preferredPositionInResponse; /* OPTIONAL */
896 Z_OtherInformation *otherInfo;
900 typedef struct Z_ScanResponse
902 Z_ReferenceId *referenceId; /* OPTIONAL */
903 int *stepSize; /* OPTIONAL */
905 #define Z_Scan_success 0
906 #define Z_Scan_partial_1 1
907 #define Z_Scan_partial_2 2
908 #define Z_Scan_partial_3 3
909 #define Z_Scan_partial_4 4
910 #define Z_Scan_partial_5 5
911 #define Z_Scan_failure 6
912 int *numberOfEntriesReturned;
913 int *positionOfTerm; /* OPTIONAL */
914 Z_ListEntries *entries; /* OPTIONAL */
915 Odr_oid *attributeSet; /* OPTIONAL */
917 Z_OtherInformation *otherInfo;
922 /* ------------------------ DELETE -------------------------- */
924 #define Z_DeleteStatus_success 0
925 #define Z_DeleteStatus_resultSetDidNotExist 1
926 #define Z_DeleteStatus_previouslyDeletedByTarget 2
927 #define Z_DeleteStatus_systemProblemAtTarget 3
928 #define Z_DeleteStatus_accessNotAllowed 4
929 #define Z_DeleteStatus_resourceControlAtOrigin 5
930 #define Z_DeleteStatus_resourceControlAtTarget 6
931 #define Z_DeleteStatus_bulkDeleteNotSupported 7
932 #define Z_DeleteStatus_notAllRsltSetsDeletedOnBulkDlte 8
933 #define Z_DeleteStatus_notAllRequestedResultSetsDeleted 9
934 #define Z_DeleteStatus_resultSetInUse 10
936 typedef struct Z_ListStatus
942 typedef struct Z_DeleteResultSetRequest
944 Z_ReferenceId *referenceId; /* OPTIONAL */
946 #define Z_DeleteRequest_list 0
947 #define Z_DeleteRequest_all 1
949 Z_ResultSetId **resultSetList; /* OPTIONAL */
951 Z_OtherInformation *otherInfo;
953 } Z_DeleteResultSetRequest;
955 typedef struct Z_DeleteResultSetResponse
957 Z_ReferenceId *referenceId; /* OPTIONAL */
958 int *deleteOperationStatus;
960 Z_ListStatus *deleteListStatuses; /* OPTIONAL */
961 int *numberNotDeleted; /* OPTIONAL */
962 int num_bulkStatuses;
963 Z_ListStatus *bulkStatuses; /* OPTIONAL */
964 char *deleteMessage; /* OPTIONAL */
966 Z_OtherInformation *otherInfo;
968 } Z_DeleteResultSetResponse;
970 /* ------------------------ CLOSE SERVICE ------------------- */
972 typedef struct Z_Close
974 Z_ReferenceId *referenceId; /* OPTIONAL */
976 #define Z_Close_finished 0
977 #define Z_Close_shutdown 1
978 #define Z_Close_systemProblem 2
979 #define Z_Close_costLimit 3
980 #define Z_Close_resources 4
981 #define Z_Close_securityViolation 5
982 #define Z_Close_protocolError 6
983 #define Z_Close_lackOfActivity 7
984 #define Z_Close_peerAbort 8
985 #define Z_Close_unspecified 9
986 char *diagnosticInformation; /* OPTIONAL */
987 Odr_oid *resourceReportFormat; /* OPTIONAL */
988 Z_External *resourceReport; /* OPTIONAL */
990 Z_OtherInformation *otherInfo; /* OPTIONAL */
994 /* ------------------------ SEGMENTATION -------------------- */
996 typedef struct Z_Segment
998 Z_ReferenceId *referenceId; /* OPTIONAL */
999 int *numberOfRecordsReturned;
1000 int num_segmentRecords;
1001 Z_NamePlusRecord **segmentRecords;
1002 Z_OtherInformation *otherInfo; /* OPTIONAL */
1005 /* ----------------------- Extended Services ---------------- */
1007 typedef struct Z_Permissions
1010 int num_allowableFunctions;
1011 int **allowableFunctions;
1012 #define Z_Permissions_delete 1
1013 #define Z_Permissions_modifyContents 2
1014 #define Z_Permissions_modifyPermissions 3
1015 #define Z_Permissions_present 4
1016 #define Z_Permissions_invoke 5
1019 typedef struct Z_ExtendedServicesRequest
1021 Z_ReferenceId *referenceId; /* OPTIONAL */
1023 #define Z_ExtendedServicesRequest_create 1
1024 #define Z_ExtendedServicesRequest_delete 2
1025 #define Z_ExtendedServicesRequest_modify 3
1026 Odr_oid *packageType;
1027 char *packageName; /* OPTIONAL */
1028 char *userId; /* OPTIONAL */
1029 Z_IntUnit *retentionTime; /* OPTIONAL */
1030 Z_Permissions *permissions; /* OPTIONAL */
1031 char *description; /* OPTIONAL */
1032 Z_External *taskSpecificParameters; /* OPTIONAL */
1034 #define Z_ExtendedServicesRequest_wait 1
1035 #define Z_ExtendedServicesRequest_waitIfPossible 2
1036 #define Z_ExtendedServicesRequest_dontWait 3
1037 #define Z_ExtendedServicesRequest_dontReturnPackage 4
1038 char *elements; /* OPTIONAL */
1039 Z_OtherInformation *otherInfo; /* OPTIONAL */
1040 } Z_ExtendedServicesRequest;
1042 typedef struct Z_ExtendedServicesResponse
1044 Z_ReferenceId *referenceId; /* OPTIONAL */
1045 int *operationStatus;
1046 #define Z_ExtendedServicesResponse_done 1
1047 #define Z_ExtendedServicesResponse_accepted 2
1048 #define Z_ExtendedServicesResponse_failure 3
1049 int num_diagnostics;
1050 Z_DiagRec **diagnostics; /* OPTIONAL */
1051 Z_External *taskPackage; /* OPTIONAL */
1052 Z_OtherInformation *otherInfo; /* OPTIONAL */
1053 } Z_ExtendedServicesResponse;
1055 /* ------------------------ APDU ---------------------------- */
1057 typedef struct Z_APDU
1060 #define Z_APDU_initRequest 0
1061 #define Z_APDU_initResponse 1
1062 #define Z_APDU_searchRequest 2
1063 #define Z_APDU_searchResponse 3
1064 #define Z_APDU_presentRequest 4
1065 #define Z_APDU_presentResponse 5
1066 #define Z_APDU_deleteResultSetRequest 6
1067 #define Z_APDU_deleteResultSetResponse 7
1068 #define Z_APDU_resourceControlRequest 8
1069 #define Z_APDU_resourceControlResponse 9
1070 #define Z_APDU_triggerResourceControlRequest 10
1071 #define Z_APDU_scanRequest 11
1072 #define Z_APDU_scanResponse 12
1073 #define Z_APDU_segmentRequest 13
1074 #define Z_APDU_extendedServicesRequest 14
1075 #define Z_APDU_extendedServicesResponse 15
1076 #define Z_APDU_close 16
1077 #define Z_APDU_accessControlRequest 17
1078 #define Z_APDU_accessControlResponse 18
1081 Z_InitRequest *initRequest;
1082 Z_InitResponse *initResponse;
1083 Z_SearchRequest *searchRequest;
1084 Z_SearchResponse *searchResponse;
1085 Z_PresentRequest *presentRequest;
1086 Z_PresentResponse *presentResponse;
1087 Z_DeleteResultSetRequest *deleteResultSetRequest;
1088 Z_DeleteResultSetResponse *deleteResultSetResponse;
1089 Z_AccessControlRequest *accessControlRequest;
1090 Z_AccessControlResponse *accessControlResponse;
1091 Z_ResourceControlRequest *resourceControlRequest;
1092 Z_ResourceControlResponse *resourceControlResponse;
1093 Z_TriggerResourceControlRequest *triggerResourceControlRequest;
1094 Z_ScanRequest *scanRequest;
1095 Z_ScanResponse *scanResponse;
1096 Z_Segment *segmentRequest;
1097 Z_ExtendedServicesRequest *extendedServicesRequest;
1098 Z_ExtendedServicesResponse *extendedServicesResponse;
1103 int z_APDU(ODR o, Z_APDU **p, int opt);
1104 int z_SUTRS(ODR o, Odr_oct **p, int opt);
1106 Z_InitRequest *zget_InitRequest(ODR o);
1107 Z_InitResponse *zget_InitResponse(ODR o);
1108 Z_SearchRequest *zget_SearchRequest(ODR o);
1109 Z_SearchResponse *zget_SearchResponse(ODR o);
1110 Z_PresentRequest *zget_PresentRequest(ODR o);
1111 Z_PresentResponse *zget_PresentResponse(ODR o);
1112 Z_DeleteResultSetRequest *zget_DeleteResultSetRequest(ODR o);
1113 Z_DeleteResultSetResponse *zget_DeleteResultSetResponse(ODR o);
1114 Z_ScanRequest *zget_ScanRequest(ODR o);
1115 Z_ScanResponse *zget_ScanResponse(ODR o);
1116 Z_TriggerResourceControlRequest *zget_TriggerResourceControlRequest(ODR o);
1117 Z_ResourceControlRequest *zget_ResourceControlRequest(ODR o);
1118 Z_ResourceControlResponse *zget_ResourceControlResponse(ODR o);
1119 Z_Close *zget_Close(ODR o);
1120 int z_InternationalString(ODR o, char **p, int opt);
1121 int z_OtherInformation(ODR o, Z_OtherInformation **p, int opt);
1122 int z_ElementSetName(ODR o, char **p, int opt);
1123 int z_IntUnit(ODR o, Z_IntUnit **p, int opt);
1124 int z_Unit(ODR o, Z_Unit **p, int opt);
1125 int z_DatabaseName(ODR o, Z_DatabaseName **p, int opt);
1126 int z_StringOrNumeric(ODR o, Z_StringOrNumeric **p, int opt);
1127 int z_OtherInformationUnit(ODR o, Z_OtherInformationUnit **p, int opt);
1128 int z_Term(ODR o, Z_Term **p, int opt);
1129 int z_Specification(ODR o, Z_Specification **p, int opt);
1130 int z_Permissions(ODR o, Z_Permissions **p, int opt);
1131 int z_DiagRec(ODR o, Z_DiagRec **p, int opt);
1132 int z_AttributeList(ODR o, Z_AttributeList **p, int opt);
1133 int z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt);
1134 Z_APDU *zget_APDU(ODR o, int which);
1136 #include <prt-rsc.h>
1137 #include <prt-acc.h>
1138 #include <prt-exp.h>
1139 #include <prt-grs.h>
1140 #include <prt-exd.h>
1141 #include <prt-dia.h>
1142 #include <prt-esp.h>
1144 #include <prt-ext.h>