-/* $Id: recctrl.h,v 1.2 2004-09-28 12:39:54 adam Exp $
+/* $Id: recctrl.h,v 1.3 2004-09-28 13:31:18 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
02111-1307, USA.
*/
-
-
#ifndef RECCTRL_H
#define RECCTRL_H
#include <idzebra/data1.h>
#include <idzebra/zebramap.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+YAZ_BEGIN_CDECL
/* single word entity */
typedef struct {
typedef struct recTypeClass *RecTypeClass;
typedef struct recTypes *RecTypes;
+YAZ_EXPORT
RecTypeClass recTypeClass_create (Res res, NMEM nmem);
+
+YAZ_EXPORT
void recTypeClass_destroy(RecTypeClass rtc);
+
+YAZ_EXPORT
void recTypeClass_info(RecTypeClass rtc, void *cd,
void (*cb)(void *cd, const char *s));
+YAZ_EXPORT
RecTypes recTypes_init(RecTypeClass rtc, data1_handle dh);
+
+YAZ_EXPORT
void recTypes_destroy(RecTypes recTypes);
+
+YAZ_EXPORT
void recTypes_default_handlers(RecTypes recTypes, Res res);
+YAZ_EXPORT
RecType recType_byName(RecTypes rts, Res res, const char *name,
void **clientDataP);
-#ifdef __cplusplus
-}
-#endif
+YAZ_END_CDECL
#endif
-/* $Id: recgrs.h,v 1.1 2004-09-28 10:15:03 adam Exp $
+/* $Id: recgrs.h,v 1.2 2004-09-28 13:31:20 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
02111-1307, USA.
*/
-#ifndef GRSREAD_H
-#define GRSREAD_H
+#ifndef RECGRS_H
+#define RECGRS_H
#include <idzebra/recctrl.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+YAZ_BEGIN_CDECL
struct grs_read_info {
void *clientData;
data1_handle dh;
};
+YAZ_EXPORT
int zebra_grs_extract(void *clientData, struct recExtractCtrl *p,
data1_node *(*grs_read)(struct grs_read_info *));
+YAZ_EXPORT
int zebra_grs_retrieve(void *clientData, struct recRetrieveCtrl *p,
data1_node *(*grs_read)(struct grs_read_info *));
+YAZ_EXPORT
int grs_extract_tree(struct recExtractCtrl *p, data1_node *n);
-#ifdef __cplusplus
-}
-#endif
+YAZ_END_CDECL
#endif
-/* $Id: res.h,v 1.1 2004-08-25 09:23:36 adam Exp $
+/* $Id: res.h,v 1.2 2004-09-28 13:31:20 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
02111-1307, USA.
*/
-
-
#ifndef RES_H
#define RES_H
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include <yaz/yaz-version.h>
- typedef struct res_struct *Res;
-
- Res res_open (const char *name, Res res_def, Res over_res);
- void res_close (Res r);
- const char *res_get (Res r, const char *name);
- const char *res_get_def (Res r, const char *name, const char *def);
- int res_get_match (Res r, const char *name, const char *value, const char *s);
- void res_set (Res r, const char *name, const char *value);
- int res_trav (Res r, const char *prefix, void *p,
- void (*f)(void *p, const char *name, const char *value));
- int res_write (Res r);
- const char *res_get_prefix (Res r, const char *name, const char *prefix,
- const char *def);
-
-#ifdef __cplusplus
-}
-#endif
+YAZ_BEGIN_CDECL
+
+typedef struct res_struct *Res;
+
+YAZ_EXPORT
+Res res_open (const char *name, Res res_def, Res over_res);
+
+YAZ_EXPORT
+void res_close (Res r);
+
+YAZ_EXPORT
+const char *res_get (Res r, const char *name);
+
+YAZ_EXPORT
+const char *res_get_def (Res r, const char *name, const char *def);
+
+YAZ_EXPORT
+int res_get_match (Res r, const char *name, const char *value, const char *s);
+
+YAZ_EXPORT
+void res_set (Res r, const char *name, const char *value);
+
+YAZ_EXPORT
+int res_trav (Res r, const char *prefix, void *p,
+ void (*f)(void *p, const char *name, const char *value));
+
+YAZ_EXPORT
+int res_write (Res r);
+
+YAZ_EXPORT
+const char *res_get_prefix (Res r, const char *name, const char *prefix,
+ const char *def);
+
+YAZ_END_CDECL
#endif
-/* $Id: zebramap.h,v 1.1 2004-09-28 12:39:54 adam Exp $
+/* $Id: zebramap.h,v 1.2 2004-09-28 13:31:20 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
YAZ_BEGIN_CDECL
typedef struct zebra_maps *ZebraMaps;
+
+YAZ_EXPORT
ZebraMaps zebra_maps_open (Res res, const char *base);
+YAZ_EXPORT
void zebra_maps_close (ZebraMaps zm);
+YAZ_EXPORT
const char **zebra_maps_input (ZebraMaps zms, unsigned reg_id,
const char **from, int len, int first);
+
+YAZ_EXPORT
const char *zebra_maps_output(ZebraMaps, unsigned reg_id, const char **from);
+YAZ_EXPORT
int zebra_maps_attr (ZebraMaps zms, Z_AttributesPlusTerm *zapt,
unsigned *reg_id, char **search_type, char *rank_type,
int *complete_flag, int *sort_flag);
+YAZ_EXPORT
int zebra_maps_sort (ZebraMaps zms, Z_SortAttributes *sortAttributes,
int *numerical);
+YAZ_EXPORT
int zebra_maps_is_complete (ZebraMaps zms, unsigned reg_id);
+
+YAZ_EXPORT
int zebra_maps_is_sort (ZebraMaps zms, unsigned reg_id);
+
+YAZ_EXPORT
int zebra_maps_is_positioned (ZebraMaps zms, unsigned reg_id);
+YAZ_EXPORT
WRBUF zebra_replace(ZebraMaps zms, unsigned reg_id, const char *ex_list,
const char *input_str, int input_len);