2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: zoom-p.h,v 1.18 2007-04-12 13:52:57 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 {
65 int support_named_resultsets;
69 ZOOM_resultset resultsets;
70 ZOOM_Event m_queue_front;
71 ZOOM_Event m_queue_back;
72 zoom_sru_mode sru_mode;
75 struct ZOOM_options_entry {
78 int len; /* of `value', which may contain NULs */
79 struct ZOOM_options_entry *next;
82 struct ZOOM_options_p {
84 void *callback_handle;
85 ZOOM_options_callback callback_func;
86 struct ZOOM_options_entry *entries;
92 typedef struct ZOOM_record_cache_p *ZOOM_record_cache;
94 #define RECORD_HASH_SIZE 131
96 struct ZOOM_resultset_p {
97 Z_SortKeySpecList *r_sort_spec;
106 ZOOM_record_cache record_hash[RECORD_HASH_SIZE];
107 ZOOM_options options;
108 ZOOM_connection connection;
110 char **databaseNames;
111 int num_databaseNames;
114 struct ZOOM_record_p {
119 Z_NamePlusRecord *npr;
122 struct ZOOM_record_cache_p {
123 struct ZOOM_record_p rec;
124 char *elementSetName;
128 ZOOM_record_cache next;
131 struct ZOOM_scanset_p {
134 ZOOM_options options;
135 ZOOM_connection connection;
136 Z_AttributesPlusTerm *termListAndStartPoint;
137 Z_AttributeSetId *attributeSet;
138 Z_ScanResponse *scan_response;
139 char **databaseNames;
140 int num_databaseNames;
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);
199 * indent-tabs-mode: nil
201 * vim: shiftwidth=4 tabstop=8 expandtab