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