Moved zebrautl.h to idzebra/util.h.
[idzebra-moved-to-github.git] / include / idzebra / bfile.h
index e76e649..d1b25c1 100644 (file)
@@ -1,6 +1,6 @@
-/* $Id: bfile.h,v 1.2 2004-12-13 20:51:30 adam Exp $
-   Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
-   Index Data Aps
+/* $Id: bfile.h,v 1.4 2005-03-30 09:25:23 adam Exp $
+   Copyright (C) 1995-2005
+   Index Data ApS
 
 This file is part of the Zebra server.
 
@@ -24,7 +24,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #define BFILE_H
 
 #include <yaz/yconfig.h>
-#include <idzebra/version.h>
+#include <idzebra/util.h>
 
 YAZ_BEGIN_CDECL
 
@@ -40,6 +40,9 @@ void bfs_destroy (BFiles bfiles);
 YAZ_EXPORT
 int bf_close (BFile);
 
+YAZ_EXPORT
+int bf_xclose (BFile bf, int version, const char *more_info);
+
 /* bf_open: opens bfile.
    opens bfile with name 'name' and with 'block_size' as block size.
    returns bfile handle is successful; NULL otherwise 
@@ -47,6 +50,11 @@ int bf_close (BFile);
 YAZ_EXPORT
 BFile bf_open (BFiles bfs, const char *name, int block_size, int wflag);
 
+YAZ_EXPORT
+BFile bf_xopen(BFiles bfs, const char *name, int block_size, int wrflag,
+              const char *magic, int *read_version,
+              const char **more_info);
+
 /* bf_read: reads bytes from bfile 'bf'.
    reads 'nbytes' bytes (or whole block if 0) from offset 'offset' from
    block 'no'. stores contents in buffer 'buf'.
@@ -83,6 +91,14 @@ void bf_commitClean (BFiles bfs, const char *spec);
 YAZ_EXPORT
 void bf_reset (BFiles bfs);
 
+/* bf_alloc: allocate one or more blocks */
+YAZ_EXPORT
+int bf_alloc(BFile bf, int no, zint *blocks);
+
+/* bf_alloc: allocate one or more blocks */
+YAZ_EXPORT
+int bf_free(BFile bf, int no, const zint *blocks);
+
 YAZ_END_CDECL
 
 #endif