2 * Copyright (c) 1995-1999, 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.1 1999-06-08 13:11:55 adam Exp $
36 #include <yaz-version.h>
42 /* ----------------- GLOBAL AUXILIARY DEFS ----------------*/
45 typedef struct Z_External Z_External;
47 typedef Odr_oct Z_ReferenceId;
48 typedef char Z_DatabaseName;
49 typedef char Z_ResultSetId;
50 typedef Odr_oct Z_ResultsetId;
52 typedef struct Z_InfoCategory
54 Odr_oid *categoryTypeId; /* OPTIONAL */
58 typedef struct Z_OtherInformationUnit
60 Z_InfoCategory *category; /* OPTIONAL */
62 #define Z_OtherInfo_characterInfo 0
63 #define Z_OtherInfo_binaryInfo 1
64 #define Z_OtherInfo_externallyDefinedInfo 2
65 #define Z_OtherInfo_oid 3
70 Z_External *externallyDefinedInfo;
73 } Z_OtherInformationUnit;
75 typedef struct Z_OtherInformation
78 Z_OtherInformationUnit **list;
81 typedef struct Z_StringOrNumeric
84 #define Z_StringOrNumeric_string 0
85 #define Z_StringOrNumeric_numeric 1
95 char *unitSystem; /* OPTIONAL */
96 Z_StringOrNumeric *unitType; /* OPTIONAL */
97 Z_StringOrNumeric *unit; /* OPTIONAL */
98 int *scaleFactor; /* OPTIONAL */
101 typedef struct Z_IntUnit
107 typedef Odr_oct Z_SUTRS;
109 typedef struct Z_StringList
115 /* ----------------- INIT SERVICE ----------------*/
119 char *groupId; /* OPTIONAL */
120 char *userId; /* OPTIONAL */
121 char *password; /* OPTIONAL */
124 typedef struct Z_IdAuthentication
127 #define Z_IdAuthentication_open 0
128 #define Z_IdAuthentication_idPass 1
129 #define Z_IdAuthentication_anonymous 2
130 #define Z_IdAuthentication_other 3
138 } Z_IdAuthentication;
140 #define Z_ProtocolVersion_1 0
141 #define Z_ProtocolVersion_2 1
142 #define Z_ProtocolVersion_3 2
144 #define Z_Options_search 0
145 #define Z_Options_present 1
146 #define Z_Options_delSet 2
147 #define Z_Options_resourceReport 3
148 #define Z_Options_triggerResourceCtrl 4
149 #define Z_Options_resourceCtrl 5
150 #define Z_Options_accessCtrl 6
151 #define Z_Options_scan 7
152 #define Z_Options_sort 8
153 #define Z_Options_reserved 9
154 #define Z_Options_extendedServices 10
155 #define Z_Options_level_1Segmentation 11
156 #define Z_Options_level_2Segmentation 12
157 #define Z_Options_concurrentOperations 13
158 #define Z_Options_namedResultSets 14
160 typedef struct Z_InitRequest
162 Z_ReferenceId *referenceId; /* OPTIONAL */
163 Odr_bitmask *protocolVersion;
164 Odr_bitmask *options;
165 int *preferredMessageSize;
166 int *maximumRecordSize;
167 Z_IdAuthentication* idAuthentication; /* OPTIONAL */
168 char *implementationId; /* OPTIONAL */
169 char *implementationName; /* OPTIONAL */
170 char *implementationVersion; /* OPTIONAL */
171 Z_External *userInformationField; /* OPTIONAL */
172 Z_OtherInformation *otherInfo; /* OPTIONAL */
175 typedef struct Z_InitResponse
177 Z_ReferenceId *referenceId; /* OPTIONAL */
178 Odr_bitmask *protocolVersion;
179 Odr_bitmask *options;
180 int *preferredMessageSize;
181 int *maximumRecordSize;
183 char *implementationId; /* OPTIONAL */
184 char *implementationName; /* OPTIONAL */
185 char *implementationVersion; /* OPTIONAL */
186 Z_External *userInformationField; /* OPTIONAL */
187 Z_OtherInformation *otherInfo; /* OPTIONAL */
190 typedef struct Z_NSRAuthentication
195 } Z_NSRAuthentication;
197 int z_NSRAuthentication(ODR o, Z_NSRAuthentication **p, int opt,
200 int z_StrAuthentication(ODR o, char **p, int opt, const char *name);
202 /* ------------------ SEARCH SERVICE ----------------*/
204 typedef struct Z_DatabaseSpecificUnit
207 char *elementSetName;
208 } Z_DatabaseSpecificUnit;
210 typedef struct Z_DatabaseSpecific
213 Z_DatabaseSpecificUnit **elements;
214 } Z_DatabaseSpecific;
216 typedef struct Z_ElementSetNames
219 #define Z_ElementSetNames_generic 0
220 #define Z_ElementSetNames_databaseSpecific 1
224 Z_DatabaseSpecific *databaseSpecific;
228 /* ---------------------- RPN QUERY --------------------------- */
230 typedef struct Z_ComplexAttribute
233 Z_StringOrNumeric **list;
234 int num_semanticAction;
235 int **semanticAction; /* OPTIONAL */
236 } Z_ComplexAttribute;
238 typedef struct Z_AttributeElement
240 Odr_oid *attributeSet; /* OPTIONAL - v3 only */
243 #define Z_AttributeValue_numeric 0
244 #define Z_AttributeValue_complex 1
248 Z_ComplexAttribute *complex;
250 } Z_AttributeElement;
252 typedef struct Z_Term
255 #define Z_Term_general 0
256 #define Z_Term_numeric 1
257 #define Z_Term_characterString 2
259 #define Z_Term_dateTime 4
260 #define Z_Term_external 5
261 #define Z_Term_integerAndUnit 6
262 #define Z_Term_null 7
265 Odr_oct *general; /* this is required for v2 */
267 char *characterString;
270 Z_External *external;
271 /* Z_IntUnit *integerAndUnit; */
276 typedef struct Z_AttributesPlusTerm
279 Z_AttributeElement **attributeList;
281 } Z_AttributesPlusTerm;
283 typedef struct Z_ResultSetPlusAttributes
287 Z_AttributeElement **attributeList;
288 } Z_ResultSetPlusAttributes;
290 typedef struct Z_ProximityOperator
292 bool_t *exclusion; /* OPTIONAL */
296 #define Z_Prox_lessThan 1
297 #define Z_Prox_lessThanOrEqual 2
298 #define Z_Prox_equal 3
299 #define Z_Prox_greaterThanOrEqual 4
300 #define Z_Prox_greaterThan 5
301 #define Z_Prox_notEqual 6
303 #define Z_ProxCode_known 0
304 #define Z_ProxCode_private 1
305 int *proximityUnitCode;
306 #define Z_ProxUnit_character 1
307 #define Z_ProxUnit_word 2
308 #define Z_ProxUnit_sentence 3
309 #define Z_ProxUnit_paragraph 4
310 #define Z_ProxUnit_section 5
311 #define Z_ProxUnit_chapter 6
312 #define Z_ProxUnit_document 7
313 #define Z_ProxUnit_element 8
314 #define Z_ProxUnit_subelement 9
315 #define Z_ProxUnit_elementType 10
316 #define Z_ProxUnit_byte 11 /* v3 only */
317 } Z_ProximityOperator;
319 typedef struct Z_Operator
322 #define Z_Operator_and 0
323 #define Z_Operator_or 1
324 #define Z_Operator_and_not 2
325 #define Z_Operator_prox 3
328 Odr_null *and; /* these guys are nulls. */
331 Z_ProximityOperator *prox;
335 typedef struct Z_Operand
338 #define Z_Operand_APT 0
339 #define Z_Operand_resultSetId 1
340 #define Z_Operand_resultAttr /* v3 only */ 2
343 Z_AttributesPlusTerm *attributesPlusTerm;
344 Z_ResultSetId *resultSetId;
345 Z_ResultSetPlusAttributes *resultAttr;
349 typedef struct Z_Complex
351 struct Z_RPNStructure *s1;
352 struct Z_RPNStructure *s2;
353 Z_Operator *roperator;
356 typedef struct Z_RPNStructure
359 #define Z_RPNStructure_simple 0
360 #define Z_RPNStructure_complex 1
368 typedef struct Z_RPNQuery
370 Odr_oid *attributeSetId;
371 Z_RPNStructure *RPNStructure;
374 /* -------------------------- SEARCHREQUEST -------------------------- */
376 typedef struct Z_Query
379 #define Z_Query_type_1 1
380 #define Z_Query_type_2 2
381 #define Z_Query_type_101 3
386 Z_RPNQuery *type_101;
390 typedef struct Z_SearchRequest
392 Z_ReferenceId *referenceId; /* OPTIONAL */
393 int *smallSetUpperBound;
394 int *largeSetLowerBound;
395 int *mediumSetPresentNumber;
396 bool_t *replaceIndicator;
398 int num_databaseNames;
399 char **databaseNames;
400 Z_ElementSetNames *smallSetElementSetNames; /* OPTIONAL */
401 Z_ElementSetNames *mediumSetElementSetNames; /* OPTIONAL */
402 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
404 Z_OtherInformation *additionalSearchInfo; /* OPTIONAL */
405 Z_OtherInformation *otherInfo; /* OPTIONAL */
408 /* ------------------------ RECORD -------------------------- */
410 typedef Z_External Z_DatabaseRecord;
412 typedef struct Z_DefaultDiagFormat
414 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
416 /* until the whole character set issue becomes more definite,
417 * you can probably ignore this on input. */
419 #define Z_DiagForm_v2AddInfo 0
420 #define Z_DiagForm_v3AddInfo 1
422 } Z_DefaultDiagFormat;
424 typedef struct Z_DiagRec
427 #define Z_DiagRec_defaultFormat 0
428 #define Z_DiagRec_externallyDefined 1
431 Z_DefaultDiagFormat *defaultFormat;
432 Z_External *externallyDefined;
436 typedef struct Z_DiagRecs
439 Z_DiagRec **diagRecs;
442 typedef struct Z_NamePlusRecord
444 char *databaseName; /* OPTIONAL */
446 #define Z_NamePlusRecord_databaseRecord 0
447 #define Z_NamePlusRecord_surrogateDiagnostic 1
450 Z_DatabaseRecord *databaseRecord;
451 Z_DiagRec *surrogateDiagnostic;
455 typedef struct Z_NamePlusRecordList
458 Z_NamePlusRecord **records;
459 } Z_NamePlusRecordList;
461 typedef struct Z_Records
464 #define Z_Records_DBOSD 0
465 #define Z_Records_NSD 1
466 #define Z_Records_multipleNSD 2
469 Z_NamePlusRecordList *databaseOrSurDiagnostics;
470 Z_DiagRec *nonSurrogateDiagnostic;
471 Z_DiagRecs *multipleNonSurDiagnostics;
475 /* ------------------------ SEARCHRESPONSE ------------------ */
477 typedef struct Z_SearchResponse
479 Z_ReferenceId *referenceId; /* OPTIONAL */
481 int *numberOfRecordsReturned;
482 int *nextResultSetPosition;
483 bool_t *searchStatus;
484 int *resultSetStatus; /* OPTIONAL */
485 #define Z_RES_SUBSET 1
486 #define Z_RES_INTERIM 2
488 int *presentStatus; /* OPTIONAL */
489 #define Z_PRES_SUCCESS 0
490 #define Z_PRES_PARTIAL_1 1
491 #define Z_PRES_PARTIAL_2 2
492 #define Z_PRES_PARTIAL_3 3
493 #define Z_PRES_PARTIAL_4 4
494 #define Z_PRES_FAILURE 5
495 Z_Records *records; /* OPTIONAL */
496 Z_OtherInformation *additionalSearchInfo;
497 Z_OtherInformation *otherInfo;
500 /* ------------------------- PRESENT SERVICE -----------------*/
502 typedef struct Z_ElementSpec
505 #define Z_ElementSpec_elementSetName 0
506 #define Z_ElementSpec_externalSpec 1
509 char *elementSetName;
510 Z_External *externalSpec;
514 typedef struct Z_Specification
516 Odr_oid *schema; /* OPTIONAL */
517 Z_ElementSpec *elementSpec; /* OPTIONAL */
520 typedef struct Z_DbSpecific
523 Z_Specification *spec;
526 typedef struct Z_CompSpec
528 bool_t *selectAlternativeSyntax;
529 Z_Specification *generic; /* OPTIONAL */
531 Z_DbSpecific **dbSpecific; /* OPTIONAL */
532 int num_recordSyntax;
533 Odr_oid **recordSyntax; /* OPTIONAL */
536 typedef struct Z_RecordComposition
539 #define Z_RecordComp_simple 0
540 #define Z_RecordComp_complex 1
543 Z_ElementSetNames *simple;
546 } Z_RecordComposition;
548 typedef struct Z_Range
550 int *startingPosition;
551 int *numberOfRecords;
554 typedef struct Z_PresentRequest
556 Z_ReferenceId *referenceId; /* OPTIONAL */
557 Z_ResultSetId *resultSetId;
558 int *resultSetStartPoint;
559 int *numberOfRecordsRequested;
561 Z_Range **additionalRanges; /* OPTIONAL */
562 Z_RecordComposition *recordComposition; /* OPTIONAL */
563 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
564 int *maxSegmentCount; /* OPTIONAL */
565 int *maxRecordSize; /* OPTIONAL */
566 int *maxSegmentSize; /* OPTIONAL */
567 Z_OtherInformation *otherInfo; /* OPTIONAL */
570 typedef struct Z_PresentResponse
572 Z_ReferenceId *referenceId; /* OPTIONAL */
573 int *numberOfRecordsReturned;
574 int *nextResultSetPosition;
577 Z_OtherInformation *otherInfo; /* OPTIONAL */
580 /* ------------------ RESOURCE CONTROL ----------------*/
582 typedef struct Z_TriggerResourceControlRequest
584 Z_ReferenceId *referenceId; /* OPTIONAL */
585 int *requestedAction;
586 #define Z_TriggerResourceCtrl_resourceReport 1
587 #define Z_TriggerResourceCtrl_resourceControl 2
588 #define Z_TriggerResourceCtrl_cancel 3
589 Odr_oid *prefResourceReportFormat; /* OPTIONAL */
590 bool_t *resultSetWanted; /* OPTIONAL */
591 Z_OtherInformation *otherInfo;
592 } Z_TriggerResourceControlRequest;
594 typedef struct Z_ResourceControlRequest
596 Z_ReferenceId *referenceId; /* OPTIONAL */
597 bool_t *suspendedFlag; /* OPTIONAL */
598 Z_External *resourceReport; /* OPTIONAL */
599 int *partialResultsAvailable; /* OPTIONAL */
600 #define Z_ResourceControlRequest_subset 1
601 #define Z_ResourceControlRequest_interim 2
602 #define Z_ResourceControlRequest_none 3
603 bool_t *responseRequired;
604 bool_t *triggeredRequestFlag; /* OPTIONAL */
605 Z_OtherInformation *otherInfo;
606 } Z_ResourceControlRequest;
608 typedef struct Z_ResourceControlResponse
610 Z_ReferenceId *referenceId; /* OPTIONAL */
611 bool_t *continueFlag;
612 bool_t *resultSetWanted; /* OPTIONAL */
613 Z_OtherInformation *otherInfo;
614 } Z_ResourceControlResponse;
617 /* ------------------ ACCESS CTRL SERVICE ----------------*/
619 typedef struct Z_AccessControlRequest
621 Z_ReferenceId *referenceId; /* OPTIONAL */
623 #define Z_AccessRequest_simpleForm 0
624 #define Z_AccessRequest_externallyDefined 1
628 Z_External *externallyDefined;
630 Z_OtherInformation *otherInfo; /* OPTIONAL */
631 } Z_AccessControlRequest;
633 typedef struct Z_AccessControlResponse
635 Z_ReferenceId *referenceId; /* OPTIONAL */
637 #define Z_AccessResponse_simpleForm 0
638 #define Z_AccessResponse_externallyDefined 1
642 Z_External *externallyDefined;
644 Z_DiagRec *diagnostic; /* OPTIONAL */
645 Z_OtherInformation *otherInfo; /* OPTIONAL */
646 } Z_AccessControlResponse;
648 /* ------------------------ SCAN SERVICE -------------------- */
650 typedef struct Z_AttributeList
653 Z_AttributeElement **attributes;
656 typedef struct Z_AlternativeTerm
659 Z_AttributesPlusTerm **terms;
662 typedef struct Z_ByDatabase
665 int *num; /* OPTIONAL */
666 Z_OtherInformation *otherDbInfo; /* OPTIONAL */
669 typedef struct Z_ByDatabaseList
672 Z_ByDatabase **elements;
675 typedef struct Z_ScanOccurrences
678 #define Z_ScanOccurrences_global 0
679 #define Z_ScanOccurrences_byDatabase 1
683 Z_ByDatabaseList *byDatabase;
688 typedef struct Z_OccurrenceByAttributesElem
690 Z_AttributeList *attributes;
691 Z_ScanOccurrences *occurrences; /* OPTIONAL */
692 Z_OtherInformation *otherOccurInfo; /* OPTIONAL */
693 } Z_OccurrenceByAttributesElem;
695 typedef struct Z_OccurrenceByAttributes
698 Z_OccurrenceByAttributesElem **elements;
699 } Z_OccurrenceByAttributes;
701 typedef struct Z_TermInfo
704 char *displayTerm; /* OPTIONAL */
705 Z_AttributeList *suggestedAttributes; /* OPTIONAL */
706 Z_AlternativeTerm *alternativeTerm; /* OPTIONAL */
707 int *globalOccurrences; /* OPTIONAL */
708 Z_OccurrenceByAttributes *byAttributes; /* OPTIONAL */
709 Z_OtherInformation *otherTermInfo; /* OPTIONAL */
712 typedef struct Z_Entry
715 #define Z_Entry_termInfo 0
716 #define Z_Entry_surrogateDiagnostic 1
719 Z_TermInfo *termInfo;
720 Z_DiagRec *surrogateDiagnostic;
724 #ifdef BUGGY_LISTENTRIES
726 typedef struct Z_Entries
732 typedef struct Z_ListEntries
735 #define Z_ListEntries_entries 0
736 #define Z_ListEntries_nonSurrogateDiagnostics 1
740 Z_DiagRecs *nonSurrogateDiagnostics;
746 typedef struct Z_ListEntries {
748 Z_Entry **entries; /* OPT */
749 int num_nonsurrogateDiagnostics;
750 Z_DiagRec **nonsurrogateDiagnostics; /* OPT */
753 typedef struct Z_ScanRequest
755 Z_ReferenceId *referenceId; /* OPTIONAL */
756 int num_databaseNames;
757 char **databaseNames;
758 Odr_oid *attributeSet; /* OPTIONAL */
759 Z_AttributesPlusTerm *termListAndStartPoint;
760 int *stepSize; /* OPTIONAL */
761 int *numberOfTermsRequested;
762 int *preferredPositionInResponse; /* OPTIONAL */
763 Z_OtherInformation *otherInfo;
766 typedef struct Z_ScanResponse
768 Z_ReferenceId *referenceId; /* OPTIONAL */
769 int *stepSize; /* OPTIONAL */
771 #define Z_Scan_success 0
772 #define Z_Scan_partial_1 1
773 #define Z_Scan_partial_2 2
774 #define Z_Scan_partial_3 3
775 #define Z_Scan_partial_4 4
776 #define Z_Scan_partial_5 5
777 #define Z_Scan_failure 6
778 int *numberOfEntriesReturned;
779 int *positionOfTerm; /* OPTIONAL */
780 Z_ListEntries *entries; /* OPTIONAL */
781 Odr_oid *attributeSet; /* OPTIONAL */
782 Z_OtherInformation *otherInfo;
786 /* ------------------------ DELETE -------------------------- */
788 #define Z_DeleteStatus_success 0
789 #define Z_DeleteStatus_resultSetDidNotExist 1
790 #define Z_DeleteStatus_previouslyDeletedByTarget 2
791 #define Z_DeleteStatus_systemProblemAtTarget 3
792 #define Z_DeleteStatus_accessNotAllowed 4
793 #define Z_DeleteStatus_resourceControlAtOrigin 5
794 #define Z_DeleteStatus_resourceControlAtTarget 6
795 #define Z_DeleteStatus_bulkDeleteNotSupported 7
796 #define Z_DeleteStatus_notAllRsltSetsDeletedOnBulkDlte 8
797 #define Z_DeleteStatus_notAllRequestedResultSetsDeleted 9
798 #define Z_DeleteStatus_resultSetInUse 10
800 typedef struct Z_ListStatus
806 typedef struct Z_DeleteResultSetRequest
808 Z_ReferenceId *referenceId; /* OPTIONAL */
810 #define Z_DeleteRequest_list 0
811 #define Z_DeleteRequest_all 1
812 int num_resultSetList;
813 Z_ResultSetId **resultSetList; /* OPTIONAL */
814 Z_OtherInformation *otherInfo;
815 } Z_DeleteResultSetRequest;
817 typedef struct Z_ListStatuses {
819 Z_ListStatus **elements;
822 typedef struct Z_DeleteResultSetResponse
824 Z_ReferenceId *referenceId; /* OPTIONAL */
825 int *deleteOperationStatus;
826 Z_ListStatuses *deleteListStatuses;/* OPTIONAL */
827 int *numberNotDeleted; /* OPTIONAL */
828 Z_ListStatuses *bulkStatuses; /* OPTIONAL */
829 char *deleteMessage; /* OPTIONAL */
830 Z_OtherInformation *otherInfo;
831 } Z_DeleteResultSetResponse;
833 /* ------------------------ CLOSE SERVICE ------------------- */
835 typedef struct Z_Close
837 Z_ReferenceId *referenceId; /* OPTIONAL */
839 #define Z_Close_finished 0
840 #define Z_Close_shutdown 1
841 #define Z_Close_systemProblem 2
842 #define Z_Close_costLimit 3
843 #define Z_Close_resources 4
844 #define Z_Close_securityViolation 5
845 #define Z_Close_protocolError 6
846 #define Z_Close_lackOfActivity 7
847 #define Z_Close_peerAbort 8
848 #define Z_Close_unspecified 9
849 char *diagnosticInformation; /* OPTIONAL */
850 Odr_oid *resourceReportFormat; /* OPTIONAL */
851 Z_External *resourceReport; /* OPTIONAL */
852 Z_OtherInformation *otherInfo; /* OPTIONAL */
855 /* ------------------------ SEGMENTATION -------------------- */
857 typedef struct Z_Segment
859 Z_ReferenceId *referenceId; /* OPTIONAL */
860 int *numberOfRecordsReturned;
861 int num_segmentRecords;
862 Z_NamePlusRecord **segmentRecords;
863 Z_OtherInformation *otherInfo; /* OPTIONAL */
866 /* ----------------------- Extended Services ---------------- */
868 typedef struct Z_Permissions
871 int num_allowableFunctions;
872 int **allowableFunctions;
873 #define Z_Permissions_delete 1
874 #define Z_Permissions_modifyContents 2
875 #define Z_Permissions_modifyPermissions 3
876 #define Z_Permissions_present 4
877 #define Z_Permissions_invoke 5
880 typedef struct Z_ExtendedServicesRequest
882 Z_ReferenceId *referenceId; /* OPTIONAL */
884 #define Z_ExtendedServicesRequest_create 1
885 #define Z_ExtendedServicesRequest_delete 2
886 #define Z_ExtendedServicesRequest_modify 3
887 Odr_oid *packageType;
888 char *packageName; /* OPTIONAL */
889 char *userId; /* OPTIONAL */
890 Z_IntUnit *retentionTime; /* OPTIONAL */
891 Z_Permissions *permissions; /* OPTIONAL */
892 char *description; /* OPTIONAL */
893 Z_External *taskSpecificParameters; /* OPTIONAL */
895 #define Z_ExtendedServicesRequest_wait 1
896 #define Z_ExtendedServicesRequest_waitIfPossible 2
897 #define Z_ExtendedServicesRequest_dontWait 3
898 #define Z_ExtendedServicesRequest_dontReturnPackage 4
899 char *elements; /* OPTIONAL */
900 Z_OtherInformation *otherInfo; /* OPTIONAL */
901 } Z_ExtendedServicesRequest;
903 typedef struct Z_ExtendedServicesResponse
905 Z_ReferenceId *referenceId; /* OPTIONAL */
906 int *operationStatus;
907 #define Z_ExtendedServicesResponse_done 1
908 #define Z_ExtendedServicesResponse_accepted 2
909 #define Z_ExtendedServicesResponse_failure 3
911 Z_DiagRec **diagnostics; /* OPTIONAL */
912 Z_External *taskPackage; /* OPTIONAL */
913 Z_OtherInformation *otherInfo; /* OPTIONAL */
914 } Z_ExtendedServicesResponse;
916 /* ------------------------ Sort --------------------------- */
918 typedef struct Z_SortAttributes
921 Z_AttributeList *list;
924 typedef struct Z_SortKey
927 #define Z_SortKey_sortField 0
928 #define Z_SortKey_elementSpec 1
929 #define Z_SortKey_sortAttributes 2
933 Z_Specification *elementSpec;
934 Z_SortAttributes *sortAttributes;
938 typedef struct Z_SortDbSpecific
944 typedef struct Z_SortDbSpecificList
947 Z_SortDbSpecific **dbSpecific;
948 } Z_SortDbSpecificList;
950 typedef struct Z_SortElement
953 #define Z_SortElement_generic 0
954 #define Z_SortElement_databaseSpecific 1
958 Z_SortDbSpecificList *databaseSpecific;
962 typedef struct Z_SortMissingValueAction
965 #define Z_SortMissingValAct_abort 0
966 #define Z_SortMissingValAct_null 1
967 #define Z_SortMissingValAct_valData 2
974 } Z_SortMissingValueAction;
976 typedef struct Z_SortKeySpec
978 Z_SortElement *sortElement;
980 #define Z_SortRelation_ascending 0
981 #define Z_SortRelation_descending 1
982 #define Z_SortRelation_ascendingByFreq 3
983 #define Z_SortRelation_descendingByFreq 4
984 int *caseSensitivity;
985 #define Z_SortCase_caseSensitive 0
986 #define Z_SortCase_caseInsensitive 1
987 Z_SortMissingValueAction *missingValueAction; /* OPTIONAL */
990 typedef struct Z_SortResponse
992 Z_ReferenceId *referenceId; /* OPTIONAL */
994 #define Z_SortStatus_success 0
995 #define Z_SortStatus_partial_1 1
996 #define Z_SortStatus_failure 2
997 int *resultSetStatus; /* OPTIONAL */
998 #define Z_SortResultSetStatus_empty 1
999 #define Z_SortResultSetStatus_interim 2
1000 #define Z_SortResultSetStatus_unchanged 3
1001 #define Z_SortResultSetStatus_none 4
1002 Z_DiagRecs *diagnostics; /* OPTIONAL */
1003 Z_OtherInformation *otherInfo; /* OPTIONAL */
1006 typedef struct Z_SortKeySpecList
1009 Z_SortKeySpec **specs;
1010 } Z_SortKeySpecList;
1012 typedef struct Z_SortRequest
1014 Z_ReferenceId *referenceId; /* OPTIONAL */
1015 Z_StringList *inputResultSetNames;
1016 char *sortedResultSetName;
1017 Z_SortKeySpecList *sortSequence;
1018 Z_OtherInformation *otherInfo; /* OPTIONAL */
1021 /* ----------------------- Resource Report ------------------ */
1023 typedef struct Z_ResourceReportRequest
1025 Z_ReferenceId *referenceId; /* OPTIONAL */
1026 Z_ReferenceId *opId; /* OPTIONAL */
1027 Odr_oid *prefResourceReportFormat; /* OPTIONAL */
1028 Z_OtherInformation *otherInfo; /* OPTIONAL */
1029 } Z_ResourceReportRequest;
1031 typedef struct Z_ResourceReportResponse
1033 Z_ReferenceId *referenceId; /* OPTIONAL */
1034 int *resourceReportStatus;
1035 #define Z_ResourceReportStatus_success 0
1036 #define Z_ResourceReportStatus_partial 1
1037 #define Z_ResourceReportStatus_failure_1 2
1038 #define Z_ResourceReportStatus_failure_2 3
1039 #define Z_ResourceReportStatus_failure_3 4
1040 #define Z_ResourceReportStatus_failure_4 5
1041 #define Z_ResourceReportStatus_failure_5 6
1042 #define Z_ResourceReportStatus_failure_6 7
1043 Z_External *resourceReport; /* OPTIONAL */
1044 Z_OtherInformation *otherInfo; /* OPTIONAL */
1045 } Z_ResourceReportResponse;
1047 /* ------------------------ APDU ---------------------------- */
1049 typedef struct Z_APDU
1052 #define Z_APDU_initRequest 0
1053 #define Z_APDU_initResponse 1
1054 #define Z_APDU_searchRequest 2
1055 #define Z_APDU_searchResponse 3
1056 #define Z_APDU_presentRequest 4
1057 #define Z_APDU_presentResponse 5
1058 #define Z_APDU_deleteResultSetRequest 6
1059 #define Z_APDU_deleteResultSetResponse 7
1060 #define Z_APDU_resourceControlRequest 8
1061 #define Z_APDU_resourceControlResponse 9
1062 #define Z_APDU_triggerResourceControlRequest 10
1063 #define Z_APDU_scanRequest 11
1064 #define Z_APDU_scanResponse 12
1065 #define Z_APDU_segmentRequest 13
1066 #define Z_APDU_extendedServicesRequest 14
1067 #define Z_APDU_extendedServicesResponse 15
1068 #define Z_APDU_close 16
1069 #define Z_APDU_accessControlRequest 17
1070 #define Z_APDU_accessControlResponse 18
1071 #define Z_APDU_sortRequest 20
1072 #define Z_APDU_sortResponse 21
1073 #define Z_APDU_resourceReportRequest 22
1074 #define Z_APDU_resourceReportResponse 23
1077 Z_InitRequest *initRequest;
1078 Z_InitResponse *initResponse;
1079 Z_SearchRequest *searchRequest;
1080 Z_SearchResponse *searchResponse;
1081 Z_PresentRequest *presentRequest;
1082 Z_PresentResponse *presentResponse;
1083 Z_DeleteResultSetRequest *deleteResultSetRequest;
1084 Z_DeleteResultSetResponse *deleteResultSetResponse;
1085 Z_AccessControlRequest *accessControlRequest;
1086 Z_AccessControlResponse *accessControlResponse;
1087 Z_ResourceControlRequest *resourceControlRequest;
1088 Z_ResourceControlResponse *resourceControlResponse;
1089 Z_TriggerResourceControlRequest *triggerResourceControlRequest;
1090 Z_ResourceReportRequest *resourceReportRequest;
1091 Z_ResourceReportResponse *resourceReportResponse;
1092 Z_ScanRequest *scanRequest;
1093 Z_ScanResponse *scanResponse;
1094 Z_SortRequest *sortRequest;
1095 Z_SortResponse *sortResponse;
1096 Z_Segment *segmentRequest;
1097 Z_ExtendedServicesRequest *extendedServicesRequest;
1098 Z_ExtendedServicesResponse *extendedServicesResponse;
1103 #define z_APDU z_APDU_old
1105 YAZ_EXPORT int z_APDU(ODR o, Z_APDU **p, int opt, const char *name);
1106 YAZ_EXPORT int z_SUTRS(ODR o, Odr_oct **p, int opt, const char *name);
1108 YAZ_EXPORT Z_InitRequest *zget_InitRequest(ODR o);
1109 YAZ_EXPORT Z_InitResponse *zget_InitResponse(ODR o);
1110 YAZ_EXPORT Z_SearchRequest *zget_SearchRequest(ODR o);
1111 YAZ_EXPORT Z_SearchResponse *zget_SearchResponse(ODR o);
1112 YAZ_EXPORT Z_PresentRequest *zget_PresentRequest(ODR o);
1113 YAZ_EXPORT Z_PresentResponse *zget_PresentResponse(ODR o);
1114 YAZ_EXPORT Z_DeleteResultSetRequest *zget_DeleteResultSetRequest(ODR o);
1115 YAZ_EXPORT Z_DeleteResultSetResponse *zget_DeleteResultSetResponse(ODR o);
1116 YAZ_EXPORT Z_ScanRequest *zget_ScanRequest(ODR o);
1117 YAZ_EXPORT Z_ScanResponse *zget_ScanResponse(ODR o);
1118 YAZ_EXPORT Z_TriggerResourceControlRequest *zget_TriggerResourceControlRequest(ODR o);
1119 YAZ_EXPORT Z_ResourceControlRequest *zget_ResourceControlRequest(ODR o);
1120 YAZ_EXPORT Z_ResourceControlResponse *zget_ResourceControlResponse(ODR o);
1121 YAZ_EXPORT Z_Close *zget_Close(ODR o);
1122 YAZ_EXPORT int z_StringList(ODR o, Z_StringList **p, int opt,
1124 YAZ_EXPORT int z_InternationalString(ODR o, char **p, int opt,
1126 YAZ_EXPORT int z_OtherInformation(ODR o, Z_OtherInformation **p, int opt,
1128 YAZ_EXPORT int z_ElementSetName(ODR o, char **p, int opt, const char *name);
1129 YAZ_EXPORT int z_IntUnit(ODR o, Z_IntUnit **p, int opt, const char *name);
1130 YAZ_EXPORT int z_Unit(ODR o, Z_Unit **p, int opt, const char *name);
1131 YAZ_EXPORT int z_DatabaseName(ODR o, Z_DatabaseName **p, int opt,
1133 YAZ_EXPORT int z_StringOrNumeric(ODR o, Z_StringOrNumeric **p, int opt,
1135 YAZ_EXPORT int z_OtherInformationUnit(ODR o, Z_OtherInformationUnit **p,
1136 int opt, const char *name);
1137 YAZ_EXPORT int z_Term(ODR o, Z_Term **p, int opt, const char *name);
1138 YAZ_EXPORT int z_Specification(ODR o, Z_Specification **p, int opt,
1140 YAZ_EXPORT int z_Permissions(ODR o, Z_Permissions **p, int opt,
1142 YAZ_EXPORT int z_DiagRec(ODR o, Z_DiagRec **p, int opt, const char *name);
1143 YAZ_EXPORT int z_DiagRecs(ODR o, Z_DiagRecs **p, int opt, const char *name);
1144 YAZ_EXPORT int z_AttributeList(ODR o, Z_AttributeList **p, int opt,
1146 YAZ_EXPORT int z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt,
1148 YAZ_EXPORT Z_APDU *zget_APDU(ODR o, int which);
1149 YAZ_EXPORT int z_Query(ODR o, Z_Query **p, int opt, const char *name);
1155 #include <prt-rsc.h>
1156 #include <prt-acc.h>
1157 #include <prt-exp.h>
1158 #include <prt-grs.h>
1159 #include <prt-arc.h>
1160 #include <prt-exd.h>
1161 #include <prt-dia.h>
1162 #include <prt-esp.h>
1163 #include <prt-add.h>
1165 #include <prt-dat.h>
1166 #include <prt-univ.h>
1167 #include <prt-ext.h>