vdr  2.4.0
Macros | Functions
timers.c File Reference
#include "timers.h"
#include <ctype.h>
#include "device.h"
#include "i18n.h"
#include "libsi/si.h"
#include "recording.h"
#include "remote.h"
#include "status.h"
#include "svdrp.h"
Include dependency graph for timers.c:

Go to the source code of this file.

Macros

#define DAYBUFFERSIZE   64
 
#define EITPRESENTFOLLOWINGRATE   10
 
#define FULLMATCH   1000
 
#define EXPIRELATENCY   60
 
#define EPGLIMITBEFORE   (1 * 3600)
 
#define EPGLIMITAFTER   (1 * 3600)
 

Functions

static bool RemoteTimerError (const cTimer *Timer, cString *Msg)
 
bool HandleRemoteTimerModifications (cTimer *NewTimer, cTimer *OldTimer, cString *Msg)
 
static int CompareTimers (const void *a, const void *b)
 

Macro Definition Documentation

◆ DAYBUFFERSIZE

#define DAYBUFFERSIZE   64

◆ EITPRESENTFOLLOWINGRATE

#define EITPRESENTFOLLOWINGRATE   10

Definition at line 413 of file timers.c.

◆ EPGLIMITAFTER

#define EPGLIMITAFTER   (1 * 3600)

Definition at line 538 of file timers.c.

◆ EPGLIMITBEFORE

#define EPGLIMITBEFORE   (1 * 3600)

Definition at line 537 of file timers.c.

◆ EXPIRELATENCY

#define EXPIRELATENCY   60

Definition at line 513 of file timers.c.

◆ FULLMATCH

#define FULLMATCH   1000

Definition at line 475 of file timers.c.

Function Documentation

◆ CompareTimers()

static int CompareTimers ( const void *  a,
const void *  b 
)
static

Definition at line 1088 of file timers.c.

Referenced by cSortedTimers::cSortedTimers().

◆ 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:

◆ RemoteTimerError()

static bool RemoteTimerError ( const cTimer Timer,
cString Msg 
)
static

Definition at line 1020 of file timers.c.

References cTimer::Id(), cTimer::Remote(), cString::sprintf(), and tr.

Referenced by HandleRemoteTimerModifications().