Ask user for storing overlapping CI timer from epg

Origin commit data
------------------
Commit: 7543aa602c
Author: FlatTV <FlatTV@gmx.de>
Date: 2016-07-10 (Sun, 10 Jul 2016)
This commit is contained in:
FlatTV
2016-07-10 21:44:30 +02:00
parent 918c1cb45a
commit bcc4103260
10 changed files with 50 additions and 10 deletions

View File

@@ -115,6 +115,7 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd)
resp.apids = ev->eventInfo.apids;
strcpy(resp.recordingDir, ev->recordingDir.substr(0,sizeof(resp.recordingDir)-1).c_str());
strcpy(resp.epgTitle, ev->epgTitle.substr(0,sizeof(resp.epgTitle)-1).c_str());
resp.channel_ci = ev->eventInfo.channel_ci; //NI
}
else if(event->eventType == CTimerd::TIMER_ZAPTO)
{
@@ -184,6 +185,7 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd)
lresp.apids = ev->eventInfo.apids;
strcpy(lresp.recordingDir, ev->recordingDir.substr(0,sizeof(lresp.recordingDir)-1).c_str());
strcpy(lresp.epgTitle, ev->epgTitle.substr(0,sizeof(lresp.epgTitle)-1).c_str());
lresp.channel_ci = ev->eventInfo.channel_ci; //NI
}
else if(event->eventType == CTimerd::TIMER_ZAPTO)
{
@@ -321,7 +323,8 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd)
recInfo.apids,
msgAddTimer.eventRepeat,
msgAddTimer.repeatCount,
recInfo.recordingDir);
recInfo.recordingDir,
recInfo.channel_ci); //NI
rspAddTimer.eventID = CTimerManager::getInstance()->addEvent(event);
break;

View File

@@ -1134,13 +1134,14 @@ CTimerEvent_Record::CTimerEvent_Record(time_t announce_Time, time_t alarm_Time,
event_id_t epgID,
time_t epg_starttime, unsigned char apids,
CTimerd::CTimerEventRepeat evrepeat,
uint32_t repeatcount, const std::string &recDir) :
uint32_t repeatcount, const std::string &recDir,/*NI*/bool channel_ci) :
CTimerEvent(getEventType(), announce_Time, alarm_Time, stop_Time, evrepeat, repeatcount)
{
eventInfo.epgID = epgID;
eventInfo.epg_starttime = epg_starttime;
eventInfo.channel_id = channel_id;
eventInfo.apids = apids;
eventInfo.channel_ci = channel_ci; //NI
recordingDir = recDir;
epgTitle="";
CShortEPGData epgdata;
@@ -1172,6 +1173,9 @@ CTimerEvent_Record::CTimerEvent_Record(CConfigFile *config, int iId):
epgTitle = config->getString("EPG_TITLE_"+id);
dprintf("read EPG_TITLE_%s %s (%p)\n",id.c_str(),epgTitle.c_str(),&epgTitle);
//NI
eventInfo.channel_ci = config->getBool("EVENT_INFO_CHANNEL_CI_"+id);
dprintf("read EVENT_INFO_CHANNEL_CI_%s %i\n",id.c_str(),eventInfo.channel_ci);
}
//------------------------------------------------------------
void CTimerEvent_Record::fireEvent()
@@ -1238,6 +1242,9 @@ void CTimerEvent_Record::saveToConfig(CConfigFile *config)
config->setString("EPG_TITLE_"+id,epgTitle);
dprintf("set EPG_TITLE_%s to %s (%p)\n",id.c_str(),epgTitle.c_str(), &epgTitle);
//NI
config->setBool("EVENT_INFO_CHANNEL_CI_"+id, eventInfo.channel_ci);
dprintf("set EVENT_INFO_CHANNEL_CI_%s to %i\n",id.c_str(),eventInfo.channel_ci);
}
//------------------------------------------------------------
void CTimerEvent_Record::Reschedule()

View File

@@ -123,7 +123,7 @@ class CTimerEvent_Record : public CTimerEvent
time_t epg_starttime = 0,
unsigned char apids = TIMERD_APIDS_STD,
CTimerd::CTimerEventRepeat evrepeat = CTimerd::TIMERREPEAT_ONCE,
uint32_t repeatcount = 1, const std::string &recDir = "");
uint32_t repeatcount = 1, const std::string &recDir = "",/*NI*/bool channel_ci=false);
CTimerEvent_Record(CConfigFile *config, int iId);
virtual ~CTimerEvent_Record(){};
virtual CTimerd::CTimerEventTypes getEventType(void) const { return CTimerd::TIMER_RECORD; };