2a323faba74a1be4526e92866cd86d77ddba1407
[yaz-moved-to-github.git] / include / proto.h
1 /*
2  * Copyright (c) 1995, Index Data.
3  *
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,
6  * provided that:
7  *
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.
11  *
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.
15  *
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
24  * OF THIS SOFTWARE.
25  *
26  * $Log: proto.h,v $
27  * Revision 1.35  1996-06-10 08:57:38  quinn
28  * Added OPAC, ResourceReport
29  *
30  * Revision 1.34  1996/06/10  08:55:36  quinn
31  * Added Summary.
32  *
33  * Revision 1.33  1996/02/23  10:00:51  quinn
34  * SCAN Work
35  *
36  * Revision 1.32  1996/02/20  12:52:39  quinn
37  * Various
38  *
39  * Revision 1.31  1996/01/22  09:46:45  quinn
40  * Added Sort PDU. Moved StringList to main protocol file.
41  *
42  * Revision 1.30  1996/01/10  15:21:32  quinn
43  * Added links to access control PDUs
44  *
45  * Revision 1.29  1996/01/02  11:46:49  quinn
46  * Changed 'operator' to 'roperator' to avoid C++ conflict.
47  * Moved to pl3
48  *
49  * Revision 1.28  1996/01/02  08:57:32  quinn
50  * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
51  *
52  * Revision 1.27  1995/10/12  10:34:46  quinn
53  * Added Espec-1.
54  *
55  * Revision 1.26  1995/09/29  17:12:08  quinn
56  * Smallish
57  *
58  * Revision 1.25  1995/09/27  15:02:49  quinn
59  * Modified function heads & prototypes.
60  *
61  * Revision 1.24  1995/08/29  11:17:43  quinn
62  * *** empty log message ***
63  *
64  * Revision 1.23  1995/08/21  09:10:36  quinn
65  * Smallish fixes to suppport new formats.
66  *
67  * Revision 1.22  1995/08/17  12:45:14  quinn
68  * Fixed minor problems with GRS-1. Added support in c&s.
69  *
70  * Revision 1.21  1995/08/15  12:00:11  quinn
71  * Updated External
72  *
73  * Revision 1.20  1995/08/10  08:54:35  quinn
74  * Added Explain.
75  *
76  * Revision 1.19  1995/06/19  12:38:28  quinn
77  * Reorganized include-files. Added small features.
78  *
79  * Revision 1.18  1995/06/16  13:16:05  quinn
80  * Fixed Defaultdiagformat.
81  *
82  * Revision 1.17  1995/06/15  15:42:05  quinn
83  * Fixed some v3 bugs
84  *
85  * Revision 1.16  1995/06/15  07:45:06  quinn
86  * Moving to v3.
87  *
88  * Revision 1.15  1995/06/14  15:26:43  quinn
89  * *** empty log message ***
90  *
91  * Revision 1.14  1995/06/07  14:42:34  quinn
92  * Fixed CLOSE
93  *
94  * Revision 1.13  1995/06/07  14:36:47  quinn
95  * Added CLOSE
96  *
97  * Revision 1.12  1995/06/05  10:53:13  quinn
98  * Smallish.
99  *
100  * Revision 1.11  1995/06/02  09:49:47  quinn
101  * Add access control
102  *
103  * Revision 1.10  1995/05/29  08:11:34  quinn
104  * Moved oid from odr/asn to util.
105  *
106  * Revision 1.9  1995/05/22  11:31:25  quinn
107  * Added PDUs
108  *
109  * Revision 1.8  1995/05/17  08:41:35  quinn
110  * Added delete to proto & other little things.
111  * Relaying auth info to backend.
112  *
113  * Revision 1.7  1995/05/16  08:50:37  quinn
114  * License, documentation, and memory fixes
115  *
116  * Revision 1.6  1995/05/15  11:55:55  quinn
117  * Work on asynchronous activity.
118  *
119  * Revision 1.5  1995/04/17  11:28:18  quinn
120  * Smallish
121  *
122  * Revision 1.4  1995/04/10  10:22:47  quinn
123  * Added SCAN
124  *
125  * Revision 1.3  1995/03/30  12:18:09  quinn
126  * Added info.
127  *
128  * Revision 1.2  1995/03/30  10:26:48  quinn
129  * Added Term structure
130  *
131  * Revision 1.1  1995/03/30  09:39:42  quinn
132  * Moved .h files to include directory
133  *
134  * Revision 1.11  1995/03/30  09:08:44  quinn
135  * Added Resource control protocol
136  *
137  * Revision 1.10  1995/03/29  15:39:39  quinn
138  * Adding some resource control elements, and a null-check to getentbyoid
139  *
140  * Revision 1.9  1995/03/29  08:06:18  quinn
141  * Added a few v3 elements
142  *
143  * Revision 1.8  1995/03/22  10:12:49  quinn
144  * Added Z_PRES constants.
145  *
146  * Revision 1.7  1995/03/20  09:45:12  quinn
147  * Working towards v3
148  *
149  * Revision 1.5  1995/03/07  16:29:34  quinn
150  * Added authentication stuff.
151  *
152  * Revision 1.4  1995/03/07  10:13:00  quinn
153  * Added prototype for z_APDU()
154  *
155  * Revision 1.3  1995/02/14  11:54:23  quinn
156  * Fixing include.
157  *
158  * Revision 1.2  1995/02/09  15:51:40  quinn
159  * Works better now.
160  *
161  * Revision 1.1  1995/02/06  16:44:48  quinn
162  * First hack at Z/SR protocol
163  *
164  */
165
166 #ifndef PROTO_H
167 #define PROTO_H
168
169 #include <yconfig.h>
170 #include <odr.h>
171 #include <oid.h>
172 #include <odr_use.h>
173 #include <yaz-version.h>
174
175 /*
176  * Because we didn't have time to put all of the extra v3 elements in here
177  * before the first applications were written, we have to place them
178  * in #ifdefs in places where they would break existing code. If you are
179  * developing new stuff, we urge you to leave them in, even if you don't
180  * intend to use any v3 features. When we are comfortable that the old
181  * apps have been updated, we'll remove the #ifdefs.
182  */
183
184 #define Z_95
185
186 /* ----------------- GLOBAL AUXILIARY DEFS ----------------*/
187
188 struct Z_External;
189 typedef struct Z_External Z_External;
190
191 typedef Odr_oct Z_ReferenceId;
192 typedef char Z_DatabaseName;
193 typedef char Z_ResultSetId;
194 typedef Odr_oct Z_ResultsetId;
195
196 typedef struct Z_InfoCategory
197 {
198     Odr_oid *categoryTypeId;         /* OPTIONAL */
199     int *categoryValue;
200 } Z_InfoCategory;
201
202 typedef struct Z_OtherInformationUnit
203 {
204     Z_InfoCategory *category;        /* OPTIONAL */
205     int which;
206 #define Z_OtherInfo_characterInfo 0
207 #define Z_OtherInfo_binaryInfo 1
208 #define Z_OtherInfo_externallyDefinedInfo 2
209 #define Z_OtherInfo_oid 3
210     union
211     {
212         char *characterInfo; 
213         Odr_oct *binaryInfo;
214         Z_External *externallyDefinedInfo;
215         Odr_oid *oid;
216     } information;
217 } Z_OtherInformationUnit;
218
219 typedef struct Z_OtherInformation
220 {
221     int num_elements;
222     Z_OtherInformationUnit **list;
223 } Z_OtherInformation;
224
225 typedef struct Z_StringOrNumeric
226 {
227     int which;
228 #define Z_StringOrNumeric_string 0
229 #define Z_StringOrNumeric_numeric 1
230     union
231     {
232         char *string;
233         int *numeric;
234     } u;
235 } Z_StringOrNumeric;
236
237 typedef struct Z_Unit
238 {
239     char *unitSystem;               /* OPTIONAL */
240     Z_StringOrNumeric *unitType;    /* OPTIONAL */
241     Z_StringOrNumeric *unit;        /* OPTIONAL */
242     int *scaleFactor;               /* OPTIONAL */
243 } Z_Unit;
244
245 typedef struct Z_IntUnit
246 {
247     int *value;
248     Z_Unit *unitUsed;
249 } Z_IntUnit;
250
251 typedef Odr_oct Z_SUTRS;
252
253 typedef struct Z_StringList
254 {
255     int num_strings;
256     char **strings;
257 } Z_StringList;
258
259 /* ----------------- INIT SERVICE  ----------------*/
260
261 typedef struct
262 {
263     char *groupId;       /* OPTIONAL */
264     char *userId;         /* OPTIONAL */
265     char *password;      /* OPTIONAL */
266 } Z_IdPass;
267
268 typedef struct Z_IdAuthentication
269 {
270     int which;
271 #define Z_IdAuthentication_open 0
272 #define Z_IdAuthentication_idPass 1
273 #define Z_IdAuthentication_anonymous 2
274 #define Z_IdAuthentication_other 3
275     union
276     {
277         char *open;
278         Z_IdPass *idPass;
279         Odr_null *anonymous;
280         Z_External *other;
281     } u;
282 } Z_IdAuthentication;
283
284 #define Z_ProtocolVersion_1               0
285 #define Z_ProtocolVersion_2               1
286 #define Z_ProtocolVersion_3               2
287
288 #define Z_Options_search                  0
289 #define Z_Options_present                 1
290 #define Z_Options_delSet                  2
291 #define Z_Options_resourceReport          3
292 #define Z_Options_triggerResourceCtrl     4
293 #define Z_Options_resourceCtrl            5
294 #define Z_Options_accessCtrl              6
295 #define Z_Options_scan                    7
296 #define Z_Options_sort                    8
297 #define Z_Options_reserved                9
298 #define Z_Options_extendedServices       10
299 #define Z_Options_level_1Segmentation    11
300 #define Z_Options_level_2Segmentation    12
301 #define Z_Options_concurrentOperations   13
302 #define Z_Options_namedResultSets        14
303
304 typedef struct Z_InitRequest
305 {
306     Z_ReferenceId *referenceId;                   /* OPTIONAL */
307     Odr_bitmask *protocolVersion;
308     Odr_bitmask *options;
309     int *preferredMessageSize;
310     int *maximumRecordSize;
311     Z_IdAuthentication* idAuthentication;        /* OPTIONAL */
312     char *implementationId;                      /* OPTIONAL */
313     char *implementationName;                    /* OPTIONAL */
314     char *implementationVersion;                 /* OPTIONAL */
315     Z_External *userInformationField;          /* OPTIONAL */
316 #ifdef Z_95
317     Z_OtherInformation *otherInfo;               /* OPTIONAL */
318 #endif
319 } Z_InitRequest;
320
321 typedef struct Z_InitResponse
322 {
323     Z_ReferenceId *referenceId;    /* OPTIONAL */
324     Odr_bitmask *protocolVersion;
325     Odr_bitmask *options;
326     int *preferredMessageSize;
327     int *maximumRecordSize;
328     bool_t *result;
329     char *implementationId;      /* OPTIONAL */
330     char *implementationName;    /* OPTIONAL */
331     char *implementationVersion; /* OPTIONAL */
332     Z_External *userInformationField; /* OPTIONAL */
333 #ifdef Z_95
334     Z_OtherInformation *otherInfo;    /* OPTIONAL */
335 #endif
336 } Z_InitResponse;
337
338 typedef struct Z_NSRAuthentication
339 {
340     char *user;
341     char *password;
342     char *account;
343 } Z_NSRAuthentication;
344
345 int z_NSRAuthentication(ODR o, Z_NSRAuthentication **p, int opt);
346
347 int z_StrAuthentication(ODR o, char **p, int opt);
348
349 /* ------------------ SEARCH SERVICE ----------------*/
350
351 typedef struct Z_DatabaseSpecificUnit
352 {
353     char *databaseName;
354     char *elementSetName;
355 } Z_DatabaseSpecificUnit;
356
357 typedef struct Z_DatabaseSpecific
358 {
359     int num_elements;
360     Z_DatabaseSpecificUnit **elements;
361 } Z_DatabaseSpecific;
362
363 typedef struct Z_ElementSetNames
364 {
365     int which;
366 #define Z_ElementSetNames_generic 0
367 #define Z_ElementSetNames_databaseSpecific 1
368     union
369     {
370         char *generic;
371         Z_DatabaseSpecific *databaseSpecific;
372     } u;
373 } Z_ElementSetNames;
374
375 /* ---------------------- RPN QUERY --------------------------- */
376
377 typedef struct Z_ComplexAttribute
378 {
379     int num_list;
380     Z_StringOrNumeric **list;
381     int num_semanticAction;
382     int **semanticAction;           /* OPTIONAL */
383 } Z_ComplexAttribute;
384
385 typedef struct Z_AttributeElement
386 {
387 #ifdef Z_95
388     Odr_oid *attributeSet;           /* OPTIONAL - v3 only */
389 #endif
390     int *attributeType;
391 #ifdef Z_95
392     int which;
393 #define Z_AttributeValue_numeric 0
394 #define Z_AttributeValue_complex 1
395     union
396     {
397         int *numeric;
398         Z_ComplexAttribute *complex;
399     } value;
400 #else
401     int *attributeValue;
402 #endif
403 } Z_AttributeElement;
404
405 typedef struct Z_Term 
406 {
407     int which;
408 #define Z_Term_general 0
409 #define Z_Term_numeric 1
410 #define Z_Term_characterString 2
411 #define Z_Term_oid 3
412 #define Z_Term_dateTime 4
413 #define Z_Term_external 5
414 #define Z_Term_integerAndUnit 6
415 #define Z_Term_null 7
416     union
417     {
418         Odr_oct *general; /* this is required for v2 */
419         int *numeric;
420         char *characterString;
421         Odr_oid *oid;
422         char *dateTime;
423         Z_External *external;
424         /* Z_IntUnit *integerAndUnit; */
425         Odr_null *null;
426     } u;
427 } Z_Term;
428
429 typedef struct Z_AttributesPlusTerm
430 {
431     int num_attributes;
432     Z_AttributeElement **attributeList;
433     Z_Term *term;
434 } Z_AttributesPlusTerm;
435
436 typedef struct Z_ResultSetPlusAttributes
437 {
438     char *resultSet;
439     int num_attributes;
440     Z_AttributeElement **attributeList;
441 } Z_ResultSetPlusAttributes;
442
443 typedef struct Z_ProximityOperator
444 {
445     bool_t *exclusion;          /* OPTIONAL */
446     int *distance;
447     bool_t *ordered;
448     int *relationType;
449 #define Z_Prox_lessThan           1
450 #define Z_Prox_lessThanOrEqual    2
451 #define Z_Prox_equal              3
452 #define Z_Prox_greaterThanOrEqual 4
453 #define Z_Prox_greaterThan        5
454 #define Z_Prox_notEqual           6
455     int which;
456 #define Z_ProxCode_known 0
457 #define Z_ProxCode_private 1
458     int *proximityUnitCode;
459 #define Z_ProxUnit_character       1
460 #define Z_ProxUnit_word            2
461 #define Z_ProxUnit_sentence        3
462 #define Z_ProxUnit_paragraph       4
463 #define Z_ProxUnit_section         5
464 #define Z_ProxUnit_chapter         6
465 #define Z_ProxUnit_document        7
466 #define Z_ProxUnit_element         8
467 #define Z_ProxUnit_subelement      9
468 #define Z_ProxUnit_elementType    10
469 #define Z_ProxUnit_byte           11   /* v3 only */
470 } Z_ProximityOperator;
471
472 typedef struct Z_Operator
473 {
474     int which;
475 #define Z_Operator_and 0
476 #define Z_Operator_or 1
477 #define Z_Operator_and_not 2
478 #define Z_Operator_prox 3
479     union
480     {
481         Odr_null *and;          /* these guys are nulls. */
482         Odr_null *or;
483         Odr_null *and_not;
484         Z_ProximityOperator *prox;
485     } u;
486 } Z_Operator;
487
488 typedef struct Z_Operand
489 {
490     int which;
491 #define Z_Operand_APT 0
492 #define Z_Operand_resultSetId 1
493 #define Z_Operand_resultAttr             /* v3 only */ 2
494     union
495     {
496         Z_AttributesPlusTerm *attributesPlusTerm;
497         Z_ResultSetId *resultSetId;
498         Z_ResultSetPlusAttributes *resultAttr;
499     } u;
500 } Z_Operand;
501
502 typedef struct Z_Complex
503 {
504     struct Z_RPNStructure *s1;
505     struct Z_RPNStructure *s2;
506     Z_Operator *roperator;
507 } Z_Complex;
508
509 typedef struct Z_RPNStructure
510 {
511     int which;
512 #define Z_RPNStructure_simple 0
513 #define Z_RPNStructure_complex 1
514     union
515     {
516         Z_Operand *simple;
517         Z_Complex *complex;
518     } u;
519 } Z_RPNStructure;
520
521 typedef struct Z_RPNQuery
522 {
523     Odr_oid *attributeSetId;
524     Z_RPNStructure *RPNStructure;
525 } Z_RPNQuery;
526
527 /* -------------------------- SEARCHREQUEST -------------------------- */
528
529 typedef struct Z_Query
530 {
531     int which;
532 #define Z_Query_type_1 1
533 #define Z_Query_type_2 2
534 #define Z_Query_type_101 3
535     union
536     {
537         Z_RPNQuery *type_1;
538         Odr_oct *type_2;
539         Z_RPNQuery *type_101;
540     } u;
541 } Z_Query;
542
543 typedef struct Z_SearchRequest
544 {
545     Z_ReferenceId *referenceId;   /* OPTIONAL */
546     int *smallSetUpperBound;
547     int *largeSetLowerBound;
548     int *mediumSetPresentNumber;
549     bool_t *replaceIndicator;
550     char *resultSetName;
551     int num_databaseNames;
552     char **databaseNames;
553     Z_ElementSetNames *smallSetElementSetNames;    /* OPTIONAL */
554     Z_ElementSetNames *mediumSetElementSetNames;    /* OPTIONAL */
555     Odr_oid *preferredRecordSyntax;  /* OPTIONAL */
556     Z_Query *query;
557 #ifdef Z_95
558     Z_OtherInformation *additionalSearchInfo;       /* OPTIONAL */
559     Z_OtherInformation *otherInfo;                  /* OPTIONAL */
560 #endif
561 } Z_SearchRequest;
562
563 /* ------------------------ RECORD -------------------------- */
564
565 typedef Z_External Z_DatabaseRecord;
566
567 #ifdef Z_95
568
569 typedef struct Z_DefaultDiagFormat
570 {
571     Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
572     int *condition;
573     /* until the whole character set issue becomes more definite,
574      * you can probably ignore this on input. */
575     int which;
576 #define Z_DiagForm_v2AddInfo 0
577 #define Z_DiagForm_v3AddInfo 1
578     char *addinfo;
579 } Z_DefaultDiagFormat;
580
581 typedef struct Z_DiagRec
582 {
583     int which;
584 #define Z_DiagRec_defaultFormat 0
585 #define Z_DiagRec_externallyDefined 1
586     union
587     {
588         Z_DefaultDiagFormat *defaultFormat;
589         Z_External *externallyDefined;
590     } u;
591 } Z_DiagRec;
592
593 #else
594
595 typedef struct Z_DiagRec
596 {
597     Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
598     int *condition;
599     char *addinfo;
600 } Z_DiagRec;
601
602 #endif
603
604 typedef struct Z_DiagRecs
605 {
606     int num_diagRecs;
607     Z_DiagRec **diagRecs;
608 } Z_DiagRecs;
609
610 typedef struct Z_NamePlusRecord
611 {
612     char *databaseName;      /* OPTIONAL */
613     int which;
614 #define Z_NamePlusRecord_databaseRecord 0
615 #define Z_NamePlusRecord_surrogateDiagnostic 1
616     union
617     {
618         Z_DatabaseRecord *databaseRecord;
619         Z_DiagRec *surrogateDiagnostic;
620     } u;
621 } Z_NamePlusRecord;
622
623 typedef struct Z_NamePlusRecordList
624 {
625     int num_records;
626     Z_NamePlusRecord **records;
627 } Z_NamePlusRecordList;
628
629 typedef struct Z_Records
630 {
631     int which;
632 #define Z_Records_DBOSD 0
633 #define Z_Records_NSD 1
634 #define Z_Records_multipleNSD 2
635     union
636     {
637         Z_NamePlusRecordList *databaseOrSurDiagnostics;
638         Z_DiagRec *nonSurrogateDiagnostic;
639         Z_DiagRecs *multipleNonSurDiagnostics;
640     } u;
641 } Z_Records;
642
643 /* ------------------------ SEARCHRESPONSE ------------------ */
644
645 typedef struct Z_SearchResponse
646 {
647     Z_ReferenceId *referenceId;       /* OPTIONAL */
648     int *resultCount;
649     int *numberOfRecordsReturned;
650     int *nextResultSetPosition;
651     bool_t *searchStatus;
652     int *resultSetStatus;              /* OPTIONAL */
653 #define Z_RES_SUBSET        1
654 #define Z_RES_INTERIM       2
655 #define Z_RES_NONE          3
656     int *presentStatus;                /* OPTIONAL */
657 #define Z_PRES_SUCCESS      0
658 #define Z_PRES_PARTIAL_1    1
659 #define Z_PRES_PARTIAL_2    2
660 #define Z_PRES_PARTIAL_3    3
661 #define Z_PRES_PARTIAL_4    4
662 #define Z_PRES_FAILURE      5
663     Z_Records *records;                  /* OPTIONAL */
664 #ifdef Z_95
665     Z_OtherInformation *additionalSearchInfo;
666     Z_OtherInformation *otherInfo;
667 #endif
668 } Z_SearchResponse;
669
670 /* ------------------------- PRESENT SERVICE -----------------*/
671
672 typedef struct Z_ElementSpec
673 {
674     int which;
675 #define Z_ElementSpec_elementSetName 0
676 #define Z_ElementSpec_externalSpec 1
677     union
678     {
679         char *elementSetName;
680         Z_External *externalSpec;
681     } u;
682 } Z_ElementSpec;
683
684 typedef struct Z_Specification
685 {
686     Odr_oid *schema;                  /* OPTIONAL */
687     Z_ElementSpec *elementSpec;       /* OPTIONAL */
688 } Z_Specification;
689
690 typedef struct Z_DbSpecific
691 {
692     char *databaseName;
693     Z_Specification *spec;
694 } Z_DbSpecific;
695
696 typedef struct Z_CompSpec
697 {
698     bool_t *selectAlternativeSyntax;
699     Z_Specification *generic;            /* OPTIONAL */
700     int num_dbSpecific;
701     Z_DbSpecific **dbSpecific;           /* OPTIONAL */
702     int num_recordSyntax;
703     Odr_oid **recordSyntax;              /* OPTIONAL */
704 } Z_CompSpec;
705
706 typedef struct Z_RecordComposition
707 {
708     int which;
709 #define Z_RecordComp_simple 0
710 #define Z_RecordComp_complex 1
711     union
712     {
713         Z_ElementSetNames *simple;
714         Z_CompSpec *complex;
715     } u;
716 } Z_RecordComposition;
717
718 typedef struct Z_Range
719 {
720     int *startingPosition;
721     int *numberOfRecords;
722 } Z_Range;
723
724 typedef struct Z_PresentRequest
725 {
726     Z_ReferenceId *referenceId;              /* OPTIONAL */
727     Z_ResultSetId *resultSetId;
728     int *resultSetStartPoint;
729     int *numberOfRecordsRequested;
730 #ifdef Z_95
731     int num_ranges;
732     Z_Range **additionalRanges;              /* OPTIONAL */
733     Z_RecordComposition *recordComposition;  /* OPTIONAL */
734 #else
735     Z_ElementSetNames *elementSetNames;  /* OPTIONAL */
736 #endif
737     Odr_oid *preferredRecordSyntax;  /* OPTIONAL */
738 #ifdef Z_95
739     int *maxSegmentCount;                 /* OPTIONAL */
740     int *maxRecordSize;                   /* OPTIONAL */
741     int *maxSegmentSize;                  /* OPTIONAL */
742     Z_OtherInformation *otherInfo;        /* OPTIONAL */
743 #endif
744 } Z_PresentRequest;
745
746 typedef struct Z_PresentResponse
747 {
748     Z_ReferenceId *referenceId;        /* OPTIONAL */
749     int *numberOfRecordsReturned;
750     int *nextResultSetPosition;
751     int *presentStatus;
752     Z_Records *records;
753 #ifdef Z_95
754     Z_OtherInformation *otherInfo;     /* OPTIONAL */
755 #endif
756 } Z_PresentResponse;
757
758 /* ------------------ RESOURCE CONTROL ----------------*/
759
760 typedef struct Z_TriggerResourceControlRequest
761 {
762     Z_ReferenceId *referenceId;    /* OPTIONAL */
763     int *requestedAction;
764 #define Z_TriggerResourceCtrl_resourceReport  1
765 #define Z_TriggerResourceCtrl_resourceControl 2
766 #define Z_TriggerResourceCtrl_cancel          3
767     Odr_oid *prefResourceReportFormat;  /* OPTIONAL */
768     bool_t *resultSetWanted;            /* OPTIONAL */
769 #ifdef Z_95
770     Z_OtherInformation *otherInfo;
771 #endif
772 } Z_TriggerResourceControlRequest;
773
774 typedef struct Z_ResourceControlRequest
775 {
776     Z_ReferenceId *referenceId;    /* OPTIONAL */
777     bool_t *suspendedFlag;         /* OPTIONAL */
778     Z_External *resourceReport; /* OPTIONAL */
779     int *partialResultsAvailable;  /* OPTIONAL */
780 #define Z_ResourceControlRequest_subset    1
781 #define Z_ResourceControlRequest_interim   2
782 #define Z_ResourceControlRequest_none      3
783     bool_t *responseRequired;
784     bool_t *triggeredRequestFlag;  /* OPTIONAL */
785 #ifdef Z_95
786     Z_OtherInformation *otherInfo;
787 #endif
788 } Z_ResourceControlRequest;
789
790 typedef struct Z_ResourceControlResponse
791 {
792     Z_ReferenceId *referenceId;    /* OPTIONAL */
793     bool_t *continueFlag;
794     bool_t *resultSetWanted;       /* OPTIONAL */
795 #ifdef Z_95
796     Z_OtherInformation *otherInfo;
797 #endif
798 } Z_ResourceControlResponse;
799
800
801 /* ------------------ ACCESS CTRL SERVICE ----------------*/
802
803 typedef struct Z_AccessControlRequest
804 {
805     Z_ReferenceId *referenceId;           /* OPTIONAL */
806     int which;
807 #define Z_AccessRequest_simpleForm 0
808 #define Z_AccessRequest_externallyDefined 1
809     union
810     {
811         Odr_oct *simpleForm;
812         Z_External *externallyDefined;
813     } u;
814 #ifdef Z_95
815     Z_OtherInformation *otherInfo;           /* OPTIONAL */
816 #endif
817 } Z_AccessControlRequest;
818
819 typedef struct Z_AccessControlResponse
820 {
821     Z_ReferenceId *referenceId;              /* OPTIONAL */
822     int which;
823 #define Z_AccessResponse_simpleForm 0
824 #define Z_AccessResponse_externallyDefined 1
825     union
826     {
827         Odr_oct *simpleForm;
828         Z_External *externallyDefined;
829     } u;
830     Z_DiagRec *diagnostic;                   /* OPTIONAL */
831 #ifdef Z_95
832     Z_OtherInformation *otherInfo;           /* OPTIONAL */
833 #endif
834 } Z_AccessControlResponse;
835
836 /* ------------------------ SCAN SERVICE -------------------- */
837
838 typedef struct Z_AttributeList
839 {
840     int num_attributes;
841     Z_AttributeElement **attributes;
842 } Z_AttributeList;
843
844 typedef struct Z_AlternativeTerm
845 {
846     int num_terms;
847     Z_AttributesPlusTerm **terms;
848 } Z_AlternativeTerm;
849
850 #if 1
851
852 typedef struct Z_ByDatabase
853 {
854     char *db;
855     int *num;                           /* OPTIONAL */
856     Z_OtherInformation *otherDbInfo;    /* OPTIONAL */
857 } Z_ByDatabase;
858
859 typedef struct Z_ByDatabaseList
860 {
861     int num_elements;
862     Z_ByDatabase **elements;
863 } Z_ByDatabaseList;
864
865 typedef struct Z_ScanOccurrences
866 {
867     int which;
868 #define Z_ScanOccurrences_global         0
869 #define Z_ScanOccurrences_byDatabase     1
870     union
871     {
872         int *global;
873         Z_ByDatabaseList *byDatabase;
874     } u;
875
876 } Z_ScanOccurrences;
877
878 typedef struct Z_OccurrenceByAttributesElem
879 {
880     Z_AttributeList *attributes;
881     Z_ScanOccurrences *occurrences;         /* OPTIONAL */
882     Z_OtherInformation *otherOccurInfo;      /* OPTIONAL */
883 } Z_OccurrenceByAttributesElem;
884
885 typedef struct Z_OccurrenceByAttributes
886 {
887     int num_elements;
888     Z_OccurrenceByAttributesElem **elements;
889 } Z_OccurrenceByAttributes;
890
891 #else
892
893 /*
894  * Old, incomplete definition of OccurrenceByAttributes.
895  */
896
897 typedef struct Z_OccurrenceByAttributes
898 {
899     Z_AttributeList *attributes;
900 #if 0
901     int which;
902 #define Z_OByAtt_global 0
903 #define Z_ObyAtt_byDatabase 1
904     union
905     {
906 #endif
907         int *global;
908 #if 0
909         /* Z_ByDatabase *byDatabase; */
910     } u;
911 #endif
912 } Z_OccurrenceByAttributes;
913
914 #endif
915
916 typedef struct Z_TermInfo
917 {
918     Z_Term *term;
919     char *displayTerm;                     /* OPTIONAL */
920     Z_AttributeList *suggestedAttributes;  /* OPTIONAL */
921     Z_AlternativeTerm *alternativeTerm;    /* OPTIONAL */
922     int *globalOccurrences;                /* OPTIONAL */
923     Z_OccurrenceByAttributes *byAttributes; /* OPTIONAL */
924     Z_OtherInformation *otherTermInfo;      /* OPTIONAL */
925 } Z_TermInfo;
926
927 typedef struct Z_Entry
928 {
929     int which;
930 #define Z_Entry_termInfo 0
931 #define Z_Entry_surrogateDiagnostic 1
932     union
933     {
934         Z_TermInfo *termInfo;
935         Z_DiagRec *surrogateDiagnostic;
936     } u;
937 } Z_Entry;
938
939 typedef struct Z_Entries
940 {
941     int num_entries;
942     Z_Entry **entries;
943 } Z_Entries;
944
945 typedef struct Z_ListEntries
946 {
947     int which;
948 #define Z_ListEntries_entries 0
949 #define Z_ListEntries_nonSurrogateDiagnostics 1
950     union
951     {
952         Z_Entries *entries;
953         Z_DiagRecs *nonSurrogateDiagnostics;
954     } u;
955 } Z_ListEntries;
956
957 typedef struct Z_ScanRequest
958 {
959     Z_ReferenceId *referenceId;       /* OPTIONAL */
960     int num_databaseNames;
961     char **databaseNames;
962     Odr_oid *attributeSet;          /* OPTIONAL */
963     Z_AttributesPlusTerm *termListAndStartPoint;
964     int *stepSize;                    /* OPTIONAL */
965     int *numberOfTermsRequested;
966     int *preferredPositionInResponse;   /* OPTIONAL */
967 #ifdef Z_95
968     Z_OtherInformation *otherInfo;
969 #endif
970 } Z_ScanRequest;
971
972 typedef struct Z_ScanResponse
973 {
974     Z_ReferenceId *referenceId;       /* OPTIONAL */
975     int *stepSize;                    /* OPTIONAL */
976     int *scanStatus;
977 #define Z_Scan_success      0
978 #define Z_Scan_partial_1    1
979 #define Z_Scan_partial_2    2
980 #define Z_Scan_partial_3    3
981 #define Z_Scan_partial_4    4
982 #define Z_Scan_partial_5    5
983 #define Z_Scan_failure      6
984     int *numberOfEntriesReturned;
985     int *positionOfTerm;              /* OPTIONAL */
986     Z_ListEntries *entries;           /* OPTIONAL */
987     Odr_oid *attributeSet;            /* OPTIONAL */
988 #ifdef Z_95
989     Z_OtherInformation *otherInfo;
990 #endif
991 } Z_ScanResponse; 
992
993
994 /* ------------------------ DELETE -------------------------- */
995
996 #define Z_DeleteStatus_success                          0
997 #define Z_DeleteStatus_resultSetDidNotExist             1
998 #define Z_DeleteStatus_previouslyDeletedByTarget        2
999 #define Z_DeleteStatus_systemProblemAtTarget            3
1000 #define Z_DeleteStatus_accessNotAllowed                 4
1001 #define Z_DeleteStatus_resourceControlAtOrigin          5
1002 #define Z_DeleteStatus_resourceControlAtTarget          6
1003 #define Z_DeleteStatus_bulkDeleteNotSupported           7
1004 #define Z_DeleteStatus_notAllRsltSetsDeletedOnBulkDlte  8
1005 #define Z_DeleteStatus_notAllRequestedResultSetsDeleted 9
1006 #define Z_DeleteStatus_resultSetInUse                  10
1007
1008 typedef struct Z_ListStatus
1009 {
1010     Z_ResultSetId *id;
1011     int *status;
1012 } Z_ListStatus;
1013
1014 typedef struct Z_DeleteResultSetRequest
1015 {
1016     Z_ReferenceId *referenceId;        /* OPTIONAL */
1017     int *deleteFunction;
1018 #define Z_DeleteRequest_list    0
1019 #define Z_DeleteRequest_all     1
1020     int num_ids;
1021     Z_ResultSetId **resultSetList;      /* OPTIONAL */
1022 #ifdef Z_95
1023     Z_OtherInformation *otherInfo;
1024 #endif
1025 } Z_DeleteResultSetRequest;
1026
1027 typedef struct Z_DeleteResultSetResponse
1028 {
1029     Z_ReferenceId *referenceId;        /* OPTIONAL */
1030     int *deleteOperationStatus;
1031     int num_statuses;
1032     Z_ListStatus *deleteListStatuses;  /* OPTIONAL */
1033     int *numberNotDeleted;             /* OPTIONAL */
1034     int num_bulkStatuses;
1035     Z_ListStatus *bulkStatuses;        /* OPTIONAL */
1036     char *deleteMessage;               /* OPTIONAL */
1037 #ifdef Z_95
1038     Z_OtherInformation *otherInfo;
1039 #endif
1040 } Z_DeleteResultSetResponse;
1041
1042 /* ------------------------ CLOSE SERVICE ------------------- */
1043
1044 typedef struct Z_Close
1045 {
1046     Z_ReferenceId *referenceId;         /* OPTIONAL */
1047     int *closeReason;
1048 #define Z_Close_finished           0
1049 #define Z_Close_shutdown           1
1050 #define Z_Close_systemProblem      2
1051 #define Z_Close_costLimit          3
1052 #define Z_Close_resources          4
1053 #define Z_Close_securityViolation  5
1054 #define Z_Close_protocolError      6
1055 #define Z_Close_lackOfActivity     7
1056 #define Z_Close_peerAbort          8
1057 #define Z_Close_unspecified        9
1058     char *diagnosticInformation;          /* OPTIONAL */
1059     Odr_oid *resourceReportFormat;        /* OPTIONAL */
1060     Z_External *resourceReport;         /* OPTIONAL */
1061 #ifdef Z_95
1062     Z_OtherInformation *otherInfo;        /* OPTIONAL */
1063 #endif
1064 } Z_Close;
1065
1066 /* ------------------------ SEGMENTATION -------------------- */
1067
1068 typedef struct Z_Segment
1069 {
1070     Z_ReferenceId *referenceId;   /* OPTIONAL */
1071     int *numberOfRecordsReturned;
1072     int num_segmentRecords;
1073     Z_NamePlusRecord **segmentRecords;
1074     Z_OtherInformation *otherInfo;  /* OPTIONAL */
1075 } Z_Segment;
1076
1077 /* ----------------------- Extended Services ---------------- */
1078
1079 typedef struct Z_Permissions
1080 {
1081     char *userId;                         
1082     int num_allowableFunctions;
1083     int **allowableFunctions;             
1084 #define Z_Permissions_delete              1
1085 #define Z_Permissions_modifyContents      2
1086 #define Z_Permissions_modifyPermissions   3
1087 #define Z_Permissions_present             4
1088 #define Z_Permissions_invoke              5
1089 } Z_Permissions;
1090
1091 typedef struct Z_ExtendedServicesRequest
1092 {
1093     Z_ReferenceId *referenceId;             /* OPTIONAL */
1094     int *function;                        
1095 #define Z_ExtendedServicesRequest_create              1
1096 #define Z_ExtendedServicesRequest_delete              2
1097 #define Z_ExtendedServicesRequest_modify              3
1098     Odr_oid *packageType;                 
1099     char *packageName;                      /* OPTIONAL */
1100     char *userId;                           /* OPTIONAL */
1101     Z_IntUnit *retentionTime;               /* OPTIONAL */
1102     Z_Permissions *permissions;             /* OPTIONAL */
1103     char *description;                      /* OPTIONAL */
1104     Z_External *taskSpecificParameters;     /* OPTIONAL */
1105     int *waitAction;                      
1106 #define Z_ExtendedServicesRequest_wait                1
1107 #define Z_ExtendedServicesRequest_waitIfPossible      2
1108 #define Z_ExtendedServicesRequest_dontWait            3
1109 #define Z_ExtendedServicesRequest_dontReturnPackage   4
1110     char *elements;             /* OPTIONAL */
1111     Z_OtherInformation *otherInfo;          /* OPTIONAL */
1112 } Z_ExtendedServicesRequest;
1113
1114 typedef struct Z_ExtendedServicesResponse
1115 {
1116     Z_ReferenceId *referenceId;             /* OPTIONAL */
1117     int *operationStatus;                 
1118 #define Z_ExtendedServicesResponse_done                1
1119 #define Z_ExtendedServicesResponse_accepted            2
1120 #define Z_ExtendedServicesResponse_failure             3
1121     int num_diagnostics;
1122     Z_DiagRec **diagnostics;                /* OPTIONAL */
1123     Z_External *taskPackage;                /* OPTIONAL */
1124     Z_OtherInformation *otherInfo;          /* OPTIONAL */
1125 } Z_ExtendedServicesResponse;
1126
1127 /* ------------------------ Sort --------------------------- */
1128
1129 typedef struct Z_SortAttributes
1130 {
1131     Odr_oid *id;
1132     Z_AttributeList *list;
1133 } Z_SortAttributes;
1134
1135 typedef struct Z_SortKey
1136 {
1137     int which;
1138 #define Z_SortKey_sortField             0
1139 #define Z_SortKey_elementSpec           1
1140 #define Z_SortKey_sortAttributes        2
1141     union
1142     {
1143         char *sortField;
1144         Z_Specification *elementSpec;
1145         Z_SortAttributes *sortAttributes;
1146     } u;
1147 } Z_SortKey;
1148
1149 typedef struct Z_SortDbSpecific
1150 {
1151     char *databaseName;
1152     Z_SortKey *dbSort;
1153 } Z_SortDbSpecific;
1154
1155 typedef struct Z_SortDbSpecificList
1156 {
1157     int num_dbSpecific;
1158     Z_SortDbSpecific **dbSpecific;
1159 } Z_SortDbSpecificList;
1160
1161 typedef struct Z_SortElement
1162 {
1163     int which;
1164 #define Z_SortElement_generic               0
1165 #define Z_SortElement_databaseSpecific      1
1166     union
1167     {
1168         Z_SortKey *generic;
1169         Z_SortDbSpecificList *databaseSpecific;
1170     } u;
1171 } Z_SortElement;
1172
1173 typedef struct Z_SortMissingValueAction
1174 {
1175     int which;
1176 #define Z_SortMissingValAct_abort           0
1177 #define Z_SortMissingValAct_null            1
1178 #define Z_SortMissingValAct_valData         2
1179     union
1180     {
1181         Odr_null *abort;
1182         Odr_null *null;
1183         Odr_oct *valData;
1184     } u;
1185 } Z_SortMissingValueAction;
1186
1187 typedef struct Z_SortKeySpec
1188 {
1189     Z_SortElement *sortElement;
1190     int *sortRelation;
1191 #define Z_SortRelation_ascending            0
1192 #define Z_SortRelation_descending           1
1193 #define Z_SortRelation_ascendingByFreq      3
1194 #define Z_SortRelation_descendingByFreq     4
1195     int *caseSensitivity;
1196 #define Z_SortCase_caseSensitive            0
1197 #define Z_SortCase_caseInsensitive          1
1198     Z_SortMissingValueAction *missingValueAction;  /* OPTIONAL */
1199 } Z_SortKeySpec;
1200
1201 typedef struct Z_SortResponse
1202 {
1203     Z_ReferenceId *referenceId;             /* OPTIONAL */
1204     int *sortStatus;
1205 #define Z_SortStatus_success              0
1206 #define Z_SortStatus_partial_1            1
1207 #define Z_SortStatus_failure              2
1208     int *resultSetStatus;                   /* OPTIONAL */
1209 #define Z_SortResultSetStatus_empty       1
1210 #define Z_SortResultSetStatus_interim     2
1211 #define Z_SortResultSetStatus_unchanged   3
1212 #define Z_SortResultSetStatus_none        4
1213     Z_DiagRecs *diagnostics;                /* OPTIONAL */
1214     Z_OtherInformation *otherInfo;          /* OPTIONAL */
1215 } Z_SortResponse;
1216
1217 typedef struct Z_SortKeySpecList
1218 {
1219     int num_specs;
1220     Z_SortKeySpec **specs;
1221 } Z_SortKeySpecList;
1222
1223 typedef struct Z_SortRequest
1224 {
1225     Z_ReferenceId *referenceId;             /* OPTIONAL */
1226     Z_StringList *inputResultSetNames;
1227     char *sortedResultSetName;
1228     Z_SortKeySpecList *sortSequence;
1229     Z_OtherInformation *otherInfo;          /* OPTIONAL */
1230 } Z_SortRequest;
1231
1232 /* ----------------------- Resource Report ------------------ */
1233
1234 typedef struct Z_ResourceReportRequest
1235 {
1236     Z_ReferenceId *referenceId;             /* OPTIONAL */
1237     Z_ReferenceId *opId;                    /* OPTIONAL */
1238     Odr_oid *prefResourceReportFormat;      /* OPTIONAL */
1239     Z_OtherInformation *otherInfo;          /* OPTIONAL */
1240 } Z_ResourceReportRequest;
1241
1242 typedef struct Z_ResourceReportResponse
1243 {
1244     Z_ReferenceId *referenceId;             /* OPTIONAL */
1245     int *resourceReportStatus;
1246 #define Z_ResourceReportStatus_success   0
1247 #define Z_ResourceReportStatus_partial   1
1248 #define Z_ResourceReportStatus_failure_1 2
1249 #define Z_ResourceReportStatus_failure_2 3
1250 #define Z_ResourceReportStatus_failure_3 4
1251 #define Z_ResourceReportStatus_failure_4 5
1252 #define Z_ResourceReportStatus_failure_5 6
1253 #define Z_ResourceReportStatus_failure_6 7
1254     Z_External *resourceReport;             /* OPTIONAL */
1255     Z_OtherInformation *otherInfo;          /* OPTIONAL */
1256 } Z_ResourceReportResponse;
1257
1258 /* ------------------------ APDU ---------------------------- */
1259
1260 typedef struct Z_APDU
1261 {    
1262     int which;
1263 #define Z_APDU_initRequest 0
1264 #define Z_APDU_initResponse 1
1265 #define Z_APDU_searchRequest 2
1266 #define Z_APDU_searchResponse 3
1267 #define Z_APDU_presentRequest 4
1268 #define Z_APDU_presentResponse 5
1269 #define Z_APDU_deleteResultSetRequest 6
1270 #define Z_APDU_deleteResultSetResponse 7
1271 #define Z_APDU_resourceControlRequest 8
1272 #define Z_APDU_resourceControlResponse 9
1273 #define Z_APDU_triggerResourceControlRequest 10
1274 #define Z_APDU_scanRequest 11
1275 #define Z_APDU_scanResponse 12
1276 #define Z_APDU_segmentRequest 13
1277 #define Z_APDU_extendedServicesRequest 14
1278 #define Z_APDU_extendedServicesResponse 15
1279 #define Z_APDU_close 16
1280 #define Z_APDU_accessControlRequest 17
1281 #define Z_APDU_accessControlResponse 18
1282 #define Z_APDU_sortRequest 20
1283 #define Z_APDU_sortResponse 21
1284 #define Z_APDU_resourceReportRequest 22
1285 #define Z_APDU_resourceReportResponse 23
1286     union
1287     {
1288         Z_InitRequest  *initRequest;
1289         Z_InitResponse *initResponse;
1290         Z_SearchRequest *searchRequest;
1291         Z_SearchResponse *searchResponse;
1292         Z_PresentRequest *presentRequest;
1293         Z_PresentResponse *presentResponse;
1294         Z_DeleteResultSetRequest *deleteResultSetRequest;
1295         Z_DeleteResultSetResponse *deleteResultSetResponse;
1296         Z_AccessControlRequest *accessControlRequest;
1297         Z_AccessControlResponse *accessControlResponse;
1298         Z_ResourceControlRequest *resourceControlRequest;
1299         Z_ResourceControlResponse *resourceControlResponse;
1300         Z_TriggerResourceControlRequest *triggerResourceControlRequest;
1301         Z_ResourceReportRequest *resourceReportRequest;
1302         Z_ResourceReportResponse *resourceReportResponse;
1303         Z_ScanRequest *scanRequest;
1304         Z_ScanResponse *scanResponse;
1305         Z_SortRequest *sortRequest;
1306         Z_SortResponse *sortResponse;
1307         Z_Segment *segmentRequest;
1308         Z_ExtendedServicesRequest *extendedServicesRequest;
1309         Z_ExtendedServicesResponse *extendedServicesResponse;
1310         Z_Close *close;
1311     } u;
1312 } Z_APDU;
1313
1314 int z_APDU(ODR o, Z_APDU **p, int opt);
1315 int z_SUTRS(ODR o, Odr_oct **p, int opt);
1316
1317 Z_InitRequest *zget_InitRequest(ODR o);
1318 Z_InitResponse *zget_InitResponse(ODR o);
1319 Z_SearchRequest *zget_SearchRequest(ODR o);
1320 Z_SearchResponse *zget_SearchResponse(ODR o);
1321 Z_PresentRequest *zget_PresentRequest(ODR o);
1322 Z_PresentResponse *zget_PresentResponse(ODR o);
1323 Z_DeleteResultSetRequest *zget_DeleteResultSetRequest(ODR o);
1324 Z_DeleteResultSetResponse *zget_DeleteResultSetResponse(ODR o);
1325 Z_ScanRequest *zget_ScanRequest(ODR o);
1326 Z_ScanResponse *zget_ScanResponse(ODR o);
1327 Z_TriggerResourceControlRequest *zget_TriggerResourceControlRequest(ODR o);
1328 Z_ResourceControlRequest *zget_ResourceControlRequest(ODR o);
1329 Z_ResourceControlResponse *zget_ResourceControlResponse(ODR o);
1330 Z_Close *zget_Close(ODR o);
1331 int z_StringList(ODR o, Z_StringList **p, int opt);
1332 int z_InternationalString(ODR o, char **p, int opt);
1333 int z_OtherInformation(ODR o, Z_OtherInformation **p, int opt);
1334 int z_ElementSetName(ODR o, char **p, int opt);
1335 int z_IntUnit(ODR o, Z_IntUnit **p, int opt);
1336 int z_Unit(ODR o, Z_Unit **p, int opt);
1337 int z_DatabaseName(ODR o, Z_DatabaseName **p, int opt);
1338 int z_StringOrNumeric(ODR o, Z_StringOrNumeric **p, int opt);
1339 int z_OtherInformationUnit(ODR o, Z_OtherInformationUnit **p, int opt);
1340 int z_Term(ODR o, Z_Term **p, int opt);
1341 int z_Specification(ODR o, Z_Specification **p, int opt);
1342 int z_Permissions(ODR o, Z_Permissions **p, int opt);
1343 int z_DiagRec(ODR o, Z_DiagRec **p, int opt);
1344 int z_AttributeList(ODR o, Z_AttributeList **p, int opt);
1345 int z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt);
1346 Z_APDU *zget_APDU(ODR o, int which);
1347
1348 #include <prt-rsc.h>
1349 #include <prt-acc.h>
1350 #include <prt-exp.h>
1351 #include <prt-grs.h>
1352 #include <prt-arc.h>
1353 #include <prt-exd.h>
1354 #include <prt-dia.h>
1355 #include <prt-esp.h>
1356
1357 #include <prt-ext.h>
1358
1359 #endif