vdr
1.7.27
|
#include <epg.h>
Public Member Functions | |
cSchedule * | AddSchedule (tChannelID ChannelID) |
const cSchedule * | GetSchedule (tChannelID ChannelID) const |
const cSchedule * | GetSchedule (const cChannel *Channel, bool AddIfMissing=false) const |
cSchedule * | AddSchedule (tChannelID ChannelID) |
const cSchedule * | GetSchedule (tChannelID ChannelID) const |
const cSchedule * | GetSchedule (const cChannel *Channel, bool AddIfMissing=false) const |
Static Public Member Functions | |
static void | SetEpgDataFileName (const char *FileName) |
static const cSchedules * | Schedules (cSchedulesLock &SchedulesLock) |
static time_t | Modified (void) |
static void | SetModified (cSchedule *Schedule) |
static void | Cleanup (bool Force=false) |
static void | ResetVersions (void) |
static bool | ClearAll (void) |
static bool | Dump (FILE *f, const char *Prefix="", eDumpMode DumpMode=dmAll, time_t AtTime=0) |
static bool | Read (FILE *f=NULL) |
static void | SetEpgDataFileName (const char *FileName) |
static const cSchedules * | Schedules (cSchedulesLock &SchedulesLock) |
static time_t | Modified (void) |
static void | SetModified (cSchedule *Schedule) |
static void | Cleanup (bool Force=false) |
static void | ResetVersions (void) |
static bool | ClearAll (void) |
static bool | Dump (FILE *f, const char *Prefix="", eDumpMode DumpMode=dmAll, time_t AtTime=0) |
static bool | Read (FILE *f=NULL) |
Private Attributes | |
cRwLock | rwlock |
Static Private Attributes | |
static cSchedules | schedules |
static const char * | epgDataFileName = NULL |
static time_t | lastCleanup = time(NULL) |
static time_t | lastDump = time(NULL) |
static time_t | modified = 0 |
Friends | |
class | cSchedule |
class | cSchedulesLock |
cSchedule * cSchedules::AddSchedule | ( | tChannelID | ChannelID | ) |
Definition at line 1247 of file epg.c.
References cListBase::Add(), Channels, tChannelID::ClrRid(), cSchedule, cChannels::GetByChannelID(), GetSchedule(), and cChannel::schedule.
Referenced by cSchedule::Read().
cSchedule* cSchedules::AddSchedule | ( | tChannelID | ChannelID | ) |
static void cSchedules::Cleanup | ( | bool | Force = false | ) | [static] |
void cSchedules::Cleanup | ( | bool | Force = false | ) | [static] |
Definition at line 1150 of file epg.c.
References Cleanup(), cSafeFile::Close(), Dump(), epgDataFileName, cList< T >::First(), isyslog, lastCleanup, lastDump, LOG_ERROR, cList< T >::Next(), cSafeFile::Open(), ReportEpgBugFixStats(), and Schedules().
Referenced by Cleanup(), ClearAll(), cSVDRP::CmdPUTE(), main(), and cPUTEhandler::Process().
static bool cSchedules::ClearAll | ( | void | ) | [static] |
bool cSchedules::ClearAll | ( | void | ) | [static] |
Definition at line 1191 of file epg.c.
References Cleanup(), cList< T >::First(), cList< T >::Next(), Schedules(), and Timers.
Referenced by cSVDRP::CmdCLRE().
static bool cSchedules::Dump | ( | FILE * | f, |
const char * | Prefix = "" , |
||
eDumpMode | DumpMode = dmAll , |
||
time_t | AtTime = 0 |
||
) | [static] |
bool cSchedules::Dump | ( | FILE * | f, |
const char * | Prefix = "" , |
||
eDumpMode | DumpMode = dmAll , |
||
time_t | AtTime = 0 |
||
) | [static] |
Definition at line 1205 of file epg.c.
References Dump(), cList< T >::First(), cList< T >::Next(), and Schedules().
Referenced by Cleanup(), cSVDRP::CmdLSTE(), and Dump().
const cSchedule * cSchedules::GetSchedule | ( | tChannelID | ChannelID | ) | const |
Definition at line 1261 of file epg.c.
References tChannelID::ClrRid(), cList< cSchedule >::First(), and cList< cSchedule >::Next().
Referenced by AddSchedule(), cEIT::cEIT(), cSVDRP::CmdLSTE(), cMenuWhatsOn::cMenuWhatsOn(), cDisplayChannel::DisplayInfo(), cRecordControl::GetEvent(), GetSchedule(), main(), cMenuSchedule::PrepareScheduleAllAll(), cMenuSchedule::PrepareScheduleAllThis(), cMenuSchedule::PrepareScheduleThisAll(), cMenuSchedule::PrepareScheduleThisThis(), Read(), cMenuChannelItem::Set(), cTimer::SetEventFromSchedule(), and SetTrackDescriptions().
const cSchedule* cSchedules::GetSchedule | ( | tChannelID | ChannelID | ) | const |
const cSchedule * cSchedules::GetSchedule | ( | const cChannel * | Channel, |
bool | AddIfMissing = false |
||
) | const |
Definition at line 1271 of file epg.c.
References cSchedule, cChannel::GetChannelID(), GetSchedule(), tChannelID::InvalidID, and cChannel::schedule.
const cSchedule* cSchedules::GetSchedule | ( | const cChannel * | Channel, |
bool | AddIfMissing = false |
||
) | const |
static time_t cSchedules::Modified | ( | void | ) | [inline, static] |
static time_t cSchedules::Modified | ( | void | ) | [inline, static] |
Definition at line 205 of file include/vdr/epg.h.
References modified.
bool cSchedules::Read | ( | FILE * | f = NULL | ) | [static] |
Definition at line 1217 of file epg.c.
References Channels, dsyslog, epgDataFileName, cList< T >::First(), GetSchedule(), LOG_ERROR, cList< T >::Next(), and Schedules().
Referenced by cEpgDataReader::Action(), cSVDRP::CmdPUTE(), and cPUTEhandler::Process().
static bool cSchedules::Read | ( | FILE * | f = NULL | ) | [static] |
static void cSchedules::ResetVersions | ( | void | ) | [static] |
void cSchedules::ResetVersions | ( | void | ) | [static] |
Definition at line 1181 of file epg.c.
References cList< T >::First(), cList< T >::Next(), ResetVersions(), and Schedules().
Referenced by cMenuSetupEPG::ProcessKey(), and ResetVersions().
const cSchedules * cSchedules::Schedules | ( | cSchedulesLock & | SchedulesLock | ) | [static] |
Caller must provide a cSchedulesLock which has to survive the entire time the returned cSchedules is accessed.
Once the cSchedules is no longer used, the cSchedulesLock must be destroyed.
Definition at line 1133 of file epg.c.
References cSchedulesLock::Locked(), and schedules.
Referenced by Cleanup(), ClearAll(), cSVDRP::CmdCLRE(), cSVDRP::CmdLSTE(), cMenuSchedule::cMenuSchedule(), cRecordControl::cRecordControl(), cDisplayChannel::DisplayInfo(), Dump(), cRecordControl::GetEvent(), main(), cEitFilter::Process(), Read(), ResetVersions(), cMenuChannelItem::Set(), cTimer::SetEventFromSchedule(), cTimers::SetEvents(), and SetTrackDescriptions().
static const cSchedules* cSchedules::Schedules | ( | cSchedulesLock & | SchedulesLock | ) | [static] |
Caller must provide a cSchedulesLock which has to survive the entire time the returned cSchedules is accessed.
Once the cSchedules is no longer used, the cSchedulesLock must be destroyed.
static void cSchedules::SetEpgDataFileName | ( | const char * | FileName | ) | [static] |
void cSchedules::SetEpgDataFileName | ( | const char * | FileName | ) | [static] |
void cSchedules::SetModified | ( | cSchedule * | Schedule | ) | [static] |
Definition at line 1144 of file epg.c.
References modified, and cSchedule::SetModified().
Referenced by cEIT::cEIT(), and cSchedule::Read().
static void cSchedules::SetModified | ( | cSchedule * | Schedule | ) | [static] |
cSchedule [friend] |
Definition at line 190 of file epg.h.
Referenced by AddSchedule(), and GetSchedule().
cSchedulesLock [friend] |
static const char * cSchedules::epgDataFileName = NULL [static, private] |
Definition at line 195 of file epg.h.
Referenced by Cleanup(), Read(), and SetEpgDataFileName().
static time_t cSchedules::lastCleanup = time(NULL) [static, private] |
static time_t cSchedules::lastDump = time(NULL) [static, private] |
static time_t cSchedules::modified = 0 [static, private] |
Definition at line 198 of file epg.h.
Referenced by Modified(), and SetModified().
cRwLock cSchedules::rwlock [private] |
Definition at line 193 of file epg.h.
Referenced by cSchedulesLock::cSchedulesLock(), and cSchedulesLock::~cSchedulesLock().
static cSchedules cSchedules::schedules [static, private] |
Definition at line 194 of file epg.h.
Referenced by cSchedulesLock::cSchedulesLock(), Schedules(), and cSchedulesLock::~cSchedulesLock().