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