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.31 1996-01-22 09:46:45 quinn
28 * Added Sort PDU. Moved StringList to main protocol file.
30 * Revision 1.30 1996/01/10 15:21:32 quinn
31 * Added links to access control PDUs
33 * Revision 1.29 1996/01/02 11:46:49 quinn
34 * Changed 'operator' to 'roperator' to avoid C++ conflict.
37 * Revision 1.28 1996/01/02 08:57:32 quinn
38 * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
40 * Revision 1.27 1995/10/12 10:34:46 quinn
43 * Revision 1.26 1995/09/29 17:12:08 quinn
46 * Revision 1.25 1995/09/27 15:02:49 quinn
47 * Modified function heads & prototypes.
49 * Revision 1.24 1995/08/29 11:17:43 quinn
50 * *** empty log message ***
52 * Revision 1.23 1995/08/21 09:10:36 quinn
53 * Smallish fixes to suppport new formats.
55 * Revision 1.22 1995/08/17 12:45:14 quinn
56 * Fixed minor problems with GRS-1. Added support in c&s.
58 * Revision 1.21 1995/08/15 12:00:11 quinn
61 * Revision 1.20 1995/08/10 08:54:35 quinn
64 * Revision 1.19 1995/06/19 12:38:28 quinn
65 * Reorganized include-files. Added small features.
67 * Revision 1.18 1995/06/16 13:16:05 quinn
68 * Fixed Defaultdiagformat.
70 * Revision 1.17 1995/06/15 15:42:05 quinn
73 * Revision 1.16 1995/06/15 07:45:06 quinn
76 * Revision 1.15 1995/06/14 15:26:43 quinn
77 * *** empty log message ***
79 * Revision 1.14 1995/06/07 14:42:34 quinn
82 * Revision 1.13 1995/06/07 14:36:47 quinn
85 * Revision 1.12 1995/06/05 10:53:13 quinn
88 * Revision 1.11 1995/06/02 09:49:47 quinn
91 * Revision 1.10 1995/05/29 08:11:34 quinn
92 * Moved oid from odr/asn to util.
94 * Revision 1.9 1995/05/22 11:31:25 quinn
97 * Revision 1.8 1995/05/17 08:41:35 quinn
98 * Added delete to proto & other little things.
99 * Relaying auth info to backend.
101 * Revision 1.7 1995/05/16 08:50:37 quinn
102 * License, documentation, and memory fixes
104 * Revision 1.6 1995/05/15 11:55:55 quinn
105 * Work on asynchronous activity.
107 * Revision 1.5 1995/04/17 11:28:18 quinn
110 * Revision 1.4 1995/04/10 10:22:47 quinn
113 * Revision 1.3 1995/03/30 12:18:09 quinn
116 * Revision 1.2 1995/03/30 10:26:48 quinn
117 * Added Term structure
119 * Revision 1.1 1995/03/30 09:39:42 quinn
120 * Moved .h files to include directory
122 * Revision 1.11 1995/03/30 09:08:44 quinn
123 * Added Resource control protocol
125 * Revision 1.10 1995/03/29 15:39:39 quinn
126 * Adding some resource control elements, and a null-check to getentbyoid
128 * Revision 1.9 1995/03/29 08:06:18 quinn
129 * Added a few v3 elements
131 * Revision 1.8 1995/03/22 10:12:49 quinn
132 * Added Z_PRES constants.
134 * Revision 1.7 1995/03/20 09:45:12 quinn
137 * Revision 1.5 1995/03/07 16:29:34 quinn
138 * Added authentication stuff.
140 * Revision 1.4 1995/03/07 10:13:00 quinn
141 * Added prototype for z_APDU()
143 * Revision 1.3 1995/02/14 11:54:23 quinn
146 * Revision 1.2 1995/02/09 15:51:40 quinn
149 * Revision 1.1 1995/02/06 16:44:48 quinn
150 * First hack at Z/SR protocol
161 #include <yaz-version.h>
164 * Because we didn't have time to put all of the extra v3 elements in here
165 * before the first applications were written, we have to place them
166 * in #ifdefs in places where they would break existing code. If you are
167 * developing new stuff, we urge you to leave them in, even if you don't
168 * intend to use any v3 features. When we are comfortable that the old
169 * apps have been updated, we'll remove the #ifdefs.
174 /* ----------------- GLOBAL AUXILIARY DEFS ----------------*/
177 typedef struct Z_External Z_External;
179 typedef Odr_oct Z_ReferenceId;
180 typedef char Z_DatabaseName;
181 typedef char Z_ResultSetId;
182 typedef Odr_oct Z_ResultsetId;
184 typedef struct Z_InfoCategory
186 Odr_oid *categoryTypeId; /* OPTIONAL */
190 typedef struct Z_OtherInformationUnit
192 Z_InfoCategory *category; /* OPTIONAL */
194 #define Z_OtherInfo_characterInfo 0
195 #define Z_OtherInfo_binaryInfo 1
196 #define Z_OtherInfo_externallyDefinedInfo 2
197 #define Z_OtherInfo_oid 3
202 Z_External *externallyDefinedInfo;
205 } Z_OtherInformationUnit;
207 typedef struct Z_OtherInformation
210 Z_OtherInformationUnit **list;
211 } Z_OtherInformation;
213 typedef struct Z_StringOrNumeric
216 #define Z_StringOrNumeric_string 0
217 #define Z_StringOrNumeric_numeric 1
225 typedef struct Z_Unit
227 char *unitSystem; /* OPTIONAL */
228 Z_StringOrNumeric *unitType; /* OPTIONAL */
229 Z_StringOrNumeric *unit; /* OPTIONAL */
230 int *scaleFactor; /* OPTIONAL */
233 typedef struct Z_IntUnit
239 typedef Odr_oct Z_SUTRS;
241 typedef struct Z_StringList
247 /* ----------------- INIT SERVICE ----------------*/
251 char *groupId; /* OPTIONAL */
252 char *userId; /* OPTIONAL */
253 char *password; /* OPTIONAL */
256 typedef struct Z_IdAuthentication
259 #define Z_IdAuthentication_open 0
260 #define Z_IdAuthentication_idPass 1
261 #define Z_IdAuthentication_anonymous 2
262 #define Z_IdAuthentication_other 3
270 } Z_IdAuthentication;
272 #define Z_ProtocolVersion_1 0
273 #define Z_ProtocolVersion_2 1
274 #define Z_ProtocolVersion_3 2
276 #define Z_Options_search 0
277 #define Z_Options_present 1
278 #define Z_Options_delSet 2
279 #define Z_Options_resourceReport 3
280 #define Z_Options_triggerResourceCtrl 4
281 #define Z_Options_resourceCtrl 5
282 #define Z_Options_accessCtrl 6
283 #define Z_Options_scan 7
284 #define Z_Options_sort 8
285 #define Z_Options_reserved 9
286 #define Z_Options_extendedServices 10
287 #define Z_Options_level_1Segmentation 11
288 #define Z_Options_level_2Segmentation 12
289 #define Z_Options_concurrentOperations 13
290 #define Z_Options_namedResultSets 14
292 typedef struct Z_InitRequest
294 Z_ReferenceId *referenceId; /* OPTIONAL */
295 Odr_bitmask *protocolVersion;
296 Odr_bitmask *options;
297 int *preferredMessageSize;
298 int *maximumRecordSize;
299 Z_IdAuthentication* idAuthentication; /* OPTIONAL */
300 char *implementationId; /* OPTIONAL */
301 char *implementationName; /* OPTIONAL */
302 char *implementationVersion; /* OPTIONAL */
303 Z_External *userInformationField; /* OPTIONAL */
305 Z_OtherInformation *otherInfo; /* OPTIONAL */
309 typedef struct Z_InitResponse
311 Z_ReferenceId *referenceId; /* OPTIONAL */
312 Odr_bitmask *protocolVersion;
313 Odr_bitmask *options;
314 int *preferredMessageSize;
315 int *maximumRecordSize;
317 char *implementationId; /* OPTIONAL */
318 char *implementationName; /* OPTIONAL */
319 char *implementationVersion; /* OPTIONAL */
320 Z_External *userInformationField; /* OPTIONAL */
322 Z_OtherInformation *otherInfo; /* OPTIONAL */
326 typedef struct Z_NSRAuthentication
331 } Z_NSRAuthentication;
333 int z_NSRAuthentication(ODR o, Z_NSRAuthentication **p, int opt);
335 int z_StrAuthentication(ODR o, char **p, int opt);
337 /* ------------------ SEARCH SERVICE ----------------*/
339 typedef struct Z_DatabaseSpecificUnit
342 char *elementSetName;
343 } Z_DatabaseSpecificUnit;
345 typedef struct Z_DatabaseSpecific
348 Z_DatabaseSpecificUnit **elements;
349 } Z_DatabaseSpecific;
351 typedef struct Z_ElementSetNames
354 #define Z_ElementSetNames_generic 0
355 #define Z_ElementSetNames_databaseSpecific 1
359 Z_DatabaseSpecific *databaseSpecific;
363 /* ---------------------- RPN QUERY --------------------------- */
365 typedef struct Z_ComplexAttribute
368 Z_StringOrNumeric **list;
369 int num_semanticAction;
370 int **semanticAction; /* OPTIONAL */
371 } Z_ComplexAttribute;
373 typedef struct Z_AttributeElement
376 Odr_oid *attributeSet; /* OPTIONAL - v3 only */
381 #define Z_AttributeValue_numeric 0
382 #define Z_AttributeValue_complex 1
386 Z_ComplexAttribute *complex;
391 } Z_AttributeElement;
393 typedef struct Z_Term
396 #define Z_Term_general 0
397 #define Z_Term_numeric 1
398 #define Z_Term_characterString 2
400 #define Z_Term_dateTime 4
401 #define Z_Term_external 5
402 #define Z_Term_integerAndUnit 6
403 #define Z_Term_null 7
406 Odr_oct *general; /* this is required for v2 */
408 char *characterString;
411 Z_External *external;
412 /* Z_IntUnit *integerAndUnit; */
417 typedef struct Z_AttributesPlusTerm
420 Z_AttributeElement **attributeList;
422 } Z_AttributesPlusTerm;
424 typedef struct Z_ResultSetPlusAttributes
428 Z_AttributeElement **attributeList;
429 } Z_ResultSetPlusAttributes;
431 typedef struct Z_ProximityOperator
433 bool_t *exclusion; /* OPTIONAL */
437 #define Z_Prox_lessThan 1
438 #define Z_Prox_lessThanOrEqual 2
439 #define Z_Prox_equal 3
440 #define Z_Prox_greaterThanOrEqual 4
441 #define Z_Prox_greaterThan 5
442 #define Z_Prox_notEqual 6
444 #define Z_ProxCode_known 0
445 #define Z_ProxCode_private 1
446 int *proximityUnitCode;
447 #define Z_ProxUnit_character 1
448 #define Z_ProxUnit_word 2
449 #define Z_ProxUnit_sentence 3
450 #define Z_ProxUnit_paragraph 4
451 #define Z_ProxUnit_section 5
452 #define Z_ProxUnit_chapter 6
453 #define Z_ProxUnit_document 7
454 #define Z_ProxUnit_element 8
455 #define Z_ProxUnit_subelement 9
456 #define Z_ProxUnit_elementType 10
457 #define Z_ProxUnit_byte 11 /* v3 only */
458 } Z_ProximityOperator;
460 typedef struct Z_Operator
463 #define Z_Operator_and 0
464 #define Z_Operator_or 1
465 #define Z_Operator_and_not 2
466 #define Z_Operator_prox 3
469 Odr_null *and; /* these guys are nulls. */
472 Z_ProximityOperator *prox;
476 typedef struct Z_Operand
479 #define Z_Operand_APT 0
480 #define Z_Operand_resultSetId 1
481 #define Z_Operand_resultAttr /* v3 only */ 2
484 Z_AttributesPlusTerm *attributesPlusTerm;
485 Z_ResultSetId *resultSetId;
486 Z_ResultSetPlusAttributes *resultAttr;
490 typedef struct Z_Complex
492 struct Z_RPNStructure *s1;
493 struct Z_RPNStructure *s2;
494 Z_Operator *roperator;
497 typedef struct Z_RPNStructure
500 #define Z_RPNStructure_simple 0
501 #define Z_RPNStructure_complex 1
509 typedef struct Z_RPNQuery
511 Odr_oid *attributeSetId;
512 Z_RPNStructure *RPNStructure;
515 /* -------------------------- SEARCHREQUEST -------------------------- */
517 typedef struct Z_Query
520 #define Z_Query_type_1 1
521 #define Z_Query_type_2 2
522 #define Z_Query_type_101 3
527 Z_RPNQuery *type_101;
531 typedef struct Z_SearchRequest
533 Z_ReferenceId *referenceId; /* OPTIONAL */
534 int *smallSetUpperBound;
535 int *largeSetLowerBound;
536 int *mediumSetPresentNumber;
537 bool_t *replaceIndicator;
539 int num_databaseNames;
540 char **databaseNames;
541 Z_ElementSetNames *smallSetElementSetNames; /* OPTIONAL */
542 Z_ElementSetNames *mediumSetElementSetNames; /* OPTIONAL */
543 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
546 Z_OtherInformation *additionalSearchInfo; /* OPTIONAL */
547 Z_OtherInformation *otherInfo; /* OPTIONAL */
551 /* ------------------------ RECORD -------------------------- */
553 typedef Z_External Z_DatabaseRecord;
557 typedef struct Z_DefaultDiagFormat
559 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
561 /* until the whole character set issue becomes more definite,
562 * you can probably ignore this on input. */
564 #define Z_DiagForm_v2AddInfo 0
565 #define Z_DiagForm_v3AddInfo 1
567 } Z_DefaultDiagFormat;
569 typedef struct Z_DiagRec
572 #define Z_DiagRec_defaultFormat 0
573 #define Z_DiagRec_externallyDefined 1
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 */
602 #define Z_NamePlusRecord_databaseRecord 0
603 #define Z_NamePlusRecord_surrogateDiagnostic 1
606 Z_DatabaseRecord *databaseRecord;
607 Z_DiagRec *surrogateDiagnostic;
611 typedef struct Z_NamePlusRecordList
614 Z_NamePlusRecord **records;
615 } Z_NamePlusRecordList;
617 typedef struct Z_Records
620 #define Z_Records_DBOSD 0
621 #define Z_Records_NSD 1
622 #define Z_Records_multipleNSD 2
625 Z_NamePlusRecordList *databaseOrSurDiagnostics;
626 Z_DiagRec *nonSurrogateDiagnostic;
627 Z_DiagRecs *multipleNonSurDiagnostics;
631 /* ------------------------ SEARCHRESPONSE ------------------ */
633 typedef struct Z_SearchResponse
635 Z_ReferenceId *referenceId; /* OPTIONAL */
637 int *numberOfRecordsReturned;
638 int *nextResultSetPosition;
639 bool_t *searchStatus;
640 int *resultSetStatus; /* OPTIONAL */
641 #define Z_RES_SUBSET 1
642 #define Z_RES_INTERIM 2
644 int *presentStatus; /* OPTIONAL */
645 #define Z_PRES_SUCCESS 0
646 #define Z_PRES_PARTIAL_1 1
647 #define Z_PRES_PARTIAL_2 2
648 #define Z_PRES_PARTIAL_3 3
649 #define Z_PRES_PARTIAL_4 4
650 #define Z_PRES_FAILURE 5
651 Z_Records *records; /* OPTIONAL */
653 Z_OtherInformation *additionalSearchInfo;
654 Z_OtherInformation *otherInfo;
658 /* ------------------------- PRESENT SERVICE -----------------*/
660 typedef struct Z_ElementSpec
663 #define Z_ElementSpec_elementSetName 0
664 #define Z_ElementSpec_externalSpec 1
667 char *elementSetName;
668 Z_External *externalSpec;
672 typedef struct Z_Specification
674 Odr_oid *schema; /* OPTIONAL */
675 Z_ElementSpec *elementSpec; /* OPTIONAL */
678 typedef struct Z_DbSpecific
681 Z_Specification *spec;
684 typedef struct Z_CompSpec
686 bool_t *selectAlternativeSyntax;
687 Z_Specification *generic; /* OPTIONAL */
689 Z_DbSpecific **dbSpecific; /* OPTIONAL */
690 int num_recordSyntax;
691 Odr_oid **recordSyntax; /* OPTIONAL */
694 typedef struct Z_RecordComposition
697 #define Z_RecordComp_simple 0
698 #define Z_RecordComp_complex 1
701 Z_ElementSetNames *simple;
704 } Z_RecordComposition;
706 typedef struct Z_Range
708 int *startingPosition;
709 int *numberOfRecords;
712 typedef struct Z_PresentRequest
714 Z_ReferenceId *referenceId; /* OPTIONAL */
715 Z_ResultSetId *resultSetId;
716 int *resultSetStartPoint;
717 int *numberOfRecordsRequested;
720 Z_Range **additionalRanges; /* OPTIONAL */
721 Z_RecordComposition *recordComposition; /* OPTIONAL */
723 Z_ElementSetNames *elementSetNames; /* OPTIONAL */
725 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
727 int *maxSegmentCount; /* OPTIONAL */
728 int *maxRecordSize; /* OPTIONAL */
729 int *maxSegmentSize; /* OPTIONAL */
730 Z_OtherInformation *otherInfo; /* OPTIONAL */
734 typedef struct Z_PresentResponse
736 Z_ReferenceId *referenceId; /* OPTIONAL */
737 int *numberOfRecordsReturned;
738 int *nextResultSetPosition;
742 Z_OtherInformation *otherInfo; /* OPTIONAL */
746 /* ------------------ RESOURCE CONTROL ----------------*/
748 typedef struct Z_TriggerResourceControlRequest
750 Z_ReferenceId *referenceId; /* OPTIONAL */
751 int *requestedAction;
752 #define Z_TriggerResourceCtrl_resourceReport 1
753 #define Z_TriggerResourceCtrl_resourceControl 2
754 #define Z_TriggerResourceCtrl_cancel 3
755 Odr_oid *prefResourceReportFormat; /* OPTIONAL */
756 bool_t *resultSetWanted; /* OPTIONAL */
758 Z_OtherInformation *otherInfo;
760 } Z_TriggerResourceControlRequest;
762 typedef struct Z_ResourceControlRequest
764 Z_ReferenceId *referenceId; /* OPTIONAL */
765 bool_t *suspendedFlag; /* OPTIONAL */
766 Z_External *resourceReport; /* OPTIONAL */
767 int *partialResultsAvailable; /* OPTIONAL */
768 #define Z_ResourceControlRequest_subset 1
769 #define Z_ResourceControlRequest_interim 2
770 #define Z_ResourceControlRequest_none 3
771 bool_t *responseRequired;
772 bool_t *triggeredRequestFlag; /* OPTIONAL */
774 Z_OtherInformation *otherInfo;
776 } Z_ResourceControlRequest;
778 typedef struct Z_ResourceControlResponse
780 Z_ReferenceId *referenceId; /* OPTIONAL */
781 bool_t *continueFlag;
782 bool_t *resultSetWanted; /* OPTIONAL */
784 Z_OtherInformation *otherInfo;
786 } Z_ResourceControlResponse;
789 /* ------------------ ACCESS CTRL SERVICE ----------------*/
791 typedef struct Z_AccessControlRequest
793 Z_ReferenceId *referenceId; /* OPTIONAL */
795 #define Z_AccessRequest_simpleForm 0
796 #define Z_AccessRequest_externallyDefined 1
800 Z_External *externallyDefined;
803 Z_OtherInformation *otherInfo; /* OPTIONAL */
805 } Z_AccessControlRequest;
807 typedef struct Z_AccessControlResponse
809 Z_ReferenceId *referenceId; /* OPTIONAL */
811 #define Z_AccessResponse_simpleForm 0
812 #define Z_AccessResponse_externallyDefined 1
816 Z_External *externallyDefined;
818 Z_DiagRec *diagnostic; /* OPTIONAL */
820 Z_OtherInformation *otherInfo; /* OPTIONAL */
822 } Z_AccessControlResponse;
824 /* ------------------------ SCAN SERVICE -------------------- */
826 typedef struct Z_AttributeList
829 Z_AttributeElement **attributes;
832 typedef struct Z_AlternativeTerm
835 Z_AttributesPlusTerm **terms;
838 typedef struct Z_OccurrenceByAttributes
840 Z_AttributeList *attributes;
843 #define Z_OByAtt_global 0
844 #define Z_ObyAtt_byDatabase 1
850 /* Z_ByDatabase *byDatabase; */
853 } Z_OccurrenceByAttributes;
855 typedef struct Z_TermInfo
858 Z_AttributeList *suggestedAttributes; /* OPTIONAL */
859 Z_AlternativeTerm *alternativeTerm; /* OPTIONAL */
860 int *globalOccurrences; /* OPTIONAL */
861 Z_OccurrenceByAttributes *byAttributes; /* OPTIONAL */
864 typedef struct Z_Entry
867 #define Z_Entry_termInfo 0
868 #define Z_Entry_surrogateDiagnostic 1
871 Z_TermInfo *termInfo;
872 Z_DiagRec *surrogateDiagnostic;
876 typedef struct Z_Entries
882 typedef struct Z_ListEntries
885 #define Z_ListEntries_entries 0
886 #define Z_ListEntries_nonSurrogateDiagnostics 1
890 Z_DiagRecs *nonSurrogateDiagnostics;
894 typedef struct Z_ScanRequest
896 Z_ReferenceId *referenceId; /* OPTIONAL */
897 int num_databaseNames;
898 char **databaseNames;
899 Odr_oid *attributeSet; /* OPTIONAL */
900 Z_AttributesPlusTerm *termListAndStartPoint;
901 int *stepSize; /* OPTIONAL */
902 int *numberOfTermsRequested;
903 int *preferredPositionInResponse; /* OPTIONAL */
905 Z_OtherInformation *otherInfo;
909 typedef struct Z_ScanResponse
911 Z_ReferenceId *referenceId; /* OPTIONAL */
912 int *stepSize; /* OPTIONAL */
914 #define Z_Scan_success 0
915 #define Z_Scan_partial_1 1
916 #define Z_Scan_partial_2 2
917 #define Z_Scan_partial_3 3
918 #define Z_Scan_partial_4 4
919 #define Z_Scan_partial_5 5
920 #define Z_Scan_failure 6
921 int *numberOfEntriesReturned;
922 int *positionOfTerm; /* OPTIONAL */
923 Z_ListEntries *entries; /* OPTIONAL */
924 Odr_oid *attributeSet; /* OPTIONAL */
926 Z_OtherInformation *otherInfo;
931 /* ------------------------ DELETE -------------------------- */
933 #define Z_DeleteStatus_success 0
934 #define Z_DeleteStatus_resultSetDidNotExist 1
935 #define Z_DeleteStatus_previouslyDeletedByTarget 2
936 #define Z_DeleteStatus_systemProblemAtTarget 3
937 #define Z_DeleteStatus_accessNotAllowed 4
938 #define Z_DeleteStatus_resourceControlAtOrigin 5
939 #define Z_DeleteStatus_resourceControlAtTarget 6
940 #define Z_DeleteStatus_bulkDeleteNotSupported 7
941 #define Z_DeleteStatus_notAllRsltSetsDeletedOnBulkDlte 8
942 #define Z_DeleteStatus_notAllRequestedResultSetsDeleted 9
943 #define Z_DeleteStatus_resultSetInUse 10
945 typedef struct Z_ListStatus
951 typedef struct Z_DeleteResultSetRequest
953 Z_ReferenceId *referenceId; /* OPTIONAL */
955 #define Z_DeleteRequest_list 0
956 #define Z_DeleteRequest_all 1
958 Z_ResultSetId **resultSetList; /* OPTIONAL */
960 Z_OtherInformation *otherInfo;
962 } Z_DeleteResultSetRequest;
964 typedef struct Z_DeleteResultSetResponse
966 Z_ReferenceId *referenceId; /* OPTIONAL */
967 int *deleteOperationStatus;
969 Z_ListStatus *deleteListStatuses; /* OPTIONAL */
970 int *numberNotDeleted; /* OPTIONAL */
971 int num_bulkStatuses;
972 Z_ListStatus *bulkStatuses; /* OPTIONAL */
973 char *deleteMessage; /* OPTIONAL */
975 Z_OtherInformation *otherInfo;
977 } Z_DeleteResultSetResponse;
979 /* ------------------------ CLOSE SERVICE ------------------- */
981 typedef struct Z_Close
983 Z_ReferenceId *referenceId; /* OPTIONAL */
985 #define Z_Close_finished 0
986 #define Z_Close_shutdown 1
987 #define Z_Close_systemProblem 2
988 #define Z_Close_costLimit 3
989 #define Z_Close_resources 4
990 #define Z_Close_securityViolation 5
991 #define Z_Close_protocolError 6
992 #define Z_Close_lackOfActivity 7
993 #define Z_Close_peerAbort 8
994 #define Z_Close_unspecified 9
995 char *diagnosticInformation; /* OPTIONAL */
996 Odr_oid *resourceReportFormat; /* OPTIONAL */
997 Z_External *resourceReport; /* OPTIONAL */
999 Z_OtherInformation *otherInfo; /* OPTIONAL */
1003 /* ------------------------ SEGMENTATION -------------------- */
1005 typedef struct Z_Segment
1007 Z_ReferenceId *referenceId; /* OPTIONAL */
1008 int *numberOfRecordsReturned;
1009 int num_segmentRecords;
1010 Z_NamePlusRecord **segmentRecords;
1011 Z_OtherInformation *otherInfo; /* OPTIONAL */
1014 /* ----------------------- Extended Services ---------------- */
1016 typedef struct Z_Permissions
1019 int num_allowableFunctions;
1020 int **allowableFunctions;
1021 #define Z_Permissions_delete 1
1022 #define Z_Permissions_modifyContents 2
1023 #define Z_Permissions_modifyPermissions 3
1024 #define Z_Permissions_present 4
1025 #define Z_Permissions_invoke 5
1028 typedef struct Z_ExtendedServicesRequest
1030 Z_ReferenceId *referenceId; /* OPTIONAL */
1032 #define Z_ExtendedServicesRequest_create 1
1033 #define Z_ExtendedServicesRequest_delete 2
1034 #define Z_ExtendedServicesRequest_modify 3
1035 Odr_oid *packageType;
1036 char *packageName; /* OPTIONAL */
1037 char *userId; /* OPTIONAL */
1038 Z_IntUnit *retentionTime; /* OPTIONAL */
1039 Z_Permissions *permissions; /* OPTIONAL */
1040 char *description; /* OPTIONAL */
1041 Z_External *taskSpecificParameters; /* OPTIONAL */
1043 #define Z_ExtendedServicesRequest_wait 1
1044 #define Z_ExtendedServicesRequest_waitIfPossible 2
1045 #define Z_ExtendedServicesRequest_dontWait 3
1046 #define Z_ExtendedServicesRequest_dontReturnPackage 4
1047 char *elements; /* OPTIONAL */
1048 Z_OtherInformation *otherInfo; /* OPTIONAL */
1049 } Z_ExtendedServicesRequest;
1051 typedef struct Z_ExtendedServicesResponse
1053 Z_ReferenceId *referenceId; /* OPTIONAL */
1054 int *operationStatus;
1055 #define Z_ExtendedServicesResponse_done 1
1056 #define Z_ExtendedServicesResponse_accepted 2
1057 #define Z_ExtendedServicesResponse_failure 3
1058 int num_diagnostics;
1059 Z_DiagRec **diagnostics; /* OPTIONAL */
1060 Z_External *taskPackage; /* OPTIONAL */
1061 Z_OtherInformation *otherInfo; /* OPTIONAL */
1062 } Z_ExtendedServicesResponse;
1064 /* ------------------------ Sort --------------------------- */
1066 typedef struct Z_SortAttributes
1069 Z_AttributeList *list;
1072 typedef struct Z_SortKey
1075 #define Z_SortKey_sortField 0
1076 #define Z_SortKey_elementSpec 1
1077 #define Z_SortKey_sortAttributes 2
1081 Z_Specification *elementSpec;
1082 Z_SortAttributes *sortAttributes;
1086 typedef struct Z_SortDbSpecific
1092 typedef struct Z_SortDbSpecificList
1095 Z_SortDbSpecific **dbSpecific;
1096 } Z_SortDbSpecificList;
1098 typedef struct Z_SortElement
1101 #define Z_SortElement_generic 0
1102 #define Z_SortElement_databaseSpecific 1
1106 Z_SortDbSpecificList *databaseSpecific;
1110 typedef struct Z_SortMissingValueAction
1113 #define Z_SortMissingValAct_abort 0
1114 #define Z_SortMissingValAct_null 1
1115 #define Z_SortMissingValAct_valData 2
1122 } Z_SortMissingValueAction;
1124 typedef struct Z_SortKeySpec
1126 Z_SortElement *sortElement;
1128 #define Z_SortRelation_ascending 0
1129 #define Z_SortRelation_descending 1
1130 #define Z_SortRelation_ascendingByFreq 3
1131 #define Z_SortRelation_descendingByFreq 4
1132 int *caseSensitivity;
1133 #define Z_SortCase_caseSensitive 0
1134 #define Z_SortCase_caseInsensitive 1
1135 Z_SortMissingValueAction *missingValueAction; /* OPTIONAL */
1138 typedef struct Z_SortResponse
1140 Z_ReferenceId *referenceId; /* OPTIONAL */
1142 #define Z_SortStatus_success 0
1143 #define Z_SortStatus_partial_1 1
1144 #define Z_SortStatus_failure 2
1145 int *resultSetStatus; /* OPTIONAL */
1146 #define Z_SortResultSetStatus_empty 1
1147 #define Z_SortResultSetStatus_interim 2
1148 #define Z_SortResultSetStatus_unchanged 3
1149 #define Z_SortResultSetStatus_none 4
1150 Z_DiagRecs *diagnostics; /* OPTIONAL */
1151 Z_OtherInformation *otherInfo; /* OPTIONAL */
1154 typedef struct Z_SortKeySpecList
1157 Z_SortKeySpec **specs;
1158 } Z_SortKeySpecList;
1160 typedef struct Z_SortRequest
1162 Z_ReferenceId *referenceId; /* OPTIONAL */
1163 Z_StringList *inputResultSetNames;
1164 char *sortedResultSetName;
1165 Z_SortKeySpecList *sortSequence;
1166 Z_OtherInformation *otherInfo; /* OPTIONAL */
1169 /* ------------------------ APDU ---------------------------- */
1171 typedef struct Z_APDU
1174 #define Z_APDU_initRequest 0
1175 #define Z_APDU_initResponse 1
1176 #define Z_APDU_searchRequest 2
1177 #define Z_APDU_searchResponse 3
1178 #define Z_APDU_presentRequest 4
1179 #define Z_APDU_presentResponse 5
1180 #define Z_APDU_deleteResultSetRequest 6
1181 #define Z_APDU_deleteResultSetResponse 7
1182 #define Z_APDU_resourceControlRequest 8
1183 #define Z_APDU_resourceControlResponse 9
1184 #define Z_APDU_triggerResourceControlRequest 10
1185 #define Z_APDU_scanRequest 11
1186 #define Z_APDU_scanResponse 12
1187 #define Z_APDU_segmentRequest 13
1188 #define Z_APDU_extendedServicesRequest 14
1189 #define Z_APDU_extendedServicesResponse 15
1190 #define Z_APDU_close 16
1191 #define Z_APDU_accessControlRequest 17
1192 #define Z_APDU_accessControlResponse 18
1193 #define Z_APDU_sortRequest 20
1194 #define Z_APDU_sortResponse 21
1197 Z_InitRequest *initRequest;
1198 Z_InitResponse *initResponse;
1199 Z_SearchRequest *searchRequest;
1200 Z_SearchResponse *searchResponse;
1201 Z_PresentRequest *presentRequest;
1202 Z_PresentResponse *presentResponse;
1203 Z_DeleteResultSetRequest *deleteResultSetRequest;
1204 Z_DeleteResultSetResponse *deleteResultSetResponse;
1205 Z_AccessControlRequest *accessControlRequest;
1206 Z_AccessControlResponse *accessControlResponse;
1207 Z_ResourceControlRequest *resourceControlRequest;
1208 Z_ResourceControlResponse *resourceControlResponse;
1209 Z_TriggerResourceControlRequest *triggerResourceControlRequest;
1210 Z_ScanRequest *scanRequest;
1211 Z_ScanResponse *scanResponse;
1212 Z_SortRequest *sortRequest;
1213 Z_SortResponse *sortResponse;
1214 Z_Segment *segmentRequest;
1215 Z_ExtendedServicesRequest *extendedServicesRequest;
1216 Z_ExtendedServicesResponse *extendedServicesResponse;
1221 int z_APDU(ODR o, Z_APDU **p, int opt);
1222 int z_SUTRS(ODR o, Odr_oct **p, int opt);
1224 Z_InitRequest *zget_InitRequest(ODR o);
1225 Z_InitResponse *zget_InitResponse(ODR o);
1226 Z_SearchRequest *zget_SearchRequest(ODR o);
1227 Z_SearchResponse *zget_SearchResponse(ODR o);
1228 Z_PresentRequest *zget_PresentRequest(ODR o);
1229 Z_PresentResponse *zget_PresentResponse(ODR o);
1230 Z_DeleteResultSetRequest *zget_DeleteResultSetRequest(ODR o);
1231 Z_DeleteResultSetResponse *zget_DeleteResultSetResponse(ODR o);
1232 Z_ScanRequest *zget_ScanRequest(ODR o);
1233 Z_ScanResponse *zget_ScanResponse(ODR o);
1234 Z_TriggerResourceControlRequest *zget_TriggerResourceControlRequest(ODR o);
1235 Z_ResourceControlRequest *zget_ResourceControlRequest(ODR o);
1236 Z_ResourceControlResponse *zget_ResourceControlResponse(ODR o);
1237 Z_Close *zget_Close(ODR o);
1238 int z_StringList(ODR o, Z_StringList **p, int opt);
1239 int z_InternationalString(ODR o, char **p, int opt);
1240 int z_OtherInformation(ODR o, Z_OtherInformation **p, int opt);
1241 int z_ElementSetName(ODR o, char **p, int opt);
1242 int z_IntUnit(ODR o, Z_IntUnit **p, int opt);
1243 int z_Unit(ODR o, Z_Unit **p, int opt);
1244 int z_DatabaseName(ODR o, Z_DatabaseName **p, int opt);
1245 int z_StringOrNumeric(ODR o, Z_StringOrNumeric **p, int opt);
1246 int z_OtherInformationUnit(ODR o, Z_OtherInformationUnit **p, int opt);
1247 int z_Term(ODR o, Z_Term **p, int opt);
1248 int z_Specification(ODR o, Z_Specification **p, int opt);
1249 int z_Permissions(ODR o, Z_Permissions **p, int opt);
1250 int z_DiagRec(ODR o, Z_DiagRec **p, int opt);
1251 int z_AttributeList(ODR o, Z_AttributeList **p, int opt);
1252 int z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt);
1253 Z_APDU *zget_APDU(ODR o, int which);
1255 #include <prt-rsc.h>
1256 #include <prt-acc.h>
1257 #include <prt-exp.h>
1258 #include <prt-grs.h>
1259 #include <prt-exd.h>
1260 #include <prt-dia.h>
1261 #include <prt-esp.h>
1263 #include <prt-ext.h>