#include "bio_file_p.h"
#include <gwenhywfar/misc.h>
#include <gwenhywfar/text.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <gwenhywfar/debug.h>
Go to the source code of this file.
Defines | |
#define | DISABLE_DEBUGLOG |
Functions | |
int | GWEN_BufferedIO_File__Close (GWEN_BUFFEREDIO *dm) |
int | GWEN_BufferedIO_File__Read (GWEN_BUFFEREDIO *dm, char *buffer, int *size, int timeout) |
int | GWEN_BufferedIO_File__Write (GWEN_BUFFEREDIO *dm, const char *buffer, int *size, int timeout) |
void GWENHYWFAR_CB | GWEN_BufferedIO_File_FreeData (void *bp, void *p) |
GWEN_BUFFEREDIO * | GWEN_BufferedIO_File_new (int fd) |
void | GWEN_BufferedIO_File_Table__free (GWEN_BUFFEREDIO_FILE *bft) |
GWEN_BUFFEREDIO_FILE * | GWEN_BufferedIO_File_Table__new () |
#define DISABLE_DEBUGLOG |
Definition at line 33 of file bio_file.c.
int GWEN_BufferedIO_File__Close | ( | GWEN_BUFFEREDIO * | dm | ) |
Definition at line 132 of file bio_file.c.
References DBG_ERROR, GWEN_ERROR_CLOSE, GWEN_INHERIT_GETDATA, and GWEN_LOGDOMAIN.
Referenced by GWEN_BufferedIO_File_new().
int GWEN_BufferedIO_File__Read | ( | GWEN_BUFFEREDIO * | dm, | |
char * | buffer, | |||
int * | size, | |||
int | timeout | |||
) |
Definition at line 70 of file bio_file.c.
References DBG_DEBUG, DBG_ERROR, DBG_WARN, GWEN_ERROR_READ, GWEN_INHERIT_GETDATA, and GWEN_LOGDOMAIN.
Referenced by GWEN_BufferedIO_File_new().
int GWEN_BufferedIO_File__Write | ( | GWEN_BUFFEREDIO * | dm, | |
const char * | buffer, | |||
int * | size, | |||
int | timeout | |||
) |
Definition at line 103 of file bio_file.c.
References DBG_ERROR, DBG_WARN, GWEN_ERROR_WRITE, GWEN_INHERIT_GETDATA, and GWEN_LOGDOMAIN.
Referenced by GWEN_BufferedIO_File_new().
void GWENHYWFAR_CB GWEN_BufferedIO_File_FreeData | ( | void * | bp, | |
void * | p | |||
) |
Definition at line 152 of file bio_file.c.
References GWEN_BufferedIO_File_Table__free().
Referenced by GWEN_BufferedIO_File_new().
GWEN_BUFFEREDIO* GWEN_BufferedIO_File_new | ( | int | fd | ) |
Create a buffered IO context using an already open file. This file will automatically be closed upon GWEN_BufferedIO_Close (unless it is stdin, stdout or stderr). This context can be free'd using GWEN_BufferedIO_free.
Definition at line 161 of file bio_file.c.
References GWEN_BufferedIO_File__Close(), GWEN_BufferedIO_File__Read(), GWEN_BufferedIO_File__Write(), GWEN_BufferedIO_File_FreeData(), GWEN_BufferedIO_File_Table__new(), GWEN_BufferedIO_new(), GWEN_BufferedIO_SetCloseFn(), GWEN_BufferedIO_SetReadFn(), GWEN_BufferedIO_SetTimeout(), GWEN_BufferedIO_SetWriteFn(), and GWEN_INHERIT_SETDATA.
void GWEN_BufferedIO_File_Table__free | ( | GWEN_BUFFEREDIO_FILE * | bft | ) |
Definition at line 64 of file bio_file.c.
References GWEN_FREE_OBJECT.
Referenced by GWEN_BufferedIO_File_FreeData().
GWEN_BUFFEREDIO_FILE* GWEN_BufferedIO_File_Table__new | ( | ) |
Definition at line 54 of file bio_file.c.
References GWEN_NEW_OBJECT.
Referenced by GWEN_BufferedIO_File_new().