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