aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorNils Durner <durner@gnunet.org>2009-06-16 20:13:13 +0000
committerNils Durner <durner@gnunet.org>2009-06-16 20:13:13 +0000
commitdc6e9887c24209d0e3dfb6cfb30fbde6ae3b47e9 (patch)
tree08e0d0aaf9d67b2fd259dcfed6def6abc91f34c4 /src/include
parent841cf45c29f46825a8e9913c6e45dcff21318f5a (diff)
downloadgnunet-dc6e9887c24209d0e3dfb6cfb30fbde6ae3b47e9.tar.gz
gnunet-dc6e9887c24209d0e3dfb6cfb30fbde6ae3b47e9.zip
GNUNET_IO_handle => GNUNET_DISK_handle
Diffstat (limited to 'src/include')
-rw-r--r--src/include/Makefile.am1
-rw-r--r--src/include/gnunet_disk_lib.h13
-rw-r--r--src/include/gnunet_io_lib.h46
-rw-r--r--src/include/gnunet_util_lib.h1
4 files changed, 11 insertions, 50 deletions
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
index 0fb7aa0fd..bc832c444 100644
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -24,7 +24,6 @@ gnunetinclude_HEADERS = \
24 gnunet_fragmentation_lib.h \ 24 gnunet_fragmentation_lib.h \
25 gnunet_getopt_lib.h \ 25 gnunet_getopt_lib.h \
26 gnunet_hello_lib.h \ 26 gnunet_hello_lib.h \
27 gnunet_io_lib.h \
28 gnunet_network_lib.h \ 27 gnunet_network_lib.h \
29 gnunet_peerinfo_service.h \ 28 gnunet_peerinfo_service.h \
30 gnunet_program_lib.h \ 29 gnunet_program_lib.h \
diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h
index 080d8c09b..2c7488cc4 100644
--- a/src/include/gnunet_disk_lib.h
+++ b/src/include/gnunet_disk_lib.h
@@ -28,7 +28,6 @@
28 28
29#include "gnunet_configuration_lib.h" 29#include "gnunet_configuration_lib.h"
30#include "gnunet_scheduler_lib.h" 30#include "gnunet_scheduler_lib.h"
31#include "gnunet_io_lib.h"
32 31
33/* we need size_t, and since it can be both unsigned int 32/* we need size_t, and since it can be both unsigned int
34 or unsigned long long, this IS platform dependent; 33 or unsigned long long, this IS platform dependent;
@@ -75,6 +74,8 @@ extern "C"
75 74
76enum GNUNET_DISK_Seek {GNUNET_SEEK_SET, GNUNET_SEEK_CUR, GNUNET_SEEK_END}; 75enum GNUNET_DISK_Seek {GNUNET_SEEK_SET, GNUNET_SEEK_CUR, GNUNET_SEEK_END};
77 76
77struct GNUNET_IO_Handle;
78
78/** 79/**
79 * Get the number of blocks that are left on the partition that 80 * Get the number of blocks that are left on the partition that
80 * contains the given file (for normal users). 81 * contains the given file (for normal users).
@@ -86,6 +87,14 @@ long GNUNET_DISK_get_blocks_available (const char *part);
86 87
87 88
88/** 89/**
90 * Checks whether a handle is invalid
91 * @param h handle to check
92 * @return GNUNET_YES if invalid, GNUNET_NO if valid
93 */
94int GNUNET_DISK_handle_invalid (const struct GNUNET_IO_Handle *h);
95
96
97/**
89 * Check that fil corresponds to a filename 98 * Check that fil corresponds to a filename
90 * (of a file that exists and that is not a directory). 99 * (of a file that exists and that is not a directory).
91 * 100 *
@@ -153,7 +162,7 @@ int GNUNET_DISK_file_read (const struct GNUNET_IO_Handle *h, void *result, int l
153 * @param fn file name 162 * @param fn file name
154 * @param result the buffer to write the result to 163 * @param result the buffer to write the result to
155 * @param len the maximum number of bytes to read 164 * @param len the maximum number of bytes to read
156 * @return GNUNET_OK on success, GNUNET_SYSERR on error 165 * @return number of bytes read, GNUNET_SYSERR on failure
157 */ 166 */
158int GNUNET_DISK_fn_read (const char * const fn, void *result, int len); 167int GNUNET_DISK_fn_read (const char * const fn, void *result, int len);
159 168
diff --git a/src/include/gnunet_io_lib.h b/src/include/gnunet_io_lib.h
deleted file mode 100644
index 3d04a2317..000000000
--- a/src/include/gnunet_io_lib.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 This file is part of GNUnet.
3 (C) 2009 Christian Grothoff (and other contributing authors)
4
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 2, or (at your
8 option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
19*/
20
21/**
22 * @file include/gnunet_io_lib.h
23 * @brief Helper functions for abstract IO handles
24 * @author Nils Durner
25 */
26
27#ifndef IO_HANDLE_H_
28#define IO_HANDLE_H_
29
30struct GNUNET_IO_Handle;
31
32/**
33 * Checks whether a handle is invalid
34 * @param h handle to check
35 * @return GNUNET_YES if invalid, GNUNET_NO if valid
36 */
37int GNUNET_IO_handle_invalid (const struct GNUNET_IO_Handle *h);
38
39/**
40 * Mark a handle as invalid
41 * @param h file handle
42 */
43void GNUNET_IO_handle_invalidate (struct GNUNET_IO_Handle *h);
44
45
46#endif /* IO_HANDLE_H_ */
diff --git a/src/include/gnunet_util_lib.h b/src/include/gnunet_util_lib.h
index 58621caf5..6354e28fa 100644
--- a/src/include/gnunet_util_lib.h
+++ b/src/include/gnunet_util_lib.h
@@ -43,7 +43,6 @@ extern "C"
43#include "gnunet_crypto_lib.h" 43#include "gnunet_crypto_lib.h"
44#include "gnunet_disk_lib.h" 44#include "gnunet_disk_lib.h"
45#include "gnunet_getopt_lib.h" 45#include "gnunet_getopt_lib.h"
46#include "gnunet_io_lib.h"
47#include "gnunet_network_lib.h" 46#include "gnunet_network_lib.h"
48#include "gnunet_plugin_lib.h" 47#include "gnunet_plugin_lib.h"
49#include "gnunet_program_lib.h" 48#include "gnunet_program_lib.h"