2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: zoom-p.h,v 1.25 2007-09-11 08:40:28 adam Exp $
9 * \brief Internal header for ZOOM implementation
11 #include <yaz/proto.h>
12 #include <yaz/oid_db.h>
13 #include <yaz/comstack.h>
14 #include <yaz/wrbuf.h>
16 #include <yaz/sortspec.h>
19 typedef struct ZOOM_Event_p *ZOOM_Event;
23 Z_SortKeySpecList *sort_spec;
37 typedef struct ZOOM_task_p *ZOOM_task;
40 #define STATE_CONNECTING 1
41 #define STATE_ESTABLISHED 2
43 struct ZOOM_connection_p {
73 int support_named_resultsets;
76 int maximum_record_size;
77 int preferred_message_size;
81 ZOOM_resultset resultsets;
82 ZOOM_Event m_queue_front;
83 ZOOM_Event m_queue_back;
84 zoom_sru_mode sru_mode;
87 struct ZOOM_options_entry {
90 int len; /* of `value', which may contain NULs */
91 struct ZOOM_options_entry *next;
94 struct ZOOM_options_p {
96 void *callback_handle;
97 ZOOM_options_callback callback_func;
98 struct ZOOM_options_entry *entries;
100 ZOOM_options parent2;
104 typedef struct ZOOM_record_cache_p *ZOOM_record_cache;
106 #define RECORD_HASH_SIZE 131
108 struct ZOOM_resultset_p {
109 Z_SortKeySpecList *r_sort_spec;
118 ZOOM_record_cache record_hash[RECORD_HASH_SIZE];
119 ZOOM_options options;
120 ZOOM_connection connection;
122 char **databaseNames;
123 int num_databaseNames;
126 struct ZOOM_record_p {
131 Z_NamePlusRecord *npr;
134 const char *diag_uri;
135 const char *diag_message;
136 const char *diag_details;
137 const char *diag_set;
140 struct ZOOM_record_cache_p {
141 struct ZOOM_record_p rec;
142 char *elementSetName;
146 ZOOM_record_cache next;
149 struct ZOOM_scanset_p {
152 ZOOM_options options;
153 ZOOM_connection connection;
155 Z_ScanResponse *scan_response;
156 Z_SRW_scanResponse *srw_scan_response;
158 char **databaseNames;
159 int num_databaseNames;
162 struct ZOOM_package_p {
165 ZOOM_options options;
166 ZOOM_connection connection;
175 #define ZOOM_TASK_SEARCH 1
179 ZOOM_resultset resultset;
181 char *elementSetName;
183 #define ZOOM_TASK_RETRIEVE 2
186 ZOOM_resultset resultset;
189 char *elementSetName;
191 #define ZOOM_TASK_CONNECT 3
192 #define ZOOM_TASK_SCAN 4
196 #define ZOOM_TASK_PACKAGE 5
197 ZOOM_package package;
198 #define ZOOM_TASK_SORT 6
200 ZOOM_resultset resultset;
207 struct ZOOM_Event_p {
213 void ZOOM_options_addref (ZOOM_options opt);
218 * indent-tabs-mode: nil
220 * vim: shiftwidth=4 tabstop=8 expandtab