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.37 1996-10-09 15:54:58 quinn
28 * Added SearchInfoReport
30 * Revision 1.36 1996/10/07 15:29:20 quinn
33 * Revision 1.35 1996/06/10 08:57:38 quinn
34 * Added OPAC, ResourceReport
36 * Revision 1.34 1996/06/10 08:55:36 quinn
39 * Revision 1.33 1996/02/23 10:00:51 quinn
42 * Revision 1.32 1996/02/20 12:52:39 quinn
45 * Revision 1.31 1996/01/22 09:46:45 quinn
46 * Added Sort PDU. Moved StringList to main protocol file.
48 * Revision 1.30 1996/01/10 15:21:32 quinn
49 * Added links to access control PDUs
51 * Revision 1.29 1996/01/02 11:46:49 quinn
52 * Changed 'operator' to 'roperator' to avoid C++ conflict.
55 * Revision 1.28 1996/01/02 08:57:32 quinn
56 * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
58 * Revision 1.27 1995/10/12 10:34:46 quinn
61 * Revision 1.26 1995/09/29 17:12:08 quinn
64 * Revision 1.25 1995/09/27 15:02:49 quinn
65 * Modified function heads & prototypes.
67 * Revision 1.24 1995/08/29 11:17:43 quinn
68 * *** empty log message ***
70 * Revision 1.23 1995/08/21 09:10:36 quinn
71 * Smallish fixes to suppport new formats.
73 * Revision 1.22 1995/08/17 12:45:14 quinn
74 * Fixed minor problems with GRS-1. Added support in c&s.
76 * Revision 1.21 1995/08/15 12:00:11 quinn
79 * Revision 1.20 1995/08/10 08:54:35 quinn
82 * Revision 1.19 1995/06/19 12:38:28 quinn
83 * Reorganized include-files. Added small features.
85 * Revision 1.18 1995/06/16 13:16:05 quinn
86 * Fixed Defaultdiagformat.
88 * Revision 1.17 1995/06/15 15:42:05 quinn
91 * Revision 1.16 1995/06/15 07:45:06 quinn
94 * Revision 1.15 1995/06/14 15:26:43 quinn
95 * *** empty log message ***
97 * Revision 1.14 1995/06/07 14:42:34 quinn
100 * Revision 1.13 1995/06/07 14:36:47 quinn
103 * Revision 1.12 1995/06/05 10:53:13 quinn
106 * Revision 1.11 1995/06/02 09:49:47 quinn
109 * Revision 1.10 1995/05/29 08:11:34 quinn
110 * Moved oid from odr/asn to util.
112 * Revision 1.9 1995/05/22 11:31:25 quinn
115 * Revision 1.8 1995/05/17 08:41:35 quinn
116 * Added delete to proto & other little things.
117 * Relaying auth info to backend.
119 * Revision 1.7 1995/05/16 08:50:37 quinn
120 * License, documentation, and memory fixes
122 * Revision 1.6 1995/05/15 11:55:55 quinn
123 * Work on asynchronous activity.
125 * Revision 1.5 1995/04/17 11:28:18 quinn
128 * Revision 1.4 1995/04/10 10:22:47 quinn
131 * Revision 1.3 1995/03/30 12:18:09 quinn
134 * Revision 1.2 1995/03/30 10:26:48 quinn
135 * Added Term structure
137 * Revision 1.1 1995/03/30 09:39:42 quinn
138 * Moved .h files to include directory
140 * Revision 1.11 1995/03/30 09:08:44 quinn
141 * Added Resource control protocol
143 * Revision 1.10 1995/03/29 15:39:39 quinn
144 * Adding some resource control elements, and a null-check to getentbyoid
146 * Revision 1.9 1995/03/29 08:06:18 quinn
147 * Added a few v3 elements
149 * Revision 1.8 1995/03/22 10:12:49 quinn
150 * Added Z_PRES constants.
152 * Revision 1.7 1995/03/20 09:45:12 quinn
155 * Revision 1.5 1995/03/07 16:29:34 quinn
156 * Added authentication stuff.
158 * Revision 1.4 1995/03/07 10:13:00 quinn
159 * Added prototype for z_APDU()
161 * Revision 1.3 1995/02/14 11:54:23 quinn
164 * Revision 1.2 1995/02/09 15:51:40 quinn
167 * Revision 1.1 1995/02/06 16:44:48 quinn
168 * First hack at Z/SR protocol
179 #include <yaz-version.h>
182 * Because we didn't have time to put all of the extra v3 elements in here
183 * before the first applications were written, we have to place them
184 * in #ifdefs in places where they would break existing code. If you are
185 * developing new stuff, we urge you to leave them in, even if you don't
186 * intend to use any v3 features. When we are comfortable that the old
187 * apps have been updated, we'll remove the #ifdefs.
192 /* ----------------- GLOBAL AUXILIARY DEFS ----------------*/
195 typedef struct Z_External Z_External;
197 typedef Odr_oct Z_ReferenceId;
198 typedef char Z_DatabaseName;
199 typedef char Z_ResultSetId;
200 typedef Odr_oct Z_ResultsetId;
202 typedef struct Z_InfoCategory
204 Odr_oid *categoryTypeId; /* OPTIONAL */
208 typedef struct Z_OtherInformationUnit
210 Z_InfoCategory *category; /* OPTIONAL */
212 #define Z_OtherInfo_characterInfo 0
213 #define Z_OtherInfo_binaryInfo 1
214 #define Z_OtherInfo_externallyDefinedInfo 2
215 #define Z_OtherInfo_oid 3
220 Z_External *externallyDefinedInfo;
223 } Z_OtherInformationUnit;
225 typedef struct Z_OtherInformation
228 Z_OtherInformationUnit **list;
229 } Z_OtherInformation;
231 typedef struct Z_StringOrNumeric
234 #define Z_StringOrNumeric_string 0
235 #define Z_StringOrNumeric_numeric 1
243 typedef struct Z_Unit
245 char *unitSystem; /* OPTIONAL */
246 Z_StringOrNumeric *unitType; /* OPTIONAL */
247 Z_StringOrNumeric *unit; /* OPTIONAL */
248 int *scaleFactor; /* OPTIONAL */
251 typedef struct Z_IntUnit
257 typedef Odr_oct Z_SUTRS;
259 typedef struct Z_StringList
265 /* ----------------- INIT SERVICE ----------------*/
269 char *groupId; /* OPTIONAL */
270 char *userId; /* OPTIONAL */
271 char *password; /* OPTIONAL */
274 typedef struct Z_IdAuthentication
277 #define Z_IdAuthentication_open 0
278 #define Z_IdAuthentication_idPass 1
279 #define Z_IdAuthentication_anonymous 2
280 #define Z_IdAuthentication_other 3
288 } Z_IdAuthentication;
290 #define Z_ProtocolVersion_1 0
291 #define Z_ProtocolVersion_2 1
292 #define Z_ProtocolVersion_3 2
294 #define Z_Options_search 0
295 #define Z_Options_present 1
296 #define Z_Options_delSet 2
297 #define Z_Options_resourceReport 3
298 #define Z_Options_triggerResourceCtrl 4
299 #define Z_Options_resourceCtrl 5
300 #define Z_Options_accessCtrl 6
301 #define Z_Options_scan 7
302 #define Z_Options_sort 8
303 #define Z_Options_reserved 9
304 #define Z_Options_extendedServices 10
305 #define Z_Options_level_1Segmentation 11
306 #define Z_Options_level_2Segmentation 12
307 #define Z_Options_concurrentOperations 13
308 #define Z_Options_namedResultSets 14
310 typedef struct Z_InitRequest
312 Z_ReferenceId *referenceId; /* OPTIONAL */
313 Odr_bitmask *protocolVersion;
314 Odr_bitmask *options;
315 int *preferredMessageSize;
316 int *maximumRecordSize;
317 Z_IdAuthentication* idAuthentication; /* OPTIONAL */
318 char *implementationId; /* OPTIONAL */
319 char *implementationName; /* OPTIONAL */
320 char *implementationVersion; /* OPTIONAL */
321 Z_External *userInformationField; /* OPTIONAL */
323 Z_OtherInformation *otherInfo; /* OPTIONAL */
327 typedef struct Z_InitResponse
329 Z_ReferenceId *referenceId; /* OPTIONAL */
330 Odr_bitmask *protocolVersion;
331 Odr_bitmask *options;
332 int *preferredMessageSize;
333 int *maximumRecordSize;
335 char *implementationId; /* OPTIONAL */
336 char *implementationName; /* OPTIONAL */
337 char *implementationVersion; /* OPTIONAL */
338 Z_External *userInformationField; /* OPTIONAL */
340 Z_OtherInformation *otherInfo; /* OPTIONAL */
344 typedef struct Z_NSRAuthentication
349 } Z_NSRAuthentication;
351 int z_NSRAuthentication(ODR o, Z_NSRAuthentication **p, int opt);
353 int z_StrAuthentication(ODR o, char **p, int opt);
355 /* ------------------ SEARCH SERVICE ----------------*/
357 typedef struct Z_DatabaseSpecificUnit
360 char *elementSetName;
361 } Z_DatabaseSpecificUnit;
363 typedef struct Z_DatabaseSpecific
366 Z_DatabaseSpecificUnit **elements;
367 } Z_DatabaseSpecific;
369 typedef struct Z_ElementSetNames
372 #define Z_ElementSetNames_generic 0
373 #define Z_ElementSetNames_databaseSpecific 1
377 Z_DatabaseSpecific *databaseSpecific;
381 /* ---------------------- RPN QUERY --------------------------- */
383 typedef struct Z_ComplexAttribute
386 Z_StringOrNumeric **list;
387 int num_semanticAction;
388 int **semanticAction; /* OPTIONAL */
389 } Z_ComplexAttribute;
391 typedef struct Z_AttributeElement
394 Odr_oid *attributeSet; /* OPTIONAL - v3 only */
399 #define Z_AttributeValue_numeric 0
400 #define Z_AttributeValue_complex 1
404 Z_ComplexAttribute *complex;
409 } Z_AttributeElement;
411 typedef struct Z_Term
414 #define Z_Term_general 0
415 #define Z_Term_numeric 1
416 #define Z_Term_characterString 2
418 #define Z_Term_dateTime 4
419 #define Z_Term_external 5
420 #define Z_Term_integerAndUnit 6
421 #define Z_Term_null 7
424 Odr_oct *general; /* this is required for v2 */
426 char *characterString;
429 Z_External *external;
430 /* Z_IntUnit *integerAndUnit; */
435 typedef struct Z_AttributesPlusTerm
438 Z_AttributeElement **attributeList;
440 } Z_AttributesPlusTerm;
442 typedef struct Z_ResultSetPlusAttributes
446 Z_AttributeElement **attributeList;
447 } Z_ResultSetPlusAttributes;
449 typedef struct Z_ProximityOperator
451 bool_t *exclusion; /* OPTIONAL */
455 #define Z_Prox_lessThan 1
456 #define Z_Prox_lessThanOrEqual 2
457 #define Z_Prox_equal 3
458 #define Z_Prox_greaterThanOrEqual 4
459 #define Z_Prox_greaterThan 5
460 #define Z_Prox_notEqual 6
462 #define Z_ProxCode_known 0
463 #define Z_ProxCode_private 1
464 int *proximityUnitCode;
465 #define Z_ProxUnit_character 1
466 #define Z_ProxUnit_word 2
467 #define Z_ProxUnit_sentence 3
468 #define Z_ProxUnit_paragraph 4
469 #define Z_ProxUnit_section 5
470 #define Z_ProxUnit_chapter 6
471 #define Z_ProxUnit_document 7
472 #define Z_ProxUnit_element 8
473 #define Z_ProxUnit_subelement 9
474 #define Z_ProxUnit_elementType 10
475 #define Z_ProxUnit_byte 11 /* v3 only */
476 } Z_ProximityOperator;
478 typedef struct Z_Operator
481 #define Z_Operator_and 0
482 #define Z_Operator_or 1
483 #define Z_Operator_and_not 2
484 #define Z_Operator_prox 3
487 Odr_null *and; /* these guys are nulls. */
490 Z_ProximityOperator *prox;
494 typedef struct Z_Operand
497 #define Z_Operand_APT 0
498 #define Z_Operand_resultSetId 1
499 #define Z_Operand_resultAttr /* v3 only */ 2
502 Z_AttributesPlusTerm *attributesPlusTerm;
503 Z_ResultSetId *resultSetId;
504 Z_ResultSetPlusAttributes *resultAttr;
508 typedef struct Z_Complex
510 struct Z_RPNStructure *s1;
511 struct Z_RPNStructure *s2;
512 Z_Operator *roperator;
515 typedef struct Z_RPNStructure
518 #define Z_RPNStructure_simple 0
519 #define Z_RPNStructure_complex 1
527 typedef struct Z_RPNQuery
529 Odr_oid *attributeSetId;
530 Z_RPNStructure *RPNStructure;
533 /* -------------------------- SEARCHREQUEST -------------------------- */
535 typedef struct Z_Query
538 #define Z_Query_type_1 1
539 #define Z_Query_type_2 2
540 #define Z_Query_type_101 3
545 Z_RPNQuery *type_101;
549 typedef struct Z_SearchRequest
551 Z_ReferenceId *referenceId; /* OPTIONAL */
552 int *smallSetUpperBound;
553 int *largeSetLowerBound;
554 int *mediumSetPresentNumber;
555 bool_t *replaceIndicator;
557 int num_databaseNames;
558 char **databaseNames;
559 Z_ElementSetNames *smallSetElementSetNames; /* OPTIONAL */
560 Z_ElementSetNames *mediumSetElementSetNames; /* OPTIONAL */
561 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
564 Z_OtherInformation *additionalSearchInfo; /* OPTIONAL */
565 Z_OtherInformation *otherInfo; /* OPTIONAL */
569 /* ------------------------ RECORD -------------------------- */
571 typedef Z_External Z_DatabaseRecord;
575 typedef struct Z_DefaultDiagFormat
577 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
579 /* until the whole character set issue becomes more definite,
580 * you can probably ignore this on input. */
582 #define Z_DiagForm_v2AddInfo 0
583 #define Z_DiagForm_v3AddInfo 1
585 } Z_DefaultDiagFormat;
587 typedef struct Z_DiagRec
590 #define Z_DiagRec_defaultFormat 0
591 #define Z_DiagRec_externallyDefined 1
594 Z_DefaultDiagFormat *defaultFormat;
595 Z_External *externallyDefined;
601 typedef struct Z_DiagRec
603 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
610 typedef struct Z_DiagRecs
613 Z_DiagRec **diagRecs;
616 typedef struct Z_NamePlusRecord
618 char *databaseName; /* OPTIONAL */
620 #define Z_NamePlusRecord_databaseRecord 0
621 #define Z_NamePlusRecord_surrogateDiagnostic 1
624 Z_DatabaseRecord *databaseRecord;
625 Z_DiagRec *surrogateDiagnostic;
629 typedef struct Z_NamePlusRecordList
632 Z_NamePlusRecord **records;
633 } Z_NamePlusRecordList;
635 typedef struct Z_Records
638 #define Z_Records_DBOSD 0
639 #define Z_Records_NSD 1
640 #define Z_Records_multipleNSD 2
643 Z_NamePlusRecordList *databaseOrSurDiagnostics;
644 Z_DiagRec *nonSurrogateDiagnostic;
645 Z_DiagRecs *multipleNonSurDiagnostics;
649 /* ------------------------ SEARCHRESPONSE ------------------ */
651 typedef struct Z_SearchResponse
653 Z_ReferenceId *referenceId; /* OPTIONAL */
655 int *numberOfRecordsReturned;
656 int *nextResultSetPosition;
657 bool_t *searchStatus;
658 int *resultSetStatus; /* OPTIONAL */
659 #define Z_RES_SUBSET 1
660 #define Z_RES_INTERIM 2
662 int *presentStatus; /* OPTIONAL */
663 #define Z_PRES_SUCCESS 0
664 #define Z_PRES_PARTIAL_1 1
665 #define Z_PRES_PARTIAL_2 2
666 #define Z_PRES_PARTIAL_3 3
667 #define Z_PRES_PARTIAL_4 4
668 #define Z_PRES_FAILURE 5
669 Z_Records *records; /* OPTIONAL */
671 Z_OtherInformation *additionalSearchInfo;
672 Z_OtherInformation *otherInfo;
676 /* ------------------------- PRESENT SERVICE -----------------*/
678 typedef struct Z_ElementSpec
681 #define Z_ElementSpec_elementSetName 0
682 #define Z_ElementSpec_externalSpec 1
685 char *elementSetName;
686 Z_External *externalSpec;
690 typedef struct Z_Specification
692 Odr_oid *schema; /* OPTIONAL */
693 Z_ElementSpec *elementSpec; /* OPTIONAL */
696 typedef struct Z_DbSpecific
699 Z_Specification *spec;
702 typedef struct Z_CompSpec
704 bool_t *selectAlternativeSyntax;
705 Z_Specification *generic; /* OPTIONAL */
707 Z_DbSpecific **dbSpecific; /* OPTIONAL */
708 int num_recordSyntax;
709 Odr_oid **recordSyntax; /* OPTIONAL */
712 typedef struct Z_RecordComposition
715 #define Z_RecordComp_simple 0
716 #define Z_RecordComp_complex 1
719 Z_ElementSetNames *simple;
722 } Z_RecordComposition;
724 typedef struct Z_Range
726 int *startingPosition;
727 int *numberOfRecords;
730 typedef struct Z_PresentRequest
732 Z_ReferenceId *referenceId; /* OPTIONAL */
733 Z_ResultSetId *resultSetId;
734 int *resultSetStartPoint;
735 int *numberOfRecordsRequested;
738 Z_Range **additionalRanges; /* OPTIONAL */
739 Z_RecordComposition *recordComposition; /* OPTIONAL */
741 Z_ElementSetNames *elementSetNames; /* OPTIONAL */
743 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
745 int *maxSegmentCount; /* OPTIONAL */
746 int *maxRecordSize; /* OPTIONAL */
747 int *maxSegmentSize; /* OPTIONAL */
748 Z_OtherInformation *otherInfo; /* OPTIONAL */
752 typedef struct Z_PresentResponse
754 Z_ReferenceId *referenceId; /* OPTIONAL */
755 int *numberOfRecordsReturned;
756 int *nextResultSetPosition;
760 Z_OtherInformation *otherInfo; /* OPTIONAL */
764 /* ------------------ RESOURCE CONTROL ----------------*/
766 typedef struct Z_TriggerResourceControlRequest
768 Z_ReferenceId *referenceId; /* OPTIONAL */
769 int *requestedAction;
770 #define Z_TriggerResourceCtrl_resourceReport 1
771 #define Z_TriggerResourceCtrl_resourceControl 2
772 #define Z_TriggerResourceCtrl_cancel 3
773 Odr_oid *prefResourceReportFormat; /* OPTIONAL */
774 bool_t *resultSetWanted; /* OPTIONAL */
776 Z_OtherInformation *otherInfo;
778 } Z_TriggerResourceControlRequest;
780 typedef struct Z_ResourceControlRequest
782 Z_ReferenceId *referenceId; /* OPTIONAL */
783 bool_t *suspendedFlag; /* OPTIONAL */
784 Z_External *resourceReport; /* OPTIONAL */
785 int *partialResultsAvailable; /* OPTIONAL */
786 #define Z_ResourceControlRequest_subset 1
787 #define Z_ResourceControlRequest_interim 2
788 #define Z_ResourceControlRequest_none 3
789 bool_t *responseRequired;
790 bool_t *triggeredRequestFlag; /* OPTIONAL */
792 Z_OtherInformation *otherInfo;
794 } Z_ResourceControlRequest;
796 typedef struct Z_ResourceControlResponse
798 Z_ReferenceId *referenceId; /* OPTIONAL */
799 bool_t *continueFlag;
800 bool_t *resultSetWanted; /* OPTIONAL */
802 Z_OtherInformation *otherInfo;
804 } Z_ResourceControlResponse;
807 /* ------------------ ACCESS CTRL SERVICE ----------------*/
809 typedef struct Z_AccessControlRequest
811 Z_ReferenceId *referenceId; /* OPTIONAL */
813 #define Z_AccessRequest_simpleForm 0
814 #define Z_AccessRequest_externallyDefined 1
818 Z_External *externallyDefined;
821 Z_OtherInformation *otherInfo; /* OPTIONAL */
823 } Z_AccessControlRequest;
825 typedef struct Z_AccessControlResponse
827 Z_ReferenceId *referenceId; /* OPTIONAL */
829 #define Z_AccessResponse_simpleForm 0
830 #define Z_AccessResponse_externallyDefined 1
834 Z_External *externallyDefined;
836 Z_DiagRec *diagnostic; /* OPTIONAL */
838 Z_OtherInformation *otherInfo; /* OPTIONAL */
840 } Z_AccessControlResponse;
842 /* ------------------------ SCAN SERVICE -------------------- */
844 typedef struct Z_AttributeList
847 Z_AttributeElement **attributes;
850 typedef struct Z_AlternativeTerm
853 Z_AttributesPlusTerm **terms;
858 typedef struct Z_ByDatabase
861 int *num; /* OPTIONAL */
862 Z_OtherInformation *otherDbInfo; /* OPTIONAL */
865 typedef struct Z_ByDatabaseList
868 Z_ByDatabase **elements;
871 typedef struct Z_ScanOccurrences
874 #define Z_ScanOccurrences_global 0
875 #define Z_ScanOccurrences_byDatabase 1
879 Z_ByDatabaseList *byDatabase;
884 typedef struct Z_OccurrenceByAttributesElem
886 Z_AttributeList *attributes;
887 Z_ScanOccurrences *occurrences; /* OPTIONAL */
888 Z_OtherInformation *otherOccurInfo; /* OPTIONAL */
889 } Z_OccurrenceByAttributesElem;
891 typedef struct Z_OccurrenceByAttributes
894 Z_OccurrenceByAttributesElem **elements;
895 } Z_OccurrenceByAttributes;
900 * Old, incomplete definition of OccurrenceByAttributes.
903 typedef struct Z_OccurrenceByAttributes
905 Z_AttributeList *attributes;
908 #define Z_OByAtt_global 0
909 #define Z_ObyAtt_byDatabase 1
915 /* Z_ByDatabase *byDatabase; */
918 } Z_OccurrenceByAttributes;
922 typedef struct Z_TermInfo
925 char *displayTerm; /* OPTIONAL */
926 Z_AttributeList *suggestedAttributes; /* OPTIONAL */
927 Z_AlternativeTerm *alternativeTerm; /* OPTIONAL */
928 int *globalOccurrences; /* OPTIONAL */
929 Z_OccurrenceByAttributes *byAttributes; /* OPTIONAL */
930 Z_OtherInformation *otherTermInfo; /* OPTIONAL */
933 typedef struct Z_Entry
936 #define Z_Entry_termInfo 0
937 #define Z_Entry_surrogateDiagnostic 1
940 Z_TermInfo *termInfo;
941 Z_DiagRec *surrogateDiagnostic;
945 typedef struct Z_Entries
951 typedef struct Z_ListEntries
954 #define Z_ListEntries_entries 0
955 #define Z_ListEntries_nonSurrogateDiagnostics 1
959 Z_DiagRecs *nonSurrogateDiagnostics;
963 typedef struct Z_ScanRequest
965 Z_ReferenceId *referenceId; /* OPTIONAL */
966 int num_databaseNames;
967 char **databaseNames;
968 Odr_oid *attributeSet; /* OPTIONAL */
969 Z_AttributesPlusTerm *termListAndStartPoint;
970 int *stepSize; /* OPTIONAL */
971 int *numberOfTermsRequested;
972 int *preferredPositionInResponse; /* OPTIONAL */
974 Z_OtherInformation *otherInfo;
978 typedef struct Z_ScanResponse
980 Z_ReferenceId *referenceId; /* OPTIONAL */
981 int *stepSize; /* OPTIONAL */
983 #define Z_Scan_success 0
984 #define Z_Scan_partial_1 1
985 #define Z_Scan_partial_2 2
986 #define Z_Scan_partial_3 3
987 #define Z_Scan_partial_4 4
988 #define Z_Scan_partial_5 5
989 #define Z_Scan_failure 6
990 int *numberOfEntriesReturned;
991 int *positionOfTerm; /* OPTIONAL */
992 Z_ListEntries *entries; /* OPTIONAL */
993 Odr_oid *attributeSet; /* OPTIONAL */
995 Z_OtherInformation *otherInfo;
1000 /* ------------------------ DELETE -------------------------- */
1002 #define Z_DeleteStatus_success 0
1003 #define Z_DeleteStatus_resultSetDidNotExist 1
1004 #define Z_DeleteStatus_previouslyDeletedByTarget 2
1005 #define Z_DeleteStatus_systemProblemAtTarget 3
1006 #define Z_DeleteStatus_accessNotAllowed 4
1007 #define Z_DeleteStatus_resourceControlAtOrigin 5
1008 #define Z_DeleteStatus_resourceControlAtTarget 6
1009 #define Z_DeleteStatus_bulkDeleteNotSupported 7
1010 #define Z_DeleteStatus_notAllRsltSetsDeletedOnBulkDlte 8
1011 #define Z_DeleteStatus_notAllRequestedResultSetsDeleted 9
1012 #define Z_DeleteStatus_resultSetInUse 10
1014 typedef struct Z_ListStatus
1020 typedef struct Z_DeleteResultSetRequest
1022 Z_ReferenceId *referenceId; /* OPTIONAL */
1023 int *deleteFunction;
1024 #define Z_DeleteRequest_list 0
1025 #define Z_DeleteRequest_all 1
1027 Z_ResultSetId **resultSetList; /* OPTIONAL */
1029 Z_OtherInformation *otherInfo;
1031 } Z_DeleteResultSetRequest;
1033 typedef struct Z_DeleteResultSetResponse
1035 Z_ReferenceId *referenceId; /* OPTIONAL */
1036 int *deleteOperationStatus;
1038 Z_ListStatus **deleteListStatuses; /* OPTIONAL */
1039 int *numberNotDeleted; /* OPTIONAL */
1040 int num_bulkStatuses;
1041 Z_ListStatus **bulkStatuses; /* OPTIONAL */
1042 char *deleteMessage; /* OPTIONAL */
1044 Z_OtherInformation *otherInfo;
1046 } Z_DeleteResultSetResponse;
1048 /* ------------------------ CLOSE SERVICE ------------------- */
1050 typedef struct Z_Close
1052 Z_ReferenceId *referenceId; /* OPTIONAL */
1054 #define Z_Close_finished 0
1055 #define Z_Close_shutdown 1
1056 #define Z_Close_systemProblem 2
1057 #define Z_Close_costLimit 3
1058 #define Z_Close_resources 4
1059 #define Z_Close_securityViolation 5
1060 #define Z_Close_protocolError 6
1061 #define Z_Close_lackOfActivity 7
1062 #define Z_Close_peerAbort 8
1063 #define Z_Close_unspecified 9
1064 char *diagnosticInformation; /* OPTIONAL */
1065 Odr_oid *resourceReportFormat; /* OPTIONAL */
1066 Z_External *resourceReport; /* OPTIONAL */
1068 Z_OtherInformation *otherInfo; /* OPTIONAL */
1072 /* ------------------------ SEGMENTATION -------------------- */
1074 typedef struct Z_Segment
1076 Z_ReferenceId *referenceId; /* OPTIONAL */
1077 int *numberOfRecordsReturned;
1078 int num_segmentRecords;
1079 Z_NamePlusRecord **segmentRecords;
1080 Z_OtherInformation *otherInfo; /* OPTIONAL */
1083 /* ----------------------- Extended Services ---------------- */
1085 typedef struct Z_Permissions
1088 int num_allowableFunctions;
1089 int **allowableFunctions;
1090 #define Z_Permissions_delete 1
1091 #define Z_Permissions_modifyContents 2
1092 #define Z_Permissions_modifyPermissions 3
1093 #define Z_Permissions_present 4
1094 #define Z_Permissions_invoke 5
1097 typedef struct Z_ExtendedServicesRequest
1099 Z_ReferenceId *referenceId; /* OPTIONAL */
1101 #define Z_ExtendedServicesRequest_create 1
1102 #define Z_ExtendedServicesRequest_delete 2
1103 #define Z_ExtendedServicesRequest_modify 3
1104 Odr_oid *packageType;
1105 char *packageName; /* OPTIONAL */
1106 char *userId; /* OPTIONAL */
1107 Z_IntUnit *retentionTime; /* OPTIONAL */
1108 Z_Permissions *permissions; /* OPTIONAL */
1109 char *description; /* OPTIONAL */
1110 Z_External *taskSpecificParameters; /* OPTIONAL */
1112 #define Z_ExtendedServicesRequest_wait 1
1113 #define Z_ExtendedServicesRequest_waitIfPossible 2
1114 #define Z_ExtendedServicesRequest_dontWait 3
1115 #define Z_ExtendedServicesRequest_dontReturnPackage 4
1116 char *elements; /* OPTIONAL */
1117 Z_OtherInformation *otherInfo; /* OPTIONAL */
1118 } Z_ExtendedServicesRequest;
1120 typedef struct Z_ExtendedServicesResponse
1122 Z_ReferenceId *referenceId; /* OPTIONAL */
1123 int *operationStatus;
1124 #define Z_ExtendedServicesResponse_done 1
1125 #define Z_ExtendedServicesResponse_accepted 2
1126 #define Z_ExtendedServicesResponse_failure 3
1127 int num_diagnostics;
1128 Z_DiagRec **diagnostics; /* OPTIONAL */
1129 Z_External *taskPackage; /* OPTIONAL */
1130 Z_OtherInformation *otherInfo; /* OPTIONAL */
1131 } Z_ExtendedServicesResponse;
1133 /* ------------------------ Sort --------------------------- */
1135 typedef struct Z_SortAttributes
1138 Z_AttributeList *list;
1141 typedef struct Z_SortKey
1144 #define Z_SortKey_sortField 0
1145 #define Z_SortKey_elementSpec 1
1146 #define Z_SortKey_sortAttributes 2
1150 Z_Specification *elementSpec;
1151 Z_SortAttributes *sortAttributes;
1155 typedef struct Z_SortDbSpecific
1161 typedef struct Z_SortDbSpecificList
1164 Z_SortDbSpecific **dbSpecific;
1165 } Z_SortDbSpecificList;
1167 typedef struct Z_SortElement
1170 #define Z_SortElement_generic 0
1171 #define Z_SortElement_databaseSpecific 1
1175 Z_SortDbSpecificList *databaseSpecific;
1179 typedef struct Z_SortMissingValueAction
1182 #define Z_SortMissingValAct_abort 0
1183 #define Z_SortMissingValAct_null 1
1184 #define Z_SortMissingValAct_valData 2
1191 } Z_SortMissingValueAction;
1193 typedef struct Z_SortKeySpec
1195 Z_SortElement *sortElement;
1197 #define Z_SortRelation_ascending 0
1198 #define Z_SortRelation_descending 1
1199 #define Z_SortRelation_ascendingByFreq 3
1200 #define Z_SortRelation_descendingByFreq 4
1201 int *caseSensitivity;
1202 #define Z_SortCase_caseSensitive 0
1203 #define Z_SortCase_caseInsensitive 1
1204 Z_SortMissingValueAction *missingValueAction; /* OPTIONAL */
1207 typedef struct Z_SortResponse
1209 Z_ReferenceId *referenceId; /* OPTIONAL */
1211 #define Z_SortStatus_success 0
1212 #define Z_SortStatus_partial_1 1
1213 #define Z_SortStatus_failure 2
1214 int *resultSetStatus; /* OPTIONAL */
1215 #define Z_SortResultSetStatus_empty 1
1216 #define Z_SortResultSetStatus_interim 2
1217 #define Z_SortResultSetStatus_unchanged 3
1218 #define Z_SortResultSetStatus_none 4
1219 Z_DiagRecs *diagnostics; /* OPTIONAL */
1220 Z_OtherInformation *otherInfo; /* OPTIONAL */
1223 typedef struct Z_SortKeySpecList
1226 Z_SortKeySpec **specs;
1227 } Z_SortKeySpecList;
1229 typedef struct Z_SortRequest
1231 Z_ReferenceId *referenceId; /* OPTIONAL */
1232 Z_StringList *inputResultSetNames;
1233 char *sortedResultSetName;
1234 Z_SortKeySpecList *sortSequence;
1235 Z_OtherInformation *otherInfo; /* OPTIONAL */
1238 /* ----------------------- Resource Report ------------------ */
1240 typedef struct Z_ResourceReportRequest
1242 Z_ReferenceId *referenceId; /* OPTIONAL */
1243 Z_ReferenceId *opId; /* OPTIONAL */
1244 Odr_oid *prefResourceReportFormat; /* OPTIONAL */
1245 Z_OtherInformation *otherInfo; /* OPTIONAL */
1246 } Z_ResourceReportRequest;
1248 typedef struct Z_ResourceReportResponse
1250 Z_ReferenceId *referenceId; /* OPTIONAL */
1251 int *resourceReportStatus;
1252 #define Z_ResourceReportStatus_success 0
1253 #define Z_ResourceReportStatus_partial 1
1254 #define Z_ResourceReportStatus_failure_1 2
1255 #define Z_ResourceReportStatus_failure_2 3
1256 #define Z_ResourceReportStatus_failure_3 4
1257 #define Z_ResourceReportStatus_failure_4 5
1258 #define Z_ResourceReportStatus_failure_5 6
1259 #define Z_ResourceReportStatus_failure_6 7
1260 Z_External *resourceReport; /* OPTIONAL */
1261 Z_OtherInformation *otherInfo; /* OPTIONAL */
1262 } Z_ResourceReportResponse;
1264 /* ------------------------ APDU ---------------------------- */
1266 typedef struct Z_APDU
1269 #define Z_APDU_initRequest 0
1270 #define Z_APDU_initResponse 1
1271 #define Z_APDU_searchRequest 2
1272 #define Z_APDU_searchResponse 3
1273 #define Z_APDU_presentRequest 4
1274 #define Z_APDU_presentResponse 5
1275 #define Z_APDU_deleteResultSetRequest 6
1276 #define Z_APDU_deleteResultSetResponse 7
1277 #define Z_APDU_resourceControlRequest 8
1278 #define Z_APDU_resourceControlResponse 9
1279 #define Z_APDU_triggerResourceControlRequest 10
1280 #define Z_APDU_scanRequest 11
1281 #define Z_APDU_scanResponse 12
1282 #define Z_APDU_segmentRequest 13
1283 #define Z_APDU_extendedServicesRequest 14
1284 #define Z_APDU_extendedServicesResponse 15
1285 #define Z_APDU_close 16
1286 #define Z_APDU_accessControlRequest 17
1287 #define Z_APDU_accessControlResponse 18
1288 #define Z_APDU_sortRequest 20
1289 #define Z_APDU_sortResponse 21
1290 #define Z_APDU_resourceReportRequest 22
1291 #define Z_APDU_resourceReportResponse 23
1294 Z_InitRequest *initRequest;
1295 Z_InitResponse *initResponse;
1296 Z_SearchRequest *searchRequest;
1297 Z_SearchResponse *searchResponse;
1298 Z_PresentRequest *presentRequest;
1299 Z_PresentResponse *presentResponse;
1300 Z_DeleteResultSetRequest *deleteResultSetRequest;
1301 Z_DeleteResultSetResponse *deleteResultSetResponse;
1302 Z_AccessControlRequest *accessControlRequest;
1303 Z_AccessControlResponse *accessControlResponse;
1304 Z_ResourceControlRequest *resourceControlRequest;
1305 Z_ResourceControlResponse *resourceControlResponse;
1306 Z_TriggerResourceControlRequest *triggerResourceControlRequest;
1307 Z_ResourceReportRequest *resourceReportRequest;
1308 Z_ResourceReportResponse *resourceReportResponse;
1309 Z_ScanRequest *scanRequest;
1310 Z_ScanResponse *scanResponse;
1311 Z_SortRequest *sortRequest;
1312 Z_SortResponse *sortResponse;
1313 Z_Segment *segmentRequest;
1314 Z_ExtendedServicesRequest *extendedServicesRequest;
1315 Z_ExtendedServicesResponse *extendedServicesResponse;
1320 int z_APDU(ODR o, Z_APDU **p, int opt);
1321 int z_SUTRS(ODR o, Odr_oct **p, int opt);
1323 Z_InitRequest *zget_InitRequest(ODR o);
1324 Z_InitResponse *zget_InitResponse(ODR o);
1325 Z_SearchRequest *zget_SearchRequest(ODR o);
1326 Z_SearchResponse *zget_SearchResponse(ODR o);
1327 Z_PresentRequest *zget_PresentRequest(ODR o);
1328 Z_PresentResponse *zget_PresentResponse(ODR o);
1329 Z_DeleteResultSetRequest *zget_DeleteResultSetRequest(ODR o);
1330 Z_DeleteResultSetResponse *zget_DeleteResultSetResponse(ODR o);
1331 Z_ScanRequest *zget_ScanRequest(ODR o);
1332 Z_ScanResponse *zget_ScanResponse(ODR o);
1333 Z_TriggerResourceControlRequest *zget_TriggerResourceControlRequest(ODR o);
1334 Z_ResourceControlRequest *zget_ResourceControlRequest(ODR o);
1335 Z_ResourceControlResponse *zget_ResourceControlResponse(ODR o);
1336 Z_Close *zget_Close(ODR o);
1337 int z_StringList(ODR o, Z_StringList **p, int opt);
1338 int z_InternationalString(ODR o, char **p, int opt);
1339 int z_OtherInformation(ODR o, Z_OtherInformation **p, int opt);
1340 int z_ElementSetName(ODR o, char **p, int opt);
1341 int z_IntUnit(ODR o, Z_IntUnit **p, int opt);
1342 int z_Unit(ODR o, Z_Unit **p, int opt);
1343 int z_DatabaseName(ODR o, Z_DatabaseName **p, int opt);
1344 int z_StringOrNumeric(ODR o, Z_StringOrNumeric **p, int opt);
1345 int z_OtherInformationUnit(ODR o, Z_OtherInformationUnit **p, int opt);
1346 int z_Term(ODR o, Z_Term **p, int opt);
1347 int z_Specification(ODR o, Z_Specification **p, int opt);
1348 int z_Permissions(ODR o, Z_Permissions **p, int opt);
1349 int z_DiagRec(ODR o, Z_DiagRec **p, int opt);
1350 int z_AttributeList(ODR o, Z_AttributeList **p, int opt);
1351 int z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt);
1352 Z_APDU *zget_APDU(ODR o, int which);
1353 int z_Query(ODR o, Z_Query **p, int opt);
1355 #include <prt-rsc.h>
1356 #include <prt-acc.h>
1357 #include <prt-exp.h>
1358 #include <prt-grs.h>
1359 #include <prt-arc.h>
1360 #include <prt-exd.h>
1361 #include <prt-dia.h>
1362 #include <prt-esp.h>
1363 #include <prt-add.h>
1365 #include <prt-ext.h>