projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merge
[oweals/gnunet.git]
/
src
/
include
/
gnunet_bio_lib.h
diff --git
a/src/include/gnunet_bio_lib.h
b/src/include/gnunet_bio_lib.h
index d54184c8e4cb897b7c7cad6ffc6cb1fd44a5399e..e90e85832786510b137386c2256be503982afa9d 100644
(file)
--- a/
src/include/gnunet_bio_lib.h
+++ b/
src/include/gnunet_bio_lib.h
@@
-1,27
+1,32
@@
/*
This file is part of GNUnet.
/*
This file is part of GNUnet.
- (C) 2009 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2009 GNUnet e.V.
- GNUnet is free software
; you can redistribute it and/or modify
-
it under the terms of the GNU
General Public License as published
- by the Free Software Foundation
; either version 3, or (at your
- option) any later version.
+ GNUnet is free software
: you can redistribute it and/or modify it
+
under the terms of the GNU Affero
General Public License as published
+ by the Free Software Foundation
, either version 3 of the License,
+ o
r (at your o
ption) any later version.
GNUnet is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
GNUnet is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
- You should have received a copy of the GNU General Public License
- along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ SPDX-License-Identifier: AGPL3.0-or-later
*/
/**
*/
/**
- * @file include/gnunet_bio_lib.h
- * @brief buffered IO API
* @author Christian Grothoff
* @author Christian Grothoff
+ *
+ * @file
+ * Buffered IO library
+ *
+ * @defgroup bio BIO library
+ * Buffered binary disk IO (with endianess conversion)
+ * @{
*/
#ifndef GNUNET_BIO_LIB_H
*/
#ifndef GNUNET_BIO_LIB_H
@@
-59,7
+64,7
@@
GNUNET_BIO_read_open (const char *fn);
*
* @param h file handle
* @param emsg set to the error message
*
* @param h file handle
* @param emsg set to the error message
- * @return
GNUNET_OK on success,
GNUNET_SYSERR otherwise
+ * @return
#GNUNET_OK on success, #
GNUNET_SYSERR otherwise
*/
int
GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg);
*/
int
GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg);
@@
-72,7
+77,7
@@
GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg);
* @param what describes what is being read (for error message creation)
* @param result the buffer to write the result to
* @param len the number of bytes to read
* @param what describes what is being read (for error message creation)
* @param result the buffer to write the result to
* @param len the number of bytes to read
- * @return
GNUNET_OK on success,
GNUNET_SYSERR on failure
+ * @return
#GNUNET_OK on success, #
GNUNET_SYSERR on failure
*/
int
GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, const char *what,
*/
int
GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, const char *what,
@@
-87,10
+92,11
@@
GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, const char *what,
* @param line line number in the source file
* @param result the buffer to write the result to
* @param len the number of bytes to read
* @param line line number in the source file
* @param result the buffer to write the result to
* @param len the number of bytes to read
- * @return
GNUNET_OK on success,
GNUNET_SYSERR on failure
+ * @return
#GNUNET_OK on success, #
GNUNET_SYSERR on failure
*/
int
*/
int
-GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h, const char *file, int line,
+GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h,
+ const char *file, int line,
void *result, size_t len);
/**
void *result, size_t len);
/**
@@
-100,12
+106,12
@@
GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h, const char *file, int line,
* @param what describes what is being read (for error message creation)
* @param result the buffer to store a pointer to the (allocated) string to
* (note that *result could be set to NULL as well)
* @param what describes what is being read (for error message creation)
* @param result the buffer to store a pointer to the (allocated) string to
* (note that *result could be set to NULL as well)
- * @param max
Len
maximum allowed length for the string
- * @return
GNUNET_OK on success,
GNUNET_SYSERR on failure
+ * @param max
_length
maximum allowed length for the string
+ * @return
#GNUNET_OK on success, #
GNUNET_SYSERR on failure
*/
int
GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, const char *what,
*/
int
GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, const char *what,
- char **result, size_t max
Len
);
+ char **result, size_t max
_length
);
/**
/**
@@
-114,7
+120,7
@@
GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, const char *what,
* @param h handle to an open file
* @param what describes what is being read (for error message creation)
* @param result the buffer to store a pointer to the (allocated) metadata
* @param h handle to an open file
* @param what describes what is being read (for error message creation)
* @param result the buffer to store a pointer to the (allocated) metadata
- * @return
GNUNET_OK on success,
GNUNET_SYSERR on failure
+ * @return
#GNUNET_OK on success, #
GNUNET_SYSERR on failure
*/
int
GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, const char *what,
*/
int
GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, const char *what,
@@
-147,7
+153,7
@@
GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, const char *what,
* @param file name of the source file
* @param line line number in the code
* @param i address of 32-bit integer to read
* @param file name of the source file
* @param line line number in the code
* @param i address of 32-bit integer to read
- * @return
GNUNET_OK on success,
GNUNET_SYSERR on error
+ * @return
#GNUNET_OK on success, #
GNUNET_SYSERR on error
*/
int
GNUNET_BIO_read_int32__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
*/
int
GNUNET_BIO_read_int32__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
@@
-170,7
+176,7
@@
GNUNET_BIO_read_int32__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
* @param file name of the source file
* @param line line number in the code
* @param i address of 64-bit integer to read
* @param file name of the source file
* @param line line number in the code
* @param i address of 64-bit integer to read
- * @return
GNUNET_OK on success,
GNUNET_SYSERR on error
+ * @return
#GNUNET_OK on success, #
GNUNET_SYSERR on error
*/
int
GNUNET_BIO_read_int64__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
*/
int
GNUNET_BIO_read_int64__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
@@
-217,7
+223,7
@@
GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h);
* @param h handle to open file
* @param buffer the data to write
* @param n number of bytes to write
* @param h handle to open file
* @param buffer the data to write
* @param n number of bytes to write
- * @return
GNUNET_OK on success,
GNUNET_SYSERR on error
+ * @return
#GNUNET_OK on success, #
GNUNET_SYSERR on error
*/
int
GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, const void *buffer,
*/
int
GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, const void *buffer,
@@
-228,7
+234,7
@@
GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, const void *buffer,
* Force a buffered writer to flush its buffer
*
* @param h the writer handle
* Force a buffered writer to flush its buffer
*
* @param h the writer handle
- * @return
GNUNET_OK upon success. Upon failure
GNUNET_SYSERR is returned and
+ * @return
#GNUNET_OK upon success. Upon failure #
GNUNET_SYSERR is returned and
* the file is closed
*/
int
* the file is closed
*/
int
@@
-240,20
+246,18
@@
GNUNET_BIO_flush (struct GNUNET_BIO_WriteHandle *h);
*
* @param h handle to open file
* @param s string to write (can be NULL)
*
* @param h handle to open file
* @param s string to write (can be NULL)
- * @return
GNUNET_OK on success,
GNUNET_SYSERR on error
+ * @return
#GNUNET_OK on success, #
GNUNET_SYSERR on error
*/
int
GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, const char *s);
*/
int
GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, const char *s);
-
-
/**
* Write metadata container to a file.
*
* @param h handle to open file
* @param m metadata to write
/**
* Write metadata container to a file.
*
* @param h handle to open file
* @param m metadata to write
- * @return
GNUNET_OK on success,
GNUNET_SYSERR on error
+ * @return
#GNUNET_OK on success, #
GNUNET_SYSERR on error
*/
int
GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h,
*/
int
GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h,
@@
-285,7
+289,7
@@
GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h,
*
* @param h hande to open file
* @param i 32-bit integer to write
*
* @param h hande to open file
* @param i 32-bit integer to write
- * @return
GNUNET_OK on success,
GNUNET_SYSERR on error
+ * @return
#GNUNET_OK on success, #
GNUNET_SYSERR on error
*/
int
GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, int32_t i);
*/
int
GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, int32_t i);
@@
-296,7
+300,7
@@
GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, int32_t i);
*
* @param h hande to open file
* @param i 64-bit integer to write
*
* @param h hande to open file
* @param i 64-bit integer to write
- * @return
GNUNET_OK on success,
GNUNET_SYSERR on error
+ * @return
#GNUNET_OK on success, #
GNUNET_SYSERR on error
*/
int
GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h, int64_t i);
*/
int
GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h, int64_t i);
@@
-311,4
+315,7
@@
GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h, int64_t i);
/* ifndef GNUNET_BIO_LIB_H */
#endif
/* ifndef GNUNET_BIO_LIB_H */
#endif
+
+/** @} */ /* end of group bio */
+
/* end of gnunet_bio_lib.h */
/* end of gnunet_bio_lib.h */