2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: zoom-p.h,v 1.24 2007-09-09 05:54:45 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;
133 Z_SRW_diagnostic *diag;
137 struct ZOOM_record_cache_p {
138 struct ZOOM_record_p rec;
139 char *elementSetName;
143 ZOOM_record_cache next;
146 struct ZOOM_scanset_p {
149 ZOOM_options options;
150 ZOOM_connection connection;
152 Z_ScanResponse *scan_response;
153 Z_SRW_scanResponse *srw_scan_response;
155 char **databaseNames;
156 int num_databaseNames;
159 struct ZOOM_package_p {
162 ZOOM_options options;
163 ZOOM_connection connection;
172 #define ZOOM_TASK_SEARCH 1
176 ZOOM_resultset resultset;
178 char *elementSetName;
180 #define ZOOM_TASK_RETRIEVE 2
183 ZOOM_resultset resultset;
186 char *elementSetName;
188 #define ZOOM_TASK_CONNECT 3
189 #define ZOOM_TASK_SCAN 4
193 #define ZOOM_TASK_PACKAGE 5
194 ZOOM_package package;
195 #define ZOOM_TASK_SORT 6
197 ZOOM_resultset resultset;
204 struct ZOOM_Event_p {
210 void ZOOM_options_addref (ZOOM_options opt);
215 * indent-tabs-mode: nil
217 * vim: shiftwidth=4 tabstop=8 expandtab