/*
* Public header for ZOOM C.
- * $Id: zoom.h,v 1.11 2002-01-28 09:27:48 adam Exp $
+ * $Id: zoom.h,v 1.12 2002-05-17 12:48:29 adam Exp $
*/
#include <yaz/yconfig.h>
-#define ZOOM_EXPORT YAZ_EXPORT
#define ZOOM_BEGIN_CDECL YAZ_BEGIN_CDECL
#define ZOOM_END_CDECL YAZ_END_CDECL
+#ifdef WIN32
+# define ZOOM_API(x) __declspec(dllexport) x __stdcall
+#else
+# define ZOOM_API(x) x
+# endif
+
ZOOM_BEGIN_CDECL
/* ----------------------------------------------------------- */
/* create connection, connect to host, if portnum is 0, then port is
read from host string (e.g. myhost:9821) */
-ZOOM_EXPORT
-ZOOM_connection ZOOM_connection_new (const char *host, int portnum);
+ZOOM_API(ZOOM_connection)
+ZOOM_connection_new (const char *host, int portnum);
/* create connection, don't connect, apply options */
-ZOOM_EXPORT
-ZOOM_connection ZOOM_connection_create (ZOOM_options options);
+ZOOM_API(ZOOM_connection)
+ZOOM_connection_create (ZOOM_options options);
/* connect given existing connection */
-ZOOM_EXPORT
-void ZOOM_connection_connect(ZOOM_connection c, const char *host,
+ZOOM_API(void)
+ZOOM_connection_connect(ZOOM_connection c, const char *host,
int portnum);
/* destroy connection (close connection also) */
-ZOOM_EXPORT
-void ZOOM_connection_destroy (ZOOM_connection c);
+ZOOM_API(void)
+ZOOM_connection_destroy (ZOOM_connection c);
/* get/set option for connection */
-ZOOM_EXPORT
-const char *ZOOM_connection_option_get (ZOOM_connection c, const char *key);
+ZOOM_API(const char *)
+ZOOM_connection_option_get (ZOOM_connection c, const char *key);
-ZOOM_EXPORT
-void ZOOM_connection_option_set (ZOOM_connection c, const char *key,
- const char *val);
+ZOOM_API(void)
+ZOOM_connection_option_set (ZOOM_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)
*/
-ZOOM_EXPORT
-int ZOOM_connection_error (ZOOM_connection c, const char **cp,
+ZOOM_API(int)
+ZOOM_connection_error (ZOOM_connection c, const char **cp,
const char **addinfo);
/* returns error code */
-ZOOM_EXPORT
-int ZOOM_connection_errcode (ZOOM_connection c);
+ZOOM_API(int)
+ZOOM_connection_errcode (ZOOM_connection c);
/* returns error message */
-ZOOM_EXPORT
-const char *ZOOM_connection_errmsg (ZOOM_connection c);
+ZOOM_API(const char *)
+ZOOM_connection_errmsg (ZOOM_connection c);
/* returns additional info */
-ZOOM_EXPORT
-const char *ZOOM_connection_addinfo (ZOOM_connection c);
+ZOOM_API(const char *)
+ZOOM_connection_addinfo (ZOOM_connection c);
#define ZOOM_ERROR_NONE 0
#define ZOOM_ERROR_CONNECT 10000
#define ZOOM_ERROR_INTERNAL 10006
#define ZOOM_ERROR_TIMEOUT 10007
-ZOOM_EXPORT
-int ZOOM_connection_last_event(ZOOM_connection cs);
+ZOOM_API(int)
+ZOOM_connection_last_event(ZOOM_connection cs);
#define ZOOM_EVENT_NONE 0
#define ZOOM_EVENT_CONNECT 1
/* result sets */
/* create result set given a search */
-ZOOM_EXPORT
-ZOOM_resultset ZOOM_connection_search(ZOOM_connection, ZOOM_query q);
+ZOOM_API(ZOOM_resultset)
+ZOOM_connection_search(ZOOM_connection, ZOOM_query q);
/* create result set given PQF query */
-ZOOM_EXPORT
-ZOOM_resultset ZOOM_connection_search_pqf(ZOOM_connection c, const char *q);
+ZOOM_API(ZOOM_resultset)
+ZOOM_connection_search_pqf(ZOOM_connection c, const char *q);
/* destroy result set */
-ZOOM_EXPORT
-void ZOOM_resultset_destroy(ZOOM_resultset r);
+ZOOM_API(void)
+ZOOM_resultset_destroy(ZOOM_resultset r);
/* result set option */
-ZOOM_EXPORT
-const char *ZOOM_resultset_option_get (ZOOM_resultset r, const char *key);
-ZOOM_EXPORT
-void ZOOM_resultset_option_set (ZOOM_resultset r, const char *key, const char *val);
+ZOOM_API(const char *)
+ZOOM_resultset_option_get (ZOOM_resultset r, const char *key);
+ZOOM_API(void)
+ZOOM_resultset_option_set (ZOOM_resultset r, const char *key, const char *val);
/* return size of result set (alias hit count AKA result count) */
-ZOOM_EXPORT
-size_t ZOOM_resultset_size (ZOOM_resultset r);
+ZOOM_API(size_t)
+ZOOM_resultset_size (ZOOM_resultset r);
/* retrieve records */
-ZOOM_EXPORT
-void ZOOM_resultset_records (ZOOM_resultset r, ZOOM_record *recs,
- size_t start, size_t count);
+ZOOM_API(void)
+ZOOM_resultset_records (ZOOM_resultset r, ZOOM_record *recs,
+ size_t start, size_t count);
/* return record object at pos. Returns 0 if unavailable */
-ZOOM_EXPORT
-ZOOM_record ZOOM_resultset_record (ZOOM_resultset s, size_t pos);
+ZOOM_API(ZOOM_record)
+ZOOM_resultset_record (ZOOM_resultset s, size_t pos);
/* like ZOOM_resultset_record - but never blocks .. */
-ZOOM_EXPORT
-ZOOM_record ZOOM_resultset_record_immediate (ZOOM_resultset s, size_t pos);
+ZOOM_API(ZOOM_record)
+ZOOM_resultset_record_immediate (ZOOM_resultset s, size_t pos);
/* ----------------------------------------------------------- */
/* records */
/* get record information, in a form given by type */
-ZOOM_EXPORT
-const char *ZOOM_record_get (ZOOM_record rec, const char *type, int *len);
+ZOOM_API(const char *)
+ZOOM_record_get (ZOOM_record rec, const char *type, int *len);
/* destroy record */
-ZOOM_EXPORT
-void ZOOM_record_destroy (ZOOM_record rec);
+ZOOM_API(void)
+ZOOM_record_destroy (ZOOM_record rec);
/* return copy of record */
-ZOOM_EXPORT
-ZOOM_record ZOOM_record_clone (ZOOM_record srec);
+ZOOM_API(ZOOM_record)
+ZOOM_record_clone (ZOOM_record srec);
/* ----------------------------------------------------------- */
/* queries */
/* create search object */
-ZOOM_EXPORT
-ZOOM_query ZOOM_query_create(void);
+ZOOM_API(ZOOM_query)
+ZOOM_query_create(void);
/* destroy it */
-ZOOM_EXPORT
-void ZOOM_query_destroy(ZOOM_query s);
+ZOOM_API(void)
+ZOOM_query_destroy(ZOOM_query s);
/* specify prefix query for search */
-ZOOM_EXPORT
-int ZOOM_query_prefix(ZOOM_query s, const char *str);
+ZOOM_API(int)
+ZOOM_query_prefix(ZOOM_query s, const char *str);
/* specify sort criteria for search */
-ZOOM_EXPORT
-int ZOOM_query_sortby(ZOOM_query s, const char *criteria);
+ZOOM_API(int)
+ZOOM_query_sortby(ZOOM_query s, const char *criteria);
/* ----------------------------------------------------------- */
/* scan */
-ZOOM_EXPORT
-ZOOM_scanset ZOOM_connection_scan (ZOOM_connection c, const char *startterm);
+ZOOM_API(ZOOM_scanset)
+ZOOM_connection_scan (ZOOM_connection c, const char *startterm);
-ZOOM_EXPORT
-const char * ZOOM_scanset_term(ZOOM_scanset scan, size_t pos,
- int *occ, int *len);
+ZOOM_API(const char *)
+ZOOM_scanset_term(ZOOM_scanset scan, size_t pos,
+ int *occ, int *len);
-ZOOM_EXPORT
-size_t ZOOM_scanset_size(ZOOM_scanset scan);
+ZOOM_API(size_t)
+ZOOM_scanset_size(ZOOM_scanset scan);
-ZOOM_EXPORT
-void ZOOM_scanset_destroy (ZOOM_scanset scan);
+ZOOM_API(void)
+ZOOM_scanset_destroy (ZOOM_scanset scan);
-ZOOM_EXPORT
-const char *ZOOM_scanset_option_get (ZOOM_scanset scan, const char *key);
+ZOOM_API(const char *)
+ZOOM_scanset_option_get (ZOOM_scanset scan, const char *key);
-ZOOM_EXPORT
-void ZOOM_scanset_option_set (ZOOM_scanset scan, const char *key,
- const char *val);
+ZOOM_API(void)
+ZOOM_scanset_option_set (ZOOM_scanset scan, const char *key,
+ const char *val);
/* ----------------------------------------------------------- */
/* options */
typedef const char *(*ZOOM_options_callback)(void *handle, const char *name);
-ZOOM_EXPORT
-ZOOM_options_callback ZOOM_options_set_callback (ZOOM_options opt,
+ZOOM_API(ZOOM_options_callback)
+ZOOM_options_set_callback (ZOOM_options opt,
ZOOM_options_callback c,
void *handle);
-ZOOM_EXPORT
-ZOOM_options ZOOM_options_create (void);
-
-ZOOM_EXPORT
-ZOOM_options ZOOM_options_create_with_parent (ZOOM_options parent);
+ZOOM_API(ZOOM_options)
+ZOOM_options_create (void);
-ZOOM_EXPORT
-const char *ZOOM_options_get (ZOOM_options opt, const char *name);
+ZOOM_API(ZOOM_options)
+ZOOM_options_create_with_parent (ZOOM_options parent);
-ZOOM_EXPORT
-void ZOOM_options_set (ZOOM_options opt, const char *name, const char *v);
+ZOOM_API(const char *)
+ZOOM_options_get (ZOOM_options opt, const char *name);
-ZOOM_EXPORT
-void ZOOM_options_destroy (ZOOM_options opt);
+ZOOM_API(void)
+ZOOM_options_set (ZOOM_options opt, const char *name, const char *v);
-ZOOM_EXPORT
-int ZOOM_options_get_bool (ZOOM_options opt, const char *name, int defa);
+ZOOM_API(void)
+ZOOM_options_destroy (ZOOM_options opt);
-ZOOM_EXPORT
-int ZOOM_options_get_int (ZOOM_options opt, const char *name, int defa);
+ZOOM_API(int)
+ZOOM_options_get_bool (ZOOM_options opt, const char *name, int defa);
-ZOOM_EXPORT
-void ZOOM_options_set_int(ZOOM_options opt, const char *name, int value);
+ZOOM_API(int)
+ZOOM_options_get_int (ZOOM_options opt, const char *name, int defa);
-ZOOM_EXPORT
-void ZOOM_options_addref (ZOOM_options opt);
+ZOOM_API(void)
+ZOOM_options_set_int(ZOOM_options opt, const char *name, int value);
/* ----------------------------------------------------------- */
/* events */
integer if event occurred ; zero if none occurred and no more
events are pending. The positive integer specifies the
connection for which the event occurred. */
-ZOOM_EXPORT
-int ZOOM_event (int no, ZOOM_connection *cs);
+ZOOM_API(int)
+ZOOM_event (int no, ZOOM_connection *cs);
ZOOM_END_CDECL
* NT threaded server code by
* Chas Woodfield, Fretwell Downing Informatics.
*
- * $Id: statserv.c,v 1.81 2002-05-07 11:01:59 adam Exp $
+ * $Id: statserv.c,v 1.82 2002-05-17 12:48:29 adam Exp $
*/
#include <stdio.h>
}
}
-void event_loop_thread (IOCHAN iochan)
+void __cdecl event_loop_thread (IOCHAN iochan)
{
event_loop (&iochan);
}
# makefile.mak - makefile for MS NMAKE
-# $Id: makefile,v 1.36 2002-03-18 21:33:48 adam Exp $
+# $Id: makefile,v 1.37 2002-05-17 12:48:30 adam Exp $
#
# Programmed by
# HL: Heikki Levanto, Index Data
default: all
-all: dirs yaz_date_h generate dll client ztest zoomsh
+all: dirs generate dll client ztest zoomsh
NSIS="c:\program files\nsis\makensis.exe"
CLIENT=$(BINDIR)\yaz-client.exe
ZOOMSH=$(BINDIR)\zoomsh.exe
ZTEST=$(BINDIR)\yaz-ztest.exe
-YAZ_DATE_H=$(INCLDIR)\yaz\yaz-date.h
ZOOMTST1=$(BINDIR)\zoomtst1.exe
ZOOMTST2=$(BINDIR)\zoomtst2.exe
zoomsh: $(ZOOMSH) $(ZOOMTST1) $(ZOOMTST2) $(ZOOMTST3) \
$(ZOOMTST4) $(ZOOMTST5) $(ZOOMTST6) $(ZOOMTST7) $(ZOOMTST8)
-yaz_date_h: $(YAZ_DATE_H)
-
###########################################################
############### Compiler and linker options
###########################################################
!if $(HAVE_TCL)
-$(YAZ_DATE_H):
- @cd ..
- $(TCL) util\cvs-date.tcl include\yaz\yaz-date.h
- @cd win
-
$(Z3950V3_FILES): $(Z3950DIR)\z3950v3.asn
@cd $(Z3950DIR)
$(TCL) $(TCLOPT) -d z.tcl z3950v3.asn
###########################################################
#
# $Log: makefile,v $
-# Revision 1.36 2002-03-18 21:33:48 adam
+# Revision 1.37 2002-05-17 12:48:30 adam
+# Use __stdcall convention for ZOOM on WIN32
+#
+# Revision 1.36 2002/03/18 21:33:48 adam
# MARC records embedded in C code for test server
#
# Revision 1.35 2002/03/16 10:26:57 adam
/*
- * $Id: zoom-c.c,v 1.27 2002-05-14 13:42:26 oleg Exp $
+ * $Id: zoom-c.c,v 1.28 2002-05-17 12:48:30 adam Exp $
*
* ZOOM layer for C, connections, result sets, queries.
*/
int pos,
const char *elementSetName);
-ZOOM_connection ZOOM_connection_create (ZOOM_options options)
+ZOOM_API(ZOOM_connection)
+ZOOM_connection_create (ZOOM_options options)
{
ZOOM_connection c = (ZOOM_connection) xmalloc (sizeof(*c));
return databaseNames;
}
-ZOOM_connection ZOOM_connection_new (const char *host, int portnum)
+ZOOM_API(ZOOM_connection)
+ZOOM_connection_new (const char *host, int portnum)
{
ZOOM_connection c = ZOOM_connection_create (0);
return c;
}
-void ZOOM_connection_connect(ZOOM_connection c,
- const char *host, int portnum)
+ZOOM_API(void)
+ZOOM_connection_connect(ZOOM_connection c,
+ const char *host, int portnum)
{
const char *val;
ZOOM_task task;
}
}
-ZOOM_query ZOOM_query_create(void)
+ZOOM_API(ZOOM_query)
+ZOOM_query_create(void)
{
ZOOM_query s = (ZOOM_query) xmalloc (sizeof(*s));
return s;
}
-void ZOOM_query_destroy(ZOOM_query s)
+ZOOM_API(void)
+ZOOM_query_destroy(ZOOM_query s)
{
if (!s)
return;
}
}
-int ZOOM_query_prefix(ZOOM_query s, const char *str)
+ZOOM_API(int)
+ZOOM_query_prefix(ZOOM_query s, const char *str)
{
s->query = (Z_Query *) odr_malloc (s->odr, sizeof(*s->query));
s->query->which = Z_Query_type_1;
return 0;
}
-int ZOOM_query_sortby(ZOOM_query s, const char *criteria)
+ZOOM_API(int)
+ZOOM_query_sortby(ZOOM_query s, const char *criteria)
{
s->sort_spec = yaz_sort_spec (s->odr, criteria);
if (!s->sort_spec)
static int do_write(ZOOM_connection c);
-void ZOOM_connection_destroy(ZOOM_connection c)
+ZOOM_API(void)
+ZOOM_connection_destroy(ZOOM_connection c)
{
ZOOM_resultset r;
if (!c)
return r;
}
-ZOOM_resultset ZOOM_connection_search_pqf(ZOOM_connection c, const char *q)
+ZOOM_API(ZOOM_resultset)
+ZOOM_connection_search_pqf(ZOOM_connection c, const char *q)
{
ZOOM_resultset r;
ZOOM_query s = ZOOM_query_create();
return r;
}
-ZOOM_resultset ZOOM_connection_search(ZOOM_connection c, ZOOM_query q)
+ZOOM_API(ZOOM_resultset)
+ZOOM_connection_search(ZOOM_connection c, ZOOM_query q)
{
ZOOM_resultset r = ZOOM_resultset_create ();
ZOOM_task task;
return r;
}
-void ZOOM_resultset_destroy(ZOOM_resultset r)
+ZOOM_API(void)
+ZOOM_resultset_destroy(ZOOM_resultset r)
{
if (!r)
return;
}
}
-size_t ZOOM_resultset_size (ZOOM_resultset r)
+ZOOM_API(size_t)
+ZOOM_resultset_size (ZOOM_resultset r)
{
return r->size;
}
;
}
-void ZOOM_resultset_records (ZOOM_resultset r, ZOOM_record *recs,
- size_t start, size_t count)
+ZOOM_API(void)
+ZOOM_resultset_records (ZOOM_resultset r, ZOOM_record *recs,
+ size_t start, size_t count)
{
int force_present = 0;
c->error = *r->condition;
}
-ZOOM_record ZOOM_record_clone (ZOOM_record srec)
+ZOOM_API(ZOOM_record)
+ZOOM_record_clone (ZOOM_record srec)
{
char *buf;
int size;
return nrec;
}
-ZOOM_record ZOOM_resultset_record_immediate (ZOOM_resultset s,size_t pos)
+ZOOM_API(ZOOM_record)
+ZOOM_resultset_record_immediate (ZOOM_resultset s,size_t pos)
{
return record_cache_lookup (s, pos, 0);
}
-ZOOM_record ZOOM_resultset_record (ZOOM_resultset r, size_t pos)
+ZOOM_API(ZOOM_record)
+ZOOM_resultset_record (ZOOM_resultset r, size_t pos)
{
ZOOM_resultset_retrieve (r, 1, pos, 1);
return ZOOM_resultset_record_immediate (r, pos);
}
-void ZOOM_record_destroy (ZOOM_record rec)
+ZOOM_API(void)
+ZOOM_record_destroy (ZOOM_record rec)
{
if (!rec)
return;
xfree (rec);
}
-const char *ZOOM_record_get (ZOOM_record rec, const char *type, int *len)
+ZOOM_API(const char *)
+ZOOM_record_get (ZOOM_record rec, const char *type, int *len)
{
Z_NamePlusRecord *npr;
return 1;
}
-ZOOM_scanset ZOOM_connection_scan (ZOOM_connection c, const char *start)
+ZOOM_API(ZOOM_scanset)
+ZOOM_connection_scan (ZOOM_connection c, const char *start)
{
ZOOM_scanset scan = (ZOOM_scanset) xmalloc (sizeof(*scan));
return scan;
}
-void ZOOM_scanset_destroy (ZOOM_scanset scan)
+ZOOM_API(void)
+ZOOM_scanset_destroy (ZOOM_scanset scan)
{
if (!scan)
return;
}
}
-int send_scan (ZOOM_connection c)
+static int send_scan (ZOOM_connection c)
{
ZOOM_scanset scan;
Z_APDU *apdu = zget_APDU(c->odr_out, Z_APDU_scanRequest);
return 1;
}
-size_t ZOOM_scanset_size (ZOOM_scanset scan)
+ZOOM_API(size_t)
+ZOOM_scanset_size (ZOOM_scanset scan)
{
if (!scan || !scan->scan_response || !scan->scan_response->entries)
return 0;
return scan->scan_response->entries->num_entries;
}
-const char *ZOOM_scanset_term (ZOOM_scanset scan, size_t pos,
+ZOOM_API(const char *)
+ZOOM_scanset_term (ZOOM_scanset scan, size_t pos,
int *occ, int *len)
{
const char *term = 0;
return term;
}
-const char *ZOOM_scanset_option_get (ZOOM_scanset scan, const char *key)
+ZOOM_API(const char *)
+ZOOM_scanset_option_get (ZOOM_scanset scan, const char *key)
{
return ZOOM_options_get (scan->options, key);
}
-void ZOOM_scanset_option_set (ZOOM_scanset scan, const char *key,
+ZOOM_API(void)
+ZOOM_scanset_option_set (ZOOM_scanset scan, const char *key,
const char *val)
{
ZOOM_options_set (scan->options, key, val);
}
-const char *ZOOM_connection_option_get (ZOOM_connection c, const char *key)
+ZOOM_API(const char *)
+ZOOM_connection_option_get (ZOOM_connection c, const char *key)
{
return ZOOM_options_get (c->options, key);
}
-void ZOOM_connection_option_set (ZOOM_connection c, const char *key,
+ZOOM_API(void)
+ZOOM_connection_option_set (ZOOM_connection c, const char *key,
const char *val)
{
ZOOM_options_set (c->options, key, val);
}
-const char *ZOOM_resultset_option_get (ZOOM_resultset r, const char *key)
+ZOOM_API(const char *)
+ZOOM_resultset_option_get (ZOOM_resultset r, const char *key)
{
return ZOOM_options_get (r->options, key);
}
-void ZOOM_resultset_option_set (ZOOM_resultset r, const char *key,
+ZOOM_API(void)
+ZOOM_resultset_option_set (ZOOM_resultset r, const char *key,
const char *val)
{
ZOOM_options_set (r->options, key, val);
}
-int ZOOM_connection_errcode (ZOOM_connection c)
+ZOOM_API(int)
+ZOOM_connection_errcode (ZOOM_connection c)
{
return ZOOM_connection_error (c, 0, 0);
}
-const char *ZOOM_connection_errmsg (ZOOM_connection c)
+ZOOM_API(const char *)
+ZOOM_connection_errmsg (ZOOM_connection c)
{
const char *msg;
ZOOM_connection_error (c, &msg, 0);
return msg;
}
-const char *ZOOM_connection_addinfo (ZOOM_connection c)
+ZOOM_API(const char *)
+ZOOM_connection_addinfo (ZOOM_connection c)
{
const char *addinfo;
ZOOM_connection_error (c, 0, &addinfo);
return addinfo;
}
-int ZOOM_connection_error (ZOOM_connection c, const char **cp,
+ZOOM_API(int)
+ZOOM_connection_error (ZOOM_connection c, const char **cp,
const char **addinfo)
{
int error = c->error;
return c->error;
}
-int ZOOM_connection_do_io(ZOOM_connection c, int mask)
+static int ZOOM_connection_do_io(ZOOM_connection c, int mask)
{
ZOOM_Event event = 0;
int r = cs_look(c->cs);
return 1;
}
-int ZOOM_connection_last_event(ZOOM_connection cs)
+ZOOM_API(int)
+ZOOM_connection_last_event(ZOOM_connection cs)
{
if (!cs)
return ZOOM_EVENT_NONE;
return cs->last_event;
}
-int ZOOM_event (int no, ZOOM_connection *cs)
+ZOOM_API(int)
+ZOOM_event (int no, ZOOM_connection *cs)
{
#if HAVE_SYS_POLL_H
struct pollfd pollfds[1024];
/*
- * $Id: zoom-opt.c,v 1.4 2002-01-28 09:27:48 adam Exp $
+ * $Id: zoom-opt.c,v 1.5 2002-05-17 12:48:30 adam Exp $
*
* ZOOM layer for C, options handling
*/
#include "zoom-p.h"
-ZOOM_options ZOOM_options_create (void)
+ZOOM_API(ZOOM_options)
+ZOOM_options_create (void)
{
return ZOOM_options_create_with_parent (0);
}
-ZOOM_options ZOOM_options_create_with_parent (ZOOM_options parent)
+ZOOM_API(ZOOM_options)
+ZOOM_options_create_with_parent (ZOOM_options parent)
{
ZOOM_options opt = (ZOOM_options) xmalloc (sizeof(*opt));
(opt->refcount)++;
}
-ZOOM_options_callback ZOOM_options_set_callback (
+ZOOM_API(ZOOM_options_callback)
+ZOOM_options_set_callback (
ZOOM_options opt,
ZOOM_options_callback callback_func,
void *callback_handle)
return callback_old;
}
-void ZOOM_options_destroy (ZOOM_options opt)
+ZOOM_API(void)
+ZOOM_options_destroy (ZOOM_options opt)
{
if (!opt)
return;
}
}
-void ZOOM_options_set (ZOOM_options opt, const char *name, const char *value)
+ZOOM_API(void)
+ZOOM_options_set (ZOOM_options opt, const char *name, const char *value)
{
struct ZOOM_options_entry **e;
(*e)->next = 0;
}
-const char *ZOOM_options_get (ZOOM_options opt, const char *name)
+ZOOM_API(const char *)
+ZOOM_options_get (ZOOM_options opt, const char *name)
{
const char *v = 0;
if (!opt)
return v;
}
-int ZOOM_options_get_bool (ZOOM_options opt, const char *name, int defa)
+ZOOM_API(int)
+ZOOM_options_get_bool (ZOOM_options opt, const char *name, int defa)
{
const char *v = ZOOM_options_get (opt, name);
return 0;
}
-int ZOOM_options_get_int (ZOOM_options opt, const char *name, int defa)
+ZOOM_API(int)
+ZOOM_options_get_int (ZOOM_options opt, const char *name, int defa)
{
const char *v = ZOOM_options_get (opt, name);
return atoi(v);
}
-void ZOOM_options_set_int(ZOOM_options opt, const char *name, int value)
+ZOOM_API(void)
+ZOOM_options_set_int(ZOOM_options opt, const char *name, int value)
{
char s[40];
/*
* Private C header for ZOOM C.
- * $Id: zoom-p.h,v 1.8 2001-12-30 22:21:11 adam Exp $
+ * $Id: zoom-p.h,v 1.9 2002-05-17 12:48:30 adam Exp $
*/
#include <yaz/proto.h>
#include <yaz/comstack.h>
ZOOM_Event prev;
};
-
+void ZOOM_options_addref (ZOOM_options opt);