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