vdr  2.2.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
cDirCopier Class Reference
Collaboration diagram for cDirCopier:
[legend]

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 1660 of file recording.c.

Constructor & Destructor Documentation

◆ cDirCopier()

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

Definition at line 1675 of file recording.c.

References dirNameDst, dirNameSrc, error, and suspensionLogged.

◆ ~cDirCopier()

cDirCopier::~cDirCopier ( )
virtual

Definition at line 1684 of file recording.c.

References Stop().

Member Function Documentation

◆ Action()

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 1705 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().

◆ Error()

bool cDirCopier::Error ( void  )
inline

Definition at line 1672 of file recording.c.

References error.

Referenced by cRecordingsHandlerEntry::Active().

◆ Stop()

void cDirCopier::Stop ( void  )

◆ Throttled()

bool cDirCopier::Throttled ( void  )
private

Definition at line 1689 of file recording.c.

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

Referenced by Action().

Member Data Documentation

◆ dirNameDst

cString cDirCopier::dirNameDst
private

Definition at line 1663 of file recording.c.

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

◆ dirNameSrc

cString cDirCopier::dirNameSrc
private

Definition at line 1662 of file recording.c.

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

◆ error

bool cDirCopier::error
private

Definition at line 1664 of file recording.c.

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

◆ suspensionLogged

bool cDirCopier::suspensionLogged
private

Definition at line 1665 of file recording.c.

Referenced by cDirCopier(), and Throttled().


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