2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: zoom-p.h,v 1.10 2006-03-01 23:24:26 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;
95 typedef struct ZOOM_record_cache_p *ZOOM_record_cache;
97 struct ZOOM_resultset_p {
98 Z_SortKeySpecList *r_sort_spec;
109 ZOOM_record_cache record_cache;
110 ZOOM_options options;
111 ZOOM_connection connection;
115 struct ZOOM_record_p {
120 Z_NamePlusRecord *npr;
123 struct ZOOM_record_cache_p {
124 struct ZOOM_record_p rec;
125 char *elementSetName;
129 ZOOM_record_cache next;
132 struct ZOOM_scanset_p {
135 ZOOM_options options;
136 ZOOM_connection connection;
137 Z_AttributesPlusTerm *termListAndStartPoint;
138 Z_AttributeSetId *attributeSet;
139 Z_ScanResponse *scan_response;
142 struct ZOOM_package_p {
145 ZOOM_options options;
146 ZOOM_connection connection;
155 #define ZOOM_TASK_SEARCH 1
157 ZOOM_resultset resultset;
159 #define ZOOM_TASK_RETRIEVE 2
162 ZOOM_resultset resultset;
165 #define ZOOM_TASK_CONNECT 3
166 #define ZOOM_TASK_SCAN 4
170 #define ZOOM_TASK_PACKAGE 5
171 ZOOM_package package;
172 #define ZOOM_TASK_SORT 6
174 ZOOM_resultset resultset;
181 struct ZOOM_Event_p {
187 void ZOOM_options_addref (ZOOM_options opt);
191 * indent-tabs-mode: nil
193 * vim: shiftwidth=4 tabstop=8 expandtab