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