/*
* Public header for ZOOM C.
- * $Id: zoom.h,v 1.3 2001-11-06 17:05:19 adam Exp $
+ * $Id: zoom.h,v 1.5 2001-11-15 13:16:02 adam Exp $
*/
-/* 1. Modification
- Renamed type Z3950_search to Z3950_query and the functions
+/* 1. Renamed type Z3950_search to Z3950_query and the functions
that manipulate it..
Changed positions/sizes to be of type size_t rather than int.
+ 2. Deleted Z3950_resultset_get. Added Z3950_record_dup. Record
+ reference(s) returned by Z350_resultset_records and
+ Z3950_resultset_record are "owned" by result set.
*/
#include <yaz/yconfig.h>
ZOOM_EXPORT
void Z3950_connection_destroy (Z3950_connection c);
-/* set option for connection */
+/* get/set option for connection */
ZOOM_EXPORT
-const char *Z3950_connection_option (Z3950_connection c, const char *key,
- const char *val);
+const char *Z3950_connection_option_get (Z3950_connection c, const char *key);
+
+ZOOM_EXPORT
+void Z3950_connection_option_set (Z3950_connection c, const char *key,
+ const char *val);
/* return host for connection */
ZOOM_EXPORT
const char *Z3950_connection_host (Z3950_connection c);
/* result set option */
ZOOM_EXPORT
-const char *Z3950_resultset_option (Z3950_resultset r, const char *key,
- const char *val);
-/* return size of result set (hit count, AKA resultCount) */
+const char *Z3950_resultset_option_get (Z3950_resultset r, const char *key);
ZOOM_EXPORT
-int Z3950_resultset_size (Z3950_resultset r);
+void Z3950_resultset_option_set (Z3950_resultset r, const char *key, const char *val);
-/* return record at pos (starting from ), render given spec in type */
+/* return size of result set (alias hit count AKA result count) */
ZOOM_EXPORT
-void *Z3950_resultset_get (Z3950_resultset s, size_t pos, const char *type,
- size_t *len);
+size_t Z3950_resultset_size (Z3950_resultset r);
+
/* retrieve records */
ZOOM_EXPORT
void Z3950_resultset_records (Z3950_resultset r, Z3950_record *recs,
/* ----------------------------------------------------------- */
/* records */
-/* Get record information, in a form given by type */
+/* get record information, in a form given by type */
ZOOM_EXPORT
void *Z3950_record_get (Z3950_record rec, const char *type, size_t *len);
-/* Destroy record */
+/* destroy record */
ZOOM_EXPORT
void Z3950_record_destroy (Z3950_record rec);
+/* return copy of record */
+ZOOM_EXPORT
+Z3950_record Z3950_record_dup (Z3950_record srec);
+
/* ----------------------------------------------------------- */
/* searches */
ZOOM_EXPORT
int Z3950_query_sortby(Z3950_query s, const char *criteria);
-
/* ----------------------------------------------------------- */
/* options */
typedef const char *(*Z3950_options_callback)(void *handle, const char *name);