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.29 1996-01-02 11:46:49 quinn
28 * Changed 'operator' to 'roperator' to avoid C++ conflict.
31 * Revision 1.28 1996/01/02 08:57:32 quinn
32 * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
34 * Revision 1.27 1995/10/12 10:34:46 quinn
37 * Revision 1.26 1995/09/29 17:12:08 quinn
40 * Revision 1.25 1995/09/27 15:02:49 quinn
41 * Modified function heads & prototypes.
43 * Revision 1.24 1995/08/29 11:17:43 quinn
44 * *** empty log message ***
46 * Revision 1.23 1995/08/21 09:10:36 quinn
47 * Smallish fixes to suppport new formats.
49 * Revision 1.22 1995/08/17 12:45:14 quinn
50 * Fixed minor problems with GRS-1. Added support in c&s.
52 * Revision 1.21 1995/08/15 12:00:11 quinn
55 * Revision 1.20 1995/08/10 08:54:35 quinn
58 * Revision 1.19 1995/06/19 12:38:28 quinn
59 * Reorganized include-files. Added small features.
61 * Revision 1.18 1995/06/16 13:16:05 quinn
62 * Fixed Defaultdiagformat.
64 * Revision 1.17 1995/06/15 15:42:05 quinn
67 * Revision 1.16 1995/06/15 07:45:06 quinn
70 * Revision 1.15 1995/06/14 15:26:43 quinn
71 * *** empty log message ***
73 * Revision 1.14 1995/06/07 14:42:34 quinn
76 * Revision 1.13 1995/06/07 14:36:47 quinn
79 * Revision 1.12 1995/06/05 10:53:13 quinn
82 * Revision 1.11 1995/06/02 09:49:47 quinn
85 * Revision 1.10 1995/05/29 08:11:34 quinn
86 * Moved oid from odr/asn to util.
88 * Revision 1.9 1995/05/22 11:31:25 quinn
91 * Revision 1.8 1995/05/17 08:41:35 quinn
92 * Added delete to proto & other little things.
93 * Relaying auth info to backend.
95 * Revision 1.7 1995/05/16 08:50:37 quinn
96 * License, documentation, and memory fixes
98 * Revision 1.6 1995/05/15 11:55:55 quinn
99 * Work on asynchronous activity.
101 * Revision 1.5 1995/04/17 11:28:18 quinn
104 * Revision 1.4 1995/04/10 10:22:47 quinn
107 * Revision 1.3 1995/03/30 12:18:09 quinn
110 * Revision 1.2 1995/03/30 10:26:48 quinn
111 * Added Term structure
113 * Revision 1.1 1995/03/30 09:39:42 quinn
114 * Moved .h files to include directory
116 * Revision 1.11 1995/03/30 09:08:44 quinn
117 * Added Resource control protocol
119 * Revision 1.10 1995/03/29 15:39:39 quinn
120 * Adding some resource control elements, and a null-check to getentbyoid
122 * Revision 1.9 1995/03/29 08:06:18 quinn
123 * Added a few v3 elements
125 * Revision 1.8 1995/03/22 10:12:49 quinn
126 * Added Z_PRES constants.
128 * Revision 1.7 1995/03/20 09:45:12 quinn
131 * Revision 1.5 1995/03/07 16:29:34 quinn
132 * Added authentication stuff.
134 * Revision 1.4 1995/03/07 10:13:00 quinn
135 * Added prototype for z_APDU()
137 * Revision 1.3 1995/02/14 11:54:23 quinn
140 * Revision 1.2 1995/02/09 15:51:40 quinn
143 * Revision 1.1 1995/02/06 16:44:48 quinn
144 * First hack at Z/SR protocol
155 #include <yaz-version.h>
158 * Because we didn't have time to put all of the extra v3 elements in here
159 * before the first applications were written, we have to place them
160 * in #ifdefs in places where they would break existing code. If you are
161 * developing new stuff, we urge you to leave them in, even if you don't
162 * intend to use any v3 features. When we are comfortable that the old
163 * apps have been updated, we'll remove the #ifdefs.
168 /* ----------------- GLOBAL AUXILIARY DEFS ----------------*/
171 typedef struct Z_External Z_External;
173 typedef Odr_oct Z_ReferenceId;
174 typedef char Z_DatabaseName;
175 typedef char Z_ResultSetId;
176 typedef Odr_oct Z_ResultsetId;
178 typedef struct Z_InfoCategory
180 Odr_oid *categoryTypeId; /* OPTIONAL */
184 typedef struct Z_OtherInformationUnit
186 Z_InfoCategory *category; /* OPTIONAL */
188 #define Z_OtherInfo_characterInfo 0
189 #define Z_OtherInfo_binaryInfo 1
190 #define Z_OtherInfo_externallyDefinedInfo 2
191 #define Z_OtherInfo_oid 3
196 Z_External *externallyDefinedInfo;
199 } Z_OtherInformationUnit;
201 typedef struct Z_OtherInformation
204 Z_OtherInformationUnit **list;
205 } Z_OtherInformation;
207 typedef struct Z_StringOrNumeric
210 #define Z_StringOrNumeric_string 0
211 #define Z_StringOrNumeric_numeric 1
219 typedef struct Z_Unit
221 char *unitSystem; /* OPTIONAL */
222 Z_StringOrNumeric *unitType; /* OPTIONAL */
223 Z_StringOrNumeric *unit; /* OPTIONAL */
224 int *scaleFactor; /* OPTIONAL */
227 typedef struct Z_IntUnit
233 typedef Odr_oct Z_SUTRS;
235 /* ----------------- INIT SERVICE ----------------*/
239 char *groupId; /* OPTIONAL */
240 char *userId; /* OPTIONAL */
241 char *password; /* OPTIONAL */
244 typedef struct Z_IdAuthentication
247 #define Z_IdAuthentication_open 0
248 #define Z_IdAuthentication_idPass 1
249 #define Z_IdAuthentication_anonymous 2
250 #define Z_IdAuthentication_other 3
258 } Z_IdAuthentication;
260 #define Z_ProtocolVersion_1 0
261 #define Z_ProtocolVersion_2 1
262 #define Z_ProtocolVersion_3 2
264 #define Z_Options_search 0
265 #define Z_Options_present 1
266 #define Z_Options_delSet 2
267 #define Z_Options_resourceReport 3
268 #define Z_Options_triggerResourceCtrl 4
269 #define Z_Options_resourceCtrl 5
270 #define Z_Options_accessCtrl 6
271 #define Z_Options_scan 7
272 #define Z_Options_sort 8
273 #define Z_Options_reserved 9
274 #define Z_Options_extendedServices 10
275 #define Z_Options_level_1Segmentation 11
276 #define Z_Options_level_2Segmentation 12
277 #define Z_Options_concurrentOperations 13
278 #define Z_Options_namedResultSets 14
280 typedef struct Z_InitRequest
282 Z_ReferenceId *referenceId; /* OPTIONAL */
283 Odr_bitmask *protocolVersion;
284 Odr_bitmask *options;
285 int *preferredMessageSize;
286 int *maximumRecordSize;
287 Z_IdAuthentication* idAuthentication; /* OPTIONAL */
288 char *implementationId; /* OPTIONAL */
289 char *implementationName; /* OPTIONAL */
290 char *implementationVersion; /* OPTIONAL */
291 Z_External *userInformationField; /* OPTIONAL */
293 Z_OtherInformation *otherInfo; /* OPTIONAL */
297 typedef struct Z_InitResponse
299 Z_ReferenceId *referenceId; /* OPTIONAL */
300 Odr_bitmask *protocolVersion;
301 Odr_bitmask *options;
302 int *preferredMessageSize;
303 int *maximumRecordSize;
305 char *implementationId; /* OPTIONAL */
306 char *implementationName; /* OPTIONAL */
307 char *implementationVersion; /* OPTIONAL */
308 Z_External *userInformationField; /* OPTIONAL */
310 Z_OtherInformation *otherInfo; /* OPTIONAL */
314 typedef struct Z_NSRAuthentication
319 } Z_NSRAuthentication;
321 int z_NSRAuthentication(ODR o, Z_NSRAuthentication **p, int opt);
323 int z_StrAuthentication(ODR o, char **p, int opt);
325 /* ------------------ SEARCH SERVICE ----------------*/
327 typedef struct Z_DatabaseSpecificUnit
330 char *elementSetName;
331 } Z_DatabaseSpecificUnit;
333 typedef struct Z_DatabaseSpecific
336 Z_DatabaseSpecificUnit **elements;
337 } Z_DatabaseSpecific;
339 typedef struct Z_ElementSetNames
342 #define Z_ElementSetNames_generic 0
343 #define Z_ElementSetNames_databaseSpecific 1
347 Z_DatabaseSpecific *databaseSpecific;
351 /* ---------------------- RPN QUERY --------------------------- */
353 typedef struct Z_ComplexAttribute
356 Z_StringOrNumeric **list;
357 int num_semanticAction;
358 int **semanticAction; /* OPTIONAL */
359 } Z_ComplexAttribute;
361 typedef struct Z_AttributeElement
364 Odr_oid *attributeSet; /* OPTIONAL - v3 only */
369 #define Z_AttributeValue_numeric 0
370 #define Z_AttributeValue_complex 1
374 Z_ComplexAttribute *complex;
379 } Z_AttributeElement;
381 typedef struct Z_Term
384 #define Z_Term_general 0
385 #define Z_Term_numeric 1
386 #define Z_Term_characterString 2
388 #define Z_Term_dateTime 4
389 #define Z_Term_external 5
390 #define Z_Term_integerAndUnit 6
391 #define Z_Term_null 7
394 Odr_oct *general; /* this is required for v2 */
396 char *characterString;
399 Z_External *external;
400 /* Z_IntUnit *integerAndUnit; */
405 typedef struct Z_AttributesPlusTerm
408 Z_AttributeElement **attributeList;
410 } Z_AttributesPlusTerm;
412 typedef struct Z_ResultSetPlusAttributes
416 Z_AttributeElement **attributeList;
417 } Z_ResultSetPlusAttributes;
419 typedef struct Z_ProximityOperator
421 bool_t *exclusion; /* OPTIONAL */
425 #define Z_Prox_lessThan 1
426 #define Z_Prox_lessThanOrEqual 2
427 #define Z_Prox_equal 3
428 #define Z_Prox_greaterThanOrEqual 4
429 #define Z_Prox_greaterThan 5
430 #define Z_Prox_notEqual 6
432 #define Z_ProxCode_known 0
433 #define Z_ProxCode_private 1
434 int *proximityUnitCode;
435 #define Z_ProxUnit_character 1
436 #define Z_ProxUnit_word 2
437 #define Z_ProxUnit_sentence 3
438 #define Z_ProxUnit_paragraph 4
439 #define Z_ProxUnit_section 5
440 #define Z_ProxUnit_chapter 6
441 #define Z_ProxUnit_document 7
442 #define Z_ProxUnit_element 8
443 #define Z_ProxUnit_subelement 9
444 #define Z_ProxUnit_elementType 10
445 #define Z_ProxUnit_byte 11 /* v3 only */
446 } Z_ProximityOperator;
448 typedef struct Z_Operator
451 #define Z_Operator_and 0
452 #define Z_Operator_or 1
453 #define Z_Operator_and_not 2
454 #define Z_Operator_prox 3
457 Odr_null *and; /* these guys are nulls. */
460 Z_ProximityOperator *prox;
464 typedef struct Z_Operand
467 #define Z_Operand_APT 0
468 #define Z_Operand_resultSetId 1
469 #define Z_Operand_resultAttr /* v3 only */ 2
472 Z_AttributesPlusTerm *attributesPlusTerm;
473 Z_ResultSetId *resultSetId;
474 Z_ResultSetPlusAttributes *resultAttr;
478 typedef struct Z_Complex
480 struct Z_RPNStructure *s1;
481 struct Z_RPNStructure *s2;
482 Z_Operator *roperator;
485 typedef struct Z_RPNStructure
488 #define Z_RPNStructure_simple 0
489 #define Z_RPNStructure_complex 1
497 typedef struct Z_RPNQuery
499 Odr_oid *attributeSetId;
500 Z_RPNStructure *RPNStructure;
503 /* -------------------------- SEARCHREQUEST -------------------------- */
505 typedef struct Z_Query
508 #define Z_Query_type_1 1
509 #define Z_Query_type_2 2
510 #define Z_Query_type_101 3
515 Z_RPNQuery *type_101;
519 typedef struct Z_SearchRequest
521 Z_ReferenceId *referenceId; /* OPTIONAL */
522 int *smallSetUpperBound;
523 int *largeSetLowerBound;
524 int *mediumSetPresentNumber;
525 bool_t *replaceIndicator;
527 int num_databaseNames;
528 char **databaseNames;
529 Z_ElementSetNames *smallSetElementSetNames; /* OPTIONAL */
530 Z_ElementSetNames *mediumSetElementSetNames; /* OPTIONAL */
531 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
534 Z_OtherInformation *additionalSearchInfo; /* OPTIONAL */
535 Z_OtherInformation *otherInfo; /* OPTIONAL */
539 /* ------------------------ RECORD -------------------------- */
541 typedef Z_External Z_DatabaseRecord;
545 typedef struct Z_DefaultDiagFormat
547 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
549 /* until the whole character set issue becomes more definite,
550 * you can probably ignore this on input. */
552 #define Z_DiagForm_v2AddInfo 0
553 #define Z_DiagForm_v3AddInfo 1
555 } Z_DefaultDiagFormat;
557 typedef struct Z_DiagRec
560 #define Z_DiagRec_defaultFormat 0
561 #define Z_DiagRec_externallyDefined 1
564 Z_DefaultDiagFormat *defaultFormat;
565 Z_External *externallyDefined;
571 typedef struct Z_DiagRec
573 Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
580 typedef struct Z_DiagRecs
583 Z_DiagRec **diagRecs;
586 typedef struct Z_NamePlusRecord
588 char *databaseName; /* OPTIONAL */
590 #define Z_NamePlusRecord_databaseRecord 0
591 #define Z_NamePlusRecord_surrogateDiagnostic 1
594 Z_DatabaseRecord *databaseRecord;
595 Z_DiagRec *surrogateDiagnostic;
599 typedef struct Z_NamePlusRecordList
602 Z_NamePlusRecord **records;
603 } Z_NamePlusRecordList;
605 typedef struct Z_Records
608 #define Z_Records_DBOSD 0
609 #define Z_Records_NSD 1
610 #define Z_Records_multipleNSD 2
613 Z_NamePlusRecordList *databaseOrSurDiagnostics;
614 Z_DiagRec *nonSurrogateDiagnostic;
615 Z_DiagRecs *multipleNonSurDiagnostics;
619 /* ------------------------ SEARCHRESPONSE ------------------ */
621 typedef struct Z_SearchResponse
623 Z_ReferenceId *referenceId; /* OPTIONAL */
625 int *numberOfRecordsReturned;
626 int *nextResultSetPosition;
627 bool_t *searchStatus;
628 int *resultSetStatus; /* OPTIONAL */
629 #define Z_RES_SUBSET 1
630 #define Z_RES_INTERIM 2
632 int *presentStatus; /* OPTIONAL */
633 #define Z_PRES_SUCCESS 0
634 #define Z_PRES_PARTIAL_1 1
635 #define Z_PRES_PARTIAL_2 2
636 #define Z_PRES_PARTIAL_3 3
637 #define Z_PRES_PARTIAL_4 4
638 #define Z_PRES_FAILURE 5
639 Z_Records *records; /* OPTIONAL */
641 Z_OtherInformation *additionalSearchInfo;
642 Z_OtherInformation *otherInfo;
646 /* ------------------------- PRESENT SERVICE -----------------*/
648 typedef struct Z_ElementSpec
651 #define Z_ElementSpec_elementSetName 0
652 #define Z_ElementSpec_externalSpec 1
655 char *elementSetName;
656 Z_External *externalSpec;
660 typedef struct Z_Specification
662 Odr_oid *schema; /* OPTIONAL */
663 Z_ElementSpec *elementSpec; /* OPTIONAL */
666 typedef struct Z_DbSpecific
669 Z_Specification *spec;
672 typedef struct Z_CompSpec
674 bool_t *selectAlternativeSyntax;
675 Z_Specification *generic; /* OPTIONAL */
677 Z_DbSpecific **dbSpecific; /* OPTIONAL */
678 int num_recordSyntax;
679 Odr_oid **recordSyntax; /* OPTIONAL */
682 typedef struct Z_RecordComposition
685 #define Z_RecordComp_simple 0
686 #define Z_RecordComp_complex 1
689 Z_ElementSetNames *simple;
692 } Z_RecordComposition;
694 typedef struct Z_Range
696 int *startingPosition;
697 int *numberOfRecords;
700 typedef struct Z_PresentRequest
702 Z_ReferenceId *referenceId; /* OPTIONAL */
703 Z_ResultSetId *resultSetId;
704 int *resultSetStartPoint;
705 int *numberOfRecordsRequested;
708 Z_Range **additionalRanges; /* OPTIONAL */
709 Z_RecordComposition *recordComposition; /* OPTIONAL */
711 Z_ElementSetNames *elementSetNames; /* OPTIONAL */
713 Odr_oid *preferredRecordSyntax; /* OPTIONAL */
715 int *maxSegmentCount; /* OPTIONAL */
716 int *maxRecordSize; /* OPTIONAL */
717 int *maxSegmentSize; /* OPTIONAL */
718 Z_OtherInformation *otherInfo; /* OPTIONAL */
722 typedef struct Z_PresentResponse
724 Z_ReferenceId *referenceId; /* OPTIONAL */
725 int *numberOfRecordsReturned;
726 int *nextResultSetPosition;
730 Z_OtherInformation *otherInfo; /* OPTIONAL */
734 /* ------------------ RESOURCE CONTROL ----------------*/
736 typedef struct Z_TriggerResourceControlRequest
738 Z_ReferenceId *referenceId; /* OPTIONAL */
739 int *requestedAction;
740 #define Z_TriggerResourceCtrl_resourceReport 1
741 #define Z_TriggerResourceCtrl_resourceControl 2
742 #define Z_TriggerResourceCtrl_cancel 3
743 Odr_oid *prefResourceReportFormat; /* OPTIONAL */
744 bool_t *resultSetWanted; /* OPTIONAL */
746 Z_OtherInformation *otherInfo;
748 } Z_TriggerResourceControlRequest;
750 typedef struct Z_ResourceControlRequest
752 Z_ReferenceId *referenceId; /* OPTIONAL */
753 bool_t *suspendedFlag; /* OPTIONAL */
754 Z_External *resourceReport; /* OPTIONAL */
755 int *partialResultsAvailable; /* OPTIONAL */
756 #define Z_ResourceControlRequest_subset 1
757 #define Z_ResourceControlRequest_interim 2
758 #define Z_ResourceControlRequest_none 3
759 bool_t *responseRequired;
760 bool_t *triggeredRequestFlag; /* OPTIONAL */
762 Z_OtherInformation *otherInfo;
764 } Z_ResourceControlRequest;
766 typedef struct Z_ResourceControlResponse
768 Z_ReferenceId *referenceId; /* OPTIONAL */
769 bool_t *continueFlag;
770 bool_t *resultSetWanted; /* OPTIONAL */
772 Z_OtherInformation *otherInfo;
774 } Z_ResourceControlResponse;
777 /* ------------------ ACCESS CTRL SERVICE ----------------*/
779 typedef struct Z_AccessControlRequest
781 Z_ReferenceId *referenceId; /* OPTIONAL */
783 #define Z_AccessRequest_simpleForm 0
784 #define Z_AccessRequest_externallyDefined 1
788 Z_External *externallyDefined;
791 Z_OtherInformation *otherInfo; /* OPTIONAL */
793 } Z_AccessControlRequest;
795 typedef struct Z_AccessControlResponse
797 Z_ReferenceId *referenceId; /* OPTIONAL */
799 #define Z_AccessResponse_simpleForm 0
800 #define Z_AccessResponse_externallyDefined 1
804 Z_External *externallyDefined;
806 Z_DiagRec *diagnostic; /* OPTIONAL */
808 Z_OtherInformation *otherInfo; /* OPTIONAL */
810 } Z_AccessControlResponse;
812 /* ------------------------ SCAN SERVICE -------------------- */
814 typedef struct Z_AttributeList
817 Z_AttributeElement **attributes;
820 typedef struct Z_AlternativeTerm
823 Z_AttributesPlusTerm **terms;
826 typedef struct Z_OccurrenceByAttributes
828 Z_AttributeList *attributes;
831 #define Z_OByAtt_global 0
832 #define Z_ObyAtt_byDatabase 1
838 /* Z_ByDatabase *byDatabase; */
841 } Z_OccurrenceByAttributes;
843 typedef struct Z_TermInfo
846 Z_AttributeList *suggestedAttributes; /* OPTIONAL */
847 Z_AlternativeTerm *alternativeTerm; /* OPTIONAL */
848 int *globalOccurrences; /* OPTIONAL */
849 Z_OccurrenceByAttributes *byAttributes; /* OPTIONAL */
852 typedef struct Z_Entry
855 #define Z_Entry_termInfo 0
856 #define Z_Entry_surrogateDiagnostic 1
859 Z_TermInfo *termInfo;
860 Z_DiagRec *surrogateDiagnostic;
864 typedef struct Z_Entries
870 typedef struct Z_ListEntries
873 #define Z_ListEntries_entries 0
874 #define Z_ListEntries_nonSurrogateDiagnostics 1
878 Z_DiagRecs *nonSurrogateDiagnostics;
882 typedef struct Z_ScanRequest
884 Z_ReferenceId *referenceId; /* OPTIONAL */
885 int num_databaseNames;
886 char **databaseNames;
887 Odr_oid *attributeSet; /* OPTIONAL */
888 Z_AttributesPlusTerm *termListAndStartPoint;
889 int *stepSize; /* OPTIONAL */
890 int *numberOfTermsRequested;
891 int *preferredPositionInResponse; /* OPTIONAL */
893 Z_OtherInformation *otherInfo;
897 typedef struct Z_ScanResponse
899 Z_ReferenceId *referenceId; /* OPTIONAL */
900 int *stepSize; /* OPTIONAL */
902 #define Z_Scan_success 0
903 #define Z_Scan_partial_1 1
904 #define Z_Scan_partial_2 2
905 #define Z_Scan_partial_3 3
906 #define Z_Scan_partial_4 4
907 #define Z_Scan_partial_5 5
908 #define Z_Scan_failure 6
909 int *numberOfEntriesReturned;
910 int *positionOfTerm; /* OPTIONAL */
911 Z_ListEntries *entries; /* OPTIONAL */
912 Odr_oid *attributeSet; /* OPTIONAL */
914 Z_OtherInformation *otherInfo;
919 /* ------------------------ DELETE -------------------------- */
921 #define Z_DeleteStatus_success 0
922 #define Z_DeleteStatus_resultSetDidNotExist 1
923 #define Z_DeleteStatus_previouslyDeletedByTarget 2
924 #define Z_DeleteStatus_systemProblemAtTarget 3
925 #define Z_DeleteStatus_accessNotAllowed 4
926 #define Z_DeleteStatus_resourceControlAtOrigin 5
927 #define Z_DeleteStatus_resourceControlAtTarget 6
928 #define Z_DeleteStatus_bulkDeleteNotSupported 7
929 #define Z_DeleteStatus_notAllRsltSetsDeletedOnBulkDlte 8
930 #define Z_DeleteStatus_notAllRequestedResultSetsDeleted 9
931 #define Z_DeleteStatus_resultSetInUse 10
933 typedef struct Z_ListStatus
939 typedef struct Z_DeleteResultSetRequest
941 Z_ReferenceId *referenceId; /* OPTIONAL */
943 #define Z_DeleteRequest_list 0
944 #define Z_DeleteRequest_all 1
946 Z_ResultSetId **resultSetList; /* OPTIONAL */
948 Z_OtherInformation *otherInfo;
950 } Z_DeleteResultSetRequest;
952 typedef struct Z_DeleteResultSetResponse
954 Z_ReferenceId *referenceId; /* OPTIONAL */
955 int *deleteOperationStatus;
957 Z_ListStatus *deleteListStatuses; /* OPTIONAL */
958 int *numberNotDeleted; /* OPTIONAL */
959 int num_bulkStatuses;
960 Z_ListStatus *bulkStatuses; /* OPTIONAL */
961 char *deleteMessage; /* OPTIONAL */
963 Z_OtherInformation *otherInfo;
965 } Z_DeleteResultSetResponse;
967 /* ------------------------ CLOSE SERVICE ------------------- */
969 typedef struct Z_Close
971 Z_ReferenceId *referenceId; /* OPTIONAL */
973 #define Z_Close_finished 0
974 #define Z_Close_shutdown 1
975 #define Z_Close_systemProblem 2
976 #define Z_Close_costLimit 3
977 #define Z_Close_resources 4
978 #define Z_Close_securityViolation 5
979 #define Z_Close_protocolError 6
980 #define Z_Close_lackOfActivity 7
981 #define Z_Close_peerAbort 8
982 #define Z_Close_unspecified 9
983 char *diagnosticInformation; /* OPTIONAL */
984 Odr_oid *resourceReportFormat; /* OPTIONAL */
985 Z_External *resourceReport; /* OPTIONAL */
987 Z_OtherInformation *otherInfo; /* OPTIONAL */
991 /* ------------------------ SEGMENTATION -------------------- */
993 typedef struct Z_Segment
995 Z_ReferenceId *referenceId; /* OPTIONAL */
996 int *numberOfRecordsReturned;
997 int num_segmentRecords;
998 Z_NamePlusRecord **segmentRecords;
999 Z_OtherInformation *otherInfo; /* OPTIONAL */
1002 /* ----------------------- Extended Services ---------------- */
1004 typedef struct Z_Permissions
1007 int num_allowableFunctions;
1008 int **allowableFunctions;
1009 #define Z_Permissions_delete 1
1010 #define Z_Permissions_modifyContents 2
1011 #define Z_Permissions_modifyPermissions 3
1012 #define Z_Permissions_present 4
1013 #define Z_Permissions_invoke 5
1016 typedef struct Z_ExtendedServicesRequest
1018 Z_ReferenceId *referenceId; /* OPTIONAL */
1020 #define Z_ExtendedServicesRequest_create 1
1021 #define Z_ExtendedServicesRequest_delete 2
1022 #define Z_ExtendedServicesRequest_modify 3
1023 Odr_oid *packageType;
1024 char *packageName; /* OPTIONAL */
1025 char *userId; /* OPTIONAL */
1026 Z_IntUnit *retentionTime; /* OPTIONAL */
1027 Z_Permissions *permissions; /* OPTIONAL */
1028 char *description; /* OPTIONAL */
1029 Z_External *taskSpecificParameters; /* OPTIONAL */
1031 #define Z_ExtendedServicesRequest_wait 1
1032 #define Z_ExtendedServicesRequest_waitIfPossible 2
1033 #define Z_ExtendedServicesRequest_dontWait 3
1034 #define Z_ExtendedServicesRequest_dontReturnPackage 4
1035 char *elements; /* OPTIONAL */
1036 Z_OtherInformation *otherInfo; /* OPTIONAL */
1037 } Z_ExtendedServicesRequest;
1039 typedef struct Z_ExtendedServicesResponse
1041 Z_ReferenceId *referenceId; /* OPTIONAL */
1042 int *operationStatus;
1043 #define Z_ExtendedServicesResponse_done 1
1044 #define Z_ExtendedServicesResponse_accepted 2
1045 #define Z_ExtendedServicesResponse_failure 3
1046 int num_diagnostics;
1047 Z_DiagRec **diagnostics; /* OPTIONAL */
1048 Z_External *taskPackage; /* OPTIONAL */
1049 Z_OtherInformation *otherInfo; /* OPTIONAL */
1050 } Z_ExtendedServicesResponse;
1052 /* ------------------------ APDU ---------------------------- */
1054 typedef struct Z_APDU
1057 #define Z_APDU_initRequest 0
1058 #define Z_APDU_initResponse 1
1059 #define Z_APDU_searchRequest 2
1060 #define Z_APDU_searchResponse 3
1061 #define Z_APDU_presentRequest 4
1062 #define Z_APDU_presentResponse 5
1063 #define Z_APDU_deleteResultSetRequest 6
1064 #define Z_APDU_deleteResultSetResponse 7
1065 #define Z_APDU_resourceControlRequest 8
1066 #define Z_APDU_resourceControlResponse 9
1067 #define Z_APDU_triggerResourceControlRequest 10
1068 #define Z_APDU_scanRequest 11
1069 #define Z_APDU_scanResponse 12
1070 #define Z_APDU_segmentRequest 13
1071 #define Z_APDU_extendedServicesRequest 14
1072 #define Z_APDU_extendedServicesResponse 15
1073 #define Z_APDU_close 16
1076 Z_InitRequest *initRequest;
1077 Z_InitResponse *initResponse;
1078 Z_SearchRequest *searchRequest;
1079 Z_SearchResponse *searchResponse;
1080 Z_PresentRequest *presentRequest;
1081 Z_PresentResponse *presentResponse;
1082 Z_DeleteResultSetRequest *deleteResultSetRequest;
1083 Z_DeleteResultSetResponse *deleteResultSetResponse;
1084 Z_ResourceControlRequest *resourceControlRequest;
1085 Z_ResourceControlResponse *resourceControlResponse;
1086 Z_TriggerResourceControlRequest *triggerResourceControlRequest;
1087 Z_ScanRequest *scanRequest;
1088 Z_ScanResponse *scanResponse;
1089 Z_Segment *segmentRequest;
1090 Z_ExtendedServicesRequest *extendedServicesRequest;
1091 Z_ExtendedServicesResponse *extendedServicesResponse;
1096 int z_APDU(ODR o, Z_APDU **p, int opt);
1097 int z_SUTRS(ODR o, Odr_oct **p, int opt);
1099 Z_InitRequest *zget_InitRequest(ODR o);
1100 Z_InitResponse *zget_InitResponse(ODR o);
1101 Z_SearchRequest *zget_SearchRequest(ODR o);
1102 Z_SearchResponse *zget_SearchResponse(ODR o);
1103 Z_PresentRequest *zget_PresentRequest(ODR o);
1104 Z_PresentResponse *zget_PresentResponse(ODR o);
1105 Z_DeleteResultSetRequest *zget_DeleteResultSetRequest(ODR o);
1106 Z_DeleteResultSetResponse *zget_DeleteResultSetResponse(ODR o);
1107 Z_ScanRequest *zget_ScanRequest(ODR o);
1108 Z_ScanResponse *zget_ScanResponse(ODR o);
1109 Z_TriggerResourceControlRequest *zget_TriggerResourceControlRequest(ODR o);
1110 Z_ResourceControlRequest *zget_ResourceControlRequest(ODR o);
1111 Z_ResourceControlResponse *zget_ResourceControlResponse(ODR o);
1112 Z_Close *zget_Close(ODR o);
1113 int z_InternationalString(ODR o, char **p, int opt);
1114 int z_OtherInformation(ODR o, Z_OtherInformation **p, int opt);
1115 int z_ElementSetName(ODR o, char **p, int opt);
1116 int z_IntUnit(ODR o, Z_IntUnit **p, int opt);
1117 int z_Unit(ODR o, Z_Unit **p, int opt);
1118 int z_DatabaseName(ODR o, Z_DatabaseName **p, int opt);
1119 int z_StringOrNumeric(ODR o, Z_StringOrNumeric **p, int opt);
1120 int z_OtherInformationUnit(ODR o, Z_OtherInformationUnit **p, int opt);
1121 int z_Term(ODR o, Z_Term **p, int opt);
1122 int z_Specification(ODR o, Z_Specification **p, int opt);
1123 int z_Permissions(ODR o, Z_Permissions **p, int opt);
1124 int z_DiagRec(ODR o, Z_DiagRec **p, int opt);
1125 int z_AttributeList(ODR o, Z_AttributeList **p, int opt);
1126 int z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt);
1127 Z_APDU *zget_APDU(ODR o, int which);
1129 #include <prt-rsc.h>
1130 #include <prt-acc.h>
1131 #include <prt-exp.h>
1132 #include <prt-grs.h>
1133 #include <prt-exd.h>
1134 #include <prt-dia.h>
1135 #include <prt-esp.h>
1137 #include <prt-ext.h>