2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: zoom-p.h,v 1.19 2007-04-30 08:29:07 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;
112 yaz_iconv_t rpn_iconv;
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;
140 char **databaseNames;
141 int num_databaseNames;
144 struct ZOOM_package_p {
147 ZOOM_options options;
148 ZOOM_connection connection;
157 #define ZOOM_TASK_SEARCH 1
161 ZOOM_resultset resultset;
163 char *elementSetName;
165 #define ZOOM_TASK_RETRIEVE 2
168 ZOOM_resultset resultset;
171 char *elementSetName;
173 #define ZOOM_TASK_CONNECT 3
174 #define ZOOM_TASK_SCAN 4
178 #define ZOOM_TASK_PACKAGE 5
179 ZOOM_package package;
180 #define ZOOM_TASK_SORT 6
182 ZOOM_resultset resultset;
189 struct ZOOM_Event_p {
195 void ZOOM_options_addref (ZOOM_options opt);
200 * indent-tabs-mode: nil
202 * vim: shiftwidth=4 tabstop=8 expandtab