MOD_IOLAYER_FILE
[MOD_IOLAYER]

Informational Functions



GWENHYWFAR_API int GWEN_Io_LayerFile_GetReadFileDescriptor (const GWEN_IO_LAYER *io)
GWENHYWFAR_API int GWEN_Io_LayerFile_GetWriteFileDescriptor (const GWEN_IO_LAYER *io)

Constructor



GWENHYWFAR_API GWEN_IO_LAYERGWEN_Io_LayerFile_new (int fdRead, int fdWrite)

Makro Defining the Type Name



#define GWEN_IO_LAYER_FILE_TYPE   "file"

Detailed Description

This module provides access to already open files. It supports the following request types:

An io layer of this module is an endpoint since it has no base layer.


Define Documentation

#define GWEN_IO_LAYER_FILE_TYPE   "file"

Definition at line 44 of file io_file.h.

Referenced by GWEN_Io_LayerFile_new().


Function Documentation

GWENHYWFAR_API int GWEN_Io_LayerFile_GetReadFileDescriptor ( const GWEN_IO_LAYER io  ) 

Return the file descriptor used by this io layer for reading. After receiption of a disconnect request the file descriptor is set to -1 unless the flag GWEN_IO_LAYER_FILE_FLAGS_DONTCLOSE is set.

Definition at line 139 of file io_file.c.

References GWEN_INHERIT_GETDATA.

GWENHYWFAR_API int GWEN_Io_LayerFile_GetWriteFileDescriptor ( const GWEN_IO_LAYER io  ) 

Return the file descriptor used by this io layer for writing. After receiption of a disconnect request the file descriptor is set to -1 unless the flag GWEN_IO_LAYER_FILE_FLAGS_DONTCLOSE is set.

Definition at line 151 of file io_file.c.

References GWEN_INHERIT_GETDATA.

GWENHYWFAR_API GWEN_IO_LAYER* GWEN_Io_LayerFile_new ( int  fdRead,
int  fdWrite 
)

Creates a new IO layer using the given file descriptors. Given file descriptors will be modified using fcntl(2) to set the O_NONBLOCKING flag. Upon receiption of a disconnect request the file status flags of the descriptors are reset to the values from before this function was called.

Parameters:
fdRead descriptor for reading (or -1 if reading is not wanted)
fdWrite descriptor for writing (or -1 if writing is not wanted)

Definition at line 40 of file io_file.c.

References DBG_ERROR, GWEN_INHERIT_SETDATA, GWEN_IO_LAYER_FILE_TYPE, GWEN_Io_Layer_new(), GWEN_Io_Layer_SetAddRequestFn(), GWEN_Io_Layer_SetDelRequestFn(), GWEN_Io_Layer_SetHasWaitingRequestsFn(), GWEN_Io_Layer_SetStatus(), GWEN_Io_Layer_SetWorkOnRequestsFn(), GWEN_Io_Layer_StatusConnected, GWEN_Io_LayerFile_AddRequest(), GWEN_Io_LayerFile_DelRequest(), GWEN_Io_LayerFile_freeData(), GWEN_Io_LayerFile_HasWaitingRequests(), GWEN_Io_LayerFile_WorkOnRequests(), GWEN_LOGDOMAIN, GWEN_NEW_OBJECT, and NULL.

Referenced by GWEN_DB_ReadFileAs(), GWEN_DB_ReadFromFd(), GWEN_DB_WriteToFd(), GWEN_DBIO_ExportToFile(), GWEN_DBIO_ImportFromFile(), GWEN_XML_ReadFile(), and GWEN_XMLNode_WriteFile().


Generated on Sat Jan 2 09:32:39 2010 for gwenhywfar by  doxygen 1.6.1