man pages
[yaz-moved-to-github.git] / zoom / zoom-p.h
index b3125a0..2d7d95d 100644 (file)
@@ -1,11 +1,12 @@
 /*
  * Private C header for ZOOM C.
- * $Id: zoom-p.h,v 1.7 2001-11-28 23:00:19 adam Exp $
+ * $Id: zoom-p.h,v 1.12 2002-08-20 08:19:40 adam Exp $
  */
 #include <yaz/proto.h>
 #include <yaz/comstack.h>
 #include <yaz/wrbuf.h>
 #include <yaz/zoom.h>
+#include <yaz/sortspec.h>
 
 typedef struct ZOOM_Event_p *ZOOM_Event;
 
@@ -31,6 +32,7 @@ struct ZOOM_connection_p {
     char *addinfo;
     int state;
     int mask;
+    int reconnect_ok;
     ODR odr_in;
     ODR odr_out;
     char *buf_in;
@@ -38,10 +40,14 @@ struct ZOOM_connection_p {
     char *buf_out;
     int len_out;
     char *proxy;
+    char *charset;
+    char *lang;
     char *cookie_out;
     char *cookie_in;
+    char *client_IP;
     int async;
     int support_named_resultsets;
+    int last_event;
     ZOOM_task tasks;
     ZOOM_options options;
     ZOOM_resultset resultsets;
@@ -61,7 +67,8 @@ struct ZOOM_options_p {
     void *callback_handle;
     ZOOM_options_callback callback_func;
     struct ZOOM_options_entry *entries;
-    ZOOM_options parent;
+    ZOOM_options parent1;
+    ZOOM_options parent2;
 };
 
 typedef struct ZOOM_record_cache_p *ZOOM_record_cache;
@@ -92,10 +99,30 @@ struct ZOOM_record_p {
 struct ZOOM_record_cache_p {
     struct ZOOM_record_p rec;
     char *elementSetName;
+    char *syntax;
     int pos;
     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 ZOOM_package_p {
+    int refcount;
+    ODR odr_out;
+    ZOOM_options options;
+    ZOOM_connection connection;
+    char *buf_out;
+    int len_out;
+};
+
 struct ZOOM_task_p {
     int running;
     int which;
@@ -111,6 +138,12 @@ struct ZOOM_task_p {
             int count;
         } retrieve;
 #define ZOOM_TASK_CONNECT 3
+#define ZOOM_TASK_SCAN 4
+        struct {
+            ZOOM_scanset scan;
+        } scan;
+#define ZOOM_TASK_PACKAGE 5
+        ZOOM_package package;
     } u;
     ZOOM_task next;
 };
@@ -121,11 +154,4 @@ struct ZOOM_Event_p {
     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 <yaz/sortspec.h>
-#endif
+void ZOOM_options_addref (ZOOM_options opt);