Many new settings, userInformationField, smallSetUpperBound, etc.
[ir-tcl-moved-to-github.git] / ir-tclp.h
1 /*
2  * IR toolkit for tcl/tk
3  * (c) Index Data 1995
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: ir-tclp.h,v $
7  * Revision 1.1  1995-05-23 15:34:49  adam
8  * Many new settings, userInformationField, smallSetUpperBound, etc.
9  * A number of settings are inherited when ir-set is executed.
10  * This version is incompatible with the graphical test client (client.tcl).
11  *
12  */
13
14 #ifndef IR_TCLP_H
15 #define IR_TCLP_H
16
17 #include <tcl.h>
18
19 #include <yaz-ccl.h>
20 #include <iso2709.h>
21 #include <comstack.h>
22 #include <tcpip.h>
23
24 #if MOSI
25 #include <xmosi.h>
26 #endif
27
28 #include <odr.h>
29 #include <proto.h>
30 #include <oid.h>
31 #include <diagbib1.h>
32
33 #include "ir-tcl.h"
34
35 typedef struct {
36     char      **databaseNames;
37     int         num_databaseNames;
38
39     char       *queryType;
40     int         replaceIndicator;
41
42     int         smallSetUpperBound;
43     int         largeSetLowerBound;
44     int         mediumSetPresentNumber;
45 } IRSetCObj;
46     
47 typedef struct {
48     char       *cs_type;
49     char       *protocol_type;
50     int         connectFlag;
51     COMSTACK    cs_link;
52
53     int         preferredMessageSize;
54     int         maximumRecordSize;
55     Odr_bitmask options;
56     Odr_bitmask protocolVersion;
57     char       *idAuthentication;
58     char       *implementationName;
59     char       *implementationId;
60     int        initResult;
61     char       *targetImplementationName;
62     char       *targetImplementationId;
63     char       *targetImplementationVersion;
64     char       *userInformationField;
65
66     char       *hostname;
67    
68     char       *buf_out;
69     int         len_out;
70     char       *buf_in;
71     int         len_in;
72     char       *sbuf;
73     int         slen;
74     ODR         odr_in;
75     ODR         odr_out;
76     ODR         odr_pr;
77
78     Tcl_Interp *interp;
79     char       *callback;
80     char       *failback;
81
82     CCL_bibset  bibset;
83     oident      bib1;
84
85     struct IRSetObj_ *set_child;
86     struct IRScanObj_ *scan_child;
87
88     IRSetCObj   set_inher;
89 } IRObj;
90
91 typedef struct IRRecordList_ {
92     int no;
93     int which;
94     union {
95         struct {
96             Iso2709Rec rec;
97         } marc;
98         struct {
99             int  condition;
100             char *addinfo;
101         } diag;
102     } u;
103     struct IRRecordList_ *next;
104 } IRRecordList;
105
106 typedef struct IRSetObj_ {
107     IRObj      *parent;
108     int         searchStatus;
109     int         resultCount;
110     int         start;
111     int         number;
112     int         numberOfRecordsReturned;
113     char       *setName;
114     int         recordFlag;
115     int         which;
116     int         condition;
117     char       *addinfo;
118     IRRecordList *record_list;
119     IRSetCObj   set_inher;
120 } IRSetObj;
121
122 typedef struct IRScanEntry_ {
123     int         which;
124     union {
125         struct {
126             char *buf;
127             int  globalOccurrences;
128         } term;
129         struct {
130             int  condition;
131             char *addinfo;
132         } diag;
133     } u;
134 } IRScanEntry;
135
136 typedef struct IRScanDiag_ {
137     int         dummy;
138 } IRScanDiag;
139
140 typedef struct IRScanObj_ {
141     IRObj      *parent;
142     int         stepSize;
143     int         numberOfTermsRequested;
144     int         preferredPositionInResponse;
145
146     int         scanStatus;
147     int         numberOfEntriesReturned;
148     int         positionOfTerm;
149
150     int         entries_flag;
151     int         which;
152
153     int         num_entries;
154     int         num_diagRecs;
155
156     IRScanEntry *entries;
157     IRScanDiag  *nonSurrogateDiagnostics;
158 } IRScanObj;
159
160 #endif