8 #include <libxslt/xsltutils.h>
9 #include <libxslt/transform.h>
11 #include <yaz/comstack.h>
12 #include <yaz/pquery.h>
14 #include <yaz/yaz-ccl.h>
16 #include "termlists.h"
17 #include "relevance.h"
24 struct client *client;
29 int *term_frequency_vec;
30 struct record *next_cluster;
35 // Represents a host (irrespective of databases)
39 struct connection *connections; // All connections to this
43 // Represents a (virtual) database on a host
49 struct conf_queryprofile *qprofile;
50 struct conf_retrievalprofile *rprofile;
51 struct database *next;
55 // Represents a physical, reusable connection to a remote Z39.50 host
60 struct client *client;
68 struct connection *next;
71 // Represents client state for a connection to one search target
73 struct database *database;
74 struct connection *connection;
75 struct session *session;
79 int requestid; // ID of current outstanding request
97 #define SESSION_WATCH_RECORDS 0
98 #define SESSION_WATCH_MAX 0
100 #define SESSION_MAX_TERMLISTS 10
102 typedef void (*session_watchfun)(void *data);
104 struct named_termlist
107 struct termlist *termlist;
112 struct client *clients;
115 NMEM nmem; // Nmem for each operation (i.e. search)
116 WRBUF wrbuf; // Wrbuf for scratch(i.e. search)
118 struct named_termlist termlists[SESSION_MAX_TERMLISTS];
119 struct relevance *relevance;
120 struct reclist *reclist;
123 session_watchfun fun;
124 } watchlist[SESSION_WATCH_MAX + 1];
125 int expected_maxrecs;
132 int num_no_connection;
134 int num_initializing;
144 struct hitsbytarget {
155 int timeout; /* operations timeout, in seconds */
156 char implementationId[128];
157 char implementationName[128];
158 char implementationVersion[128];
159 int target_timeout; // seconds
163 CCL_bibset ccl_filter;
169 struct hitsbytarget *hitsbytarget(struct session *s, int *count);
170 int select_targets(struct session *se);
171 struct session *new_session();
172 void destroy_session(struct session *s);
173 int load_targets(struct session *s, const char *fn);
174 void statistics(struct session *s, struct statistics *stat);
175 char *search(struct session *s, char *query);
176 struct record **show(struct session *s, int start, int *num, int *total, int *sumhits, NMEM nmem_show);
177 struct termlist_score **termlist(struct session *s, const char *name, int *num);
178 void session_set_watch(struct session *s, int what, session_watchfun fun, void *data);
185 * indent-tabs-mode: nil
187 * vim: shiftwidth=4 tabstop=8 expandtab