mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
extended epg2vdr timer interface for schedules
This commit is contained in:
parent
e068cb93fd
commit
9647640dc7
4
HISTORY
4
HISTORY
@ -439,3 +439,7 @@ Version 1.2.4 (horchi)
|
||||
Version 1.2.5 (horchi)
|
||||
|
||||
- added timer type to epg2vdr interface
|
||||
|
||||
Version 1.2.6 (horchi)
|
||||
|
||||
- extended epg2vdr timer interface for schedules
|
||||
|
@ -226,7 +226,7 @@ enum class eDevicesLT {
|
||||
signalquality,
|
||||
channelnumber,
|
||||
channelname,
|
||||
channellogoexists,
|
||||
channellogoexists,
|
||||
channelid,
|
||||
source,
|
||||
count
|
||||
@ -855,6 +855,7 @@ enum class eLeMenuSchedulesST {
|
||||
durationminutes,
|
||||
channelname,
|
||||
channelid,
|
||||
timertype,
|
||||
count
|
||||
};
|
||||
|
||||
@ -879,6 +880,7 @@ enum class eLeMenuSchedulesIT {
|
||||
whatsonfavorites,
|
||||
timerpartitial,
|
||||
timerfull,
|
||||
isremotetimer,
|
||||
hasVPS,
|
||||
count
|
||||
};
|
||||
@ -895,6 +897,7 @@ enum class eCeMenuSchedulesST {
|
||||
channelid,
|
||||
posterpath,
|
||||
bannerpath,
|
||||
timertype,
|
||||
count
|
||||
};
|
||||
|
||||
@ -934,6 +937,7 @@ enum class eCeMenuSchedulesIT {
|
||||
whatsonfavorites,
|
||||
timerpartitial,
|
||||
timerfull,
|
||||
isremotetimer,
|
||||
count
|
||||
};
|
||||
|
||||
@ -1623,7 +1627,7 @@ enum class eLeDisplayTracksST {
|
||||
enum class eCommonAttribs {
|
||||
x = 0,
|
||||
y,
|
||||
width,
|
||||
width,
|
||||
height,
|
||||
debug,
|
||||
count
|
||||
@ -1631,7 +1635,7 @@ enum class eCommonAttribs {
|
||||
|
||||
enum class eViewAttribs {
|
||||
fadetime = 0,
|
||||
shifttime,
|
||||
shifttime,
|
||||
shifttype,
|
||||
shiftmode,
|
||||
startx,
|
||||
@ -1649,7 +1653,7 @@ enum class eViewAttribs {
|
||||
enum class eViewElementAttribs {
|
||||
delay = 0,
|
||||
fadetime,
|
||||
shifttime,
|
||||
shifttime,
|
||||
shifttype,
|
||||
shiftmode,
|
||||
startx,
|
||||
@ -1665,10 +1669,10 @@ enum class eViewListAttribs {
|
||||
align = 0,
|
||||
menuitemwidth,
|
||||
determinatefont,
|
||||
numlistelements,
|
||||
numlistelements,
|
||||
orientation,
|
||||
fadetime,
|
||||
shifttime,
|
||||
shifttime,
|
||||
shifttype,
|
||||
shiftmode,
|
||||
startx,
|
||||
@ -1682,7 +1686,7 @@ enum class eAreaAttribs {
|
||||
layer = 0,
|
||||
transparency,
|
||||
mode,
|
||||
orientation,
|
||||
orientation,
|
||||
scrollelement,
|
||||
scrollspeed,
|
||||
delay,
|
||||
|
@ -683,6 +683,7 @@ void cLeMenuSchedules::SetTokenContainer(void) {
|
||||
tokenContainer->DefineStringToken("{durationminutes}", (int)eLeMenuSchedulesST::durationminutes);
|
||||
tokenContainer->DefineStringToken("{channelname}", (int)eLeMenuSchedulesST::channelname);
|
||||
tokenContainer->DefineStringToken("{channelid}", (int)eLeMenuSchedulesST::channelid);
|
||||
tokenContainer->DefineStringToken("{timertype}", (int)eLeMenuSchedulesST::timertype);
|
||||
tokenContainer->DefineIntToken("{nummenuitem}", (int)eLeMenuSchedulesIT::nummenuitem);
|
||||
tokenContainer->DefineIntToken("{current}", (int)eLeMenuSchedulesIT::current);
|
||||
tokenContainer->DefineIntToken("{separator}", (int)eLeMenuSchedulesIT::separator);
|
||||
@ -703,6 +704,7 @@ void cLeMenuSchedules::SetTokenContainer(void) {
|
||||
tokenContainer->DefineIntToken("{whatsonfavorites}", (int)eLeMenuSchedulesIT::whatsonfavorites);
|
||||
tokenContainer->DefineIntToken("{timerpartitial}", (int)eLeMenuSchedulesIT::timerpartitial);
|
||||
tokenContainer->DefineIntToken("{timerfull}", (int)eLeMenuSchedulesIT::timerfull);
|
||||
tokenContainer->DefineIntToken("{isremotetimer}", (int)eLeMenuSchedulesIT::isremotetimer);
|
||||
tokenContainer->DefineIntToken("{hasVPS}", (int)eLeMenuSchedulesIT::hasVPS);
|
||||
InheritTokenContainer();
|
||||
}
|
||||
@ -780,6 +782,19 @@ bool cLeMenuSchedules::Parse(bool forced) {
|
||||
tokenContainer->AddIntToken((int)eLeMenuSchedulesIT::durationhours, event->Duration() / 3600);
|
||||
tokenContainer->AddStringToken((int)eLeMenuSchedulesST::durationminutes, *cString::sprintf("%.2d", (event->Duration() / 60)%60));
|
||||
tokenContainer->AddIntToken((int)eLeMenuSchedulesIT::hasVPS, (bool)event->Vps());
|
||||
|
||||
if (timerMatch == tmFull || timerMatch == tmPartial) {
|
||||
cTimer_Detail_V1 data;
|
||||
data.eventid = event->EventID();
|
||||
data.hastimer = false;
|
||||
data.local = true;
|
||||
data.type = 'R';
|
||||
if (cPlugin* pEpg2Vdr = cPluginManager::GetPlugin("epg2vdr"))
|
||||
pEpg2Vdr->Service(EPG2VDR_TIMER_DETAIL_SERVICE, &data);
|
||||
tokenContainer->AddIntToken((int)eLeMenuSchedulesIT::isremotetimer, !data.local);
|
||||
char tp[2]; sprintf(tp, "%c", data.type);
|
||||
tokenContainer->AddStringToken((int)eLeMenuSchedulesST::timertype, tp);
|
||||
}
|
||||
} else {
|
||||
char *sep = ParseSeparator(event->Title());
|
||||
tokenContainer->AddStringToken((int)eLeMenuSchedulesST::title, sep);
|
||||
@ -834,6 +849,7 @@ void cCeMenuSchedules::SetTokenContainer(void) {
|
||||
tokenContainer->DefineStringToken("{channelid}", (int)eCeMenuSchedulesST::channelid);
|
||||
tokenContainer->DefineStringToken("{posterpath}", (int)eCeMenuSchedulesST::posterpath);
|
||||
tokenContainer->DefineStringToken("{bannerpath}", (int)eCeMenuSchedulesST::bannerpath);
|
||||
tokenContainer->DefineStringToken("{timertype}", (int)eCeMenuSchedulesST::timertype);
|
||||
tokenContainer->DefineIntToken("{menuitemx}", (int)eCeMenuSchedulesIT::menuitemx);
|
||||
tokenContainer->DefineIntToken("{menuitemy}", (int)eCeMenuSchedulesIT::menuitemy);
|
||||
tokenContainer->DefineIntToken("{menuitemwidth}", (int)eCeMenuSchedulesIT::menuitemwidth);
|
||||
@ -861,6 +877,7 @@ void cCeMenuSchedules::SetTokenContainer(void) {
|
||||
tokenContainer->DefineIntToken("{whatsonfavorites}", (int)eCeMenuSchedulesIT::whatsonfavorites);
|
||||
tokenContainer->DefineIntToken("{timerpartitial}", (int)eCeMenuSchedulesIT::timerpartitial);
|
||||
tokenContainer->DefineIntToken("{timerfull}", (int)eCeMenuSchedulesIT::timerfull);
|
||||
tokenContainer->DefineIntToken("{isremotetimer}", (int)eCeMenuSchedulesIT::isremotetimer);
|
||||
tokenContainer->DefineLoopToken("{schedule[title]}", (int)eCeMenuSchedulesLT::title);
|
||||
tokenContainer->DefineLoopToken("{schedule[shorttext]}", (int)eCeMenuSchedulesLT::shorttext);
|
||||
tokenContainer->DefineLoopToken("{schedule[start]}", (int)eCeMenuSchedulesLT::start);
|
||||
@ -925,8 +942,21 @@ bool cCeMenuSchedules::Parse(bool forced) {
|
||||
}
|
||||
tokenContainer->AddIntToken((int)eCeMenuSchedulesIT::duration, event->Duration() / 60);
|
||||
tokenContainer->AddIntToken((int)eCeMenuSchedulesIT::durationhours, event->Duration() / 3600);
|
||||
|
||||
if (timerMatch == tmFull || timerMatch == tmPartial) {
|
||||
cTimer_Detail_V1 data;
|
||||
data.eventid = event->EventID();
|
||||
data.hastimer = false;
|
||||
data.local = true;
|
||||
data.type = 'R';
|
||||
if (cPlugin* pEpg2Vdr = cPluginManager::GetPlugin("epg2vdr"))
|
||||
pEpg2Vdr->Service(EPG2VDR_TIMER_DETAIL_SERVICE, &data);
|
||||
tokenContainer->AddIntToken((int)eCeMenuSchedulesIT::isremotetimer, !data.local);
|
||||
char tp[2]; sprintf(tp, "%c", data.type);
|
||||
tokenContainer->AddStringToken((int)eCeMenuSchedulesST::timertype, tp);
|
||||
}
|
||||
if (LoadFullScrapInfo(event, NULL))
|
||||
SetScraperPosterBanner(tokenContainer);
|
||||
SetScraperPosterBanner(tokenContainer);
|
||||
}
|
||||
if (channel) {
|
||||
tokenContainer->AddStringToken((int)eCeMenuSchedulesST::channelname, channel->Name());
|
||||
|
@ -17,24 +17,6 @@
|
||||
// Timer - Skin Interface
|
||||
//***************************************************************************
|
||||
|
||||
class cEpgEvent_Interface_V1 : public cEvent
|
||||
{
|
||||
public:
|
||||
|
||||
cEpgEvent_Interface_V1(tEventID EventID)
|
||||
: cEvent(EventID) {}
|
||||
|
||||
// #TODO ... getter
|
||||
|
||||
protected:
|
||||
|
||||
// #TODO ... attributes
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
// Timer - Skin Interface
|
||||
//***************************************************************************
|
||||
|
||||
class cEpgTimer_Interface_V1 : public cTimer
|
||||
{
|
||||
public:
|
||||
@ -90,7 +72,7 @@ class cEpgTimer_Interface_V1 : public cTimer
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
// Timer - Service Interface
|
||||
// Timer Service
|
||||
//***************************************************************************
|
||||
|
||||
struct cEpgTimer_Service_V1
|
||||
@ -98,23 +80,28 @@ struct cEpgTimer_Service_V1
|
||||
std::list<cEpgTimer_Interface_V1*> epgTimers;
|
||||
};
|
||||
|
||||
#define EPG2VDR_TIMER_SERVICE "Epg2Vdr_Timer_Service-v1.0"
|
||||
//***************************************************************************
|
||||
// Timer Detail Service
|
||||
//***************************************************************************
|
||||
|
||||
struct cTimer_Detail_V1
|
||||
{
|
||||
long eventid;
|
||||
int hastimer;
|
||||
int local;
|
||||
char type;
|
||||
};
|
||||
|
||||
#define EPG2VDR_TIMER_DETAIL_SERVICE "Epg2Vdr_Timer_Detail_Service-v1.0"
|
||||
#define EPG2VDR_TIMER_SERVICE "Epg2Vdr_Timer_Service-v1.0"
|
||||
|
||||
#ifdef EPG2VDR
|
||||
|
||||
//***************************************************************************
|
||||
// Class cEpgEvent
|
||||
//***************************************************************************
|
||||
|
||||
class cEpgEvent : public cEpgEvent_Interface_V1
|
||||
{
|
||||
public:
|
||||
|
||||
cEpgEvent(tEventID EventID);
|
||||
virtual ~cEpgEvent() {}
|
||||
|
||||
// #TODO ... setter
|
||||
};
|
||||
//***************************************************************************
|
||||
// EPG2VDR Internal Stuff
|
||||
//***************************************************************************
|
||||
|
||||
//***************************************************************************
|
||||
// Class cEpgTimer
|
||||
@ -124,13 +111,16 @@ class cEpgTimer : public cEpgTimer_Interface_V1
|
||||
{
|
||||
public:
|
||||
|
||||
cEpgTimer(bool Instant = false, bool Pause = false, cChannel* Channel = 0);
|
||||
cEpgTimer(bool Instant = false, bool Pause = false, const cChannel* Channel = 0);
|
||||
virtual ~cEpgTimer();
|
||||
|
||||
void setTimerId(long id) { timerid = id; }
|
||||
void setEventId(long id) { eventid = id; }
|
||||
void setTimerId(long id) { timerid = id; }
|
||||
void setEventId(long id) { eventid = id; }
|
||||
void setAction(char a) { action = a; }
|
||||
void setType(char t) { type = t; }
|
||||
void setCreateTime(time_t t) { createTime = t; }
|
||||
void setModTime(time_t t) { modTime = t; }
|
||||
void setState(char s, const char* info);
|
||||
void setAction(char a);
|
||||
void setVdr(const char* name, const char* uuid = 0, int running = 0);
|
||||
};
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
static const char *VERSION = "1.2.5";
|
||||
static const char *VERSION = "1.2.6";
|
||||
static const char *DESCRIPTION = trNOOP("Skin Designer");
|
||||
|
||||
class cPluginSkinDesigner : public cPlugin, public skindesignerapi::SkindesignerAPI {
|
||||
|
Loading…
Reference in New Issue
Block a user