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