2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: zoom-p.h,v 1.14 2006-10-26 15:34:46 adam Exp $
9 * \brief Internal header for ZOOM implementation
12 #include <yaz/proto.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 #define ZOOM_SELECT_READ 1
42 #define ZOOM_SELECT_WRITE 2
43 #define ZOOM_SELECT_EXCEPT 4
45 struct ZOOM_connection_p {
69 int support_named_resultsets;
73 ZOOM_resultset resultsets;
74 ZOOM_Event m_queue_front;
75 ZOOM_Event m_queue_back;
76 zoom_sru_mode sru_mode;
79 struct ZOOM_options_entry {
82 int len; /* of `value', which may contain NULs */
83 struct ZOOM_options_entry *next;
86 struct ZOOM_options_p {
88 void *callback_handle;
89 ZOOM_options_callback callback_func;
90 struct ZOOM_options_entry *entries;
96 typedef struct ZOOM_record_cache_p *ZOOM_record_cache;
98 #define RECORD_HASH_SIZE 131
100 struct ZOOM_resultset_p {
101 Z_SortKeySpecList *r_sort_spec;
110 ZOOM_record_cache record_hash[RECORD_HASH_SIZE];
111 ZOOM_options options;
112 ZOOM_connection connection;
116 struct ZOOM_record_p {
121 Z_NamePlusRecord *npr;
124 struct ZOOM_record_cache_p {
125 struct ZOOM_record_p rec;
126 char *elementSetName;
130 ZOOM_record_cache next;
133 struct ZOOM_scanset_p {
136 ZOOM_options options;
137 ZOOM_connection connection;
138 Z_AttributesPlusTerm *termListAndStartPoint;
139 Z_AttributeSetId *attributeSet;
140 Z_ScanResponse *scan_response;
143 struct ZOOM_package_p {
146 ZOOM_options options;
147 ZOOM_connection connection;
156 #define ZOOM_TASK_SEARCH 1
160 ZOOM_resultset resultset;
162 char *elementSetName;
164 #define ZOOM_TASK_RETRIEVE 2
167 ZOOM_resultset resultset;
170 char *elementSetName;
172 #define ZOOM_TASK_CONNECT 3
173 #define ZOOM_TASK_SCAN 4
177 #define ZOOM_TASK_PACKAGE 5
178 ZOOM_package package;
179 #define ZOOM_TASK_SORT 6
181 ZOOM_resultset resultset;
188 struct ZOOM_Event_p {
194 void ZOOM_options_addref (ZOOM_options opt);
198 * indent-tabs-mode: nil
200 * vim: shiftwidth=4 tabstop=8 expandtab