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