2 * IR toolkit for tcl/tk
4 * See the file LICENSE for details.
5 * Sebastian Hammer, Adam Dickmeiss
8 * Revision 1.12 1995-07-28 10:28:38 adam
9 * First work on request queue.
11 * Revision 1.11 1995/06/20 08:07:35 adam
12 * New setting: failInfo.
13 * Working on better cancel mechanism.
15 * Revision 1.10 1995/06/16 12:28:20 adam
16 * Implemented preferredRecordSyntax.
17 * Minor changes in diagnostic handling.
18 * Record list deleted when connection closes.
20 * Revision 1.9 1995/06/14 15:08:01 adam
21 * Bug fix in cascade-target-list. Uses yaz-version.h.
23 * Revision 1.8 1995/06/14 13:37:18 adam
24 * Setting recordType implemented.
25 * Setting implementationVersion implemented.
26 * Settings implementationId / implementationName edited.
28 * Revision 1.7 1995/06/01 07:31:28 adam
29 * Rename of many typedefs -> IrTcl_...
31 * Revision 1.6 1995/05/31 08:36:40 adam
32 * Bug fix in client.tcl: didn't save options on clientrc.tcl.
33 * New method: referenceId. More work on scan.
35 * Revision 1.5 1995/05/29 08:44:25 adam
36 * Work on delete of objects.
38 * Revision 1.4 1995/05/26 11:44:10 adam
39 * Bugs fixed. More work on MARC utilities and queries. Test
40 * client is up-to-date again.
42 * Revision 1.3 1995/05/26 08:54:17 adam
43 * New MARC utilities. Uses prefix query.
45 * Revision 1.2 1995/05/24 14:10:23 adam
46 * Work on idAuthentication, protocolVersion and options.
48 * Revision 1.1 1995/05/23 15:34:49 adam
49 * Many new settings, userInformationField, smallSetUpperBound, etc.
50 * A number of settings are inherited when ir-set is executed.
51 * This version is incompatible with the graphical test client (client.tcl).
73 #include <yaz-version.h>
83 int num_databaseNames;
85 enum oid_value *preferredRecordSyntax;
89 int smallSetUpperBound;
90 int largeSetLowerBound;
91 int mediumSetPresentNumber;
103 int preferredMessageSize;
104 int maximumRecordSize;
106 Odr_bitmask protocolVersion;
108 char *idAuthenticationOpen;
109 char *idAuthenticationGroupId;
110 char *idAuthenticationUserId;
111 char *idAuthenticationPassword;
113 char *implementationName;
114 char *implementationId;
115 char *implementationVersion;
117 char *targetImplementationName;
118 char *targetImplementationId;
119 char *targetImplementationVersion;
120 char *userInformationField;
142 struct IrTcl_SetObj_ *set_child;
143 struct IrTcl_ScanObj_ *scan_child;
144 struct IrTcl_Request_ *request_queue;
146 IrTcl_SetCObj set_inher;
149 typedef struct IrTcl_Request_ {
150 char *name_of_object;
151 struct IrTcl_Request_ *next;
169 typedef struct IrTcl_RecordList_ {
180 IrTcl_Diagnostic *list;
181 } surrogateDiagnostics;
183 struct IrTcl_RecordList_ *next;
186 typedef struct IrTcl_SetObj_ {
191 int nextResultSetPosition;
194 int numberOfRecordsReturned;
198 int nonSurrogateDiagnosticNum;
199 IrTcl_Diagnostic *nonSurrogateDiagnosticList;
200 IrTcl_RecordList *record_list;
201 IrTcl_SetCObj set_inher;
204 typedef struct IrTcl_ScanEntry_ {
209 int globalOccurrences;
212 IrTcl_Diagnostic *list;
218 typedef struct IrTcl_ScanObj_ {
221 int numberOfTermsRequested;
222 int preferredPositionInResponse;
225 int numberOfEntriesReturned;
234 IrTcl_ScanEntry *entries;
235 IrTcl_Diagnostic *nonSurrogateDiagnosticList;
236 int nonSurrogateDiagnosticNum;
239 struct ir_named_entry {
244 int ir_tcl_get_marc (Tcl_Interp *interp, const char *buf,
245 int argc, char **argv);
246 int ir_tcl_send (Tcl_Interp *interp, IrTcl_Obj *p, Z_APDU *apdu,
248 char *ir_tcl_fread_marc (FILE *inf, size_t *size);
250 #define IR_TCL_FAIL_CONNECT 1
251 #define IR_TCL_FAIL_READ 2
252 #define IR_TCL_FAIL_WRITE 3
253 #define IR_TCL_FAIL_IN_APDU 4
254 #define IR_TCL_FAIL_UNKNOWN_APDU 5
256 #define IR_TCL_R_Queue 0
257 #define IR_TCL_R_Writing 1
258 #define IR_TCL_R_Waiting 2