vdr  2.4.1
Classes | Macros | Enumerations | Functions
timers.h File Reference
#include "channels.h"
#include "config.h"
#include "epg.h"
#include "tools.h"

Go to the source code of this file.

Classes

class  cTimer
 
class  cTimers
 
class  cSortedTimers
 

Macros

#define LOCK_TIMERS_READ   USE_LIST_LOCK_READ(Timers)
 
#define LOCK_TIMERS_WRITE   USE_LIST_LOCK_WRITE(Timers)
 

Enumerations

enum  eTimerFlags {
  tfNone = 0x0000, tfActive = 0x0001, tfInstant = 0x0002, tfVps = 0x0004,
  tfRecording = 0x0008, tfAll = 0xFFFF
}
 
enum  eTimerMatch { tmNone, tmPartial, tmFull }
 

Functions

bool HandleRemoteTimerModifications (cTimer *NewTimer, cTimer *OldTimer=NULL, cString *Msg=NULL)
 
 DEF_LIST_LOCK (Timers)
 

Macro Definition Documentation

◆ LOCK_TIMERS_READ

#define LOCK_TIMERS_READ   USE_LIST_LOCK_READ(Timers)

Definition at line 223 of file timers.h.

◆ LOCK_TIMERS_WRITE

#define LOCK_TIMERS_WRITE   USE_LIST_LOCK_WRITE(Timers)

Definition at line 224 of file timers.h.

Enumeration Type Documentation

◆ eTimerFlags

Enumerator
tfNone 
tfActive 
tfInstant 
tfVps 
tfRecording 
tfAll 

Definition at line 18 of file timers.h.

◆ eTimerMatch

Enumerator
tmNone 
tmPartial 
tmFull 

Definition at line 25 of file timers.h.

Function Documentation

◆ DEF_LIST_LOCK()

DEF_LIST_LOCK ( Timers  )

◆ HandleRemoteTimerModifications()

bool HandleRemoteTimerModifications ( cTimer NewTimer,
cTimer OldTimer = NULL,
cString Msg = NULL 
)

Performs any operations necessary to synchronize changes to a timer between peer VDR machines.

OldTimer must point to the old version of the timer, while NewTimer points to the new version. If either of the two is a remote timer, the necessary SVDRP commands are executed to reflect the changes on the remote machine(s). If NewTimer is NULL, OldTimer will be removed from the remote machine (if applicable). If OldTimer is NULL, NewTimer will be added to the remote machine (if applicable). If anything goes wrong, an error message is generated in the optional Msg string, which should be presented to the user. Any necessary local operations (like adding/deleting the timer to the local list of timers etc.) must be done before and/or after the call to this function. Proper log messages will be generated by this function, even if no remote operations are required. Returns true if successful.

Definition at line 1027 of file timers.c.

References cTimer::ClrFlags(), ExecSVDRPCommand(), cTimer::Id(), isyslog, cTimer::Local(), cTimers::NewTimerId(), cTimer::Remote(), RemoteTimerError(), cTimer::SetId(), cString::sprintf(), SVDRPCode(), SVDRPValue(), tfRecording, cTimer::ToDescr(), and cTimer::ToText().

Referenced by HandleRemoteModifications().

Here is the caller graph for this function: