cRecordings Class Reference

#include <recording.h>

Inheritance diagram for cRecordings:

Inheritance graph
[legend]
Collaboration diagram for cRecordings:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cRecordings (bool Deleted=false)
virtual ~cRecordings ()
bool Load (void)
bool Update (bool Wait=false)
void TouchUpdate (void)
bool NeedsUpdate (void)
void ChangeState (void)
bool StateChanged (int &State)
void ResetResume (const char *ResumeFileName=NULL)
cRecordingGetByName (const char *FileName)
void AddByName (const char *FileName, bool TriggerUpdate=true)
void DelByName (const char *FileName)
int TotalFileSizeMB (void)
 Only for deleted recordings!

Protected Member Functions

void Action (void)

Private Member Functions

const char * UpdateFileName (void)
void Refresh (bool Foreground=false)
void ScanVideoDir (const char *DirName, bool Foreground=false, int LinkLevel=0)

Private Attributes

bool deleted
time_t lastUpdate
int state

Static Private Attributes

static char * updateFileName = NULL


Detailed Description

Definition at line 127 of file recording.h.


Constructor & Destructor Documentation

cRecordings::cRecordings ( bool  Deleted = false  ) 

Definition at line 1002 of file recording.c.

References deleted, lastUpdate, and state.

cRecordings::~cRecordings (  )  [virtual]

Definition at line 1010 of file recording.c.

References cThread::Cancel().

Here is the call graph for this function:


Member Function Documentation

const char * cRecordings::UpdateFileName ( void   )  [private]

Definition at line 1020 of file recording.c.

References AddDirectory(), updateFileName, and VideoDirectory.

Referenced by NeedsUpdate(), and TouchUpdate().

Here is the call graph for this function:

void cRecordings::Refresh ( bool  Foreground = false  )  [private]

Definition at line 1027 of file recording.c.

References ChangeState(), cListBase::Clear(), lastUpdate, cThread::Lock(), ScanVideoDir(), cThread::Unlock(), and VideoDirectory.

Referenced by Action(), and Update().

Here is the call graph for this function:

void cRecordings::ScanVideoDir ( const char *  DirName,
bool  Foreground = false,
int  LinkLevel = 0 
) [private]

void cRecordings::Action ( void   )  [protected, virtual]

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

References Refresh().

Here is the call graph for this function:

bool cRecordings::Load ( void   )  [inline]

Loads the current list of recordings and returns true if there is anything in it (for compatibility with older plugins - use Update(true) instead).

Definition at line 141 of file recording.h.

References Update().

Here is the call graph for this function:

bool cRecordings::Update ( bool  Wait = false  ) 

Triggers an update of the list of recordings, which will run as a separate thread if Wait is false. If Wait is true, the function returns only after the update has completed. Returns true if Wait is true and there is anyting in the list of recordings, false otherwise.

Definition at line 1112 of file recording.c.

References cListBase::Count(), Refresh(), and cThread::Start().

Referenced by AssertFreeDiskSpace(), cSVDRP::CmdLSTR(), Load(), and main().

Here is the call graph for this function:

void cRecordings::TouchUpdate ( void   ) 

Touches the '.update' file in the video directory, so that other instances of VDR that access the same video directory can be triggered to update their recordings list.

Definition at line 1096 of file recording.c.

References lastUpdate, NeedsUpdate(), TouchFile(), and UpdateFileName().

Referenced by cCuttingThread::Action(), AddByName(), and DelByName().

Here is the call graph for this function:

bool cRecordings::NeedsUpdate ( void   ) 

Definition at line 1104 of file recording.c.

References LastModifiedTime(), lastUpdate, and UpdateFileName().

Referenced by main(), and TouchUpdate().

Here is the call graph for this function:

void cRecordings::ChangeState ( void   )  [inline]

Definition at line 156 of file recording.h.

References state.

Referenced by AddByName(), DelByName(), Refresh(), ResetResume(), and ScanVideoDir().

bool cRecordings::StateChanged ( int &  State  ) 

Definition at line 1088 of file recording.c.

References state.

Referenced by cMenuRecordings::cMenuRecordings(), and cMenuRecordings::ProcessKey().

void cRecordings::ResetResume ( const char *  ResumeFileName = NULL  ) 

Definition at line 1179 of file recording.c.

References ChangeState(), cList< cRecording >::First(), LOCK_THREAD, and cList< cRecording >::Next().

Referenced by cResumeFile::Delete(), cResumeFile::Save(), and cMenuSetupReplay::Store().

Here is the call graph for this function:

cRecording * cRecordings::GetByName ( const char *  FileName  ) 

void cRecordings::AddByName ( const char *  FileName,
bool  TriggerUpdate = true 
)

Definition at line 1134 of file recording.c.

References cListBase::Add(), ChangeState(), GetByName(), LOCK_THREAD, and TouchUpdate().

Referenced by cRecordControl::cRecordControl(), and cCutter::Start().

Here is the call graph for this function:

void cRecordings::DelByName ( const char *  FileName  ) 

int cRecordings::TotalFileSizeMB ( void   ) 

Only for deleted recordings!

Definition at line 1168 of file recording.c.

References cList< cRecording >::First(), IsOnVideoDirectoryFileSystem(), LOCK_THREAD, and cList< cRecording >::Next().

Referenced by VideoDiskSpace().

Here is the call graph for this function:


Member Data Documentation

char * cRecordings::updateFileName = NULL [static, private]

Definition at line 129 of file recording.h.

Referenced by UpdateFileName().

bool cRecordings::deleted [private]

Definition at line 130 of file recording.h.

Referenced by cRecordings(), and ScanVideoDir().

time_t cRecordings::lastUpdate [private]

Definition at line 131 of file recording.h.

Referenced by cRecordings(), NeedsUpdate(), Refresh(), and TouchUpdate().

int cRecordings::state [private]

Definition at line 132 of file recording.h.

Referenced by ChangeState(), cRecordings(), and StateChanged().


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

Generated on Tue Jan 13 14:31:33 2009 for VDR by  doxygen 1.5.6