GNUnet  0.10.x
Macros | Functions
gnunet_bio_lib.h File Reference
#include "gnunet_container_lib.h"
Include dependency graph for gnunet_bio_lib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GNUNET_BIO_read_float(h, f)   (GNUNET_BIO_read_fn(h, __FILE__, __LINE__, f, sizeof(float)))
 Read a float. More...
 
#define GNUNET_BIO_read_double(h, f)   (GNUNET_BIO_read_fn(h, __FILE__, __LINE__, f, sizeof(double)))
 Read a double. More...
 
#define GNUNET_BIO_read_int32(h, i)   GNUNET_BIO_read_int32__(h, __FILE__, __LINE__, (int32_t*)i)
 Read an (u)int32_t. More...
 
#define GNUNET_BIO_read_int64(h, i)   GNUNET_BIO_read_int64__(h, __FILE__, __LINE__, (int64_t*)i)
 Read an (u)int64_t. More...
 
#define GNUNET_BIO_write_float(h, f)   GNUNET_BIO_write(h, &f, sizeof(float))
 Write a float. More...
 
#define GNUNET_BIO_write_double(h, f)   GNUNET_BIO_write(h, &f, sizeof(double))
 Write a double. More...
 

Functions

struct GNUNET_BIO_ReadHandleGNUNET_BIO_read_open (const char *fn)
 Open a file for reading. More...
 
int GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg)
 Close an open file. More...
 
int GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, const char *what, void *result, size_t len)
 Read the contents of a binary file into a buffer. More...
 
int GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h, const char *file, int line, void *result, size_t len)
 Read the contents of a binary file into a buffer. More...
 
int GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, const char *what, char **result, size_t max_length)
 Read 0-terminated string from a file. More...
 
int GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, const char *what, struct GNUNET_CONTAINER_MetaData **result)
 Read metadata container from a file. More...
 
int GNUNET_BIO_read_int32__ (struct GNUNET_BIO_ReadHandle *h, const char *file, int line, int32_t *i)
 Read an (u)int32_t. More...
 
int GNUNET_BIO_read_int64__ (struct GNUNET_BIO_ReadHandle *h, const char *file, int line, int64_t *i)
 Read an (u)int64_t. More...
 
struct GNUNET_BIO_WriteHandleGNUNET_BIO_write_open (const char *fn)
 Open a file for writing. More...
 
int GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h)
 Close an open file for writing. More...
 
int GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, const void *buffer, size_t n)
 Write a buffer to a file. More...
 
int GNUNET_BIO_flush (struct GNUNET_BIO_WriteHandle *h)
 Force a buffered writer to flush its buffer. More...
 
int GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, const char *s)
 Write a string to a file. More...
 
int GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h, const struct GNUNET_CONTAINER_MetaData *m)
 Write metadata container to a file. More...
 
int GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, int32_t i)
 Write an (u)int32_t. More...
 
int GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h, int64_t i)
 Write an (u)int64_t. More...
 

Detailed Description

Author
Christian Grothoff

Buffered IO library

Definition in file gnunet_bio_lib.h.