Renamed Set utility to DFASet, since this is tied to the DFA module.
[idzebra-moved-to-github.git] / include / idzebra / api.h
index c11e08d..3336ca2 100644 (file)
@@ -1,6 +1,6 @@
-/* $Id: api.h,v 1.1 2004-08-25 09:23:36 adam Exp $
-   Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
-   Index Data Aps
+/* $Id: api.h,v 1.7 2005-01-15 21:45:43 adam Exp $
+   Copyright (C) 1995-2005
+   Index Data ApS
 
 This file is part of the Zebra server.
 
@@ -20,6 +20,11 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 02111-1307, USA.
 */
 
+/**
+ * \file api.h
+ * \brief Zebra API
+ */
+
 /* Return codes:
  * Most functions return an int. Unix-like, 0 means OK, 
  * non-zero means an error. The error info should be available
@@ -35,13 +40,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include <idzebra/res.h>
 #include <idzebra/version.h>
 
-/* Fixme! Compare string (ignore case) */
-#ifdef WIN32
-#define STRCASECMP     stricmp
-#else
-#define STRCASECMP     strcasecmp
-#endif
-
 YAZ_BEGIN_CDECL
 
 typedef struct {
@@ -89,6 +87,10 @@ YAZ_EXPORT ZebraService zebra_start_res (const char *configName,
 /* Close the whole Zebra */
 YAZ_EXPORT int zebra_stop (ZebraService zs);
 
+/* Report name of each record class (filter) */
+YAZ_EXPORT void zebra_filter_info(ZebraService zs, void *cd,
+                                 void (*cb)(void *cd, const char *name));
+
 
 /* Open a ZebraHandle */
 /* There should be one handle for each thred doing something */
@@ -145,11 +147,11 @@ YAZ_EXPORT int zebra_deleleResultSet(ZebraHandle zh, int function,
 
 /* Browse */
 YAZ_EXPORT int zebra_scan (ZebraHandle zh, ODR stream,
-                           Z_AttributesPlusTerm *zapt,
-                           oid_value attributeset,
-                           int *position, int *num_entries,
-                           ZebraScanEntry **list,
-                           int *is_partial);
+                          Z_AttributesPlusTerm *zapt,
+                          oid_value attributeset,
+                          int *position, int *num_entries,
+                          ZebraScanEntry **list,
+                          int *is_partial);
 
    
           
@@ -251,6 +253,12 @@ int zebra_register_statistics (ZebraHandle zh, int dumpdict);
 YAZ_EXPORT
 int zebra_record_encoding (ZebraHandle zh, const char *encoding);
 
+YAZ_EXPORT
+int zebra_record_encoding (ZebraHandle zh, const char *encoding);
+
+YAZ_EXPORT
+int zebra_octet_term_encoding(ZebraHandle zh, const char *encoding);
+
 /* Resources */
 YAZ_EXPORT
 int zebra_set_resource(ZebraHandle zh, const char *name, const char *value);
@@ -261,5 +269,26 @@ const char *zebra_get_resource(ZebraHandle zh,
 
 YAZ_EXPORT void zebra_pidfname(ZebraService zs, char *path);
 
+typedef struct {
+    char *term;
+    char *db;
+    zint sysno;
+    int score;
+} ZebraMetaRecord;
+
+YAZ_EXPORT
+ZebraMetaRecord *zebra_meta_records_create (ZebraHandle zh,
+                                           const char *name,
+                                           int num, zint *positions);
+
+
+YAZ_EXPORT
+ZebraMetaRecord *zebra_meta_records_create_range (ZebraHandle zh,
+                                                 const char *name, 
+                                                 zint start, int num);
+
+YAZ_EXPORT
+void zebra_meta_records_destroy (ZebraHandle zh, ZebraMetaRecord *records,
+                                int num);
 YAZ_END_CDECL                                
 #endif