vdr 2.8.3
cFile Class Reference

#include <tools.h>

Public Member Functions

 cFile (void)
 ~cFile ()
 operator int ()
bool Open (const char *FileName, int Flags, mode_t Mode=DEFFILEMODE)
bool Open (int FileDes, bool Owner=true)
void Close (void)
bool IsOpen (void)
bool Ready (bool Wait=true)

Static Public Member Functions

static bool FileReady (int FileDes, int TimeoutMs=1000)

Private Attributes

int f
bool owner

Detailed Description

Definition at line 480 of file tools.h.

Constructor & Destructor Documentation

◆ cFile()

cFile::cFile ( void )

Definition at line 1731 of file tools.c.

References f, and owner.

◆ ~cFile()

cFile::~cFile ( )

Definition at line 1737 of file tools.c.

References Close().

Member Function Documentation

◆ Close()

void cFile::Close ( void )

Definition at line 1763 of file tools.c.

References f, and owner.

Referenced by cSVDRPClient::Close(), cSVDRPServer::Close(), and ~cFile().

◆ FileReady()

bool cFile::FileReady ( int FileDes,
int TimeoutMs = 1000 )
static

Definition at line 1777 of file tools.c.

Referenced by cLircUsrRemote::Action(), and Ready().

◆ IsOpen()

bool cFile::IsOpen ( void )
inline

◆ Open() [1/2]

bool cFile::Open ( const char * FileName,
int Flags,
mode_t Mode = DEFFILEMODE )

Definition at line 1742 of file tools.c.

References esyslog, IsOpen(), and Open().

Referenced by cSVDRPClient::cSVDRPClient(), cSVDRPServer::cSVDRPServer(), and Open().

◆ Open() [2/2]

bool cFile::Open ( int FileDes,
bool Owner = true )

Set Owner to false if FileDes shall not be closed by this cFile.

Definition at line 1750 of file tools.c.

References esyslog, f, IsOpen(), and owner.

◆ operator int()

cFile::operator int ( )
inline

Definition at line 487 of file tools.h.

References f.

◆ Ready()

bool cFile::Ready ( bool Wait = true)

Definition at line 1772 of file tools.c.

References f, and FileReady().

Referenced by cSVDRPClient::Process(), and cSVDRPServer::Process().

Member Data Documentation

◆ f

int cFile::f
private

Definition at line 482 of file tools.h.

Referenced by cFile(), Close(), IsOpen(), Open(), operator int(), and Ready().

◆ owner

bool cFile::owner
private

Definition at line 483 of file tools.h.

Referenced by cFile(), Close(), and Open().


The documentation for this class was generated from the following files: