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.39 1997-05-14 06:53:44 adam
30 * Revision 1.38 1997/04/30 08:52:09 quinn
33 * Revision 1.37 1996/10/09 15:54:58 quinn
34 * Added SearchInfoReport
36 * Revision 1.36 1996/10/07 15:29:20 quinn
39 * Revision 1.35 1996/06/10 08:57:38 quinn
40 * Added OPAC, ResourceReport
42 * Revision 1.34 1996/06/10 08:55:36 quinn
45 * Revision 1.33 1996/02/23 10:00:51 quinn
48 * Revision 1.32 1996/02/20 12:52:39 quinn
51 * Revision 1.31 1996/01/22 09:46:45 quinn
52 * Added Sort PDU. Moved StringList to main protocol file.
54 * Revision 1.30 1996/01/10 15:21:32 quinn
55 * Added links to access control PDUs
57 * Revision 1.29 1996/01/02 11:46:49 quinn
58 * Changed 'operator' to 'roperator' to avoid C++ conflict.
61 * Revision 1.28 1996/01/02 08:57:32 quinn
62 * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
64 * Revision 1.27 1995/10/12 10:34:46 quinn
67 * Revision 1.26 1995/09/29 17:12:08 quinn
70 * Revision 1.25 1995/09/27 15:02:49 quinn
71 * Modified function heads & prototypes.
73 * Revision 1.24 1995/08/29 11:17:43 quinn
74 * *** empty log message ***
76 * Revision 1.23 1995/08/21 09:10:36 quinn
77 * Smallish fixes to suppport new formats.
79 * Revision 1.22 1995/08/17 12:45:14 quinn
80 * Fixed minor problems with GRS-1. Added support in c&s.
82 * Revision 1.21 1995/08/15 12:00:11 quinn
85 * Revision 1.20 1995/08/10 08:54:35 quinn
88 * Revision 1.19 1995/06/19 12:38:28 quinn
89 * Reorganized include-files. Added small features.
91 * Revision 1.18 1995/06/16 13:16:05 quinn
92 * Fixed Defaultdiagformat.
94 * Revision 1.17 1995/06/15 15:42:05 quinn
97 * Revision 1.16 1995/06/15 07:45:06 quinn
100 * Revision 1.15 1995/06/14 15:26:43 quinn
101 * *** empty log message ***
103 * Revision 1.14 1995/06/07 14:42:34 quinn
106 * Revision 1.13 1995/06/07 14:36:47 quinn
109 * Revision 1.12 1995/06/05 10:53:13 quinn
112 * Revision 1.11 1995/06/02 09:49:47 quinn
115 * Revision 1.10 1995/05/29 08:11:34 quinn
116 * Moved oid from odr/asn to util.
118 * Revision 1.9 1995/05/22 11:31:25 quinn
121 * Revision 1.8 1995/05/17 08:41:35 quinn
122 * Added delete to proto & other little things.
123 * Relaying auth info to backend.
125 * Revision 1.7 1995/05/16 08:50:37 quinn
126 * License, documentation, and memory fixes
128 * Revision 1.6 1995/05/15 11:55:55 quinn
129 * Work on asynchronous activity.
131 * Revision 1.5 1995/04/17 11:28:18 quinn
134 * Revision 1.4 1995/04/10 10:22:47 quinn
137 * Revision 1.3 1995/03/30 12:18:09 quinn
140 * Revision 1.2 1995/03/30 10:26:48 quinn
141 * Added Term structure
143 * Revision 1.1 1995/03/30 09:39:42 quinn
144 * Moved .h files to include directory
146 * Revision 1.11 1995/03/30 09:08:44 quinn
147 * Added Resource control protocol
149 * Revision 1.10 1995/03/29 15:39:39 quinn
150 * Adding some resource control elements, and a null-check to getentbyoid
152 * Revision 1.9 1995/03/29 08:06:18 quinn
153 * Added a few v3 elements
155 * Revision 1.8 1995/03/22 10:12:49 quinn
156 * Added Z_PRES constants.
158 * Revision 1.7 1995/03/20 09:45:12 quinn
161 * Revision 1.5 1995/03/07 16:29:34 quinn
162 * Added authentication stuff.
164 * Revision 1.4 1995/03/07 10:13:00 quinn
165 * Added prototype for z_APDU()
167 * Revision 1.3 1995/02/14 11:54:23 quinn
170 * Revision 1.2 1995/02/09 15:51:40 quinn
173 * Revision 1.1 1995/02/06 16:44:48 quinn
174 * First hack at Z/SR protocol
185 #include <yaz-version.h>
192 * Because we didn't have time to put all of the extra v3 elements in here
193 * before the first applications were written, we have to place them
194 * in #ifdefs in places where they would break existing code. If you are
195 * developing new stuff, we urge you to leave them in, even if you don't
196 * intend to use any v3 features. When we are comfortable that the old
197 * apps have been updated, we'll remove the #ifdefs.
202 /* ----------------- GLOBAL AUXILIARY DEFS ----------------*/
205 typedef struct Z_External Z_External;
207 typedef Odr_oct Z_ReferenceId;
208 typedef char Z_DatabaseName;
209 typedef char Z_ResultSetId;
210 typedef Odr_oct Z_ResultsetId;
212 typedef struct Z_InfoCategory
214 Odr_oid *categoryTypeId; /* OPTIONAL */
218 typedef struct Z_OtherInformationUnit
220 Z_InfoCategory *category; /* OPTIONAL */
222 #define Z_OtherInfo_characterInfo 0
223 #define Z_OtherInfo_binaryInfo 1
224 #define Z_OtherInfo_externallyDefinedInfo 2
225 #define Z_OtherInfo_oid 3
230 Z_External *externallyDefinedInfo;
233 } Z_OtherInformationUnit;
235 typedef struct Z_OtherInformation
238 Z_OtherInformationUnit **list;
239 } Z_OtherInformation;
241 typedef struct Z_StringOrNumeric
244 #define Z_StringOrNumeric_string 0
245 #define Z_StringOrNumeric_numeric 1
253 typedef struct Z_Unit
255 char *unitSystem; /* OPTIONAL */
256 Z_StringOrNumeric *unitType; /* OPTIONAL */
257 Z_StringOrNumeric *unit; /* OPTIONAL */
258 int *scaleFactor; /* OPTIONAL */
261 typedef struct Z_IntUnit
267 typedef Odr_oct Z_SUTRS;
269 typedef struct Z_StringList
275 /* ----------------- INIT SERVICE ----------------*/
279 char *groupId; /* OPTIONAL */
280 char *userId; /* OPTIONAL */
281 char *password; /* OPTIONAL */
284 typedef struct Z_IdAuthentication
287 #define Z_IdAuthentication_open 0
288 #define Z_IdAuthentication_idPass 1
289 #define Z_IdAuthentication_anonymous 2
290 #define Z_IdAuthentication_other 3
298 } Z_IdAuthentication;
300 #define Z_ProtocolVersion_1 0
301 #define Z_ProtocolVersion_2 1
302 #define Z_ProtocolVersion_3 2
304 #define Z_Options_search 0
305 #define Z_Options_present 1
306 #define Z_Options_delSet 2
307 #define Z_Options_resourceReport 3
308 #define Z_Options_triggerResourceCtrl 4
309 #define Z_Options_resourceCtrl 5
310 #define Z_Options_accessCtrl 6
311 #define Z_Options_scan 7
312 #define Z_Options_sort 8
313 #define Z_Options_reserved 9
314 #define Z_Options_extendedServices 10
315 #define Z_Options_level_1Segmentation 11
316 #define Z_Options_level_2Segmentation 12
317 #define Z_Options_concurrentOperations 13
318 #define Z_Options_namedResultSets 14
320 typedef struct Z_InitRequest
322 Z_ReferenceId *referenceId; /* OPTIONAL */
323 Odr_bitmask *protocolVersion;
324 Odr_bitmask *options;
325 int *preferredMessageSize;
326 int *maximumRecordSize;
327 Z_IdAuthentication* idAuthentication; /* OPTIONAL */
328 char *implementationId; /* OPTIONAL */
329 char *implementationName; /* OPTIONAL */
330 char *implementationVersion; /* OPTIONAL */
331 Z_External *userInformationField; /* OPTIONAL */
333 Z_OtherInformation *otherInfo; /* OPTIONAL */
337 typedef struct Z_InitResponse
339 Z_ReferenceId *referenceId; /* OPTIONAL */
340 Odr_bitmask *protocolVersion;
341 Odr_bitmask *options;
342 int *preferredMessageSize;
343 int *maximumRecordSize;
345 char *implementationId; /* OPTIONAL */
346 char *implementationName; /* OPTIONAL */
347 char *implementationVersion; /* OPTIONAL */
348 Z_External *userInformationField; /* OPTIONAL */
350 Z_OtherInformation *otherInfo; /* OPTIONAL */
354 typedef struct Z_NSRAuthentication
359 } Z_NSRAuthentication;
361 int z_NSRAuthentication(ODR o, Z_NSRAuthentication **p, int opt);
363 int z_StrAuthentication(ODR o, char **p, int opt);
365 /* ------------------ SEARCH SERVICE ----------------*/
367 typedef struct Z_DatabaseSpecificUnit
370 char *elementSetName;
371 } Z_DatabaseSpecificUnit;
373 typedef struct Z_DatabaseSpecific
376 Z_DatabaseSpecificUnit **elements;
377 } Z_DatabaseSpecific;
379 typedef struct Z_ElementSetNames
382 #define Z_ElementSetNames_generic 0
383 #define Z_ElementSetNames_databaseSpecific 1
387 Z_DatabaseSpecific *databaseSpecific;
391 /* ---------------------- RPN QUERY --------------------------- */
393 typedef struct Z_ComplexAttribute
396 Z_StringOrNumeric **list;
397 int num_semanticAction;
398 int **semanticAction; /* OPTIONAL */
399 } Z_ComplexAttribute;
401 typedef struct Z_AttributeElement
404 Odr_oid *attributeSet; /* OPTIONAL - v3 only */
409 #define Z_AttributeValue_numeric 0
410 #define Z_AttributeValue_complex 1
414 Z_ComplexAttribute *complex;
419 } Z_AttributeElement;
421 typedef struct Z_Term
424 #define Z_Term_general 0
425 #define Z_Term_numeric 1
426 #define Z_Term_characterString 2
428 #define Z_Term_dateTime 4
429 #define Z_Term_external 5
430 #define Z_Term_integerAndUnit 6
431 #define Z_Term_null 7
434 Odr_oct *general; /* this is required for v2 */
436 char *characterString;
439 Z_External *external;
440 /* Z_IntUnit *integerAndUnit; */
445 typedef struct Z_AttributesPlusTerm
448 Z_AttributeElement **attributeList;
450 } Z_AttributesPlusTerm;
452 typedef struct Z_ResultSetPlusAttributes
456 Z_AttributeElement **attributeList;
457 } Z_ResultSetPlusAttributes;
459 typedef struct Z_ProximityOperator
461 bool_t *exclusion; /* OPTIONAL */
465 #define Z_Prox_lessThan 1
466 #define Z_Prox_lessThanOrEqual 2
467 #define Z_Prox_equal 3
468 #define Z_Prox_greaterThanOrEqual 4
469 #define Z_Prox_greaterThan 5
470 #define Z_Prox_notEqual 6
472 #define Z_ProxCode_known 0
473 #define Z_ProxCode_private 1
474 int *proximityUnitCode;
475 #define Z_ProxUnit_character 1
476 #define Z_ProxUnit_word 2
477 #define Z_ProxUnit_sentence 3
478 #define Z_ProxUnit_paragraph 4
479 #define Z_ProxUnit_section 5
480 #define Z_ProxUnit_chapter 6
481 #define Z_ProxUnit_document 7
482 #define Z_ProxUnit_element 8
483 #define Z_ProxUnit_subelement 9
484 #define Z_ProxUnit_elementType 10
485 #define Z_ProxUnit_byte 11 /* v3 only */
486 } Z_ProximityOperator;
488 typedef struct Z_Operator
491 #define Z_Operator_and 0
492 #define Z_Operator_or 1
493 #define Z_Operator_and_not 2
494 #define Z_Operator_prox 3
497 Odr_null *and; /* these guys are nulls. */
500 Z_ProximityOperator *prox;
504 typedef struct Z_Operand
507 #define Z_Operand_APT 0
508 #define Z_Operand_resultSetId 1
509 #define Z_Operand_resultAttr /* v3 only */ 2
512 Z_AttributesPlusTerm *attributesPlusTerm;
513 Z_ResultSetId *resultSetId;
514 Z_ResultSetPlusAttributes *resultAttr;
518 typedef struct Z_Complex
520 struct Z_RPNStructure *s1;
521 struct Z_RPNStructure *s2;
522 Z_Operator *roperator;
525 typedef struct Z_RPNStructure
528 #define Z_RPNStructure_simple 0
529 #define Z_RPNStructure_complex 1
537 typedef struct Z_RPNQuery
539 Odr_oid *attributeSetId;
540 Z_RPNStructure *RPNStructure;
543 /* -------------------------- SEARCHREQUEST -------------------------- */
545 typedef struct Z_Query
548 #define Z_Query_type_1 1
549 #define Z_Query_type_2 2
550 #define Z_Query_type_101 3
555 Z_RPNQuery *type_101;
559 typedef struct Z_SearchRequest
561 Z_ReferenceId *referenceId; /* OPTIONAL */
562 int *smallSetUpperBound;
563 int *largeSetLowerBound;
564 int *mediumSetPresentNumber;
565 bool_t *replaceIndicator;
567 int num_databaseNames;
568 char **databaseNames;
569 Z_ElementSetNames *smallSetElementSetNames; /* OPTIONAL */
570 Z_ElementSetNames *mediumSetElementSetNames; /* OPTIONAL */
571 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
574 Z_OtherInformation *additionalSearchInfo; /* OPTIONAL */
575 Z_OtherInformation *otherInfo; /* OPTIONAL */
579 /* ------------------------ RECORD -------------------------- */
581 typedef Z_External Z_DatabaseRecord;
585 typedef struct Z_DefaultDiagFormat
587 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
589 /* until the whole character set issue becomes more definite,
590 * you can probably ignore this on input. */
592 #define Z_DiagForm_v2AddInfo 0
593 #define Z_DiagForm_v3AddInfo 1
595 } Z_DefaultDiagFormat;
597 typedef struct Z_DiagRec
600 #define Z_DiagRec_defaultFormat 0
601 #define Z_DiagRec_externallyDefined 1
604 Z_DefaultDiagFormat *defaultFormat;
605 Z_External *externallyDefined;
611 typedef struct Z_DiagRec
613 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
620 typedef struct Z_DiagRecs
623 Z_DiagRec **diagRecs;
626 typedef struct Z_NamePlusRecord
628 char *databaseName; /* OPTIONAL */
630 #define Z_NamePlusRecord_databaseRecord 0
631 #define Z_NamePlusRecord_surrogateDiagnostic 1
634 Z_DatabaseRecord *databaseRecord;
635 Z_DiagRec *surrogateDiagnostic;
639 typedef struct Z_NamePlusRecordList
642 Z_NamePlusRecord **records;
643 } Z_NamePlusRecordList;
645 typedef struct Z_Records
648 #define Z_Records_DBOSD 0
649 #define Z_Records_NSD 1
650 #define Z_Records_multipleNSD 2
653 Z_NamePlusRecordList *databaseOrSurDiagnostics;
654 Z_DiagRec *nonSurrogateDiagnostic;
655 Z_DiagRecs *multipleNonSurDiagnostics;
659 /* ------------------------ SEARCHRESPONSE ------------------ */
661 typedef struct Z_SearchResponse
663 Z_ReferenceId *referenceId; /* OPTIONAL */
665 int *numberOfRecordsReturned;
666 int *nextResultSetPosition;
667 bool_t *searchStatus;
668 int *resultSetStatus; /* OPTIONAL */
669 #define Z_RES_SUBSET 1
670 #define Z_RES_INTERIM 2
672 int *presentStatus; /* OPTIONAL */
673 #define Z_PRES_SUCCESS 0
674 #define Z_PRES_PARTIAL_1 1
675 #define Z_PRES_PARTIAL_2 2
676 #define Z_PRES_PARTIAL_3 3
677 #define Z_PRES_PARTIAL_4 4
678 #define Z_PRES_FAILURE 5
679 Z_Records *records; /* OPTIONAL */
681 Z_OtherInformation *additionalSearchInfo;
682 Z_OtherInformation *otherInfo;
686 /* ------------------------- PRESENT SERVICE -----------------*/
688 typedef struct Z_ElementSpec
691 #define Z_ElementSpec_elementSetName 0
692 #define Z_ElementSpec_externalSpec 1
695 char *elementSetName;
696 Z_External *externalSpec;
700 typedef struct Z_Specification
702 Odr_oid *schema; /* OPTIONAL */
703 Z_ElementSpec *elementSpec; /* OPTIONAL */
706 typedef struct Z_DbSpecific
709 Z_Specification *spec;
712 typedef struct Z_CompSpec
714 bool_t *selectAlternativeSyntax;
715 Z_Specification *generic; /* OPTIONAL */
717 Z_DbSpecific **dbSpecific; /* OPTIONAL */
718 int num_recordSyntax;
719 Odr_oid **recordSyntax; /* OPTIONAL */
722 typedef struct Z_RecordComposition
725 #define Z_RecordComp_simple 0
726 #define Z_RecordComp_complex 1
729 Z_ElementSetNames *simple;
732 } Z_RecordComposition;
734 typedef struct Z_Range
736 int *startingPosition;
737 int *numberOfRecords;
740 typedef struct Z_PresentRequest
742 Z_ReferenceId *referenceId; /* OPTIONAL */
743 Z_ResultSetId *resultSetId;
744 int *resultSetStartPoint;
745 int *numberOfRecordsRequested;
748 Z_Range **additionalRanges; /* OPTIONAL */
749 Z_RecordComposition *recordComposition; /* OPTIONAL */
751 Z_ElementSetNames *elementSetNames; /* OPTIONAL */
753 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
755 int *maxSegmentCount; /* OPTIONAL */
756 int *maxRecordSize; /* OPTIONAL */
757 int *maxSegmentSize; /* OPTIONAL */
758 Z_OtherInformation *otherInfo; /* OPTIONAL */
762 typedef struct Z_PresentResponse
764 Z_ReferenceId *referenceId; /* OPTIONAL */
765 int *numberOfRecordsReturned;
766 int *nextResultSetPosition;
770 Z_OtherInformation *otherInfo; /* OPTIONAL */
774 /* ------------------ RESOURCE CONTROL ----------------*/
776 typedef struct Z_TriggerResourceControlRequest
778 Z_ReferenceId *referenceId; /* OPTIONAL */
779 int *requestedAction;
780 #define Z_TriggerResourceCtrl_resourceReport 1
781 #define Z_TriggerResourceCtrl_resourceControl 2
782 #define Z_TriggerResourceCtrl_cancel 3
783 Odr_oid *prefResourceReportFormat; /* OPTIONAL */
784 bool_t *resultSetWanted; /* OPTIONAL */
786 Z_OtherInformation *otherInfo;
788 } Z_TriggerResourceControlRequest;
790 typedef struct Z_ResourceControlRequest
792 Z_ReferenceId *referenceId; /* OPTIONAL */
793 bool_t *suspendedFlag; /* OPTIONAL */
794 Z_External *resourceReport; /* OPTIONAL */
795 int *partialResultsAvailable; /* OPTIONAL */
796 #define Z_ResourceControlRequest_subset 1
797 #define Z_ResourceControlRequest_interim 2
798 #define Z_ResourceControlRequest_none 3
799 bool_t *responseRequired;
800 bool_t *triggeredRequestFlag; /* OPTIONAL */
802 Z_OtherInformation *otherInfo;
804 } Z_ResourceControlRequest;
806 typedef struct Z_ResourceControlResponse
808 Z_ReferenceId *referenceId; /* OPTIONAL */
809 bool_t *continueFlag;
810 bool_t *resultSetWanted; /* OPTIONAL */
812 Z_OtherInformation *otherInfo;
814 } Z_ResourceControlResponse;
817 /* ------------------ ACCESS CTRL SERVICE ----------------*/
819 typedef struct Z_AccessControlRequest
821 Z_ReferenceId *referenceId; /* OPTIONAL */
823 #define Z_AccessRequest_simpleForm 0
824 #define Z_AccessRequest_externallyDefined 1
828 Z_External *externallyDefined;
831 Z_OtherInformation *otherInfo; /* OPTIONAL */
833 } Z_AccessControlRequest;
835 typedef struct Z_AccessControlResponse
837 Z_ReferenceId *referenceId; /* OPTIONAL */
839 #define Z_AccessResponse_simpleForm 0
840 #define Z_AccessResponse_externallyDefined 1
844 Z_External *externallyDefined;
846 Z_DiagRec *diagnostic; /* OPTIONAL */
848 Z_OtherInformation *otherInfo; /* OPTIONAL */
850 } Z_AccessControlResponse;
852 /* ------------------------ SCAN SERVICE -------------------- */
854 typedef struct Z_AttributeList
857 Z_AttributeElement **attributes;
860 typedef struct Z_AlternativeTerm
863 Z_AttributesPlusTerm **terms;
868 typedef struct Z_ByDatabase
871 int *num; /* OPTIONAL */
872 Z_OtherInformation *otherDbInfo; /* OPTIONAL */
875 typedef struct Z_ByDatabaseList
878 Z_ByDatabase **elements;
881 typedef struct Z_ScanOccurrences
884 #define Z_ScanOccurrences_global 0
885 #define Z_ScanOccurrences_byDatabase 1
889 Z_ByDatabaseList *byDatabase;
894 typedef struct Z_OccurrenceByAttributesElem
896 Z_AttributeList *attributes;
897 Z_ScanOccurrences *occurrences; /* OPTIONAL */
898 Z_OtherInformation *otherOccurInfo; /* OPTIONAL */
899 } Z_OccurrenceByAttributesElem;
901 typedef struct Z_OccurrenceByAttributes
904 Z_OccurrenceByAttributesElem **elements;
905 } Z_OccurrenceByAttributes;
910 * Old, incomplete definition of OccurrenceByAttributes.
913 typedef struct Z_OccurrenceByAttributes
915 Z_AttributeList *attributes;
918 #define Z_OByAtt_global 0
919 #define Z_ObyAtt_byDatabase 1
925 /* Z_ByDatabase *byDatabase; */
928 } Z_OccurrenceByAttributes;
932 typedef struct Z_TermInfo
935 char *displayTerm; /* OPTIONAL */
936 Z_AttributeList *suggestedAttributes; /* OPTIONAL */
937 Z_AlternativeTerm *alternativeTerm; /* OPTIONAL */
938 int *globalOccurrences; /* OPTIONAL */
939 Z_OccurrenceByAttributes *byAttributes; /* OPTIONAL */
940 Z_OtherInformation *otherTermInfo; /* OPTIONAL */
943 typedef struct Z_Entry
946 #define Z_Entry_termInfo 0
947 #define Z_Entry_surrogateDiagnostic 1
950 Z_TermInfo *termInfo;
951 Z_DiagRec *surrogateDiagnostic;
955 typedef struct Z_Entries
961 typedef struct Z_ListEntries
964 #define Z_ListEntries_entries 0
965 #define Z_ListEntries_nonSurrogateDiagnostics 1
969 Z_DiagRecs *nonSurrogateDiagnostics;
973 typedef struct Z_ScanRequest
975 Z_ReferenceId *referenceId; /* OPTIONAL */
976 int num_databaseNames;
977 char **databaseNames;
978 Odr_oid *attributeSet; /* OPTIONAL */
979 Z_AttributesPlusTerm *termListAndStartPoint;
980 int *stepSize; /* OPTIONAL */
981 int *numberOfTermsRequested;
982 int *preferredPositionInResponse; /* OPTIONAL */
984 Z_OtherInformation *otherInfo;
988 typedef struct Z_ScanResponse
990 Z_ReferenceId *referenceId; /* OPTIONAL */
991 int *stepSize; /* OPTIONAL */
993 #define Z_Scan_success 0
994 #define Z_Scan_partial_1 1
995 #define Z_Scan_partial_2 2
996 #define Z_Scan_partial_3 3
997 #define Z_Scan_partial_4 4
998 #define Z_Scan_partial_5 5
999 #define Z_Scan_failure 6
1000 int *numberOfEntriesReturned;
1001 int *positionOfTerm; /* OPTIONAL */
1002 Z_ListEntries *entries; /* OPTIONAL */
1003 Odr_oid *attributeSet; /* OPTIONAL */
1005 Z_OtherInformation *otherInfo;
1010 /* ------------------------ DELETE -------------------------- */
1012 #define Z_DeleteStatus_success 0
1013 #define Z_DeleteStatus_resultSetDidNotExist 1
1014 #define Z_DeleteStatus_previouslyDeletedByTarget 2
1015 #define Z_DeleteStatus_systemProblemAtTarget 3
1016 #define Z_DeleteStatus_accessNotAllowed 4
1017 #define Z_DeleteStatus_resourceControlAtOrigin 5
1018 #define Z_DeleteStatus_resourceControlAtTarget 6
1019 #define Z_DeleteStatus_bulkDeleteNotSupported 7
1020 #define Z_DeleteStatus_notAllRsltSetsDeletedOnBulkDlte 8
1021 #define Z_DeleteStatus_notAllRequestedResultSetsDeleted 9
1022 #define Z_DeleteStatus_resultSetInUse 10
1024 typedef struct Z_ListStatus
1030 typedef struct Z_DeleteResultSetRequest
1032 Z_ReferenceId *referenceId; /* OPTIONAL */
1033 int *deleteFunction;
1034 #define Z_DeleteRequest_list 0
1035 #define Z_DeleteRequest_all 1
1037 Z_ResultSetId **resultSetList; /* OPTIONAL */
1039 Z_OtherInformation *otherInfo;
1041 } Z_DeleteResultSetRequest;
1043 typedef struct Z_DeleteResultSetResponse
1045 Z_ReferenceId *referenceId; /* OPTIONAL */
1046 int *deleteOperationStatus;
1048 Z_ListStatus **deleteListStatuses; /* OPTIONAL */
1049 int *numberNotDeleted; /* OPTIONAL */
1050 int num_bulkStatuses;
1051 Z_ListStatus **bulkStatuses; /* OPTIONAL */
1052 char *deleteMessage; /* OPTIONAL */
1054 Z_OtherInformation *otherInfo;
1056 } Z_DeleteResultSetResponse;
1058 /* ------------------------ CLOSE SERVICE ------------------- */
1060 typedef struct Z_Close
1062 Z_ReferenceId *referenceId; /* OPTIONAL */
1064 #define Z_Close_finished 0
1065 #define Z_Close_shutdown 1
1066 #define Z_Close_systemProblem 2
1067 #define Z_Close_costLimit 3
1068 #define Z_Close_resources 4
1069 #define Z_Close_securityViolation 5
1070 #define Z_Close_protocolError 6
1071 #define Z_Close_lackOfActivity 7
1072 #define Z_Close_peerAbort 8
1073 #define Z_Close_unspecified 9
1074 char *diagnosticInformation; /* OPTIONAL */
1075 Odr_oid *resourceReportFormat; /* OPTIONAL */
1076 Z_External *resourceReport; /* OPTIONAL */
1078 Z_OtherInformation *otherInfo; /* OPTIONAL */
1082 /* ------------------------ SEGMENTATION -------------------- */
1084 typedef struct Z_Segment
1086 Z_ReferenceId *referenceId; /* OPTIONAL */
1087 int *numberOfRecordsReturned;
1088 int num_segmentRecords;
1089 Z_NamePlusRecord **segmentRecords;
1090 Z_OtherInformation *otherInfo; /* OPTIONAL */
1093 /* ----------------------- Extended Services ---------------- */
1095 typedef struct Z_Permissions
1098 int num_allowableFunctions;
1099 int **allowableFunctions;
1100 #define Z_Permissions_delete 1
1101 #define Z_Permissions_modifyContents 2
1102 #define Z_Permissions_modifyPermissions 3
1103 #define Z_Permissions_present 4
1104 #define Z_Permissions_invoke 5
1107 typedef struct Z_ExtendedServicesRequest
1109 Z_ReferenceId *referenceId; /* OPTIONAL */
1111 #define Z_ExtendedServicesRequest_create 1
1112 #define Z_ExtendedServicesRequest_delete 2
1113 #define Z_ExtendedServicesRequest_modify 3
1114 Odr_oid *packageType;
1115 char *packageName; /* OPTIONAL */
1116 char *userId; /* OPTIONAL */
1117 Z_IntUnit *retentionTime; /* OPTIONAL */
1118 Z_Permissions *permissions; /* OPTIONAL */
1119 char *description; /* OPTIONAL */
1120 Z_External *taskSpecificParameters; /* OPTIONAL */
1122 #define Z_ExtendedServicesRequest_wait 1
1123 #define Z_ExtendedServicesRequest_waitIfPossible 2
1124 #define Z_ExtendedServicesRequest_dontWait 3
1125 #define Z_ExtendedServicesRequest_dontReturnPackage 4
1126 char *elements; /* OPTIONAL */
1127 Z_OtherInformation *otherInfo; /* OPTIONAL */
1128 } Z_ExtendedServicesRequest;
1130 typedef struct Z_ExtendedServicesResponse
1132 Z_ReferenceId *referenceId; /* OPTIONAL */
1133 int *operationStatus;
1134 #define Z_ExtendedServicesResponse_done 1
1135 #define Z_ExtendedServicesResponse_accepted 2
1136 #define Z_ExtendedServicesResponse_failure 3
1137 int num_diagnostics;
1138 Z_DiagRec **diagnostics; /* OPTIONAL */
1139 Z_External *taskPackage; /* OPTIONAL */
1140 Z_OtherInformation *otherInfo; /* OPTIONAL */
1141 } Z_ExtendedServicesResponse;
1143 /* ------------------------ Sort --------------------------- */
1145 typedef struct Z_SortAttributes
1148 Z_AttributeList *list;
1151 typedef struct Z_SortKey
1154 #define Z_SortKey_sortField 0
1155 #define Z_SortKey_elementSpec 1
1156 #define Z_SortKey_sortAttributes 2
1160 Z_Specification *elementSpec;
1161 Z_SortAttributes *sortAttributes;
1165 typedef struct Z_SortDbSpecific
1171 typedef struct Z_SortDbSpecificList
1174 Z_SortDbSpecific **dbSpecific;
1175 } Z_SortDbSpecificList;
1177 typedef struct Z_SortElement
1180 #define Z_SortElement_generic 0
1181 #define Z_SortElement_databaseSpecific 1
1185 Z_SortDbSpecificList *databaseSpecific;
1189 typedef struct Z_SortMissingValueAction
1192 #define Z_SortMissingValAct_abort 0
1193 #define Z_SortMissingValAct_null 1
1194 #define Z_SortMissingValAct_valData 2
1201 } Z_SortMissingValueAction;
1203 typedef struct Z_SortKeySpec
1205 Z_SortElement *sortElement;
1207 #define Z_SortRelation_ascending 0
1208 #define Z_SortRelation_descending 1
1209 #define Z_SortRelation_ascendingByFreq 3
1210 #define Z_SortRelation_descendingByFreq 4
1211 int *caseSensitivity;
1212 #define Z_SortCase_caseSensitive 0
1213 #define Z_SortCase_caseInsensitive 1
1214 Z_SortMissingValueAction *missingValueAction; /* OPTIONAL */
1217 typedef struct Z_SortResponse
1219 Z_ReferenceId *referenceId; /* OPTIONAL */
1221 #define Z_SortStatus_success 0
1222 #define Z_SortStatus_partial_1 1
1223 #define Z_SortStatus_failure 2
1224 int *resultSetStatus; /* OPTIONAL */
1225 #define Z_SortResultSetStatus_empty 1
1226 #define Z_SortResultSetStatus_interim 2
1227 #define Z_SortResultSetStatus_unchanged 3
1228 #define Z_SortResultSetStatus_none 4
1229 Z_DiagRecs *diagnostics; /* OPTIONAL */
1230 Z_OtherInformation *otherInfo; /* OPTIONAL */
1233 typedef struct Z_SortKeySpecList
1236 Z_SortKeySpec **specs;
1237 } Z_SortKeySpecList;
1239 typedef struct Z_SortRequest
1241 Z_ReferenceId *referenceId; /* OPTIONAL */
1242 Z_StringList *inputResultSetNames;
1243 char *sortedResultSetName;
1244 Z_SortKeySpecList *sortSequence;
1245 Z_OtherInformation *otherInfo; /* OPTIONAL */
1248 /* ----------------------- Resource Report ------------------ */
1250 typedef struct Z_ResourceReportRequest
1252 Z_ReferenceId *referenceId; /* OPTIONAL */
1253 Z_ReferenceId *opId; /* OPTIONAL */
1254 Odr_oid *prefResourceReportFormat; /* OPTIONAL */
1255 Z_OtherInformation *otherInfo; /* OPTIONAL */
1256 } Z_ResourceReportRequest;
1258 typedef struct Z_ResourceReportResponse
1260 Z_ReferenceId *referenceId; /* OPTIONAL */
1261 int *resourceReportStatus;
1262 #define Z_ResourceReportStatus_success 0
1263 #define Z_ResourceReportStatus_partial 1
1264 #define Z_ResourceReportStatus_failure_1 2
1265 #define Z_ResourceReportStatus_failure_2 3
1266 #define Z_ResourceReportStatus_failure_3 4
1267 #define Z_ResourceReportStatus_failure_4 5
1268 #define Z_ResourceReportStatus_failure_5 6
1269 #define Z_ResourceReportStatus_failure_6 7
1270 Z_External *resourceReport; /* OPTIONAL */
1271 Z_OtherInformation *otherInfo; /* OPTIONAL */
1272 } Z_ResourceReportResponse;
1274 /* ------------------------ APDU ---------------------------- */
1276 typedef struct Z_APDU
1279 #define Z_APDU_initRequest 0
1280 #define Z_APDU_initResponse 1
1281 #define Z_APDU_searchRequest 2
1282 #define Z_APDU_searchResponse 3
1283 #define Z_APDU_presentRequest 4
1284 #define Z_APDU_presentResponse 5
1285 #define Z_APDU_deleteResultSetRequest 6
1286 #define Z_APDU_deleteResultSetResponse 7
1287 #define Z_APDU_resourceControlRequest 8
1288 #define Z_APDU_resourceControlResponse 9
1289 #define Z_APDU_triggerResourceControlRequest 10
1290 #define Z_APDU_scanRequest 11
1291 #define Z_APDU_scanResponse 12
1292 #define Z_APDU_segmentRequest 13
1293 #define Z_APDU_extendedServicesRequest 14
1294 #define Z_APDU_extendedServicesResponse 15
1295 #define Z_APDU_close 16
1296 #define Z_APDU_accessControlRequest 17
1297 #define Z_APDU_accessControlResponse 18
1298 #define Z_APDU_sortRequest 20
1299 #define Z_APDU_sortResponse 21
1300 #define Z_APDU_resourceReportRequest 22
1301 #define Z_APDU_resourceReportResponse 23
1304 Z_InitRequest *initRequest;
1305 Z_InitResponse *initResponse;
1306 Z_SearchRequest *searchRequest;
1307 Z_SearchResponse *searchResponse;
1308 Z_PresentRequest *presentRequest;
1309 Z_PresentResponse *presentResponse;
1310 Z_DeleteResultSetRequest *deleteResultSetRequest;
1311 Z_DeleteResultSetResponse *deleteResultSetResponse;
1312 Z_AccessControlRequest *accessControlRequest;
1313 Z_AccessControlResponse *accessControlResponse;
1314 Z_ResourceControlRequest *resourceControlRequest;
1315 Z_ResourceControlResponse *resourceControlResponse;
1316 Z_TriggerResourceControlRequest *triggerResourceControlRequest;
1317 Z_ResourceReportRequest *resourceReportRequest;
1318 Z_ResourceReportResponse *resourceReportResponse;
1319 Z_ScanRequest *scanRequest;
1320 Z_ScanResponse *scanResponse;
1321 Z_SortRequest *sortRequest;
1322 Z_SortResponse *sortResponse;
1323 Z_Segment *segmentRequest;
1324 Z_ExtendedServicesRequest *extendedServicesRequest;
1325 Z_ExtendedServicesResponse *extendedServicesResponse;
1330 int z_APDU(ODR o, Z_APDU **p, int opt);
1331 int z_SUTRS(ODR o, Odr_oct **p, int opt);
1333 Z_InitRequest *zget_InitRequest(ODR o);
1334 Z_InitResponse *zget_InitResponse(ODR o);
1335 Z_SearchRequest *zget_SearchRequest(ODR o);
1336 Z_SearchResponse *zget_SearchResponse(ODR o);
1337 Z_PresentRequest *zget_PresentRequest(ODR o);
1338 Z_PresentResponse *zget_PresentResponse(ODR o);
1339 Z_DeleteResultSetRequest *zget_DeleteResultSetRequest(ODR o);
1340 Z_DeleteResultSetResponse *zget_DeleteResultSetResponse(ODR o);
1341 Z_ScanRequest *zget_ScanRequest(ODR o);
1342 Z_ScanResponse *zget_ScanResponse(ODR o);
1343 Z_TriggerResourceControlRequest *zget_TriggerResourceControlRequest(ODR o);
1344 Z_ResourceControlRequest *zget_ResourceControlRequest(ODR o);
1345 Z_ResourceControlResponse *zget_ResourceControlResponse(ODR o);
1346 Z_Close *zget_Close(ODR o);
1347 int z_StringList(ODR o, Z_StringList **p, int opt);
1348 int z_InternationalString(ODR o, char **p, int opt);
1349 int z_OtherInformation(ODR o, Z_OtherInformation **p, int opt);
1350 int z_ElementSetName(ODR o, char **p, int opt);
1351 int z_IntUnit(ODR o, Z_IntUnit **p, int opt);
1352 int z_Unit(ODR o, Z_Unit **p, int opt);
1353 int z_DatabaseName(ODR o, Z_DatabaseName **p, int opt);
1354 int z_StringOrNumeric(ODR o, Z_StringOrNumeric **p, int opt);
1355 int z_OtherInformationUnit(ODR o, Z_OtherInformationUnit **p, int opt);
1356 int z_Term(ODR o, Z_Term **p, int opt);
1357 int z_Specification(ODR o, Z_Specification **p, int opt);
1358 int z_Permissions(ODR o, Z_Permissions **p, int opt);
1359 int z_DiagRec(ODR o, Z_DiagRec **p, int opt);
1360 int z_AttributeList(ODR o, Z_AttributeList **p, int opt);
1361 int z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt);
1362 Z_APDU *zget_APDU(ODR o, int which);
1363 int z_Query(ODR o, Z_Query **p, int opt);
1369 #include <prt-rsc.h>
1370 #include <prt-acc.h>
1371 #include <prt-exp.h>
1372 #include <prt-grs.h>
1373 #include <prt-arc.h>
1374 #include <prt-exd.h>
1375 #include <prt-dia.h>
1376 #include <prt-esp.h>
1377 #include <prt-add.h>
1379 #include <prt-ext.h>