aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_disk_lib.h
diff options
context:
space:
mode:
authordurner <durner@140774ce-b5e7-0310-ab8b-a85725594a96>2009-06-16 20:13:13 +0000
committerdurner <durner@140774ce-b5e7-0310-ab8b-a85725594a96>2009-06-16 20:13:13 +0000
commit8a0b5ea55d44ad1550eeed77aceb100fba986600 (patch)
tree08e0d0aaf9d67b2fd259dcfed6def6abc91f34c4 /src/include/gnunet_disk_lib.h
parent4d5f1e8a76f69ac827953edc73a21e8ea29c3ef6 (diff)
GNUNET_IO_handle => GNUNET_DISK_handle
git-svn-id: https://gnunet.org/svn/gnunet@8587 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/include/gnunet_disk_lib.h')
-rw-r--r--src/include/gnunet_disk_lib.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h
index 080d8c09be..2c7488cc49 100644
--- a/src/include/gnunet_disk_lib.h
+++ b/src/include/gnunet_disk_lib.h
@@ -28,7 +28,6 @@
#include "gnunet_configuration_lib.h"
#include "gnunet_scheduler_lib.h"
-#include "gnunet_io_lib.h"
/* we need size_t, and since it can be both unsigned int
or unsigned long long, this IS platform dependent;
@@ -75,6 +74,8 @@ extern "C"
enum GNUNET_DISK_Seek {GNUNET_SEEK_SET, GNUNET_SEEK_CUR, GNUNET_SEEK_END};
+struct GNUNET_IO_Handle;
+
/**
* Get the number of blocks that are left on the partition that
* contains the given file (for normal users).
@@ -86,6 +87,14 @@ long GNUNET_DISK_get_blocks_available (const char *part);
/**
+ * Checks whether a handle is invalid
+ * @param h handle to check
+ * @return GNUNET_YES if invalid, GNUNET_NO if valid
+ */
+int GNUNET_DISK_handle_invalid (const struct GNUNET_IO_Handle *h);
+
+
+/**
* Check that fil corresponds to a filename
* (of a file that exists and that is not a directory).
*
@@ -153,7 +162,7 @@ int GNUNET_DISK_file_read (const struct GNUNET_IO_Handle *h, void *result, int l
* @param fn file name
* @param result the buffer to write the result to
* @param len the maximum number of bytes to read
- * @return GNUNET_OK on success, GNUNET_SYSERR on error
+ * @return number of bytes read, GNUNET_SYSERR on failure
*/
int GNUNET_DISK_fn_read (const char * const fn, void *result, int len);