2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: zoom-p.h,v 1.20 2007-05-05 11:55:22 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>
17 typedef struct ZOOM_Event_p *ZOOM_Event;
21 Z_SortKeySpecList *sort_spec;
35 typedef struct ZOOM_task_p *ZOOM_task;
38 #define STATE_CONNECTING 1
39 #define STATE_ESTABLISHED 2
41 struct ZOOM_connection_p {
70 int support_named_resultsets;
73 int maximum_record_size;
74 int preferred_message_size;
78 ZOOM_resultset resultsets;
79 ZOOM_Event m_queue_front;
80 ZOOM_Event m_queue_back;
81 zoom_sru_mode sru_mode;
84 struct ZOOM_options_entry {
87 int len; /* of `value', which may contain NULs */
88 struct ZOOM_options_entry *next;
91 struct ZOOM_options_p {
93 void *callback_handle;
94 ZOOM_options_callback callback_func;
95 struct ZOOM_options_entry *entries;
101 typedef struct ZOOM_record_cache_p *ZOOM_record_cache;
103 #define RECORD_HASH_SIZE 131
105 struct ZOOM_resultset_p {
106 Z_SortKeySpecList *r_sort_spec;
115 ZOOM_record_cache record_hash[RECORD_HASH_SIZE];
116 ZOOM_options options;
117 ZOOM_connection connection;
119 char **databaseNames;
120 int num_databaseNames;
121 yaz_iconv_t rpn_iconv;
124 struct ZOOM_record_p {
129 Z_NamePlusRecord *npr;
132 struct ZOOM_record_cache_p {
133 struct ZOOM_record_p rec;
134 char *elementSetName;
138 ZOOM_record_cache next;
141 struct ZOOM_scanset_p {
144 ZOOM_options options;
145 ZOOM_connection connection;
146 Z_AttributesPlusTerm *termListAndStartPoint;
147 Z_AttributeSetId *attributeSet;
148 Z_ScanResponse *scan_response;
149 char **databaseNames;
150 int num_databaseNames;
153 struct ZOOM_package_p {
156 ZOOM_options options;
157 ZOOM_connection connection;
166 #define ZOOM_TASK_SEARCH 1
170 ZOOM_resultset resultset;
172 char *elementSetName;
174 #define ZOOM_TASK_RETRIEVE 2
177 ZOOM_resultset resultset;
180 char *elementSetName;
182 #define ZOOM_TASK_CONNECT 3
183 #define ZOOM_TASK_SCAN 4
187 #define ZOOM_TASK_PACKAGE 5
188 ZOOM_package package;
189 #define ZOOM_TASK_SORT 6
191 ZOOM_resultset resultset;
198 struct ZOOM_Event_p {
204 void ZOOM_options_addref (ZOOM_options opt);
209 * indent-tabs-mode: nil
211 * vim: shiftwidth=4 tabstop=8 expandtab