2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: zoom-p.h,v 1.21 2007-08-16 10:09:36 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 {
72 int support_named_resultsets;
75 int maximum_record_size;
76 int preferred_message_size;
80 ZOOM_resultset resultsets;
81 ZOOM_Event m_queue_front;
82 ZOOM_Event m_queue_back;
83 zoom_sru_mode sru_mode;
86 struct ZOOM_options_entry {
89 int len; /* of `value', which may contain NULs */
90 struct ZOOM_options_entry *next;
93 struct ZOOM_options_p {
95 void *callback_handle;
96 ZOOM_options_callback callback_func;
97 struct ZOOM_options_entry *entries;
103 typedef struct ZOOM_record_cache_p *ZOOM_record_cache;
105 #define RECORD_HASH_SIZE 131
107 struct ZOOM_resultset_p {
108 Z_SortKeySpecList *r_sort_spec;
117 ZOOM_record_cache record_hash[RECORD_HASH_SIZE];
118 ZOOM_options options;
119 ZOOM_connection connection;
121 char **databaseNames;
122 int num_databaseNames;
125 struct ZOOM_record_p {
130 Z_NamePlusRecord *npr;
133 struct ZOOM_record_cache_p {
134 struct ZOOM_record_p rec;
135 char *elementSetName;
139 ZOOM_record_cache next;
142 struct ZOOM_scanset_p {
145 ZOOM_options options;
146 ZOOM_connection connection;
148 Z_ScanResponse *scan_response;
149 Z_SRW_scanResponse *srw_scan_response;
151 char **databaseNames;
152 int num_databaseNames;
155 struct ZOOM_package_p {
158 ZOOM_options options;
159 ZOOM_connection connection;
168 #define ZOOM_TASK_SEARCH 1
172 ZOOM_resultset resultset;
174 char *elementSetName;
176 #define ZOOM_TASK_RETRIEVE 2
179 ZOOM_resultset resultset;
182 char *elementSetName;
184 #define ZOOM_TASK_CONNECT 3
185 #define ZOOM_TASK_SCAN 4
189 #define ZOOM_TASK_PACKAGE 5
190 ZOOM_package package;
191 #define ZOOM_TASK_SORT 6
193 ZOOM_resultset resultset;
200 struct ZOOM_Event_p {
206 void ZOOM_options_addref (ZOOM_options opt);
211 * indent-tabs-mode: nil
213 * vim: shiftwidth=4 tabstop=8 expandtab