vdr  1.7.31
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
cRecordings Class Reference

#include <recording.h>

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, bool RemoveRecording=true)
void UpdateByName (const char *FileName)
int TotalFileSizeMB (void)
double MBperMinute (void)
 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, bool RemoveRecording=true)
void UpdateByName (const char *FileName)
int TotalFileSizeMB (void)
double MBperMinute (void)
- Public Member Functions inherited from cList< cRecording >
cRecordingGet (int Index) const
cRecordingGet (int Index) const
cRecordingFirst (void) const
cRecordingFirst (void) const
cRecordingLast (void) const
cRecordingLast (void) const
cRecordingPrev (const cRecording *object) const
cRecordingPrev (const cRecording *object) const
cRecordingNext (const cRecording *object) const
cRecordingNext (const cRecording *object) const
- Public Member Functions inherited from cListBase
virtual ~cListBase ()
void Add (cListObject *Object, cListObject *After=NULL)
void Ins (cListObject *Object, cListObject *Before=NULL)
void Del (cListObject *Object, bool DeleteObject=true)
virtual void Move (int From, int To)
void Move (cListObject *From, cListObject *To)
virtual void Clear (void)
int Count (void) const
void Sort (void)
virtual ~cListBase ()
void Add (cListObject *Object, cListObject *After=NULL)
void Ins (cListObject *Object, cListObject *Before=NULL)
void Del (cListObject *Object, bool DeleteObject=true)
virtual void Move (int From, int To)
void Move (cListObject *From, cListObject *To)
virtual void Clear (void)
int Count (void) const
void Sort (void)
- Public Member Functions inherited from cThread
 cThread (const char *Description=NULL)
virtual ~cThread ()
void SetDescription (const char *Description,...) __attribute__((format(printf
void bool Start (void)
bool Active (void)
 cThread (const char *Description=NULL)
virtual ~cThread ()
void SetDescription (const char *Description,...) __attribute__((format(printf
void bool Start (void)
bool Active (void)

Protected Member Functions

void Action (void)
void Action (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)
void SetPriority (int Priority)
void SetIOPriority (int Priority)
void Lock (void)
void Unlock (void)
bool Running (void)
void Cancel (int WaitSeconds=0)

Private Member Functions

const char * UpdateFileName (void)
void Refresh (bool Foreground=false)
void ScanVideoDir (const char *DirName, bool Foreground=false, int LinkLevel=0)
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

Additional Inherited Members

- Static Public Member Functions inherited from cThread
static tThreadId ThreadId (void)
static tThreadId IsMainThread (void)
static void SetMainThreadId (void)
static tThreadId ThreadId (void)
static tThreadId IsMainThread (void)
static void SetMainThreadId (void)
- Protected Attributes inherited from cListBase
cListObjectobjects
cListObjectlastObject
int count

Detailed Description

Definition at line 159 of file include/vdr/recording.h.

Constructor & Destructor Documentation

cRecordings::cRecordings ( bool  Deleted = false)

Definition at line 1120 of file recording.c.

References deleted, lastUpdate, and state.

cRecordings::~cRecordings ( )
virtual

Definition at line 1128 of file recording.c.

References cThread::Cancel().

cRecordings::cRecordings ( bool  Deleted = false)
virtual cRecordings::~cRecordings ( )
virtual

Member Function Documentation

void cRecordings::Action ( void  )
protectedvirtual

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

References Refresh().

void cRecordings::Action ( void  )
protectedvirtual

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.

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

Definition at line 188 of file include/vdr/recording.h.

References state.

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

void cRecordings::ChangeState ( void  )
inline

Definition at line 188 of file recording.h.

References state.

void cRecordings::DelByName ( const char *  FileName,
bool  RemoveRecording = true 
)
void cRecordings::DelByName ( const char *  FileName,
bool  RemoveRecording = true 
)
cRecording * cRecordings::GetByName ( const char *  FileName)
cRecording* cRecordings::GetByName ( const char *  FileName)
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 173 of file include/vdr/recording.h.

References Update().

Referenced by cMenuTimers::Commands().

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 173 of file recording.h.

References Update().

double cRecordings::MBperMinute ( void  )

Returns the average data rate (in MB/min) of all recordings, or -1 if this value is unknown.

Definition at line 1297 of file recording.c.

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

Referenced by cVideoDiskUsage::HasChanged().

double cRecordings::MBperMinute ( void  )

Returns the average data rate (in MB/min) of all recordings, or -1 if this value is unknown.

bool cRecordings::NeedsUpdate ( void  )

Definition at line 1212 of file recording.c.

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

Referenced by main(), and TouchUpdate().

bool cRecordings::NeedsUpdate ( void  )
void cRecordings::Refresh ( bool  Foreground = false)
private
void cRecordings::Refresh ( bool  Foreground = false)
private
void cRecordings::ResetResume ( const char *  ResumeFileName = NULL)
void cRecordings::ResetResume ( const char *  ResumeFileName = NULL)
void cRecordings::ScanVideoDir ( const char *  DirName,
bool  Foreground = false,
int  LinkLevel = 0 
)
private
void cRecordings::ScanVideoDir ( const char *  DirName,
bool  Foreground = false,
int  LinkLevel = 0 
)
private
bool cRecordings::StateChanged ( int &  State)
bool cRecordings::StateChanged ( int &  State)

Definition at line 1196 of file recording.c.

References state.

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

int cRecordings::TotalFileSizeMB ( void  )
int cRecordings::TotalFileSizeMB ( void  )

Definition at line 1285 of file recording.c.

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

Referenced by VideoDiskSpace().

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.

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

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

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

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 anything in the list of recordings, false otherwise.

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 anything in the list of recordings, false otherwise.

Definition at line 1220 of file recording.c.

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

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

void cRecordings::UpdateByName ( const char *  FileName)

Definition at line 1277 of file recording.c.

References GetByName(), LOCK_THREAD, and cRecording::ReadInfo().

Referenced by cRecorder::Action().

void cRecordings::UpdateByName ( const char *  FileName)
const char* cRecordings::UpdateFileName ( void  )
private
const char * cRecordings::UpdateFileName ( void  )
private

Definition at line 1138 of file recording.c.

References AddDirectory(), updateFileName, and VideoDirectory.

Referenced by NeedsUpdate(), and TouchUpdate().

Member Data Documentation

bool cRecordings::deleted
private

Definition at line 162 of file include/vdr/recording.h.

Referenced by cRecordings(), and ScanVideoDir().

time_t cRecordings::lastUpdate
private

Definition at line 163 of file include/vdr/recording.h.

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

int cRecordings::state
private

Definition at line 164 of file include/vdr/recording.h.

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

static char * cRecordings::updateFileName = NULL
staticprivate

Definition at line 161 of file include/vdr/recording.h.

Referenced by UpdateFileName().


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