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