X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fyaz%2Fzoom.h;h=c7df143f82d79d3f6066ded198ea863f8c321131;hp=484a7cd2b18deef2e2896e23bee52729d93f73e3;hb=fd2f1538cdb20385c2c267d318c59d567eb3d242;hpb=67e7a7a13ff1e787b9e5cfe84494dfd446c1bcb9 diff --git a/include/yaz/zoom.h b/include/yaz/zoom.h index 484a7cd..c7df143 100644 --- a/include/yaz/zoom.h +++ b/include/yaz/zoom.h @@ -1,13 +1,8 @@ /* * Public header for ZOOM C. - * $Id: zoom.h,v 1.3 2001-11-06 17:05:19 adam Exp $ + * $Id: zoom.h,v 1.6 2001-11-16 09:52:39 adam Exp $ */ -/* 1. Modification - 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. -*/ #include #define ZOOM_EXPORT YAZ_EXPORT @@ -47,13 +42,13 @@ void Z3950_connection_connect(Z3950_connection c, const char *host, 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); -/* return host for connection */ +const char *Z3950_connection_option_get (Z3950_connection c, const char *key); + ZOOM_EXPORT -const char *Z3950_connection_host (Z3950_connection c); +void Z3950_connection_option_set (Z3950_connection c, const char *key, + const char *val); /* return error code (0 == success, failure otherwise). cp holds error string on failure, addinfo holds addititional info (if any) @@ -98,16 +93,14 @@ void Z3950_resultset_destroy(Z3950_resultset r); /* 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, @@ -124,14 +117,18 @@ Z3950_record Z3950_resultset_record_immediate (Z3950_resultset s, size_t pos); /* ----------------------------------------------------------- */ /* 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 */ @@ -148,7 +145,6 @@ int Z3950_query_prefix(Z3950_query s, const char *str); ZOOM_EXPORT int Z3950_query_sortby(Z3950_query s, const char *criteria); - /* ----------------------------------------------------------- */ /* options */ typedef const char *(*Z3950_options_callback)(void *handle, const char *name);