Using autoconf. New definitions: YAZ_BEGIN_CDECL/YAZ_END_CDECL.
[yaz-moved-to-github.git] / include / yaz / backend.h
index 10e8e0a..af26289 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995-1999, Index Data.
+ * Copyright (c) 1995-2000, Index Data.
  *
  * Permission to use, copy, modify, distribute, and sell this software and
  * its documentation, in whole or in part, for any purpose, is hereby granted,
  * OF THIS SOFTWARE.
  *
  * $Log: backend.h,v $
- * Revision 1.1  1999-11-30 13:47:11  adam
+ * Revision 1.4  2000-02-28 11:20:06  adam
+ * Using autoconf. New definitions: YAZ_BEGIN_CDECL/YAZ_END_CDECL.
+ *
+ * Revision 1.3  2000/01/12 14:36:07  adam
+ * Added printing stream (ODR) for backend functions.
+ *
+ * Revision 1.2  1999/12/16 23:36:19  adam
+ * Implemented ILL protocol. Minor updates ASN.1 compiler.
+ *
+ * Revision 1.1  1999/11/30 13:47:11  adam
  * Improved installation. Moved header files to include/yaz.
  *
  * Revision 1.28  1999/11/04 14:58:44  adam
@@ -78,9 +87,7 @@
 #include <yaz/proto.h>
 #include <yaz/statserv.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+YAZ_BEGIN_CDECL
     
 typedef struct request *bend_request;
 typedef struct association *bend_association;
@@ -96,6 +103,7 @@ typedef struct
     Z_Query *query;            /* query structure */
     ODR stream;                /* encoding stream */
     ODR decode;                /* decoding stream */
+    ODR print;                 /* printing stream */
 } bend_searchrequest;
 
 /* old search request output */
@@ -116,6 +124,7 @@ typedef struct {
     Z_Query *query;            /* query structure */
     ODR stream;                /* encode stream */
     ODR decode;                /* decode stream */
+    ODR print;                 /* print stream */
 
     bend_request request;
     bend_association association;
@@ -134,6 +143,7 @@ typedef struct {
     Z_ReferenceId *referenceId;/* reference ID */
     Z_RecordComposition *comp; /* Formatting instructions */
     ODR stream;                /* encoding stream - memory source if required */
+    ODR print;                 /* printing stream */
     bend_request request;
     bend_association association;
 
@@ -154,6 +164,7 @@ typedef struct
     oid_value format;          /* One of the CLASS_RECSYN members */
     Z_RecordComposition *comp; /* Formatting instructions */
     ODR stream;                /* encoding stream - memory source if req */
+    ODR print;                 /* printing stream */
     int surrogate_flag;        /* surrogate diagnostic flag (rw) */
 } bend_fetchrequest;
 
@@ -182,6 +193,7 @@ typedef struct
     int term_position;  /* desired index of term in result list */
     int num_entries;    /* number of entries requested */
     ODR stream;         /* encoding stream - memory source if required */
+    ODR print;          /* printing stream */
 } bend_scanrequest;
 
 struct scan_entry {
@@ -213,6 +225,7 @@ typedef struct bend_scan_rr {
     Z_ReferenceId *referenceId; /* reference ID */
     Z_AttributesPlusTerm *term;
     ODR stream;         /* encoding stream - memory source if required */
+    ODR print;          /* printing stream */
 
     int term_position;  /* desired index of term in result list/returned */
     int num_entries;    /* number of entries requested/returned */
@@ -236,6 +249,7 @@ typedef struct bend_delete_rr {
     int delete_status;      /* status for the whole operation */
     int *statuses;          /* status each set - indexed as setnames */
     ODR stream;
+    ODR print; 
 } bend_delete_rr;
 
 /* close handler */
@@ -249,6 +263,7 @@ typedef struct bend_sort_rr
     char *output_setname;
     Z_SortKeySpecList *sort_sequence;
     ODR stream;
+    ODR print;
     Z_ReferenceId *referenceId;/* reference ID */
 
     int sort_status;
@@ -256,13 +271,14 @@ typedef struct bend_sort_rr
     char *errstring;
 } bend_sort_rr;
 
-/* extended services handler. Added in from DALI */
 typedef struct bend_esrequest_rr
 {
     int ItemNo;
     Z_ExtendedServicesRequest *esr;
     
     ODR stream;                /* encoding stream */
+    ODR decode;                /* decoding stream */
+    ODR print;                 /* printing stream */
     Z_ReferenceId *referenceId;/* reference ID */
     bend_request request;
     bend_association association;
@@ -275,6 +291,7 @@ typedef struct bend_initrequest
     char *configname;
     Z_IdAuthentication *auth;
     ODR stream;                /* encoding stream */
+    ODR print;                 /* printing stream */
     Z_ReferenceId *referenceId;/* reference ID */
     
     char *implementation_name;
@@ -308,8 +325,6 @@ YAZ_EXPORT int bend_backend_respond (bend_association a, bend_request req);
 YAZ_EXPORT void bend_request_setdata(bend_request r, void *p);
 YAZ_EXPORT void *bend_request_getdata(bend_request r);
 
-#ifdef __cplusplus
-}
-#endif
+YAZ_END_CDECL
 
 #endif