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