New OID database - with public definitions in oid_db.h. Removed old OID
[yaz-moved-to-github.git] / include / yaz / backend.h
index 39c4c67..c7df87a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995-2006, Index Data
+ * Copyright (c) 1995-2007, Index Data
  * All rights reserved.
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -24,7 +24,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-/* $Id: backend.h,v 1.38 2006-10-09 21:02:41 adam Exp $ */
+/* $Id: backend.h,v 1.43 2007-04-12 13:52:57 adam Exp $ */
 
 /** 
  * \file backend.h
@@ -40,6 +40,7 @@
 #include <yaz/yconfig.h>
 #include <yaz/proto.h>
 #include <yaz/srw.h>
+#include <yaz/oid_db.h>
 
 YAZ_BEGIN_CDECL
     
@@ -68,6 +69,8 @@ typedef struct {
     char *srw_sortKeys;        /* holds SRU/SRW sortKeys info */
     char *srw_setname;         /* holds SRU/SRW generated resultsetID */
     int *srw_setnameIdleTime;  /* holds SRU/SRW life-time */
+    int estimated_hit_count;   /* if hit count is estimated */
+    int partial_resultset;     /* if result set is partial */
 } bend_search_rr;
 
 /* extended present handler. Does not replace bend_fetch. */
@@ -75,7 +78,7 @@ typedef struct {
     char *setname;             /* set name */
     int start;
     int number;                /* record number */
-    oid_value format;          /* One of the CLASS_RECSYN members */
+    int *format;               /* format, transfer syntax (OID) */
     Z_ReferenceId *referenceId;/* reference ID */
     Z_RecordComposition *comp; /* Formatting instructions */
     ODR stream;                /* encoding stream - memory source if required */
@@ -92,8 +95,7 @@ typedef struct bend_fetch_rr {
     char *setname;             /* set name */
     int number;                /* record number */
     Z_ReferenceId *referenceId;/* reference ID */
-    oid_value request_format;  /* One of the CLASS_RECSYN members */
-    int *request_format_raw;   /* same as above (raw OID) */
+    int *request_format;        /* format, transfer syntax (OID) */
     Z_RecordComposition *comp; /* Formatting instructions */
     ODR stream;                /* encoding stream - memory source if req */
     ODR print;                 /* printing stream */
@@ -102,8 +104,7 @@ typedef struct bend_fetch_rr {
     int len;                   /* length of record or -1 if structured */
     char *record;              /* record */
     int last_in_set;           /* is it?  */
-    oid_value output_format;   /* format */
-    int *output_format_raw;    /* used instead of above if not-null */
+    int *output_format;        /* response format/syntax (OID) */
     int errcode;               /* 0==success */
     char *errstring;           /* system error string or NULL */
     int surrogate_flag;        /* surrogate diagnostic */
@@ -126,7 +127,7 @@ typedef enum {
 typedef struct bend_scan_rr {
     int num_bases;      /* number of elements in databaselist */
     char **basenames;   /* databases to search */
-    oid_value attributeset;
+    int *attributeset;
     Z_ReferenceId *referenceId; /* reference ID */
     Z_AttributesPlusTerm *term;
     ODR stream;         /* encoding stream - memory source if required */
@@ -154,14 +155,12 @@ typedef struct bend_update_rr {
     char *operation;
     char *operation_status;
     char *record_id;
-    char *record_version;
-    char *record_checksum;
-    char *record_old_version;
+    Z_SRW_recordVersion *record_versions;
+    int num_versions;
     char *record_packing;
     char *record_schema;
     char *record_data;
-    Z_SRW_extra_record *request_extra_record;
-    Z_SRW_extra_record *response_extra_record;
+    char *extra_record_data;
     char *extra_request_data;
     char *extra_response_data;
     char *uri;
@@ -329,6 +328,7 @@ YAZ_EXPORT statserv_options_block *statserv_getcontrol(void);
 YAZ_EXPORT void statserv_setcontrol(statserv_options_block *block);
 YAZ_EXPORT int check_ip_tcpd(void *cd, const char *addr, int len, int type);
 
+YAZ_EXPORT int bend_assoc_is_alive(bend_association assoc);
 
 YAZ_END_CDECL