vdr  2.2.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
cDirCopier Class Reference

Public Member Functions

 cDirCopier (const char *DirNameSrc, const char *DirNameDst)
 
virtual ~cDirCopier ()
 
void Stop (void)
 
bool Error (void)
 
- Public Member Functions inherited from cThread
 cThread (const char *Description=NULL, bool LowPriority=false)
 
virtual ~cThread ()
 
void SetDescription (const char *Description,...) __attribute__((format(printf
 
void bool Start (void)
 
bool Active (void)
 

Private Member Functions

bool Throttled (void)
 
virtual void Action (void)
 

Private Attributes

cString dirNameSrc
 
cString dirNameDst
 
bool error
 
bool suspensionLogged
 

Additional Inherited Members

- Static Public Member Functions inherited from cThread
static tThreadId ThreadId (void)
 
static tThreadId IsMainThread (void)
 
static void SetMainThreadId (void)
 
- Protected Member Functions inherited from cThread
void SetPriority (int Priority)
 
void SetIOPriority (int Priority)
 
void Lock (void)
 
void Unlock (void)
 
bool Running (void)
 
void Cancel (int WaitSeconds=0)
 

Detailed Description

Definition at line 1659 of file recording.c.

Constructor & Destructor Documentation

cDirCopier::cDirCopier ( const char *  DirNameSrc,
const char *  DirNameDst 
)

Definition at line 1674 of file recording.c.

References dirNameDst, dirNameSrc, error, and suspensionLogged.

Referenced by cRecordingsHandlerEntry::Active().

cDirCopier::~cDirCopier ( )
virtual

Definition at line 1683 of file recording.c.

References Stop().

Member Function Documentation

void cDirCopier::Action ( void  )
privatevirtual

A derived cThread class must implement the code it wants to execute as a separate thread in this function.

If this is a loop, it must check Running() repeatedly to see whether it's time to stop.

Implements cThread.

Definition at line 1704 of file recording.c.

References AddDirectory(), DirectoryOk(), dirNameDst, dirNameSrc, dsyslog, error, esyslog, FileSize(), max(), cReadDir::Next(), cReadDir::Ok(), cThread::Running(), safe_read(), safe_write(), cCondWait::SleepMs(), and Throttled().

bool cDirCopier::Error ( void  )
inline

Definition at line 1671 of file recording.c.

Referenced by cRecordingsHandlerEntry::FileNameDst().

void cDirCopier::Stop ( void  )
bool cDirCopier::Throttled ( void  )
private

Definition at line 1688 of file recording.c.

References dsyslog, cIoThrottle::Engaged(), and suspensionLogged.

Referenced by Action().

Member Data Documentation

cString cDirCopier::dirNameDst
private

Definition at line 1662 of file recording.c.

Referenced by Action(), cDirCopier(), and Stop().

cString cDirCopier::dirNameSrc
private

Definition at line 1661 of file recording.c.

Referenced by Action(), cDirCopier(), and Stop().

bool cDirCopier::error
private
bool cDirCopier::suspensionLogged
private

Definition at line 1664 of file recording.c.

Referenced by cDirCopier(), and Throttled().


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