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