X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=zoom%2Fzoom-p.h;h=87f517ea10ad74ed8bd819139dba47ced2e93025;hb=fde978ee5097a46b9a162dcff3b4b15d24c8c82f;hp=5958affeb91c8214a098a2720c25bd19d3331ed1;hpb=78942f568d83ea621661bfcd2d3f25eee3d316a1;p=yaz-moved-to-github.git diff --git a/zoom/zoom-p.h b/zoom/zoom-p.h index 5958aff..87f517e 100644 --- a/zoom/zoom-p.h +++ b/zoom/zoom-p.h @@ -1,15 +1,16 @@ /* * Private C header for ZOOM C. - * $Id: zoom-p.h,v 1.4 2001-11-13 22:57:03 adam Exp $ + * $Id: zoom-p.h,v 1.8 2001-12-30 22:21:11 adam Exp $ */ #include #include #include #include +#include -typedef struct Z3950_Event_p *Z3950_Event; +typedef struct ZOOM_Event_p *ZOOM_Event; -struct Z3950_query_p { +struct ZOOM_query_p { Z_Query *query; Z_SortKeySpecList *sort_spec; int refcount; @@ -20,11 +21,11 @@ struct Z3950_query_p { #define STATE_CONNECTING 1 #define STATE_ESTABLISHED 2 -#define Z3950_SELECT_READ 1 -#define Z3950_SELECT_WRITE 2 -#define Z3950_SELECT_EXCEPT 4 +#define ZOOM_SELECT_READ 1 +#define ZOOM_SELECT_WRITE 2 +#define ZOOM_SELECT_EXCEPT 4 -struct Z3950_connection_p { +struct ZOOM_connection_p { COMSTACK cs; char *host_port; int error; @@ -41,83 +42,99 @@ struct Z3950_connection_p { char *cookie_out; char *cookie_in; int async; - Z3950_task tasks; - Z3950_options options; - Z3950_resultset resultsets; - Z3950_Event m_queue_front; - Z3950_Event m_queue_back; + int support_named_resultsets; + int last_event; + ZOOM_task tasks; + ZOOM_options options; + ZOOM_resultset resultsets; + ZOOM_Event m_queue_front; + ZOOM_Event m_queue_back; }; -struct Z3950_options_entry { +struct ZOOM_options_entry { char *name; char *value; - struct Z3950_options_entry *next; + struct ZOOM_options_entry *next; }; -struct Z3950_options_p { +struct ZOOM_options_p { int refcount; void *callback_handle; - Z3950_options_callback callback_func; - struct Z3950_options_entry *entries; - Z3950_options parent; + ZOOM_options_callback callback_func; + struct ZOOM_options_entry *entries; + ZOOM_options parent; }; -typedef struct Z3950_record_cache_p *Z3950_record_cache; +typedef struct ZOOM_record_cache_p *ZOOM_record_cache; -struct Z3950_resultset_p { +struct ZOOM_resultset_p { Z_Query *r_query; Z_SortKeySpecList *r_sort_spec; - Z3950_query search; + ZOOM_query search; int refcount; int size; int start; int count; int piggyback; + char *setname; ODR odr; - Z3950_record_cache record_cache; - Z3950_options options; - Z3950_connection connection; - Z3950_resultset next; + ZOOM_record_cache record_cache; + ZOOM_options options; + ZOOM_connection connection; + ZOOM_resultset next; }; -struct Z3950_record_p { +struct ZOOM_record_p { ODR odr; WRBUF wrbuf_marc; Z_NamePlusRecord *npr; }; -struct Z3950_record_cache_p { - struct Z3950_record_p rec; +struct ZOOM_record_cache_p { + struct ZOOM_record_p rec; char *elementSetName; int pos; - Z3950_record_cache next; + ZOOM_record_cache next; +}; + +struct ZOOM_scanset_p { + int refcount; + ODR odr; + ZOOM_options options; + ZOOM_connection connection; + Z_AttributesPlusTerm *termListAndStartPoint; + Z_AttributeSetId *attributeSet; + Z_ScanResponse *scan_response; }; -struct Z3950_task_p { +struct ZOOM_task_p { int running; int which; union { -#define Z3950_TASK_SEARCH 1 - Z3950_resultset resultset; -#define Z3950_TASK_RETRIEVE 2 - /** also resultset here */ -#define Z3950_TASK_CONNECT 3 +#define ZOOM_TASK_SEARCH 1 + struct { + ZOOM_resultset resultset; + } search; +#define ZOOM_TASK_RETRIEVE 2 + struct { + int start; + ZOOM_resultset resultset; + int count; + } retrieve; +#define ZOOM_TASK_CONNECT 3 +#define ZOOM_TASK_SCAN 4 + struct { + ZOOM_scanset scan; + } scan; } u; - Z3950_task next; + ZOOM_task next; }; -struct Z3950_Event_p { +struct ZOOM_Event_p { int kind; - Z3950_Event next; - Z3950_Event prev; + ZOOM_Event next; + ZOOM_Event prev; }; -#ifndef YAZ_DATE -COMSTACK cs_create_host(const char *type_and_host, int blocking, void **vp); -Odr_oid *yaz_str_to_z3950oid (ODR o, int oid_class, const char *str); -Z_SortKeySpecList *yaz_sort_spec (ODR out, const char *arg); -#else -#include -#endif