2 * Copyright (c) 1995-2001, 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
26 * $Id: prt-proto.h,v 1.3 2001-09-24 21:51:55 adam Exp $
32 #include <yaz/yconfig.h>
35 #include <yaz/yaz-version.h>
39 /* ----------------- GLOBAL AUXILIARY DEFS ----------------*/
42 typedef struct Z_External Z_External;
44 typedef Odr_oct Z_ReferenceId;
45 typedef char Z_DatabaseName;
46 typedef char Z_ResultSetId;
47 typedef Odr_oct Z_ResultsetId;
49 typedef struct Z_InfoCategory
51 Odr_oid *categoryTypeId; /* OPTIONAL */
55 typedef struct Z_OtherInformationUnit
57 Z_InfoCategory *category; /* OPTIONAL */
59 #define Z_OtherInfo_characterInfo 0
60 #define Z_OtherInfo_binaryInfo 1
61 #define Z_OtherInfo_externallyDefinedInfo 2
62 #define Z_OtherInfo_oid 3
67 Z_External *externallyDefinedInfo;
70 } Z_OtherInformationUnit;
72 typedef struct Z_OtherInformation
75 Z_OtherInformationUnit **list;
78 typedef struct Z_StringOrNumeric
81 #define Z_StringOrNumeric_string 0
82 #define Z_StringOrNumeric_numeric 1
92 char *unitSystem; /* OPTIONAL */
93 Z_StringOrNumeric *unitType; /* OPTIONAL */
94 Z_StringOrNumeric *unit; /* OPTIONAL */
95 int *scaleFactor; /* OPTIONAL */
98 typedef struct Z_IntUnit
104 typedef Odr_oct Z_SUTRS;
106 typedef struct Z_StringList
112 /* ----------------- INIT SERVICE ----------------*/
116 char *groupId; /* OPTIONAL */
117 char *userId; /* OPTIONAL */
118 char *password; /* OPTIONAL */
121 typedef struct Z_IdAuthentication
124 #define Z_IdAuthentication_open 0
125 #define Z_IdAuthentication_idPass 1
126 #define Z_IdAuthentication_anonymous 2
127 #define Z_IdAuthentication_other 3
135 } Z_IdAuthentication;
137 #define Z_ProtocolVersion_1 0
138 #define Z_ProtocolVersion_2 1
139 #define Z_ProtocolVersion_3 2
141 #define Z_Options_search 0
142 #define Z_Options_present 1
143 #define Z_Options_delSet 2
144 #define Z_Options_resourceReport 3
145 #define Z_Options_triggerResourceCtrl 4
146 #define Z_Options_resourceCtrl 5
147 #define Z_Options_accessCtrl 6
148 #define Z_Options_scan 7
149 #define Z_Options_sort 8
150 #define Z_Options_reserved 9
151 #define Z_Options_extendedServices 10
152 #define Z_Options_level_1Segmentation 11
153 #define Z_Options_level_2Segmentation 12
154 #define Z_Options_concurrentOperations 13
155 #define Z_Options_namedResultSets 14
157 typedef struct Z_InitRequest
159 Z_ReferenceId *referenceId; /* OPTIONAL */
160 Odr_bitmask *protocolVersion;
161 Odr_bitmask *options;
162 int *preferredMessageSize;
163 int *maximumRecordSize;
164 Z_IdAuthentication* idAuthentication; /* OPTIONAL */
165 char *implementationId; /* OPTIONAL */
166 char *implementationName; /* OPTIONAL */
167 char *implementationVersion; /* OPTIONAL */
168 Z_External *userInformationField; /* OPTIONAL */
169 Z_OtherInformation *otherInfo; /* OPTIONAL */
172 typedef struct Z_InitResponse
174 Z_ReferenceId *referenceId; /* OPTIONAL */
175 Odr_bitmask *protocolVersion;
176 Odr_bitmask *options;
177 int *preferredMessageSize;
178 int *maximumRecordSize;
180 char *implementationId; /* OPTIONAL */
181 char *implementationName; /* OPTIONAL */
182 char *implementationVersion; /* OPTIONAL */
183 Z_External *userInformationField; /* OPTIONAL */
184 Z_OtherInformation *otherInfo; /* OPTIONAL */
187 typedef struct Z_NSRAuthentication
192 } Z_NSRAuthentication;
194 int z_NSRAuthentication(ODR o, Z_NSRAuthentication **p, int opt,
197 int z_StrAuthentication(ODR o, char **p, int opt, const char *name);
199 /* ------------------ SEARCH SERVICE ----------------*/
201 typedef struct Z_DatabaseSpecificUnit
204 char *elementSetName;
205 } Z_DatabaseSpecificUnit;
207 typedef struct Z_DatabaseSpecific
210 Z_DatabaseSpecificUnit **elements;
211 } Z_DatabaseSpecific;
213 typedef struct Z_ElementSetNames
216 #define Z_ElementSetNames_generic 0
217 #define Z_ElementSetNames_databaseSpecific 1
221 Z_DatabaseSpecific *databaseSpecific;
225 /* ---------------------- RPN QUERY --------------------------- */
227 typedef struct Z_ComplexAttribute
230 Z_StringOrNumeric **list;
231 int num_semanticAction;
232 int **semanticAction; /* OPTIONAL */
233 } Z_ComplexAttribute;
235 typedef struct Z_AttributeElement
237 Odr_oid *attributeSet; /* OPTIONAL - v3 only */
240 #define Z_AttributeValue_numeric 0
241 #define Z_AttributeValue_complex 1
245 Z_ComplexAttribute *complex;
247 } Z_AttributeElement;
249 typedef struct Z_Term
252 #define Z_Term_general 0
253 #define Z_Term_numeric 1
254 #define Z_Term_characterString 2
256 #define Z_Term_dateTime 4
257 #define Z_Term_external 5
258 #define Z_Term_integerAndUnit 6
259 #define Z_Term_null 7
262 Odr_oct *general; /* this is required for v2 */
264 char *characterString;
267 Z_External *external;
268 /* Z_IntUnit *integerAndUnit; */
273 typedef struct Z_AttributesPlusTerm
276 Z_AttributeElement **attributeList;
278 } Z_AttributesPlusTerm;
280 typedef struct Z_ResultSetPlusAttributes
284 Z_AttributeElement **attributeList;
285 } Z_ResultSetPlusAttributes;
287 typedef struct Z_ProximityOperator
289 bool_t *exclusion; /* OPTIONAL */
293 #define Z_Prox_lessThan 1
294 #define Z_Prox_lessThanOrEqual 2
295 #define Z_Prox_equal 3
296 #define Z_Prox_greaterThanOrEqual 4
297 #define Z_Prox_greaterThan 5
298 #define Z_Prox_notEqual 6
300 #define Z_ProxCode_known 0
301 #define Z_ProxCode_private 1
302 int *proximityUnitCode;
303 #define Z_ProxUnit_character 1
304 #define Z_ProxUnit_word 2
305 #define Z_ProxUnit_sentence 3
306 #define Z_ProxUnit_paragraph 4
307 #define Z_ProxUnit_section 5
308 #define Z_ProxUnit_chapter 6
309 #define Z_ProxUnit_document 7
310 #define Z_ProxUnit_element 8
311 #define Z_ProxUnit_subelement 9
312 #define Z_ProxUnit_elementType 10
313 #define Z_ProxUnit_byte 11 /* v3 only */
314 } Z_ProximityOperator;
316 typedef struct Z_Operator
319 #define Z_Operator_and 0
320 #define Z_Operator_or 1
321 #define Z_Operator_and_not 2
322 #define Z_Operator_prox 3
325 Odr_null *op_and; /* these guys are nulls. */
327 Odr_null *op_and_not;
328 Z_ProximityOperator *prox;
332 typedef struct Z_Operand
335 #define Z_Operand_APT 0
336 #define Z_Operand_resultSetId 1
337 #define Z_Operand_resultAttr /* v3 only */ 2
340 Z_AttributesPlusTerm *attributesPlusTerm;
341 Z_ResultSetId *resultSetId;
342 Z_ResultSetPlusAttributes *resultAttr;
346 typedef struct Z_Complex
348 struct Z_RPNStructure *s1;
349 struct Z_RPNStructure *s2;
350 Z_Operator *roperator;
353 typedef struct Z_RPNStructure
356 #define Z_RPNStructure_simple 0
357 #define Z_RPNStructure_complex 1
365 typedef struct Z_RPNQuery
367 Odr_oid *attributeSetId;
368 Z_RPNStructure *RPNStructure;
371 /* -------------------------- SEARCHREQUEST -------------------------- */
373 typedef struct Z_Query
376 #define Z_Query_type_1 1
377 #define Z_Query_type_2 2
378 #define Z_Query_type_101 3
383 Z_RPNQuery *type_101;
387 typedef struct Z_SearchRequest
389 Z_ReferenceId *referenceId; /* OPTIONAL */
390 int *smallSetUpperBound;
391 int *largeSetLowerBound;
392 int *mediumSetPresentNumber;
393 bool_t *replaceIndicator;
395 int num_databaseNames;
396 char **databaseNames;
397 Z_ElementSetNames *smallSetElementSetNames; /* OPTIONAL */
398 Z_ElementSetNames *mediumSetElementSetNames; /* OPTIONAL */
399 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
401 Z_OtherInformation *additionalSearchInfo; /* OPTIONAL */
402 Z_OtherInformation *otherInfo; /* OPTIONAL */
405 /* ------------------------ RECORD -------------------------- */
407 typedef Z_External Z_DatabaseRecord;
409 typedef struct Z_DefaultDiagFormat
411 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
413 /* until the whole character set issue becomes more definite,
414 * you can probably ignore this on input. */
416 #define Z_DiagForm_v2AddInfo 0
417 #define Z_DiagForm_v3AddInfo 1
419 } Z_DefaultDiagFormat;
421 typedef struct Z_DiagRec
424 #define Z_DiagRec_defaultFormat 0
425 #define Z_DiagRec_externallyDefined 1
428 Z_DefaultDiagFormat *defaultFormat;
429 Z_External *externallyDefined;
433 typedef struct Z_DiagRecs
436 Z_DiagRec **diagRecs;
439 typedef struct Z_NamePlusRecord
441 char *databaseName; /* OPTIONAL */
443 #define Z_NamePlusRecord_databaseRecord 0
444 #define Z_NamePlusRecord_surrogateDiagnostic 1
447 Z_DatabaseRecord *databaseRecord;
448 Z_DiagRec *surrogateDiagnostic;
452 typedef struct Z_NamePlusRecordList
455 Z_NamePlusRecord **records;
456 } Z_NamePlusRecordList;
458 typedef struct Z_Records
461 #define Z_Records_DBOSD 0
462 #define Z_Records_NSD 1
463 #define Z_Records_multipleNSD 2
466 Z_NamePlusRecordList *databaseOrSurDiagnostics;
467 Z_DiagRec *nonSurrogateDiagnostic;
468 Z_DiagRecs *multipleNonSurDiagnostics;
472 /* ------------------------ SEARCHRESPONSE ------------------ */
474 typedef struct Z_SearchResponse
476 Z_ReferenceId *referenceId; /* OPTIONAL */
478 int *numberOfRecordsReturned;
479 int *nextResultSetPosition;
480 bool_t *searchStatus;
481 int *resultSetStatus; /* OPTIONAL */
482 #define Z_RES_SUBSET 1
483 #define Z_RES_INTERIM 2
485 int *presentStatus; /* OPTIONAL */
486 #define Z_PRES_SUCCESS 0
487 #define Z_PRES_PARTIAL_1 1
488 #define Z_PRES_PARTIAL_2 2
489 #define Z_PRES_PARTIAL_3 3
490 #define Z_PRES_PARTIAL_4 4
491 #define Z_PRES_FAILURE 5
492 Z_Records *records; /* OPTIONAL */
493 Z_OtherInformation *additionalSearchInfo;
494 Z_OtherInformation *otherInfo;
497 /* ------------------------- PRESENT SERVICE -----------------*/
499 typedef struct Z_ElementSpec
502 #define Z_ElementSpec_elementSetName 0
503 #define Z_ElementSpec_externalSpec 1
506 char *elementSetName;
507 Z_External *externalSpec;
511 typedef struct Z_Specification
513 Odr_oid *schema; /* OPTIONAL */
514 Z_ElementSpec *elementSpec; /* OPTIONAL */
517 typedef struct Z_DbSpecific
520 Z_Specification *spec;
523 typedef struct Z_CompSpec
525 bool_t *selectAlternativeSyntax;
526 Z_Specification *generic; /* OPTIONAL */
528 Z_DbSpecific **dbSpecific; /* OPTIONAL */
529 int num_recordSyntax;
530 Odr_oid **recordSyntax; /* OPTIONAL */
533 typedef struct Z_RecordComposition
536 #define Z_RecordComp_simple 0
537 #define Z_RecordComp_complex 1
540 Z_ElementSetNames *simple;
543 } Z_RecordComposition;
545 typedef struct Z_Range
547 int *startingPosition;
548 int *numberOfRecords;
551 typedef struct Z_PresentRequest
553 Z_ReferenceId *referenceId; /* OPTIONAL */
554 Z_ResultSetId *resultSetId;
555 int *resultSetStartPoint;
556 int *numberOfRecordsRequested;
558 Z_Range **additionalRanges; /* OPTIONAL */
559 Z_RecordComposition *recordComposition; /* OPTIONAL */
560 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
561 int *maxSegmentCount; /* OPTIONAL */
562 int *maxRecordSize; /* OPTIONAL */
563 int *maxSegmentSize; /* OPTIONAL */
564 Z_OtherInformation *otherInfo; /* OPTIONAL */
567 typedef struct Z_PresentResponse
569 Z_ReferenceId *referenceId; /* OPTIONAL */
570 int *numberOfRecordsReturned;
571 int *nextResultSetPosition;
574 Z_OtherInformation *otherInfo; /* OPTIONAL */
577 /* ------------------ RESOURCE CONTROL ----------------*/
579 typedef struct Z_TriggerResourceControlRequest
581 Z_ReferenceId *referenceId; /* OPTIONAL */
582 int *requestedAction;
583 #define Z_TriggerResourceCtrl_resourceReport 1
584 #define Z_TriggerResourceCtrl_resourceControl 2
585 #define Z_TriggerResourceCtrl_cancel 3
586 Odr_oid *prefResourceReportFormat; /* OPTIONAL */
587 bool_t *resultSetWanted; /* OPTIONAL */
588 Z_OtherInformation *otherInfo;
589 } Z_TriggerResourceControlRequest;
591 typedef struct Z_ResourceControlRequest
593 Z_ReferenceId *referenceId; /* OPTIONAL */
594 bool_t *suspendedFlag; /* OPTIONAL */
595 Z_External *resourceReport; /* OPTIONAL */
596 int *partialResultsAvailable; /* OPTIONAL */
597 #define Z_ResourceControlRequest_subset 1
598 #define Z_ResourceControlRequest_interim 2
599 #define Z_ResourceControlRequest_none 3
600 bool_t *responseRequired;
601 bool_t *triggeredRequestFlag; /* OPTIONAL */
602 Z_OtherInformation *otherInfo;
603 } Z_ResourceControlRequest;
605 typedef struct Z_ResourceControlResponse
607 Z_ReferenceId *referenceId; /* OPTIONAL */
608 bool_t *continueFlag;
609 bool_t *resultSetWanted; /* OPTIONAL */
610 Z_OtherInformation *otherInfo;
611 } Z_ResourceControlResponse;
614 /* ------------------ ACCESS CTRL SERVICE ----------------*/
616 typedef struct Z_AccessControlRequest
618 Z_ReferenceId *referenceId; /* OPTIONAL */
620 #define Z_AccessRequest_simpleForm 0
621 #define Z_AccessRequest_externallyDefined 1
625 Z_External *externallyDefined;
627 Z_OtherInformation *otherInfo; /* OPTIONAL */
628 } Z_AccessControlRequest;
630 typedef struct Z_AccessControlResponse
632 Z_ReferenceId *referenceId; /* OPTIONAL */
634 #define Z_AccessResponse_simpleForm 0
635 #define Z_AccessResponse_externallyDefined 1
639 Z_External *externallyDefined;
641 Z_DiagRec *diagnostic; /* OPTIONAL */
642 Z_OtherInformation *otherInfo; /* OPTIONAL */
643 } Z_AccessControlResponse;
645 /* ------------------------ SCAN SERVICE -------------------- */
647 typedef struct Z_AttributeList
650 Z_AttributeElement **attributes;
653 typedef struct Z_AlternativeTerm
656 Z_AttributesPlusTerm **terms;
659 typedef struct Z_ByDatabase
662 int *num; /* OPTIONAL */
663 Z_OtherInformation *otherDbInfo; /* OPTIONAL */
666 typedef struct Z_ByDatabaseList
669 Z_ByDatabase **elements;
672 typedef struct Z_ScanOccurrences
675 #define Z_ScanOccurrences_global 0
676 #define Z_ScanOccurrences_byDatabase 1
680 Z_ByDatabaseList *byDatabase;
685 typedef struct Z_OccurrenceByAttributesElem
687 Z_AttributeList *attributes;
688 Z_ScanOccurrences *occurrences; /* OPTIONAL */
689 Z_OtherInformation *otherOccurInfo; /* OPTIONAL */
690 } Z_OccurrenceByAttributesElem;
692 typedef struct Z_OccurrenceByAttributes
695 Z_OccurrenceByAttributesElem **elements;
696 } Z_OccurrenceByAttributes;
698 typedef struct Z_TermInfo
701 char *displayTerm; /* OPTIONAL */
702 Z_AttributeList *suggestedAttributes; /* OPTIONAL */
703 Z_AlternativeTerm *alternativeTerm; /* OPTIONAL */
704 int *globalOccurrences; /* OPTIONAL */
705 Z_OccurrenceByAttributes *byAttributes; /* OPTIONAL */
706 Z_OtherInformation *otherTermInfo; /* OPTIONAL */
709 typedef struct Z_Entry
712 #define Z_Entry_termInfo 0
713 #define Z_Entry_surrogateDiagnostic 1
716 Z_TermInfo *termInfo;
717 Z_DiagRec *surrogateDiagnostic;
721 #ifdef BUGGY_LISTENTRIES
723 typedef struct Z_Entries
729 typedef struct Z_ListEntries
732 #define Z_ListEntries_entries 0
733 #define Z_ListEntries_nonSurrogateDiagnostics 1
737 Z_DiagRecs *nonSurrogateDiagnostics;
743 typedef struct Z_ListEntries {
745 Z_Entry **entries; /* OPT */
746 int num_nonsurrogateDiagnostics;
747 Z_DiagRec **nonsurrogateDiagnostics; /* OPT */
750 typedef struct Z_ScanRequest
752 Z_ReferenceId *referenceId; /* OPTIONAL */
753 int num_databaseNames;
754 char **databaseNames;
755 Odr_oid *attributeSet; /* OPTIONAL */
756 Z_AttributesPlusTerm *termListAndStartPoint;
757 int *stepSize; /* OPTIONAL */
758 int *numberOfTermsRequested;
759 int *preferredPositionInResponse; /* OPTIONAL */
760 Z_OtherInformation *otherInfo;
763 typedef struct Z_ScanResponse
765 Z_ReferenceId *referenceId; /* OPTIONAL */
766 int *stepSize; /* OPTIONAL */
768 #define Z_Scan_success 0
769 #define Z_Scan_partial_1 1
770 #define Z_Scan_partial_2 2
771 #define Z_Scan_partial_3 3
772 #define Z_Scan_partial_4 4
773 #define Z_Scan_partial_5 5
774 #define Z_Scan_failure 6
775 int *numberOfEntriesReturned;
776 int *positionOfTerm; /* OPTIONAL */
777 Z_ListEntries *entries; /* OPTIONAL */
778 Odr_oid *attributeSet; /* OPTIONAL */
779 Z_OtherInformation *otherInfo;
783 /* ------------------------ DELETE -------------------------- */
785 #define Z_DeleteStatus_success 0
786 #define Z_DeleteStatus_resultSetDidNotExist 1
787 #define Z_DeleteStatus_previouslyDeletedByTarget 2
788 #define Z_DeleteStatus_systemProblemAtTarget 3
789 #define Z_DeleteStatus_accessNotAllowed 4
790 #define Z_DeleteStatus_resourceControlAtOrigin 5
791 #define Z_DeleteStatus_resourceControlAtTarget 6
792 #define Z_DeleteStatus_bulkDeleteNotSupported 7
793 #define Z_DeleteStatus_notAllRsltSetsDeletedOnBulkDlte 8
794 #define Z_DeleteStatus_notAllRequestedResultSetsDeleted 9
795 #define Z_DeleteStatus_resultSetInUse 10
797 typedef struct Z_ListStatus
803 typedef struct Z_DeleteResultSetRequest
805 Z_ReferenceId *referenceId; /* OPTIONAL */
807 #define Z_DeleteRequest_list 0
808 #define Z_DeleteRequest_all 1
809 int num_resultSetList;
810 Z_ResultSetId **resultSetList; /* OPTIONAL */
811 Z_OtherInformation *otherInfo;
812 } Z_DeleteResultSetRequest;
814 typedef struct Z_ListStatuses {
816 Z_ListStatus **elements;
819 typedef struct Z_DeleteResultSetResponse
821 Z_ReferenceId *referenceId; /* OPTIONAL */
822 int *deleteOperationStatus;
823 Z_ListStatuses *deleteListStatuses;/* OPTIONAL */
824 int *numberNotDeleted; /* OPTIONAL */
825 Z_ListStatuses *bulkStatuses; /* OPTIONAL */
826 char *deleteMessage; /* OPTIONAL */
827 Z_OtherInformation *otherInfo;
828 } Z_DeleteResultSetResponse;
830 /* ------------------------ CLOSE SERVICE ------------------- */
832 typedef struct Z_Close
834 Z_ReferenceId *referenceId; /* OPTIONAL */
836 #define Z_Close_finished 0
837 #define Z_Close_shutdown 1
838 #define Z_Close_systemProblem 2
839 #define Z_Close_costLimit 3
840 #define Z_Close_resources 4
841 #define Z_Close_securityViolation 5
842 #define Z_Close_protocolError 6
843 #define Z_Close_lackOfActivity 7
844 #define Z_Close_peerAbort 8
845 #define Z_Close_unspecified 9
846 char *diagnosticInformation; /* OPTIONAL */
847 Odr_oid *resourceReportFormat; /* OPTIONAL */
848 Z_External *resourceReport; /* OPTIONAL */
849 Z_OtherInformation *otherInfo; /* OPTIONAL */
852 /* ------------------------ SEGMENTATION -------------------- */
854 typedef struct Z_Segment
856 Z_ReferenceId *referenceId; /* OPTIONAL */
857 int *numberOfRecordsReturned;
858 int num_segmentRecords;
859 Z_NamePlusRecord **segmentRecords;
860 Z_OtherInformation *otherInfo; /* OPTIONAL */
863 /* ----------------------- Extended Services ---------------- */
865 typedef struct Z_Permissions
868 int num_allowableFunctions;
869 int **allowableFunctions;
870 #define Z_Permissions_delete 1
871 #define Z_Permissions_modifyContents 2
872 #define Z_Permissions_modifyPermissions 3
873 #define Z_Permissions_present 4
874 #define Z_Permissions_invoke 5
877 typedef struct Z_ExtendedServicesRequest
879 Z_ReferenceId *referenceId; /* OPTIONAL */
881 #define Z_ExtendedServicesRequest_create 1
882 #define Z_ExtendedServicesRequest_delete 2
883 #define Z_ExtendedServicesRequest_modify 3
884 Odr_oid *packageType;
885 char *packageName; /* OPTIONAL */
886 char *userId; /* OPTIONAL */
887 Z_IntUnit *retentionTime; /* OPTIONAL */
888 Z_Permissions *permissions; /* OPTIONAL */
889 char *description; /* OPTIONAL */
890 Z_External *taskSpecificParameters; /* OPTIONAL */
892 #define Z_ExtendedServicesRequest_wait 1
893 #define Z_ExtendedServicesRequest_waitIfPossible 2
894 #define Z_ExtendedServicesRequest_dontWait 3
895 #define Z_ExtendedServicesRequest_dontReturnPackage 4
896 char *elements; /* OPTIONAL */
897 Z_OtherInformation *otherInfo; /* OPTIONAL */
898 } Z_ExtendedServicesRequest;
900 typedef struct Z_ExtendedServicesResponse
902 Z_ReferenceId *referenceId; /* OPTIONAL */
903 int *operationStatus;
904 #define Z_ExtendedServicesResponse_done 1
905 #define Z_ExtendedServicesResponse_accepted 2
906 #define Z_ExtendedServicesResponse_failure 3
908 Z_DiagRec **diagnostics; /* OPTIONAL */
909 Z_External *taskPackage; /* OPTIONAL */
910 Z_OtherInformation *otherInfo; /* OPTIONAL */
911 } Z_ExtendedServicesResponse;
913 /* ------------------------ Sort --------------------------- */
915 typedef struct Z_SortAttributes
918 Z_AttributeList *list;
921 typedef struct Z_SortKey
924 #define Z_SortKey_sortField 0
925 #define Z_SortKey_elementSpec 1
926 #define Z_SortKey_sortAttributes 2
930 Z_Specification *elementSpec;
931 Z_SortAttributes *sortAttributes;
935 typedef struct Z_SortDbSpecific
941 typedef struct Z_SortDbSpecificList
944 Z_SortDbSpecific **dbSpecific;
945 } Z_SortDbSpecificList;
947 typedef struct Z_SortElement
950 #define Z_SortElement_generic 0
951 #define Z_SortElement_databaseSpecific 1
955 Z_SortDbSpecificList *databaseSpecific;
959 typedef struct Z_SortMissingValueAction
962 #define Z_SortMissingValAct_abort 0
963 #define Z_SortMissingValAct_null 1
964 #define Z_SortMissingValAct_valData 2
971 } Z_SortMissingValueAction;
973 typedef struct Z_SortKeySpec
975 Z_SortElement *sortElement;
977 #define Z_SortRelation_ascending 0
978 #define Z_SortRelation_descending 1
979 #define Z_SortRelation_ascendingByFreq 3
980 #define Z_SortRelation_descendingByFreq 4
981 int *caseSensitivity;
982 #define Z_SortCase_caseSensitive 0
983 #define Z_SortCase_caseInsensitive 1
984 Z_SortMissingValueAction *missingValueAction; /* OPTIONAL */
987 typedef struct Z_SortResponse
989 Z_ReferenceId *referenceId; /* OPTIONAL */
991 #define Z_SortStatus_success 0
992 #define Z_SortStatus_partial_1 1
993 #define Z_SortStatus_failure 2
994 int *resultSetStatus; /* OPTIONAL */
995 #define Z_SortResultSetStatus_empty 1
996 #define Z_SortResultSetStatus_interim 2
997 #define Z_SortResultSetStatus_unchanged 3
998 #define Z_SortResultSetStatus_none 4
999 Z_DiagRecs *diagnostics; /* OPTIONAL */
1000 Z_OtherInformation *otherInfo; /* OPTIONAL */
1003 typedef struct Z_SortKeySpecList
1006 Z_SortKeySpec **specs;
1007 } Z_SortKeySpecList;
1009 typedef struct Z_SortRequest
1011 Z_ReferenceId *referenceId; /* OPTIONAL */
1012 Z_StringList *inputResultSetNames;
1013 char *sortedResultSetName;
1014 Z_SortKeySpecList *sortSequence;
1015 Z_OtherInformation *otherInfo; /* OPTIONAL */
1018 /* ----------------------- Resource Report ------------------ */
1020 typedef struct Z_ResourceReportRequest
1022 Z_ReferenceId *referenceId; /* OPTIONAL */
1023 Z_ReferenceId *opId; /* OPTIONAL */
1024 Odr_oid *prefResourceReportFormat; /* OPTIONAL */
1025 Z_OtherInformation *otherInfo; /* OPTIONAL */
1026 } Z_ResourceReportRequest;
1028 typedef struct Z_ResourceReportResponse
1030 Z_ReferenceId *referenceId; /* OPTIONAL */
1031 int *resourceReportStatus;
1032 #define Z_ResourceReportStatus_success 0
1033 #define Z_ResourceReportStatus_partial 1
1034 #define Z_ResourceReportStatus_failure_1 2
1035 #define Z_ResourceReportStatus_failure_2 3
1036 #define Z_ResourceReportStatus_failure_3 4
1037 #define Z_ResourceReportStatus_failure_4 5
1038 #define Z_ResourceReportStatus_failure_5 6
1039 #define Z_ResourceReportStatus_failure_6 7
1040 Z_External *resourceReport; /* OPTIONAL */
1041 Z_OtherInformation *otherInfo; /* OPTIONAL */
1042 } Z_ResourceReportResponse;
1044 /* ------------------------ APDU ---------------------------- */
1046 typedef struct Z_APDU
1049 #define Z_APDU_initRequest 0
1050 #define Z_APDU_initResponse 1
1051 #define Z_APDU_searchRequest 2
1052 #define Z_APDU_searchResponse 3
1053 #define Z_APDU_presentRequest 4
1054 #define Z_APDU_presentResponse 5
1055 #define Z_APDU_deleteResultSetRequest 6
1056 #define Z_APDU_deleteResultSetResponse 7
1057 #define Z_APDU_resourceControlRequest 8
1058 #define Z_APDU_resourceControlResponse 9
1059 #define Z_APDU_triggerResourceControlRequest 10
1060 #define Z_APDU_scanRequest 11
1061 #define Z_APDU_scanResponse 12
1062 #define Z_APDU_segmentRequest 13
1063 #define Z_APDU_extendedServicesRequest 14
1064 #define Z_APDU_extendedServicesResponse 15
1065 #define Z_APDU_close 16
1066 #define Z_APDU_accessControlRequest 17
1067 #define Z_APDU_accessControlResponse 18
1068 #define Z_APDU_sortRequest 20
1069 #define Z_APDU_sortResponse 21
1070 #define Z_APDU_resourceReportRequest 22
1071 #define Z_APDU_resourceReportResponse 23
1074 Z_InitRequest *initRequest;
1075 Z_InitResponse *initResponse;
1076 Z_SearchRequest *searchRequest;
1077 Z_SearchResponse *searchResponse;
1078 Z_PresentRequest *presentRequest;
1079 Z_PresentResponse *presentResponse;
1080 Z_DeleteResultSetRequest *deleteResultSetRequest;
1081 Z_DeleteResultSetResponse *deleteResultSetResponse;
1082 Z_AccessControlRequest *accessControlRequest;
1083 Z_AccessControlResponse *accessControlResponse;
1084 Z_ResourceControlRequest *resourceControlRequest;
1085 Z_ResourceControlResponse *resourceControlResponse;
1086 Z_TriggerResourceControlRequest *triggerResourceControlRequest;
1087 Z_ResourceReportRequest *resourceReportRequest;
1088 Z_ResourceReportResponse *resourceReportResponse;
1089 Z_ScanRequest *scanRequest;
1090 Z_ScanResponse *scanResponse;
1091 Z_SortRequest *sortRequest;
1092 Z_SortResponse *sortResponse;
1093 Z_Segment *segmentRequest;
1094 Z_ExtendedServicesRequest *extendedServicesRequest;
1095 Z_ExtendedServicesResponse *extendedServicesResponse;
1100 #define z_APDU z_APDU_old
1102 YAZ_EXPORT int z_APDU(ODR o, Z_APDU **p, int opt, const char *name);
1103 YAZ_EXPORT int z_SUTRS(ODR o, Odr_oct **p, int opt, const char *name);
1105 YAZ_EXPORT Z_InitRequest *zget_InitRequest(ODR o);
1106 YAZ_EXPORT Z_InitResponse *zget_InitResponse(ODR o);
1107 YAZ_EXPORT Z_SearchRequest *zget_SearchRequest(ODR o);
1108 YAZ_EXPORT Z_SearchResponse *zget_SearchResponse(ODR o);
1109 YAZ_EXPORT Z_PresentRequest *zget_PresentRequest(ODR o);
1110 YAZ_EXPORT Z_PresentResponse *zget_PresentResponse(ODR o);
1111 YAZ_EXPORT Z_DeleteResultSetRequest *zget_DeleteResultSetRequest(ODR o);
1112 YAZ_EXPORT Z_DeleteResultSetResponse *zget_DeleteResultSetResponse(ODR o);
1113 YAZ_EXPORT Z_ScanRequest *zget_ScanRequest(ODR o);
1114 YAZ_EXPORT Z_ScanResponse *zget_ScanResponse(ODR o);
1115 YAZ_EXPORT Z_TriggerResourceControlRequest *zget_TriggerResourceControlRequest(ODR o);
1116 YAZ_EXPORT Z_ResourceControlRequest *zget_ResourceControlRequest(ODR o);
1117 YAZ_EXPORT Z_ResourceControlResponse *zget_ResourceControlResponse(ODR o);
1118 YAZ_EXPORT Z_Close *zget_Close(ODR o);
1119 YAZ_EXPORT int z_StringList(ODR o, Z_StringList **p, int opt,
1121 YAZ_EXPORT int z_InternationalString(ODR o, char **p, int opt,
1123 YAZ_EXPORT int z_OtherInformation(ODR o, Z_OtherInformation **p, int opt,
1125 YAZ_EXPORT int z_ElementSetName(ODR o, char **p, int opt, const char *name);
1126 YAZ_EXPORT int z_IntUnit(ODR o, Z_IntUnit **p, int opt, const char *name);
1127 YAZ_EXPORT int z_Unit(ODR o, Z_Unit **p, int opt, const char *name);
1128 YAZ_EXPORT int z_DatabaseName(ODR o, Z_DatabaseName **p, int opt,
1130 YAZ_EXPORT int z_StringOrNumeric(ODR o, Z_StringOrNumeric **p, int opt,
1132 YAZ_EXPORT int z_OtherInformationUnit(ODR o, Z_OtherInformationUnit **p,
1133 int opt, const char *name);
1134 YAZ_EXPORT int z_Term(ODR o, Z_Term **p, int opt, const char *name);
1135 YAZ_EXPORT int z_Specification(ODR o, Z_Specification **p, int opt,
1137 YAZ_EXPORT int z_Permissions(ODR o, Z_Permissions **p, int opt,
1139 YAZ_EXPORT int z_DiagRec(ODR o, Z_DiagRec **p, int opt, const char *name);
1140 YAZ_EXPORT int z_DiagRecs(ODR o, Z_DiagRecs **p, int opt, const char *name);
1141 YAZ_EXPORT int z_AttributeList(ODR o, Z_AttributeList **p, int opt,
1143 YAZ_EXPORT int z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt,
1145 YAZ_EXPORT Z_APDU *zget_APDU(ODR o, int which);
1146 YAZ_EXPORT int z_Query(ODR o, Z_Query **p, int opt, const char *name);
1148 YAZ_EXPORT Odr_oid *yaz_oidval_to_z3950oid (ODR o, int oid_class,
1150 YAZ_EXPORT Odr_oid *yaz_str_to_z3950oid (ODR o, int oid_class,
1152 YAZ_EXPORT const char *yaz_z3950oid_to_str (Odr_oid *oid, int *oid_class);
1156 #include <yaz/prt-rsc.h>
1157 #include <yaz/prt-acc.h>
1158 #include <yaz/prt-exp.h>
1159 #include <yaz/prt-grs.h>
1160 #include <yaz/prt-arc.h>
1161 #include <yaz/prt-exd.h>
1162 #include <yaz/prt-dia.h>
1163 #include <yaz/prt-esp.h>
1164 #include <yaz/prt-add.h>
1166 #include <yaz/prt-dat.h>
1167 #include <yaz/prt-univ.h>
1168 #include <yaz/prt-ext.h>