vdr  2.6.1
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"

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)
 
#define DELETE_EXPIRED_TIMEOUT   30
 

Functions

static bool MatchPattern (const char *Pattern, const char *Title, cString *Before=NULL, cString *Match=NULL, cString *After=NULL)
 
static cString MakePatternFileName (const char *Pattern, const char *Title, const char *Episode, const char *File)
 
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

◆ DELETE_EXPIRED_TIMEOUT

#define DELETE_EXPIRED_TIMEOUT   30

Definition at line 1241 of file timers.c.

◆ EITPRESENTFOLLOWINGRATE

#define EITPRESENTFOLLOWINGRATE   10

Definition at line 558 of file timers.c.

◆ EPGLIMITAFTER

#define EPGLIMITAFTER   (1 * 3600)

Definition at line 742 of file timers.c.

◆ EPGLIMITBEFORE

#define EPGLIMITBEFORE   (1 * 3600)

Definition at line 741 of file timers.c.

◆ EXPIRELATENCY

#define EXPIRELATENCY   60

Definition at line 692 of file timers.c.

◆ FULLMATCH

#define FULLMATCH   1000

Definition at line 636 of file timers.c.

Function Documentation

◆ CompareTimers()

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

Definition at line 1443 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 1382 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(), and cTimer::SpawnPatternTimer().

◆ MakePatternFileName()

static cString MakePatternFileName ( const char *  Pattern,
const char *  Title,
const char *  Episode,
const char *  File 
)
static

◆ MatchPattern()

static bool MatchPattern ( const char *  Pattern,
const char *  Title,
cString Before = NULL,
cString Match = NULL,
cString After = NULL 
)
static

◆ RemoteTimerError()

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

Definition at line 1375 of file timers.c.

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

Referenced by HandleRemoteTimerModifications().