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.28 1996-01-02 08:57:32 quinn
28 * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
30 * Revision 1.27 1995/10/12 10:34:46 quinn
33 * Revision 1.26 1995/09/29 17:12:08 quinn
36 * Revision 1.25 1995/09/27 15:02:49 quinn
37 * Modified function heads & prototypes.
39 * Revision 1.24 1995/08/29 11:17:43 quinn
40 * *** empty log message ***
42 * Revision 1.23 1995/08/21 09:10:36 quinn
43 * Smallish fixes to suppport new formats.
45 * Revision 1.22 1995/08/17 12:45:14 quinn
46 * Fixed minor problems with GRS-1. Added support in c&s.
48 * Revision 1.21 1995/08/15 12:00:11 quinn
51 * Revision 1.20 1995/08/10 08:54:35 quinn
54 * Revision 1.19 1995/06/19 12:38:28 quinn
55 * Reorganized include-files. Added small features.
57 * Revision 1.18 1995/06/16 13:16:05 quinn
58 * Fixed Defaultdiagformat.
60 * Revision 1.17 1995/06/15 15:42:05 quinn
63 * Revision 1.16 1995/06/15 07:45:06 quinn
66 * Revision 1.15 1995/06/14 15:26:43 quinn
67 * *** empty log message ***
69 * Revision 1.14 1995/06/07 14:42:34 quinn
72 * Revision 1.13 1995/06/07 14:36:47 quinn
75 * Revision 1.12 1995/06/05 10:53:13 quinn
78 * Revision 1.11 1995/06/02 09:49:47 quinn
81 * Revision 1.10 1995/05/29 08:11:34 quinn
82 * Moved oid from odr/asn to util.
84 * Revision 1.9 1995/05/22 11:31:25 quinn
87 * Revision 1.8 1995/05/17 08:41:35 quinn
88 * Added delete to proto & other little things.
89 * Relaying auth info to backend.
91 * Revision 1.7 1995/05/16 08:50:37 quinn
92 * License, documentation, and memory fixes
94 * Revision 1.6 1995/05/15 11:55:55 quinn
95 * Work on asynchronous activity.
97 * Revision 1.5 1995/04/17 11:28:18 quinn
100 * Revision 1.4 1995/04/10 10:22:47 quinn
103 * Revision 1.3 1995/03/30 12:18:09 quinn
106 * Revision 1.2 1995/03/30 10:26:48 quinn
107 * Added Term structure
109 * Revision 1.1 1995/03/30 09:39:42 quinn
110 * Moved .h files to include directory
112 * Revision 1.11 1995/03/30 09:08:44 quinn
113 * Added Resource control protocol
115 * Revision 1.10 1995/03/29 15:39:39 quinn
116 * Adding some resource control elements, and a null-check to getentbyoid
118 * Revision 1.9 1995/03/29 08:06:18 quinn
119 * Added a few v3 elements
121 * Revision 1.8 1995/03/22 10:12:49 quinn
122 * Added Z_PRES constants.
124 * Revision 1.7 1995/03/20 09:45:12 quinn
127 * Revision 1.5 1995/03/07 16:29:34 quinn
128 * Added authentication stuff.
130 * Revision 1.4 1995/03/07 10:13:00 quinn
131 * Added prototype for z_APDU()
133 * Revision 1.3 1995/02/14 11:54:23 quinn
136 * Revision 1.2 1995/02/09 15:51:40 quinn
139 * Revision 1.1 1995/02/06 16:44:48 quinn
140 * First hack at Z/SR protocol
151 #include <yaz-version.h>
154 * Because we didn't have time to put all of the extra v3 elements in here
155 * before the first applications were written, we have to place them
156 * in #ifdefs in places where they would break existing code. If you are
157 * developing new stuff, we urge you to leave them in, even if you don't
158 * intend to use any v3 features. When we are comfortable that the old
159 * apps have been updated, we'll remove the #ifdefs.
164 /* ----------------- GLOBAL AUXILIARY DEFS ----------------*/
167 typedef struct Z_External Z_External;
169 typedef Odr_oct Z_ReferenceId;
170 typedef char Z_DatabaseName;
171 typedef char Z_ResultSetId;
172 typedef Odr_oct Z_ResultsetId;
174 typedef struct Z_InfoCategory
176 Odr_oid *categoryTypeId; /* OPTIONAL */
180 typedef struct Z_OtherInformationUnit
182 Z_InfoCategory *category; /* OPTIONAL */
184 #define Z_OtherInfo_characterInfo 0
185 #define Z_OtherInfo_binaryInfo 1
186 #define Z_OtherInfo_externallyDefinedInfo 2
187 #define Z_OtherInfo_oid 3
192 Z_External *externallyDefinedInfo;
195 } Z_OtherInformationUnit;
197 typedef struct Z_OtherInformation
200 Z_OtherInformationUnit **list;
201 } Z_OtherInformation;
203 typedef struct Z_StringOrNumeric
206 #define Z_StringOrNumeric_string 0
207 #define Z_StringOrNumeric_numeric 1
215 typedef struct Z_Unit
217 char *unitSystem; /* OPTIONAL */
218 Z_StringOrNumeric *unitType; /* OPTIONAL */
219 Z_StringOrNumeric *unit; /* OPTIONAL */
220 int *scaleFactor; /* OPTIONAL */
223 typedef struct Z_IntUnit
229 typedef Odr_oct Z_SUTRS;
231 /* ----------------- INIT SERVICE ----------------*/
235 char *groupId; /* OPTIONAL */
236 char *userId; /* OPTIONAL */
237 char *password; /* OPTIONAL */
240 typedef struct Z_IdAuthentication
243 #define Z_IdAuthentication_open 0
244 #define Z_IdAuthentication_idPass 1
245 #define Z_IdAuthentication_anonymous 2
246 #define Z_IdAuthentication_other 3
254 } Z_IdAuthentication;
256 #define Z_ProtocolVersion_1 0
257 #define Z_ProtocolVersion_2 1
258 #define Z_ProtocolVersion_3 2
260 #define Z_Options_search 0
261 #define Z_Options_present 1
262 #define Z_Options_delSet 2
263 #define Z_Options_resourceReport 3
264 #define Z_Options_triggerResourceCtrl 4
265 #define Z_Options_resourceCtrl 5
266 #define Z_Options_accessCtrl 6
267 #define Z_Options_scan 7
268 #define Z_Options_sort 8
269 #define Z_Options_reserved 9
270 #define Z_Options_extendedServices 10
271 #define Z_Options_level_1Segmentation 11
272 #define Z_Options_level_2Segmentation 12
273 #define Z_Options_concurrentOperations 13
274 #define Z_Options_namedResultSets 14
276 typedef struct Z_InitRequest
278 Z_ReferenceId *referenceId; /* OPTIONAL */
279 Odr_bitmask *protocolVersion;
280 Odr_bitmask *options;
281 int *preferredMessageSize;
282 int *maximumRecordSize;
283 Z_IdAuthentication* idAuthentication; /* OPTIONAL */
284 char *implementationId; /* OPTIONAL */
285 char *implementationName; /* OPTIONAL */
286 char *implementationVersion; /* OPTIONAL */
287 Z_External *userInformationField; /* OPTIONAL */
289 Z_OtherInformation *otherInfo; /* OPTIONAL */
293 typedef struct Z_InitResponse
295 Z_ReferenceId *referenceId; /* OPTIONAL */
296 Odr_bitmask *protocolVersion;
297 Odr_bitmask *options;
298 int *preferredMessageSize;
299 int *maximumRecordSize;
301 char *implementationId; /* OPTIONAL */
302 char *implementationName; /* OPTIONAL */
303 char *implementationVersion; /* OPTIONAL */
304 Z_External *userInformationField; /* OPTIONAL */
306 Z_OtherInformation *otherInfo; /* OPTIONAL */
310 typedef struct Z_NSRAuthentication
315 } Z_NSRAuthentication;
317 int z_NSRAuthentication(ODR o, Z_NSRAuthentication **p, int opt);
319 int z_StrAuthentication(ODR o, char **p, int opt);
321 /* ------------------ SEARCH SERVICE ----------------*/
323 typedef struct Z_DatabaseSpecificUnit
326 char *elementSetName;
327 } Z_DatabaseSpecificUnit;
329 typedef struct Z_DatabaseSpecific
332 Z_DatabaseSpecificUnit **elements;
333 } Z_DatabaseSpecific;
335 typedef struct Z_ElementSetNames
338 #define Z_ElementSetNames_generic 0
339 #define Z_ElementSetNames_databaseSpecific 1
343 Z_DatabaseSpecific *databaseSpecific;
347 /* ---------------------- RPN QUERY --------------------------- */
349 typedef struct Z_ComplexAttribute
352 Z_StringOrNumeric **list;
353 int num_semanticAction;
354 int **semanticAction; /* OPTIONAL */
355 } Z_ComplexAttribute;
357 typedef struct Z_AttributeElement
360 Odr_oid *attributeSet; /* OPTIONAL - v3 only */
365 #define Z_AttributeValue_numeric 0
366 #define Z_AttributeValue_complex 1
370 Z_ComplexAttribute *complex;
375 } Z_AttributeElement;
377 typedef struct Z_Term
380 #define Z_Term_general 0
381 #define Z_Term_numeric 1
382 #define Z_Term_characterString 2
384 #define Z_Term_dateTime 4
385 #define Z_Term_external 5
386 #define Z_Term_integerAndUnit 6
387 #define Z_Term_null 7
390 Odr_oct *general; /* this is required for v2 */
392 char *characterString;
395 Z_External *external;
396 /* Z_IntUnit *integerAndUnit; */
401 typedef struct Z_AttributesPlusTerm
404 Z_AttributeElement **attributeList;
406 } Z_AttributesPlusTerm;
408 typedef struct Z_ResultSetPlusAttributes
412 Z_AttributeElement **attributeList;
413 } Z_ResultSetPlusAttributes;
415 typedef struct Z_ProximityOperator
417 bool_t *exclusion; /* OPTIONAL */
421 #define Z_Prox_lessThan 1
422 #define Z_Prox_lessThanOrEqual 2
423 #define Z_Prox_equal 3
424 #define Z_Prox_greaterThanOrEqual 4
425 #define Z_Prox_greaterThan 5
426 #define Z_Prox_notEqual 6
428 #define Z_ProxCode_known 0
429 #define Z_ProxCode_private 1
430 int *proximityUnitCode;
431 #define Z_ProxUnit_character 1
432 #define Z_ProxUnit_word 2
433 #define Z_ProxUnit_sentence 3
434 #define Z_ProxUnit_paragraph 4
435 #define Z_ProxUnit_section 5
436 #define Z_ProxUnit_chapter 6
437 #define Z_ProxUnit_document 7
438 #define Z_ProxUnit_element 8
439 #define Z_ProxUnit_subelement 9
440 #define Z_ProxUnit_elementType 10
441 #define Z_ProxUnit_byte 11 /* v3 only */
442 } Z_ProximityOperator;
444 typedef struct Z_Operator
447 #define Z_Operator_and 0
448 #define Z_Operator_or 1
449 #define Z_Operator_and_not 2
450 #define Z_Operator_prox 3
453 Odr_null *and; /* these guys are nulls. */
456 Z_ProximityOperator *prox;
460 typedef struct Z_Operand
463 #define Z_Operand_APT 0
464 #define Z_Operand_resultSetId 1
465 #define Z_Operand_resultAttr /* v3 only */ 2
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
484 #define Z_RPNStructure_simple 0
485 #define Z_RPNStructure_complex 1
493 typedef struct Z_RPNQuery
495 Odr_oid *attributeSetId;
496 Z_RPNStructure *RPNStructure;
499 /* -------------------------- SEARCHREQUEST -------------------------- */
501 typedef struct Z_Query
504 #define Z_Query_type_1 1
505 #define Z_Query_type_2 2
506 #define Z_Query_type_101 3
511 Z_RPNQuery *type_101;
515 typedef struct Z_SearchRequest
517 Z_ReferenceId *referenceId; /* OPTIONAL */
518 int *smallSetUpperBound;
519 int *largeSetLowerBound;
520 int *mediumSetPresentNumber;
521 bool_t *replaceIndicator;
523 int num_databaseNames;
524 char **databaseNames;
525 Z_ElementSetNames *smallSetElementSetNames; /* OPTIONAL */
526 Z_ElementSetNames *mediumSetElementSetNames; /* OPTIONAL */
527 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
530 Z_OtherInformation *additionalSearchInfo; /* OPTIONAL */
531 Z_OtherInformation *otherInfo; /* OPTIONAL */
535 /* ------------------------ RECORD -------------------------- */
537 typedef Z_External Z_DatabaseRecord;
541 typedef struct Z_DefaultDiagFormat
543 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
545 /* until the whole character set issue becomes more definite,
546 * you can probably ignore this on input. */
548 #define Z_DiagForm_v2AddInfo 0
549 #define Z_DiagForm_v3AddInfo 1
551 } Z_DefaultDiagFormat;
553 typedef struct Z_DiagRec
556 #define Z_DiagRec_defaultFormat 0
557 #define Z_DiagRec_externallyDefined 1
560 Z_DefaultDiagFormat *defaultFormat;
561 Z_External *externallyDefined;
567 typedef struct Z_DiagRec
569 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
576 typedef struct Z_DiagRecs
579 Z_DiagRec **diagRecs;
582 typedef struct Z_NamePlusRecord
584 char *databaseName; /* OPTIONAL */
586 #define Z_NamePlusRecord_databaseRecord 0
587 #define Z_NamePlusRecord_surrogateDiagnostic 1
590 Z_DatabaseRecord *databaseRecord;
591 Z_DiagRec *surrogateDiagnostic;
595 typedef struct Z_NamePlusRecordList
598 Z_NamePlusRecord **records;
599 } Z_NamePlusRecordList;
601 typedef struct Z_Records
604 #define Z_Records_DBOSD 0
605 #define Z_Records_NSD 1
606 #define Z_Records_multipleNSD 2
609 Z_NamePlusRecordList *databaseOrSurDiagnostics;
610 Z_DiagRec *nonSurrogateDiagnostic;
611 Z_DiagRecs *multipleNonSurDiagnostics;
615 /* ------------------------ SEARCHRESPONSE ------------------ */
617 typedef struct Z_SearchResponse
619 Z_ReferenceId *referenceId; /* OPTIONAL */
621 int *numberOfRecordsReturned;
622 int *nextResultSetPosition;
623 bool_t *searchStatus;
624 int *resultSetStatus; /* OPTIONAL */
625 #define Z_RES_SUBSET 1
626 #define Z_RES_INTERIM 2
628 int *presentStatus; /* OPTIONAL */
629 #define Z_PRES_SUCCESS 0
630 #define Z_PRES_PARTIAL_1 1
631 #define Z_PRES_PARTIAL_2 2
632 #define Z_PRES_PARTIAL_3 3
633 #define Z_PRES_PARTIAL_4 4
634 #define Z_PRES_FAILURE 5
635 Z_Records *records; /* OPTIONAL */
637 Z_OtherInformation *additionalSearchInfo;
638 Z_OtherInformation *otherInfo;
642 /* ------------------------- PRESENT SERVICE -----------------*/
644 typedef struct Z_ElementSpec
647 #define Z_ElementSpec_elementSetName 0
648 #define Z_ElementSpec_externalSpec 1
651 char *elementSetName;
652 Z_External *externalSpec;
656 typedef struct Z_Specification
658 Odr_oid *schema; /* OPTIONAL */
659 Z_ElementSpec *elementSpec; /* OPTIONAL */
662 typedef struct Z_DbSpecific
665 Z_Specification *spec;
668 typedef struct Z_CompSpec
670 bool_t *selectAlternativeSyntax;
671 Z_Specification *generic; /* OPTIONAL */
673 Z_DbSpecific **dbSpecific; /* OPTIONAL */
674 int num_recordSyntax;
675 Odr_oid **recordSyntax; /* OPTIONAL */
678 typedef struct Z_RecordComposition
681 #define Z_RecordComp_simple 0
682 #define Z_RecordComp_complex 1
685 Z_ElementSetNames *simple;
688 } Z_RecordComposition;
690 typedef struct Z_Range
692 int *startingPosition;
693 int *numberOfRecords;
696 typedef struct Z_PresentRequest
698 Z_ReferenceId *referenceId; /* OPTIONAL */
699 Z_ResultSetId *resultSetId;
700 int *resultSetStartPoint;
701 int *numberOfRecordsRequested;
704 Z_Range **additionalRanges; /* OPTIONAL */
705 Z_RecordComposition *recordComposition; /* OPTIONAL */
707 Z_ElementSetNames *elementSetNames; /* OPTIONAL */
709 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
711 int *maxSegmentCount; /* OPTIONAL */
712 int *maxRecordSize; /* OPTIONAL */
713 int *maxSegmentSize; /* OPTIONAL */
714 Z_OtherInformation *otherInfo; /* OPTIONAL */
718 typedef struct Z_PresentResponse
720 Z_ReferenceId *referenceId; /* OPTIONAL */
721 int *numberOfRecordsReturned;
722 int *nextResultSetPosition;
726 Z_OtherInformation *otherInfo; /* OPTIONAL */
730 /* ------------------ RESOURCE CONTROL ----------------*/
732 typedef struct Z_TriggerResourceControlRequest
734 Z_ReferenceId *referenceId; /* OPTIONAL */
735 int *requestedAction;
736 #define Z_TriggerResourceCtrl_resourceReport 1
737 #define Z_TriggerResourceCtrl_resourceControl 2
738 #define Z_TriggerResourceCtrl_cancel 3
739 Odr_oid *prefResourceReportFormat; /* OPTIONAL */
740 bool_t *resultSetWanted; /* OPTIONAL */
742 Z_OtherInformation *otherInfo;
744 } Z_TriggerResourceControlRequest;
746 typedef struct Z_ResourceControlRequest
748 Z_ReferenceId *referenceId; /* OPTIONAL */
749 bool_t *suspendedFlag; /* OPTIONAL */
750 Z_External *resourceReport; /* OPTIONAL */
751 int *partialResultsAvailable; /* OPTIONAL */
752 #define Z_ResourceControlRequest_subset 1
753 #define Z_ResourceControlRequest_interim 2
754 #define Z_ResourceControlRequest_none 3
755 bool_t *responseRequired;
756 bool_t *triggeredRequestFlag; /* OPTIONAL */
758 Z_OtherInformation *otherInfo;
760 } Z_ResourceControlRequest;
762 typedef struct Z_ResourceControlResponse
764 Z_ReferenceId *referenceId; /* OPTIONAL */
765 bool_t *continueFlag;
766 bool_t *resultSetWanted; /* OPTIONAL */
768 Z_OtherInformation *otherInfo;
770 } Z_ResourceControlResponse;
773 /* ------------------ ACCESS CTRL SERVICE ----------------*/
775 typedef struct Z_AccessControlRequest
777 Z_ReferenceId *referenceId; /* OPTIONAL */
779 #define Z_AccessRequest_simpleForm 0
780 #define Z_AccessRequest_externallyDefined 1
784 Z_External *externallyDefined;
787 Z_OtherInformation *otherInfo; /* OPTIONAL */
789 } Z_AccessControlRequest;
791 typedef struct Z_AccessControlResponse
793 Z_ReferenceId *referenceId; /* OPTIONAL */
795 #define Z_AccessResponse_simpleForm 0
796 #define Z_AccessResponse_externallyDefined 1
800 Z_External *externallyDefined;
802 Z_DiagRec *diagnostic; /* OPTIONAL */
804 Z_OtherInformation *otherInfo; /* OPTIONAL */
806 } Z_AccessControlResponse;
808 /* ------------------------ SCAN SERVICE -------------------- */
810 typedef struct Z_AttributeList
813 Z_AttributeElement **attributes;
816 typedef struct Z_AlternativeTerm
819 Z_AttributesPlusTerm **terms;
822 typedef struct Z_OccurrenceByAttributes
824 Z_AttributeList *attributes;
827 #define Z_OByAtt_global 0
828 #define Z_ObyAtt_byDatabase 1
834 /* Z_ByDatabase *byDatabase; */
837 } Z_OccurrenceByAttributes;
839 typedef struct Z_TermInfo
842 Z_AttributeList *suggestedAttributes; /* OPTIONAL */
843 Z_AlternativeTerm *alternativeTerm; /* OPTIONAL */
844 int *globalOccurrences; /* OPTIONAL */
845 Z_OccurrenceByAttributes *byAttributes; /* OPTIONAL */
848 typedef struct Z_Entry
851 #define Z_Entry_termInfo 0
852 #define Z_Entry_surrogateDiagnostic 1
855 Z_TermInfo *termInfo;
856 Z_DiagRec *surrogateDiagnostic;
860 typedef struct Z_Entries
866 typedef struct Z_ListEntries
869 #define Z_ListEntries_entries 0
870 #define Z_ListEntries_nonSurrogateDiagnostics 1
874 Z_DiagRecs *nonSurrogateDiagnostics;
878 typedef struct Z_ScanRequest
880 Z_ReferenceId *referenceId; /* OPTIONAL */
881 int num_databaseNames;
882 char **databaseNames;
883 Odr_oid *attributeSet; /* OPTIONAL */
884 Z_AttributesPlusTerm *termListAndStartPoint;
885 int *stepSize; /* OPTIONAL */
886 int *numberOfTermsRequested;
887 int *preferredPositionInResponse; /* OPTIONAL */
889 Z_OtherInformation *otherInfo;
893 typedef struct Z_ScanResponse
895 Z_ReferenceId *referenceId; /* OPTIONAL */
896 int *stepSize; /* OPTIONAL */
898 #define Z_Scan_success 0
899 #define Z_Scan_partial_1 1
900 #define Z_Scan_partial_2 2
901 #define Z_Scan_partial_3 3
902 #define Z_Scan_partial_4 4
903 #define Z_Scan_partial_5 5
904 #define Z_Scan_failure 6
905 int *numberOfEntriesReturned;
906 int *positionOfTerm; /* OPTIONAL */
907 Z_ListEntries *entries; /* OPTIONAL */
908 Odr_oid *attributeSet; /* OPTIONAL */
910 Z_OtherInformation *otherInfo;
915 /* ------------------------ DELETE -------------------------- */
917 #define Z_DeleteStatus_success 0
918 #define Z_DeleteStatus_resultSetDidNotExist 1
919 #define Z_DeleteStatus_previouslyDeletedByTarget 2
920 #define Z_DeleteStatus_systemProblemAtTarget 3
921 #define Z_DeleteStatus_accessNotAllowed 4
922 #define Z_DeleteStatus_resourceControlAtOrigin 5
923 #define Z_DeleteStatus_resourceControlAtTarget 6
924 #define Z_DeleteStatus_bulkDeleteNotSupported 7
925 #define Z_DeleteStatus_notAllRsltSetsDeletedOnBulkDlte 8
926 #define Z_DeleteStatus_notAllRequestedResultSetsDeleted 9
927 #define Z_DeleteStatus_resultSetInUse 10
929 typedef struct Z_ListStatus
935 typedef struct Z_DeleteResultSetRequest
937 Z_ReferenceId *referenceId; /* OPTIONAL */
939 #define Z_DeleteRequest_list 0
940 #define Z_DeleteRequest_all 1
942 Z_ResultSetId **resultSetList; /* OPTIONAL */
944 Z_OtherInformation *otherInfo;
946 } Z_DeleteResultSetRequest;
948 typedef struct Z_DeleteResultSetResponse
950 Z_ReferenceId *referenceId; /* OPTIONAL */
951 int *deleteOperationStatus;
953 Z_ListStatus *deleteListStatuses; /* OPTIONAL */
954 int *numberNotDeleted; /* OPTIONAL */
955 int num_bulkStatuses;
956 Z_ListStatus *bulkStatuses; /* OPTIONAL */
957 char *deleteMessage; /* OPTIONAL */
959 Z_OtherInformation *otherInfo;
961 } Z_DeleteResultSetResponse;
963 /* ------------------------ CLOSE SERVICE ------------------- */
965 typedef struct Z_Close
967 Z_ReferenceId *referenceId; /* OPTIONAL */
969 #define Z_Close_finished 0
970 #define Z_Close_shutdown 1
971 #define Z_Close_systemProblem 2
972 #define Z_Close_costLimit 3
973 #define Z_Close_resources 4
974 #define Z_Close_securityViolation 5
975 #define Z_Close_protocolError 6
976 #define Z_Close_lackOfActivity 7
977 #define Z_Close_peerAbort 8
978 #define Z_Close_unspecified 9
979 char *diagnosticInformation; /* OPTIONAL */
980 Odr_oid *resourceReportFormat; /* OPTIONAL */
981 Z_External *resourceReport; /* OPTIONAL */
983 Z_OtherInformation *otherInfo; /* OPTIONAL */
987 /* ------------------------ SEGMENTATION -------------------- */
989 typedef struct Z_Segment
991 Z_ReferenceId *referenceId; /* OPTIONAL */
992 int *numberOfRecordsReturned;
993 int num_segmentRecords;
994 Z_NamePlusRecord **segmentRecords;
995 Z_OtherInformation *otherInfo; /* OPTIONAL */
998 /* ----------------------- Extended Services ---------------- */
1000 typedef struct Z_Permissions
1003 int num_allowableFunctions;
1004 int **allowableFunctions;
1005 #define Z_Permissions_delete 1
1006 #define Z_Permissions_modifyContents 2
1007 #define Z_Permissions_modifyPermissions 3
1008 #define Z_Permissions_present 4
1009 #define Z_Permissions_invoke 5
1012 typedef struct Z_ExtendedServicesRequest
1014 Z_ReferenceId *referenceId; /* OPTIONAL */
1016 #define Z_ExtendedServicesRequest_create 1
1017 #define Z_ExtendedServicesRequest_delete 2
1018 #define Z_ExtendedServicesRequest_modify 3
1019 Odr_oid *packageType;
1020 char *packageName; /* OPTIONAL */
1021 char *userId; /* OPTIONAL */
1022 Z_IntUnit *retentionTime; /* OPTIONAL */
1023 Z_Permissions *permissions; /* OPTIONAL */
1024 char *description; /* OPTIONAL */
1025 Z_External *taskSpecificParameters; /* OPTIONAL */
1027 #define Z_ExtendedServicesRequest_wait 1
1028 #define Z_ExtendedServicesRequest_waitIfPossible 2
1029 #define Z_ExtendedServicesRequest_dontWait 3
1030 #define Z_ExtendedServicesRequest_dontReturnPackage 4
1031 char *elements; /* OPTIONAL */
1032 Z_OtherInformation *otherInfo; /* OPTIONAL */
1033 } Z_ExtendedServicesRequest;
1035 typedef struct Z_ExtendedServicesResponse
1037 Z_ReferenceId *referenceId; /* OPTIONAL */
1038 int *operationStatus;
1039 #define Z_ExtendedServicesResponse_done 1
1040 #define Z_ExtendedServicesResponse_accepted 2
1041 #define Z_ExtendedServicesResponse_failure 3
1042 int num_diagnostics;
1043 Z_DiagRec **diagnostics; /* OPTIONAL */
1044 Z_External *taskPackage; /* OPTIONAL */
1045 Z_OtherInformation *otherInfo; /* OPTIONAL */
1046 } Z_ExtendedServicesResponse;
1048 /* ------------------------ APDU ---------------------------- */
1050 typedef struct Z_APDU
1053 #define Z_APDU_initRequest 0
1054 #define Z_APDU_initResponse 1
1055 #define Z_APDU_searchRequest 2
1056 #define Z_APDU_searchResponse 3
1057 #define Z_APDU_presentRequest 4
1058 #define Z_APDU_presentResponse 5
1059 #define Z_APDU_deleteResultSetRequest 6
1060 #define Z_APDU_deleteResultSetResponse 7
1061 #define Z_APDU_resourceControlRequest 8
1062 #define Z_APDU_resourceControlResponse 9
1063 #define Z_APDU_triggerResourceControlRequest 10
1064 #define Z_APDU_scanRequest 11
1065 #define Z_APDU_scanResponse 12
1066 #define Z_APDU_segmentRequest 13
1067 #define Z_APDU_extendedServicesRequest 14
1068 #define Z_APDU_extendedServicesResponse 15
1069 #define Z_APDU_close 16
1072 Z_InitRequest *initRequest;
1073 Z_InitResponse *initResponse;
1074 Z_SearchRequest *searchRequest;
1075 Z_SearchResponse *searchResponse;
1076 Z_PresentRequest *presentRequest;
1077 Z_PresentResponse *presentResponse;
1078 Z_DeleteResultSetRequest *deleteResultSetRequest;
1079 Z_DeleteResultSetResponse *deleteResultSetResponse;
1080 Z_ResourceControlRequest *resourceControlRequest;
1081 Z_ResourceControlResponse *resourceControlResponse;
1082 Z_TriggerResourceControlRequest *triggerResourceControlRequest;
1083 Z_ScanRequest *scanRequest;
1084 Z_ScanResponse *scanResponse;
1085 Z_Segment *segmentRequest;
1086 Z_ExtendedServicesRequest *extendedServicesRequest;
1087 Z_ExtendedServicesResponse *extendedServicesResponse;
1092 int z_APDU(ODR o, Z_APDU **p, int opt);
1093 int z_SUTRS(ODR o, Odr_oct **p, int opt);
1095 Z_InitRequest *zget_InitRequest(ODR o);
1096 Z_InitResponse *zget_InitResponse(ODR o);
1097 Z_SearchRequest *zget_SearchRequest(ODR o);
1098 Z_SearchResponse *zget_SearchResponse(ODR o);
1099 Z_PresentRequest *zget_PresentRequest(ODR o);
1100 Z_PresentResponse *zget_PresentResponse(ODR o);
1101 Z_DeleteResultSetRequest *zget_DeleteResultSetRequest(ODR o);
1102 Z_DeleteResultSetResponse *zget_DeleteResultSetResponse(ODR o);
1103 Z_ScanRequest *zget_ScanRequest(ODR o);
1104 Z_ScanResponse *zget_ScanResponse(ODR o);
1105 Z_TriggerResourceControlRequest *zget_TriggerResourceControlRequest(ODR o);
1106 Z_ResourceControlRequest *zget_ResourceControlRequest(ODR o);
1107 Z_ResourceControlResponse *zget_ResourceControlResponse(ODR o);
1108 Z_Close *zget_Close(ODR o);
1109 int z_InternationalString(ODR o, char **p, int opt);
1110 int z_OtherInformation(ODR o, Z_OtherInformation **p, int opt);
1111 int z_ElementSetName(ODR o, char **p, int opt);
1112 int z_IntUnit(ODR o, Z_IntUnit **p, int opt);
1113 int z_Unit(ODR o, Z_Unit **p, int opt);
1114 int z_DatabaseName(ODR o, Z_DatabaseName **p, int opt);
1115 int z_StringOrNumeric(ODR o, Z_StringOrNumeric **p, int opt);
1116 int z_OtherInformationUnit(ODR o, Z_OtherInformationUnit **p, int opt);
1117 int z_Term(ODR o, Z_Term **p, int opt);
1118 int z_Specification(ODR o, Z_Specification **p, int opt);
1119 int z_Permissions(ODR o, Z_Permissions **p, int opt);
1120 int z_DiagRec(ODR o, Z_DiagRec **p, int opt);
1121 int z_AttributeList(ODR o, Z_AttributeList **p, int opt);
1122 int z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt);
1123 Z_APDU *zget_APDU(ODR o, int which);
1125 #include <prt-rsc.h>
1126 #include <prt-acc.h>
1127 #include <prt-exp.h>
1128 #include <prt-grs.h>
1129 #include <prt-exd.h>
1130 #include <prt-dia.h>
1131 #include <prt-esp.h>
1133 #include <prt-ext.h>