2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: zoom-p.h,v 1.22 2007-08-23 14:23:23 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 struct ZOOM_record_cache_p {
135 struct ZOOM_record_p rec;
136 char *elementSetName;
140 ZOOM_record_cache next;
143 struct ZOOM_scanset_p {
146 ZOOM_options options;
147 ZOOM_connection connection;
149 Z_ScanResponse *scan_response;
150 Z_SRW_scanResponse *srw_scan_response;
152 char **databaseNames;
153 int num_databaseNames;
156 struct ZOOM_package_p {
159 ZOOM_options options;
160 ZOOM_connection connection;
169 #define ZOOM_TASK_SEARCH 1
173 ZOOM_resultset resultset;
175 char *elementSetName;
177 #define ZOOM_TASK_RETRIEVE 2
180 ZOOM_resultset resultset;
183 char *elementSetName;
185 #define ZOOM_TASK_CONNECT 3
186 #define ZOOM_TASK_SCAN 4
190 #define ZOOM_TASK_PACKAGE 5
191 ZOOM_package package;
192 #define ZOOM_TASK_SORT 6
194 ZOOM_resultset resultset;
201 struct ZOOM_Event_p {
207 void ZOOM_options_addref (ZOOM_options opt);
212 * indent-tabs-mode: nil
214 * vim: shiftwidth=4 tabstop=8 expandtab