2 * IR toolkit for tcl/tk
4 * See the file LICENSE for details.
5 * Sebastian Hammer, Adam Dickmeiss
8 * Revision 1.11 1995-06-20 08:07:35 adam
9 * New setting: failInfo.
10 * Working on better cancel mechanism.
12 * Revision 1.10 1995/06/16 12:28:20 adam
13 * Implemented preferredRecordSyntax.
14 * Minor changes in diagnostic handling.
15 * Record list deleted when connection closes.
17 * Revision 1.9 1995/06/14 15:08:01 adam
18 * Bug fix in cascade-target-list. Uses yaz-version.h.
20 * Revision 1.8 1995/06/14 13:37:18 adam
21 * Setting recordType implemented.
22 * Setting implementationVersion implemented.
23 * Settings implementationId / implementationName edited.
25 * Revision 1.7 1995/06/01 07:31:28 adam
26 * Rename of many typedefs -> IrTcl_...
28 * Revision 1.6 1995/05/31 08:36:40 adam
29 * Bug fix in client.tcl: didn't save options on clientrc.tcl.
30 * New method: referenceId. More work on scan.
32 * Revision 1.5 1995/05/29 08:44:25 adam
33 * Work on delete of objects.
35 * Revision 1.4 1995/05/26 11:44:10 adam
36 * Bugs fixed. More work on MARC utilities and queries. Test
37 * client is up-to-date again.
39 * Revision 1.3 1995/05/26 08:54:17 adam
40 * New MARC utilities. Uses prefix query.
42 * Revision 1.2 1995/05/24 14:10:23 adam
43 * Work on idAuthentication, protocolVersion and options.
45 * Revision 1.1 1995/05/23 15:34:49 adam
46 * Many new settings, userInformationField, smallSetUpperBound, etc.
47 * A number of settings are inherited when ir-set is executed.
48 * This version is incompatible with the graphical test client (client.tcl).
70 #include <yaz-version.h>
80 int num_databaseNames;
82 enum oid_value *preferredRecordSyntax;
86 int smallSetUpperBound;
87 int largeSetLowerBound;
88 int mediumSetPresentNumber;
100 int preferredMessageSize;
101 int maximumRecordSize;
103 Odr_bitmask protocolVersion;
105 char *idAuthenticationOpen;
106 char *idAuthenticationGroupId;
107 char *idAuthenticationUserId;
108 char *idAuthenticationPassword;
110 char *implementationName;
111 char *implementationId;
112 char *implementationVersion;
114 char *targetImplementationName;
115 char *targetImplementationId;
116 char *targetImplementationVersion;
117 char *userInformationField;
139 struct IrTcl_SetObj_ *set_child;
140 struct IrTcl_ScanObj_ *scan_child;
142 IrTcl_SetCObj set_inher;
150 typedef struct IrTcl_RecordList_ {
161 IrTcl_Diagnostic *list;
162 } surrogateDiagnostics;
164 struct IrTcl_RecordList_ *next;
167 typedef struct IrTcl_SetObj_ {
172 int nextResultSetPosition;
175 int numberOfRecordsReturned;
179 int nonSurrogateDiagnosticNum;
180 IrTcl_Diagnostic *nonSurrogateDiagnosticList;
181 IrTcl_RecordList *record_list;
182 IrTcl_SetCObj set_inher;
185 typedef struct IrTcl_ScanEntry_ {
190 int globalOccurrences;
193 IrTcl_Diagnostic *list;
199 typedef struct IrTcl_ScanObj_ {
202 int numberOfTermsRequested;
203 int preferredPositionInResponse;
206 int numberOfEntriesReturned;
215 IrTcl_ScanEntry *entries;
216 IrTcl_Diagnostic *nonSurrogateDiagnosticList;
217 int nonSurrogateDiagnosticNum;
220 struct ir_named_entry {
225 int ir_tcl_get_marc (Tcl_Interp *interp, const char *buf,
226 int argc, char **argv);
227 char *ir_tcl_fread_marc (FILE *inf, size_t *size);
229 #define IR_TCL_FAIL_CONNECT 1
230 #define IR_TCL_FAIL_READ 2
231 #define IR_TCL_FAIL_WRITE 3
232 #define IR_TCL_FAIL_IN_APDU 4
233 #define IR_TCL_FAIL_UNKNOWN_APDU 5