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