diff --git a/lib/sectionsdclient/sectionsdclient.cpp b/lib/sectionsdclient/sectionsdclient.cpp index 77628130d..46d953ea7 100644 --- a/lib/sectionsdclient/sectionsdclient.cpp +++ b/lib/sectionsdclient/sectionsdclient.cpp @@ -242,7 +242,7 @@ void CSectionsdClient::dumpStatus() } #if 0 -bool CSectionsdClient::getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::ComponentTagList& tags) +bool CSectionsdClient::getComponentTagsUniqueKey(const t_event_id uniqueKey, CSectionsdClient::ComponentTagList& tags) { if (send(sectionsd::ComponentTagsUniqueKey, (char*)&uniqueKey, sizeof(uniqueKey))) { @@ -283,7 +283,7 @@ bool CSectionsdClient::getComponentTagsUniqueKey(const event_id_t uniqueKey, CSe } } -bool CSectionsdClient::getLinkageDescriptorsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::LinkageDescriptorList& descriptors) +bool CSectionsdClient::getLinkageDescriptorsUniqueKey(const t_event_id uniqueKey, CSectionsdClient::LinkageDescriptorList& descriptors) { if (send(sectionsd::LinkageDescriptorsUniqueKey, (char*)&uniqueKey, sizeof(uniqueKey))) { @@ -368,16 +368,16 @@ bool CSectionsdClient::getCurrentNextServiceKey(const t_channel_id channel_id, C char* dp = pData; // current - current_next.current_uniqueKey = *((event_id_t *)dp); - dp+= sizeof(event_id_t); + current_next.current_uniqueKey = *((t_event_id *)dp); + dp+= sizeof(t_event_id); current_next.current_zeit = *(CSectionsdClient::sectionsdTime*) dp; dp+= sizeof(CSectionsdClient::sectionsdTime); current_next.current_name = dp; dp+=strlen(dp)+1; // next - current_next.next_uniqueKey = *((event_id_t *)dp); - dp+= sizeof(event_id_t); + current_next.next_uniqueKey = *((t_event_id *)dp); + dp+= sizeof(t_event_id); current_next.next_zeit = *(CSectionsdClient::sectionsdTime*) dp; dp+= sizeof(CSectionsdClient::sectionsdTime); current_next.next_name = dp; @@ -419,7 +419,7 @@ CChannelEventList CSectionsdClient::getChannelEvents(const bool tv_mode, t_chann { CChannelEvent aEvent; - aEvent.eventID = *((event_id_t *) dp); + aEvent.eventID = *((t_event_id *) dp); dp+=sizeof(aEvent.eventID); aEvent.startTime = *((time_t *) dp); @@ -486,7 +486,7 @@ bool CSectionsdClient::getEventsServiceKeySearchAdd(CChannelEventList& eList,con { CChannelEvent aEvent; - aEvent.eventID = *((event_id_t *) dp); + aEvent.eventID = *((t_event_id *) dp); dp+=sizeof(aEvent.eventID); aEvent.startTime = *((time_t *) dp); @@ -532,7 +532,7 @@ CChannelEventList CSectionsdClient::getEventsServiceKey(const t_channel_id chann { CChannelEvent aEvent; - aEvent.eventID = *((event_id_t *) dp); + aEvent.eventID = *((t_event_id *) dp); dp+=sizeof(aEvent.eventID); aEvent.startTime = *((time_t *) dp); @@ -654,7 +654,7 @@ bool CSectionsdClient::getActualEPGServiceKey(const t_channel_id channel_id, CEP char* dp = pData; - epgdata->eventID = *((event_id_t *)dp); + epgdata->eventID = *((t_event_id *)dp); dp+= sizeof(epgdata->eventID); epgdata->title = dp; @@ -692,7 +692,7 @@ bool CSectionsdClient::getActualEPGServiceKey(const t_channel_id channel_id, CEP return false; } -bool CSectionsdClient::getEPGid(const event_id_t eventid, const time_t starttime, CEPGData * epgdata) +bool CSectionsdClient::getEPGid(const t_event_id eventid, const time_t starttime, CEPGData * epgdata) { sectionsd::commandGetEPGid msg; @@ -710,7 +710,7 @@ bool CSectionsdClient::getEPGid(const event_id_t eventid, const time_t starttime char* dp = pData; - epgdata->eventID = *((event_id_t *)dp); + epgdata->eventID = *((t_event_id *)dp); dp+= sizeof(epgdata->eventID); epgdata->title = dp; @@ -747,7 +747,7 @@ bool CSectionsdClient::getEPGid(const event_id_t eventid, const time_t starttime return false; } -bool CSectionsdClient::getEPGidShort(const event_id_t eventid, CShortEPGData * epgdata) +bool CSectionsdClient::getEPGidShort(const t_event_id eventid, CShortEPGData * epgdata) { if (send(sectionsd::epgEPGidShort, (char*)&eventid, sizeof(eventid))) { diff --git a/lib/sectionsdclient/sectionsdclient.h b/lib/sectionsdclient/sectionsdclient.h index 4f119a607..6da654668 100644 --- a/lib/sectionsdclient/sectionsdclient.h +++ b/lib/sectionsdclient/sectionsdclient.h @@ -44,7 +44,7 @@ class CChannelEvent { public: t_channel_id get_channel_id(void) const { return GET_CHANNEL_ID_FROM_EVENT_ID(eventID); } - event_id_t eventID; + t_event_id eventID; std::string description; std::string text; time_t startTime; @@ -139,11 +139,11 @@ class CSectionsdClient : private CBasicClient struct responseGetCurrentNextInfoChannelID { - event_id_t current_uniqueKey; + t_event_id current_uniqueKey; CSectionsdClient::sectionsdTime current_zeit; std::string current_name; char current_fsk; - event_id_t next_uniqueKey; + t_event_id next_uniqueKey; CSectionsdClient::sectionsdTime next_zeit; std::string next_name; unsigned flags; @@ -176,16 +176,16 @@ class CSectionsdClient : private CBasicClient } epg_config; #if 0 - bool getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::ComponentTagList& tags); - bool getLinkageDescriptorsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::LinkageDescriptorList& descriptors); + bool getComponentTagsUniqueKey(const t_event_id uniqueKey, CSectionsdClient::ComponentTagList& tags); + bool getLinkageDescriptorsUniqueKey(const t_event_id uniqueKey, CSectionsdClient::LinkageDescriptorList& descriptors); bool getNVODTimesServiceKey(const t_channel_id channel_id, CSectionsdClient::NVODTimesList& nvod_list); bool getCurrentNextServiceKey(const t_channel_id channel_id, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next); CChannelEventList getChannelEvents(const bool tv_mode = true, t_channel_id* = NULL, int size = 0); CChannelEventList getEventsServiceKey(const t_channel_id channel_id); bool getEventsServiceKeySearchAdd(CChannelEventList& evtlist,const t_channel_id channel_id,char m_search_typ,std::string& m_search_text); - bool getEPGid(const event_id_t eventid, const time_t starttime, CEPGData * epgdata); + bool getEPGid(const t_event_id eventid, const time_t starttime, CEPGData * epgdata); bool getActualEPGServiceKey(const t_channel_id channel_id, CEPGData * epgdata); - bool getEPGidShort(const event_id_t eventid, CShortEPGData * epgdata); + bool getEPGidShort(const t_event_id eventid, CShortEPGData * epgdata); void setPrivatePid(const unsigned short pid); #endif diff --git a/lib/sectionsdclient/sectionsdtypes.h b/lib/sectionsdclient/sectionsdtypes.h index 54f07fecb..941c251f6 100644 --- a/lib/sectionsdclient/sectionsdtypes.h +++ b/lib/sectionsdclient/sectionsdtypes.h @@ -26,8 +26,8 @@ #include /* t_channel_id, t_service_id, t_original_network_id, t_transport_stream_id; */ -typedef uint64_t event_id_t; -#define CREATE_EVENT_ID(channel_id,event_nr) ((((event_id_t)channel_id) << 16) | event_nr) +typedef uint64_t t_event_id; +#define CREATE_EVENT_ID(channel_id,event_nr) ((((t_event_id)channel_id) << 16) | event_nr) #define GET_CHANNEL_ID_FROM_EVENT_ID(event_id) ((t_channel_id)((event_id) >> 16)) #endif /* __sectionsdtypes_h__ */ diff --git a/lib/timerdclient/timerdclient.cpp b/lib/timerdclient/timerdclient.cpp index 376b5fe76..f26460a25 100644 --- a/lib/timerdclient/timerdclient.cpp +++ b/lib/timerdclient/timerdclient.cpp @@ -264,7 +264,7 @@ bool CTimerdClient::checkDouble(CTimerd::CTimerEventTypes evType, void* data, ti CTimerd::EventInfo *ei=static_cast(data); if( ei->channel_id == it->channel_id ) { - if(( ei->epgID != 0 && ei->epgID != it->epgID ) || ( ei->epg_starttime != 0 && it->epg_starttime != ei->epg_starttime) ) + if(( ei->epg_id != 0 && ei->epg_id != it->epg_id ) || ( ei->epg_starttime != 0 && it->epg_starttime != ei->epg_starttime) ) { return false;//not double } @@ -276,7 +276,7 @@ bool CTimerdClient::checkDouble(CTimerd::CTimerEventTypes evType, void* data, ti CTimerd::RecordingInfo *ri=static_cast(data); if(ri->channel_id == it->channel_id && ri->apids == it->apids && !strncmp(ri->recordingDir, it->recordingDir, RECORD_DIR_MAXLEN-1) ) { - if( ( ri->epgID != 0 && ri->epgID != it->epgID ) || ( ri->epg_starttime != 0 && it->epg_starttime != ri->epg_starttime) ) + if( ( ri->epg_id != 0 && ri->epg_id != it->epg_id ) || ( ri->epg_starttime != 0 && it->epg_starttime != ri->epg_starttime) ) { return false;//not double } @@ -330,7 +330,7 @@ int CTimerdClient::addTimerEvent( CTimerd::CTimerEventTypes evType, void* data, tei.apids = ei->apids; tei.channel_id = ei->channel_id; tei.epg_starttime = ei->epg_starttime; - tei.epgID = ei->epgID; + tei.epg_id = ei->epg_id; tei.recordingSafety = ei->recordingSafety; length = sizeof( CTimerd::TransferEventInfo); data = &tei; @@ -341,7 +341,7 @@ int CTimerdClient::addTimerEvent( CTimerd::CTimerEventTypes evType, void* data, tri.apids = ri->apids; tri.channel_id = ri->channel_id; tri.epg_starttime = ri->epg_starttime; - tri.epgID = ri->epgID; + tri.epg_id = ri->epg_id; tri.recordingSafety = ri->recordingSafety; tri.autoAdjustToEPG = ri->autoAdjustToEPG; strncpy(tri.recordingDir, ri->recordingDir, RECORD_DIR_MAXLEN-1); diff --git a/lib/timerdclient/timerdclient.h b/lib/timerdclient/timerdclient.h index cdca4972b..95109fbee 100644 --- a/lib/timerdclient/timerdclient.h +++ b/lib/timerdclient/timerdclient.h @@ -110,12 +110,12 @@ class CTimerdClient:private CBasicClient // adds new record timer event int addRecordTimerEvent(const t_channel_id channel_id, time_t alarmtime, time_t stoptime, - uint64_t epgID=0, time_t epg_starttime=0, time_t announcetime = 0, + uint64_t epg_id=0, time_t epg_starttime=0, time_t announcetime = 0, unsigned char apids=TIMERD_APIDS_STD, bool safety=false,bool autoAdjust=false, std::string recDir="", bool forceAdd=true, CTimerd::CTimerEventRepeat evrepeat = CTimerd::TIMERREPEAT_ONCE, uint32_t repeatcount = 0) { CTimerd::RecordingInfo eventInfo; eventInfo.channel_id = channel_id; - eventInfo.epgID = epgID; + eventInfo.epg_id = epg_id; eventInfo.epg_starttime = epg_starttime; eventInfo.apids = apids; eventInfo.recordingSafety = safety; @@ -125,11 +125,11 @@ class CTimerdClient:private CBasicClient }; int addImmediateRecordTimerEvent(const t_channel_id channel_id, time_t alarmtime, time_t stoptime, - uint64_t epgID=0, time_t epg_starttime=0,unsigned char apids=TIMERD_APIDS_STD) + uint64_t epg_id=0, time_t epg_starttime=0,unsigned char apids=TIMERD_APIDS_STD) { CTimerd::EventInfo eventInfo; eventInfo.channel_id = channel_id; - eventInfo.epgID = epgID; + eventInfo.epg_id = epg_id; eventInfo.epg_starttime = epg_starttime; eventInfo.apids = apids; eventInfo.recordingSafety = false; @@ -143,12 +143,12 @@ class CTimerdClient:private CBasicClient // adds new zapto timer event int addZaptoTimerEvent(const t_channel_id channel_id, time_t alarmtime, time_t announcetime = 0, - time_t stoptime = 0, uint64_t epgID=0, time_t epg_starttime=0, + time_t stoptime = 0, uint64_t epg_id=0, time_t epg_starttime=0, unsigned char apids=TIMERD_APIDS_STD) { CTimerd::EventInfo eventInfo; eventInfo.channel_id = channel_id; - eventInfo.epgID = epgID; + eventInfo.epg_id = epg_id; eventInfo.epg_starttime = epg_starttime; eventInfo.apids = apids; eventInfo.recordingSafety = false; diff --git a/lib/timerdclient/timerdtypes.h b/lib/timerdclient/timerdtypes.h index 76294f409..4cf50150f 100644 --- a/lib/timerdclient/timerdtypes.h +++ b/lib/timerdclient/timerdtypes.h @@ -83,7 +83,7 @@ class CTimerd struct EventInfo { - event_id_t epgID; + t_event_id epg_id; time_t epg_starttime; t_channel_id channel_id; unsigned char apids; @@ -93,7 +93,7 @@ class CTimerd struct TransferEventInfo { - event_id_t epgID; + t_event_id epg_id; time_t epg_starttime; t_channel_id channel_id; unsigned char apids; @@ -116,7 +116,7 @@ class CTimerd { apids = e.apids; channel_id = e.channel_id; - epgID = e.epgID; + epg_id = e.epg_id; epg_starttime = e.epg_starttime; recordingSafety = e.recordingSafety; autoAdjustToEPG = e.autoAdjustToEPG; @@ -125,7 +125,7 @@ class CTimerd { apids = e.apids; channel_id = e.channel_id; - epgID = e.epgID; + epg_id = e.epg_id; epg_starttime = e.epg_starttime; recordingSafety = e.recordingSafety; autoAdjustToEPG = e.autoAdjustToEPG; @@ -154,7 +154,7 @@ class CTimerd time_t announceTime; time_t stopTime; t_channel_id channel_id; //only filled if applicable - event_id_t epgID; //only filled if applicable + t_event_id epg_id; //only filled if applicable time_t epg_starttime; //only filled if applicable unsigned char apids; //only filled if applicable bool standby_on; //only filled if applicable diff --git a/src/driver/record.cpp b/src/driver/record.cpp index 924043546..59c1bb369 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -120,7 +120,7 @@ extern "C" { CRecordInstance::CRecordInstance(const CTimerd::RecordingInfo * const eventinfo, std::string &dir, bool timeshift, bool stream_vtxt_pid, bool stream_pmt_pid, bool stream_subtitle_pids ) { channel_id = eventinfo->channel_id; - epgid = eventinfo->epgID; + epg_id = eventinfo->epg_id; epgTitle = eventinfo->epgTitle; epg_time = eventinfo->epg_starttime; apidmode = eventinfo->apids; @@ -478,9 +478,9 @@ void CRecordInstance::ProcessAPIDnames() } } - if(has_unresolved_ctags && (epgid != 0)) { + if(has_unresolved_ctags && (epg_id != 0)) { CSectionsdClient::ComponentTagList tags; - if(CEitManager::getInstance()->getComponentTagsUniqueKey(epgid, tags)) { + if(CEitManager::getInstance()->getComponentTagsUniqueKey(epg_id, tags)) { for(unsigned int i=0; i< tags.size(); i++) { for(unsigned int j=0; j< allpids.APIDs.size(); j++) { if(allpids.APIDs[j].component_tag == tags[i].componentTag) { @@ -545,7 +545,7 @@ record_error_msg_t CRecordInstance::Record() } } } - recording_id = g_Timerd->addImmediateRecordTimerEvent(channel_id, now, record_end, epgid, epg_time, apidmode); + recording_id = g_Timerd->addImmediateRecordTimerEvent(channel_id, now, record_end, epg_id, epg_time, apidmode); printf("%s: channel %" PRIx64 " -> timer eventID %d\n", __func__, channel_id, recording_id); } return ret; @@ -642,10 +642,10 @@ void CRecordInstance::FillMovieInfo(CZapitChannel * channel, APIDList & apid_lis recMovieInfo->channelName = tmpstring; tmpstring = "not available"; - if (epgid != 0) { + if (epg_id != 0) { CEPGData epgdata; - bool epg_ok = CEitManager::getInstance()->getEPGid(epgid, epg_time, &epgdata); - if(!epg_ok){//if old epgid removed check currurrent epgid + bool epg_ok = CEitManager::getInstance()->getEPGid(epg_id, epg_time, &epgdata); + if(!epg_ok){//if old epg_id removed check current epg_id epg_ok = CEitManager::getInstance()->getActualEPGServiceKey(channel->getEpgID(), &epgdata ); if(epg_ok && !epgTitle.empty()){ @@ -671,7 +671,7 @@ void CRecordInstance::FillMovieInfo(CZapitChannel * channel, APIDList & apid_lis recMovieInfo->length = epgdata.epg_times.dauer / 60; printf("fsk:%d, Genre:%d, Dauer: %d\r\n",recMovieInfo->parentalLockAge,recMovieInfo->genreMajor,recMovieInfo->length); - } else if (!epgTitle.empty()) {//if old epgid removed + } else if (!epgTitle.empty()) {//if old epg_id removed tmpstring = epgTitle; } } else if (!epgTitle.empty()) { @@ -681,7 +681,7 @@ void CRecordInstance::FillMovieInfo(CZapitChannel * channel, APIDList & apid_lis recMovieInfo->channelId = channel->getChannelID(); recMovieInfo->epgInfo1 = info1; recMovieInfo->epgInfo2 = info2; - recMovieInfo->epgId = epgid; + recMovieInfo->epgId = epg_id; recMovieInfo->mode = g_Zapit->getMode(); recMovieInfo->VideoPid = allpids.PIDs.vpid; recMovieInfo->VideoType = channel->type; @@ -814,7 +814,7 @@ void CRecordInstance::MakeExtFileName(CZapitChannel * channel, std::string &File StringReplace(FilenameTemplate,"%C","no_channel"); CShortEPGData epgdata; - if(CEitManager::getInstance()->getEPGidShort(epgid, &epgdata)) { + if(CEitManager::getInstance()->getEPGidShort(epg_id, &epgdata)) { if (!(epgdata.title.empty())) { snprintf(buf, sizeof(buf),"%s", epgdata.title.c_str()); ZapitTools::replace_char(buf); @@ -1014,13 +1014,13 @@ bool CRecordManager::Record(const t_channel_id channel_id, const char * dir, boo eventinfo.eventID = 0; eventinfo.channel_id = channel_id; if (CEitManager::getInstance()->getActualEPGServiceKey(channel->getEpgID(), &epgData )) { - eventinfo.epgID = epgData.eventID; + eventinfo.epg_id = epgData.eventID; eventinfo.epg_starttime = epgData.epg_times.startzeit; strncpy(eventinfo.epgTitle, epgData.title.c_str(), EPG_TITLE_MAXLEN-1); eventinfo.epgTitle[EPG_TITLE_MAXLEN-1]=0; } else { - eventinfo.epgID = 0; + eventinfo.epg_id = 0; eventinfo.epg_starttime = 0; strcpy(eventinfo.epgTitle, ""); } @@ -1039,7 +1039,7 @@ bool CRecordManager::Record(const CTimerd::RecordingInfo * const eventinfo, cons bool direct_record = timeshift || strlen(eventinfo->recordingDir) == 0; printf("%s channel_id %" PRIx64 " epg: %" PRIx64 ", apidmode 0x%X\n", __func__, - eventinfo->channel_id, eventinfo->epgID, eventinfo->apids); + eventinfo->channel_id, eventinfo->epg_id, eventinfo->apids); if (g_settings.recording_type == CNeutrinoApp::RECORDING_OFF /* || IS_WEBCHAN(eventinfo->channel_id) */) return false; @@ -2124,7 +2124,7 @@ record_error_msg_t CStreamRec::Record() } } } - recording_id = g_Timerd->addImmediateRecordTimerEvent(channel_id, now, record_end, epgid, epg_time, apidmode); + recording_id = g_Timerd->addImmediateRecordTimerEvent(channel_id, now, record_end, epg_id, epg_time, apidmode); printf("%s: channel %" PRIx64 " -> timer eventID %d\n", __func__, channel_id, recording_id); } hintBox.hide(); diff --git a/src/driver/record.h b/src/driver/record.h index b55c6dd2f..f7844ac39 100644 --- a/src/driver/record.h +++ b/src/driver/record.h @@ -76,7 +76,7 @@ class CRecordInstance typedef std::list APIDList; t_channel_id channel_id; - event_id_t epgid; + t_event_id epg_id; std::string epgTitle; std::string epgInfo1; unsigned char apidmode; diff --git a/src/eitd/SIevents.hpp b/src/eitd/SIevents.hpp index 7d4c00338..0047a15e1 100644 --- a/src/eitd/SIevents.hpp +++ b/src/eitd/SIevents.hpp @@ -542,7 +542,7 @@ class SIevent return CREATE_CHANNEL_ID(service_id, original_network_id, transport_stream_id); } - event_id_t uniqueKey(void) const { + t_event_id uniqueKey(void) const { return CREATE_EVENT_ID(get_channel_id(), eventID); } int runningStatus(void) const { diff --git a/src/eitd/eitd.h b/src/eitd/eitd.h index aa7036940..eaca92726 100644 --- a/src/eitd/eitd.h +++ b/src/eitd/eitd.h @@ -90,9 +90,9 @@ struct OrderFirstEndTimeServiceIDEventUniqueKey typedef std::set MySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey; typedef std::set MySIeventsOrderFirstEndTimeServiceIDEventUniqueKey; -typedef std::map > MySIeventsOrderUniqueKey; +typedef std::map > MySIeventsOrderUniqueKey; -typedef std::map > MySIeventUniqueKeysMetaOrderServiceUniqueKey; +typedef std::map > MySIeventUniqueKeysMetaOrderServiceUniqueKey; typedef std::map > MySIservicesOrderUniqueKey; typedef std::map > MySIservicesNVODorderUniqueKey; diff --git a/src/eitd/sectionsd.cpp b/src/eitd/sectionsd.cpp index 6da2a72b0..cd77ed01a 100644 --- a/src/eitd/sectionsd.cpp +++ b/src/eitd/sectionsd.cpp @@ -238,7 +238,7 @@ static MySIservicesOrderUniqueKey mySIservicesOrderUniqueKey; static MySIservicesNVODorderUniqueKey mySIservicesNVODorderUniqueKey; /* needs write lock held! */ -static bool deleteEvent(const event_id_t uniqueKey) +static bool deleteEvent(const t_event_id uniqueKey) { bool ret = false; // writeLockEvents(); @@ -417,9 +417,9 @@ debug(DEBUG_ERROR, "addEvent: ch %012" PRIx64 " running %d (%s) got_CN %d", evt. */ if (slow_addevent) { - std::vector to_delete; + std::vector to_delete; unsigned short eventID = e->eventID; - event_id_t e_key = e->uniqueKey(); + t_event_id e_key = e->uniqueKey(); t_channel_id e_chid = e->get_channel_id(); time_t start_time = e->times.begin()->startzeit; time_t end_time = e->times.begin()->startzeit + (long)e->times.begin()->dauer; @@ -439,7 +439,7 @@ debug(DEBUG_ERROR, "addEvent: ch %012" PRIx64 " running %d (%s) got_CN %d", evt. break; else { - event_id_t x_key = (*x)->uniqueKey(); + t_event_id x_key = (*x)->uniqueKey(); if (x_key == e_key) { /* the present event has a higher table_id than the new one @@ -522,7 +522,7 @@ debug(DEBUG_ERROR, "addEvent: ch %012" PRIx64 " running %d (%s) got_CN %d", evt. } unlockMessaging(); } - event_id_t uniqueKey = (*lastEvent)->uniqueKey(); + t_event_id uniqueKey = (*lastEvent)->uniqueKey(); // else debug(DEBUG_ERROR, ">"); deleteEvent(uniqueKey); } @@ -625,7 +625,7 @@ static void addNVODevent(const SIevent &evt) static void removeOldEvents(const long seconds) { - std::vector to_delete; + std::vector to_delete; // Alte events loeschen time_t zeit = time(NULL); @@ -649,7 +649,7 @@ static void removeOldEvents(const long seconds) to_delete.push_back((*e)->uniqueKey()); ++e; } - for (std::vector::iterator i = to_delete.begin(); i != to_delete.end(); ++i) + for (std::vector::iterator i = to_delete.begin(); i != to_delete.end(); ++i) deleteEvent(*i); unlockEvents(); @@ -662,7 +662,7 @@ static void removeOldEvents(const long seconds) //------------------------------------------------------------ // misc. functions //------------------------------------------------------------ -static const SIevent& findSIeventForEventUniqueKey(const event_id_t eventUniqueKey) +static const SIevent& findSIeventForEventUniqueKey(const t_event_id eventUniqueKey) { // Event (eventid) suchen MySIeventsOrderUniqueKey::iterator e = mySIeventsOrderUniqueKey.find(eventUniqueKey); @@ -730,7 +730,7 @@ static const SIevent& findNextSIeventForServiceUniqueKey(const t_channel_id serv } // Finds the next event based on unique key and start time -static const SIevent &findNextSIevent(const event_id_t uniqueKey, SItime &zeit) +static const SIevent &findNextSIevent(const t_event_id uniqueKey, SItime &zeit) { MySIeventsOrderUniqueKey::iterator eFirst = mySIeventsOrderUniqueKey.find(uniqueKey); @@ -2735,15 +2735,15 @@ void CEitManager::getCurrentNextServiceKey(t_channel_id uniqueServiceKey, CSecti unlockEvents(); } -/* commandEPGepgIDshort */ -bool CEitManager::getEPGidShort(event_id_t epgID, CShortEPGData * epgdata) +/* commandEPGepg_idshort */ +bool CEitManager::getEPGidShort(t_event_id epg_id, CShortEPGData * epgdata) { bool ret = false; - debug(DEBUG_INFO, "Request of current EPG for 0x%" PRIx64, epgID); + debug(DEBUG_INFO, "Request of current EPG for 0x%" PRIx64, epg_id); readLockEvents(); - const SIevent& e = findSIeventForEventUniqueKey(epgID); + const SIevent& e = findSIeventForEventUniqueKey(epg_id); if (e.service_id != 0) { // Event found @@ -2759,14 +2759,14 @@ bool CEitManager::getEPGidShort(event_id_t epgID, CShortEPGData * epgdata) return ret; } -/*was getEPGid commandEPGepgID(int connfd, char *data, const unsigned dataLength) */ +/*was getEPGid commandEPGepg_id(int connfd, char *data, const unsigned dataLength) */ /* TODO item / itemDescription */ -bool CEitManager::getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData * epgdata) +bool CEitManager::getEPGid(const t_event_id epg_id, const time_t startzeit, CEPGData * epgdata) { bool ret = false; - debug(DEBUG_INFO, "Request of actual EPG for 0x%" PRIx64 " 0x%lx", epgID, startzeit); + debug(DEBUG_INFO, "Request of actual EPG for 0x%" PRIx64 " 0x%lx", epg_id, startzeit); - const SIevent& evt = findSIeventForEventUniqueKey(epgID); + const SIevent& evt = findSIeventForEventUniqueKey(epg_id); epgdata->itemDescriptions.clear(); epgdata->items.clear(); @@ -2942,7 +2942,7 @@ void CEitManager::getChannelEvents(CChannelEventList &eList, t_channel_id *chidl } /*was static void commandComponentTagsUniqueKey(int connfd, char *data, const unsigned dataLength) */ -bool CEitManager::getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::ComponentTagList& tags) +bool CEitManager::getComponentTagsUniqueKey(const t_event_id uniqueKey, CSectionsdClient::ComponentTagList& tags) { bool ret = false; debug(DEBUG_INFO, "Request of ComponentTags for 0x%" PRIx64, uniqueKey); @@ -2972,7 +2972,7 @@ bool CEitManager::getComponentTagsUniqueKey(const event_id_t uniqueKey, CSection } /* was static void commandLinkageDescriptorsUniqueKey(int connfd, char *data, const unsigned dataLength) */ -bool CEitManager::getLinkageDescriptorsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::LinkageDescriptorList& descriptors) +bool CEitManager::getLinkageDescriptorsUniqueKey(const t_event_id uniqueKey, CSectionsdClient::LinkageDescriptorList& descriptors) { bool ret = false; debug(DEBUG_INFO, "Request of LinkageDescriptors for 0x%" PRIx64, uniqueKey); diff --git a/src/eitd/sectionsd.h b/src/eitd/sectionsd.h index 8972aa4ab..4414c29ee 100644 --- a/src/eitd/sectionsd.h +++ b/src/eitd/sectionsd.h @@ -58,12 +58,12 @@ class CEitManager : public OpenThreads::Thread, public OpenThreads::Mutex void getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search = 0, std::string search_text = "", bool all_chann=false, int genre=0xFF,int fsk=0); void getCurrentNextServiceKey(t_channel_id uniqueServiceKey, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next ); - bool getEPGidShort(event_id_t epgID, CShortEPGData * epgdata); - bool getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData * epgdata); + bool getEPGidShort(t_event_id epg_id, CShortEPGData * epgdata); + bool getEPGid(const t_event_id epg_id, const time_t startzeit, CEPGData * epgdata); bool getActualEPGServiceKey(const t_channel_id uniqueServiceKey, CEPGData * epgdata); void getChannelEvents(CChannelEventList &eList, t_channel_id *chidlist = NULL, int clen = 0); - bool getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::ComponentTagList& tags); - bool getLinkageDescriptorsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::LinkageDescriptorList& descriptors); + bool getComponentTagsUniqueKey(const t_event_id uniqueKey, CSectionsdClient::ComponentTagList& tags); + bool getLinkageDescriptorsUniqueKey(const t_event_id uniqueKey, CSectionsdClient::LinkageDescriptorList& descriptors); bool getNVODTimesServiceKey(const t_channel_id uniqueServiceKey, CSectionsdClient::NVODTimesList& nvod_list); void setLanguages(const std::vector& newLanguages); void addChannelFilter(t_original_network_id onid, t_transport_stream_id tsid, t_service_id sid); diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 0be361ac4..1254f9e96 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -153,13 +153,13 @@ void CEventList::UpdateTimerList(void) // Function: HasTimerConflicts // search for timer conflicts for given time // return: true if found any conflict, you can watch with parameter epg_ID -bool CEventList::HasTimerConflicts(time_t starttime, time_t duration, event_id_t *epg_ID) +bool CEventList::HasTimerConflicts(time_t starttime, time_t duration, t_event_id *epg_ID) { for(uint i= 0; i < timerlist.size(); i++) { if(timerlist[i].stopTime > starttime-timerPre && timerlist[i].alarmTime < starttime+duration+timerPost) { - *epg_ID = timerlist[i].epgID; + *epg_ID = timerlist[i].epg_id; return true; } } @@ -707,7 +707,7 @@ CTimerd::CTimerEventTypes CEventList::isScheduled(t_channel_id channel_id, CChan CTimerd::TimerList::iterator timer = timerlist.begin(); for(; timer != timerlist.end(); ++timer) { if(timer->channel_id == channel_id && (timer->eventType == CTimerd::TIMER_ZAPTO || timer->eventType == CTimerd::TIMER_RECORD || timer->eventType == CTimerd::TIMER_REMOTEBOX)) { - if(timer->epgID == event->eventID) { + if(timer->epg_id == event->eventID) { if(timer->epg_starttime == event->startTime) { bool isTimeShiftTimer = false; if( timer->eventType == CTimerd::TIMER_RECORD){ diff --git a/src/gui/eventlist.h b/src/gui/eventlist.h index 499d07d15..9bbd5a4b4 100644 --- a/src/gui/eventlist.h +++ b/src/gui/eventlist.h @@ -72,7 +72,7 @@ class CEventList : public CListHelpers t_bouquet_id m_search_bouquet_id; bool m_showChannel; int oldIndex; - event_id_t oldEventID; + t_event_id oldEventID; bool findEvents(t_channel_id channel_id, std::string channelname); @@ -99,7 +99,7 @@ class CEventList : public CListHelpers std::string infozone_text; bool infozone_background; int sort_mode; - event_id_t item_event_ID; + t_event_id item_event_ID; CComponentsText *infozone; CComponentsHeader *header; CProgressBar *pb; @@ -119,7 +119,7 @@ class CEventList : public CListHelpers int timerPre; int timerPost; void UpdateTimerList(void); - bool HasTimerConflicts(time_t starttime, time_t duration, event_id_t * epg_ID); + bool HasTimerConflicts(time_t starttime, time_t duration, t_event_id * epg_ID); bool showfollow; CTimerd::CTimerEventTypes isScheduled(t_channel_id channel_id, CChannelEvent * event, int * tID = NULL); diff --git a/src/gui/followscreenings.h b/src/gui/followscreenings.h index 077b5fb22..67a975c47 100644 --- a/src/gui/followscreenings.h +++ b/src/gui/followscreenings.h @@ -50,7 +50,7 @@ class CFollowScreenings : public CMenuTarget time_t starttime; time_t stoptime; std::string title; - uint64_t epgID; + uint64_t epg_id; unsigned char apids; bool safety; std::string recDir; @@ -69,7 +69,7 @@ class CFollowScreenings : public CMenuTarget this->channel_id = Channel_id; this->starttime = Starttime; this->stoptime = Stoptime; - this->epgID = EpgID; + this->epg_id = EpgID; this->recDir = RecDir; this->evtlist = Evtlist; this->title = Title; diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 078f910b1..a5f055c41 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -81,7 +81,7 @@ extern CBouquetList * bouquetList; /* neutrino.cpp */ extern CPictureViewer * g_PicViewer; extern cVideo * videoDecoder; -event_id_t CInfoViewer::last_curr_id = 0, CInfoViewer::last_next_id = 0; +t_event_id CInfoViewer::last_curr_id = 0, CInfoViewer::last_next_id = 0; static bool sortByDateTime (const CChannelEvent& a, const CChannelEvent& b) { diff --git a/src/gui/infoviewer.h b/src/gui/infoviewer.h index 5c96a5a0b..d4fcdbc79 100644 --- a/src/gui/infoviewer.h +++ b/src/gui/infoviewer.h @@ -94,7 +94,7 @@ class CInfoViewer int header_height; bool newfreq ; static const short bar_width = 72; - static event_id_t last_curr_id, last_next_id; + static t_event_id last_curr_id, last_next_id; uint64_t timeoutEnd; void setInfobarTimeout(int timeout_ext = 0); diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index a243b6766..4bff65f28 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -560,7 +560,7 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey) timerNew.announceTime=timerNew.alarmTime-60; CTimerd::EventInfo eventinfo; CTimerd::RecordingInfo recinfo; - eventinfo.epgID=0; + eventinfo.epg_id=0; eventinfo.epg_starttime=0; eventinfo.channel_id=timerNew.channel_id; eventinfo.apids = TIMERD_APIDS_CONF; @@ -578,7 +578,7 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey) return menu_return::RETURN_REPAINT; if (timerNew.eventType==CTimerd::TIMER_RECORD) { - recinfo.epgID=0; + recinfo.epg_id=0; recinfo.epg_starttime=0; recinfo.channel_id=timerNew.channel_id; recinfo.apids=TIMERD_APIDS_CONF; @@ -878,7 +878,7 @@ void CTimerList::RemoteBoxTimerList(CTimerd::TimerList &rtimerlist) rtimer.alarmTime = (time_t) atoll(remotetimers[i]["alarm"][0].get("digits","").asString().c_str()); rtimer.announceTime = (time_t) atoll(remotetimers[i]["announce"][0].get("digits","").asString().c_str()); rtimer.stopTime = (time_t) atoll(remotetimers[i]["stop"][0].get("digits","").asString().c_str()); - sscanf(remotetimers[i].get("epg_id","").asString().c_str(), SCANF_CHANNEL_ID_TYPE, &rtimer.epgID); + sscanf(remotetimers[i].get("epg_id","").asString().c_str(), SCANF_CHANNEL_ID_TYPE, &rtimer.epg_id); sscanf(remotetimers[i].get("channel_id","").asString().c_str(), SCANF_CHANNEL_ID_TYPE, &rtimer.channel_id); strncpy(rtimer.epgTitle,remotetimers[i].get("title","").asString().c_str(),sizeof(rtimer.epgTitle)); rtimer.epgTitle[sizeof(rtimer.epgTitle) - 1] = 0; @@ -1033,7 +1033,7 @@ int CTimerList::show() std::string title = ""; char buf1[1024]; CEPGData epgdata; - CEitManager::getInstance()->getEPGid(timerlist[selected].epgID, timerlist[selected].epg_starttime, &epgdata); + CEitManager::getInstance()->getEPGid(timerlist[selected].epg_id, timerlist[selected].epg_starttime, &epgdata); memset(buf1, '\0', sizeof(buf1)); if (!epgdata.title.empty()) title = "(" + epgdata.title + ")\n"; @@ -1086,9 +1086,9 @@ int CTimerList::show() if (timer->eventType == CTimerd::TIMER_RECORD || timer->eventType == CTimerd::TIMER_REMOTEBOX || timer->eventType == CTimerd::TIMER_ZAPTO) { hide(); - if (timer->epgID != 0) + if (timer->epg_id != 0) { - res = g_EpgData->show(timer->channel_id, timer->epgID, &timer->epg_starttime); + res = g_EpgData->show(timer->channel_id, timer->epg_id, &timer->epg_starttime); } else ShowHint(LOCALE_MESSAGEBOX_INFO, LOCALE_EPGVIEWER_NOTFOUND); @@ -1301,10 +1301,10 @@ void CTimerList::paintItem(int pos) } zAddData += ')'; } - if (timer.epgID!=0) + if (timer.epg_id!=0) { CEPGData epgdata; - if (CEitManager::getInstance()->getEPGid(timer.epgID, timer.epg_starttime, &epgdata)) + if (CEitManager::getInstance()->getEPGid(timer.epg_id, timer.epg_starttime, &epgdata)) { zAddData += " : "; zAddData += epgdata.title; @@ -1895,10 +1895,10 @@ bool CTimerList::askUserOnRemoteTimerConflict(time_t announceTime, time_t stopTi timerbuf += CTimerList::convertTimerType2String(it->eventType); timerbuf += " ("; timerbuf += CTimerList::convertChannelId2String(it->channel_id); // UTF-8 - if (it->epgID != 0) + if (it->epg_id != 0) { CEPGData epgdata; - if (CEitManager::getInstance()->getEPGid(it->epgID, it->epg_starttime, &epgdata)) + if (CEitManager::getInstance()->getEPGid(it->epg_id, it->epg_starttime, &epgdata)) { timerbuf += ":"; timerbuf += epgdata.title; @@ -1947,10 +1947,10 @@ bool askUserOnTimerConflict(time_t announceTime, time_t stopTime, t_channel_id c timerbuf += CTimerList::convertTimerType2String(it->eventType); timerbuf += " ("; timerbuf += CTimerList::convertChannelId2String(it->channel_id); // UTF-8 - if (it->epgID != 0) + if (it->epg_id != 0) { CEPGData epgdata; - if (CEitManager::getInstance()->getEPGid(it->epgID, it->epg_starttime, &epgdata)) + if (CEitManager::getInstance()->getEPGid(it->epg_id, it->epg_starttime, &epgdata)) { timerbuf += ":"; timerbuf += epgdata.title; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 4b929816d..6da02b27b 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -5235,10 +5235,10 @@ void CNeutrinoApp::getAnnounceEpgName(CTimerd::RecordingInfo * eventinfo, std::s zAddData = g_Locale->getText(LOCALE_TIMERLIST_PROGRAM_UNKNOWN); } - if(eventinfo->epgID!=0) { + if(eventinfo->epg_id!=0) { CEPGData epgdata; zAddData += " :\n"; - if (CEitManager::getInstance()->getEPGid(eventinfo->epgID, eventinfo->epg_starttime, &epgdata)) { + if (CEitManager::getInstance()->getEPGid(eventinfo->epg_id, eventinfo->epg_starttime, &epgdata)) { zAddData += epgdata.title; } else if(strlen(eventinfo->epgTitle)!=0) { diff --git a/src/nhttpd/tuxboxapi/controlapi.cpp b/src/nhttpd/tuxboxapi/controlapi.cpp index fc4b7d348..5b43ec2be 100644 --- a/src/nhttpd/tuxboxapi/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/controlapi.cpp @@ -2662,9 +2662,9 @@ void CControlAPI::SendTimers(CyhookHandler *hh) // epg title std::string title = timer->epgTitle; - if(timer->epgID!=0) { + if(timer->epg_id!=0) { CEPGData epgdata; - if (CEitManager::getInstance()->getEPGid(timer->epgID, timer->epg_starttime, &epgdata)) + if (CEitManager::getInstance()->getEPGid(timer->epg_id, timer->epg_starttime, &epgdata)) title = epgdata.title; } @@ -2720,7 +2720,7 @@ void CControlAPI::SendTimers(CyhookHandler *hh) timer_item += hh->outObject("audio", audio, true); timer_item += hh->outPair("recording_dir", timer->recordingDir, true); - timer_item += hh->outPair("epg_id", string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, timer->epgID), false); + timer_item += hh->outPair("epg_id", string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, timer->epg_id), false); } break; @@ -2983,7 +2983,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh) CTimerd::RecordingInfo recinfo; CTimerd::EventInfo eventinfo; - eventinfo.epgID = 0; + eventinfo.epg_id = 0; eventinfo.epg_starttime = 0; eventinfo.apids = TIMERD_APIDS_CONF; eventinfo.recordingSafety = (hh->ParamList["rs"] == "1") || (hh->ParamList["rs"] == "on"); diff --git a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp index 246e9b050..5ca4c7291 100644 --- a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp +++ b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp @@ -970,10 +970,10 @@ std::string CNeutrinoYParser::func_get_timer_list(CyhookHandler *, std::string } sAddData += ')'; } - if(timer->epgID!=0) + if(timer->epg_id!=0) { CEPGData epgdata; - if (CEitManager::getInstance()->getEPGid(timer->epgID, timer->epg_starttime, &epgdata)) + if (CEitManager::getInstance()->getEPGid(timer->epg_id, timer->epg_starttime, &epgdata)) sAddData+="
" + epgdata.title; else sAddData+=std::string("
")+timer->epgTitle; diff --git a/src/timerd/timerd.cpp b/src/timerd/timerd.cpp index 3585a3b94..2c4a97d95 100644 --- a/src/timerd/timerd.cpp +++ b/src/timerd/timerd.cpp @@ -101,7 +101,7 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd) #if 0 else if(event->eventType == CTimerd::TIMER_NEXTPROGRAM) { - resp.epgID = static_cast(event)->eventInfo.epgID; + resp.epg_id = static_cast(event)->eventInfo.epg_id; resp.epg_starttime = static_cast(event)->eventInfo.epg_starttime; resp.channel_id = static_cast(event)->eventInfo.channel_id; resp.apids = static_cast(event)->eventInfo.apids; @@ -110,7 +110,7 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd) else if(event->eventType == CTimerd::TIMER_RECORD) { CTimerEvent_Record* ev= static_cast(event); - resp.epgID = ev->eventInfo.epgID; + resp.epg_id = ev->eventInfo.epg_id; resp.epg_starttime = ev->eventInfo.epg_starttime; resp.channel_id = ev->eventInfo.channel_id; resp.apids = ev->eventInfo.apids; @@ -120,7 +120,7 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd) else if(event->eventType == CTimerd::TIMER_ZAPTO) { CTimerEvent_Zapto* ev= static_cast(event); - resp.epgID = ev->eventInfo.epgID; + resp.epg_id = ev->eventInfo.epg_id; resp.epg_starttime = ev->eventInfo.epg_starttime; resp.channel_id = ev->eventInfo.channel_id; resp.apids = ev->eventInfo.apids; @@ -170,7 +170,7 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd) #if 0 else if(event->eventType == CTimerd::TIMER_NEXTPROGRAM) { - lresp.epgID = static_cast(event)->eventInfo.epgID; + lresp.epg_id = static_cast(event)->eventInfo.epg_id; lresp.epg_starttime = static_cast(event)->eventInfo.epg_starttime; lresp.channel_id = static_cast(event)->eventInfo.channel_id; lresp.apids = static_cast(event)->eventInfo.apids; @@ -179,7 +179,7 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd) else if(event->eventType == CTimerd::TIMER_RECORD) { CTimerEvent_Record* ev= static_cast(event); - lresp.epgID = ev->eventInfo.epgID; + lresp.epg_id = ev->eventInfo.epg_id; lresp.epg_starttime = ev->eventInfo.epg_starttime; lresp.channel_id = ev->eventInfo.channel_id; lresp.apids = ev->eventInfo.apids; @@ -189,7 +189,7 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd) else if(event->eventType == CTimerd::TIMER_ZAPTO) { CTimerEvent_Zapto* ev= static_cast(event); - lresp.epgID = ev->eventInfo.epgID; + lresp.epg_id = ev->eventInfo.epg_id; lresp.epg_starttime = ev->eventInfo.epg_starttime; lresp.channel_id = ev->eventInfo.channel_id; lresp.apids = ev->eventInfo.apids; @@ -317,7 +317,7 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd) msgAddTimer.alarmTime, msgAddTimer.stopTime, recInfo.channel_id, - recInfo.epgID, + recInfo.epg_id, recInfo.epg_starttime, recInfo.apids, msgAddTimer.eventRepeat, @@ -336,7 +336,7 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd) msgAddTimer.alarmTime, msgAddTimer.stopTime, evInfo.channel_id, - evInfo.epgID, + evInfo.epg_id, evInfo.epg_starttime, evInfo.apids, msgAddTimer.eventRepeat, @@ -353,7 +353,7 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd) msgAddTimer.announceTime, msgAddTimer.alarmTime, evInfo.channel_id, - evInfo.epgID, + evInfo.epg_id, evInfo.epg_starttime, msgAddTimer.eventRepeat, msgAddTimer.repeatCount); diff --git a/src/timerd/timermanager.cpp b/src/timerd/timermanager.cpp index 3903a4b0f..8bade4c93 100644 --- a/src/timerd/timermanager.cpp +++ b/src/timerd/timermanager.cpp @@ -354,7 +354,7 @@ int CTimerManager::modifyEvent(int peventID, time_t announceTime, time_t alarmTi { CTimerEvent_Record *event_record = static_cast(event); event_record->recordingDir = data.recordingDir; - event_record->eventInfo.epgID = 0; + event_record->eventInfo.epg_id = 0; event_record->eventInfo.epg_starttime = 0; event_record->getEpgId(); break; @@ -362,7 +362,7 @@ int CTimerManager::modifyEvent(int peventID, time_t announceTime, time_t alarmTi case CTimerd::TIMER_ZAPTO: { CTimerEvent_Zapto *event_zapto = static_cast(event); - event_zapto->eventInfo.epgID = 0; + event_zapto->eventInfo.epg_id = 0; event_zapto->eventInfo.epg_starttime = 0; event_zapto->getEpgId(); break; @@ -1028,7 +1028,7 @@ void CTimerEvent::printEvent(void) " epg: %s (%" PRIx64 ")\n", static_cast(this)->eventInfo.channel_id, static_cast(this)->epgTitle.c_str(), - static_cast(this)->eventInfo.epgID); + static_cast(this)->eventInfo.epg_id); break; case CTimerd::TIMER_RECORD : @@ -1037,7 +1037,7 @@ void CTimerEvent::printEvent(void) " epg: %s(%" PRIx64 ") apids: 0x%X\n dir: %s\n", static_cast(this)->eventInfo.channel_id, static_cast(this)->epgTitle.c_str(), - static_cast(this)->eventInfo.epgID, + static_cast(this)->eventInfo.epg_id, static_cast(this)->eventInfo.apids, static_cast(this)->recordingDir.c_str()); break; @@ -1165,14 +1165,14 @@ void CTimerEvent_Standby::saveToConfig(CConfigFile *config) //============================================================= CTimerEvent_Record::CTimerEvent_Record(time_t announce_Time, time_t alarm_Time, time_t stop_Time, t_channel_id channel_id, - event_id_t epgID, + t_event_id epg_id, time_t epg_starttime, unsigned char apids, CTimerd::CTimerEventRepeat evrepeat, uint32_t repeatcount, const std::string &recDir, bool _recordingSafety, bool _autoAdjustToEPG) : CTimerEvent(getEventType(), announce_Time, alarm_Time, stop_Time, evrepeat, repeatcount) { - eventInfo.epgID = epgID; + eventInfo.epg_id = epg_id; eventInfo.epg_starttime = epg_starttime; eventInfo.channel_id = channel_id; eventInfo.apids = apids; @@ -1184,7 +1184,7 @@ CTimerEvent_Record::CTimerEvent_Record(time_t announce_Time, time_t alarm_Time, autoAdjustToEPG = _autoAdjustToEPG; recordingSafety = _recordingSafety; CShortEPGData epgdata; - if (CEitManager::getInstance()->getEPGidShort(epgID, &epgdata)) + if (CEitManager::getInstance()->getEPGidShort(epg_id, &epgdata)) epgTitle=epgdata.title; } @@ -1195,8 +1195,8 @@ CTimerEvent_Record::CTimerEvent_Record(CConfigFile *config, int iId): std::stringstream ostr; ostr << iId; std::string id=ostr.str(); - eventInfo.epgID = config->getInt64("EVENT_INFO_EPG_ID_"+id); - dprintf("read EVENT_INFO_EPG_ID_%s %ld\n",id.c_str(),(long)eventInfo.epgID); + eventInfo.epg_id = config->getInt64("EVENT_INFO_EPG_ID_"+id); + dprintf("read EVENT_INFO_EPG_ID_%s %ld\n",id.c_str(),(long)eventInfo.epg_id); eventInfo.epg_starttime = (long int)config->getInt64("EVENT_INFO_EPG_STARTTIME_"+id); dprintf("read EVENT_INFO_EPG_STARTTIME_%s %ld\n",id.c_str(),(long)eventInfo.epg_starttime); @@ -1271,8 +1271,8 @@ void CTimerEvent_Record::saveToConfig(CConfigFile *config) std::stringstream ostr; ostr << eventID; std::string id=ostr.str(); - config->setInt64("EVENT_INFO_EPG_ID_"+id, eventInfo.epgID); - dprintf("set EVENT_INFO_EPG_ID_%s to %ld\n",id.c_str(),(long)eventInfo.epgID); + config->setInt64("EVENT_INFO_EPG_ID_"+id, eventInfo.epg_id); + dprintf("set EVENT_INFO_EPG_ID_%s to %ld\n",id.c_str(),(long)eventInfo.epg_id); config->setInt64("EVENT_INFO_EPG_STARTTIME_"+id, eventInfo.epg_starttime); dprintf("set EVENT_INFO_EPG_STARTTIME_%s to %ld\n",id.c_str(),(long)eventInfo.epg_starttime); @@ -1298,8 +1298,8 @@ void CTimerEvent_Record::saveToConfig(CConfigFile *config) //------------------------------------------------------------ void CTimerEvent_Record::Reschedule() { - // clear epgID on reschedule - eventInfo.epgID = 0; + // clear epg_id on reschedule + eventInfo.epg_id = 0; eventInfo.epg_starttime = 0; epgTitle=""; CTimerEvent::Reschedule(); @@ -1317,22 +1317,22 @@ void CTimerEvent_Record::getEpgId() { if ( e->startTime <= check_time && (e->startTime + (int)e->duration) >= check_time) { - eventInfo.epgID = e->eventID; + eventInfo.epg_id = e->eventID; eventInfo.epg_starttime = e->startTime; break; } } - if(eventInfo.epgID != 0) + if(eventInfo.epg_id != 0) { CShortEPGData epgdata; - if (CEitManager::getInstance()->getEPGidShort(eventInfo.epgID, &epgdata)) + if (CEitManager::getInstance()->getEPGidShort(eventInfo.epg_id, &epgdata)) epgTitle=epgdata.title; } } //------------------------------------------------------------ void CTimerEvent_Record::Refresh() { - if (eventInfo.epgID == 0) + if (eventInfo.epg_id == 0) getEpgId(); } //------------------------------------------------------------ @@ -1422,15 +1422,15 @@ void CTimerEvent_Zapto::getEpgId() { if ( e->startTime < check_time && (e->startTime + (int)e->duration) > check_time) { - eventInfo.epgID = e->eventID; + eventInfo.epg_id = e->eventID; eventInfo.epg_starttime = e->startTime; break; } } - if(eventInfo.epgID != 0) + if(eventInfo.epg_id != 0) { CShortEPGData epgdata; - if (CEitManager::getInstance()->getEPGidShort(eventInfo.epgID, &epgdata)) + if (CEitManager::getInstance()->getEPGidShort(eventInfo.epg_id, &epgdata)) epgTitle=epgdata.title; } } @@ -1441,12 +1441,12 @@ void CTimerEvent_Zapto::getEpgId() //============================================================= CTimerEvent_NextProgram::CTimerEvent_NextProgram(time_t announce_Time, time_t alarm_Time, time_t stop_Time, t_channel_id channel_id, - event_id_t epgID, + t_event_id epg_id, time_t epg_starttime, CTimerd::CTimerEventRepeat evrepeat, uint32_t repeatcount) : CTimerEvent(CTimerd::TIMER_NEXTPROGRAM, announce_Time, alarm_Time, stop_Time, evrepeat,repeatcount) { - eventInfo.epgID = epgID; + eventInfo.epg_id = epg_id; eventInfo.epg_starttime = epg_starttime; eventInfo.channel_id = channel_id; } @@ -1457,8 +1457,8 @@ CTimerEvent(CTimerd::TIMER_NEXTPROGRAM, config, iId) std::stringstream ostr; ostr << iId; std::string id=ostr.str(); - eventInfo.epgID = config->getInt64("EVENT_INFO_EPG_ID_"+id); - dprintf("read EVENT_INFO_EPG_ID_%s %ld\n",id.c_str(),(long)eventInfo.epgID); + eventInfo.epg_id = config->getInt64("EVENT_INFO_EPG_ID_"+id); + dprintf("read EVENT_INFO_EPG_ID_%s %ld\n",id.c_str(),(long)eventInfo.epg_id); eventInfo.epg_starttime = config->getInt64("EVENT_INFO_EPG_STARTTIME_"+id); dprintf("read EVENT_INFO_EPG_STARTTIME_%s %ld\n",id.c_str(),(long)eventInfo.epg_starttime); @@ -1495,8 +1495,8 @@ void CTimerEvent_NextProgram::saveToConfig(CConfigFile *config) std::stringstream ostr; ostr << eventID; std::string id=ostr.str(); - config->setInt64("EVENT_INFO_EPG_ID_"+id,eventInfo.epgID); - dprintf("set EVENT_INFO_EPG_ID_%s to %ld\n",id.c_str(),(long)eventInfo.epgID); + config->setInt64("EVENT_INFO_EPG_ID_"+id,eventInfo.epg_id); + dprintf("set EVENT_INFO_EPG_ID_%s to %ld\n",id.c_str(),(long)eventInfo.epg_id); config->setInt64("EVENT_INFO_EPG_STARTTIME_"+id,eventInfo.epg_starttime); dprintf("set EVENT_INFO_EPG_STARTTIME_%s to %ld\n",id.c_str(),(long)eventInfo.epg_starttime); @@ -1511,7 +1511,7 @@ void CTimerEvent_NextProgram::saveToConfig(CConfigFile *config) void CTimerEvent_NextProgram::Reschedule() { // clear eogId on reschedule - eventInfo.epgID = 0; + eventInfo.epg_id = 0; eventInfo.epg_starttime = 0; CTimerEvent::Reschedule(); } diff --git a/src/timerd/timermanager.h b/src/timerd/timermanager.h index 414ebf28e..07eef0fb1 100644 --- a/src/timerd/timermanager.h +++ b/src/timerd/timermanager.h @@ -121,7 +121,7 @@ class CTimerEvent_Record : public CTimerEvent bool autoAdjustToEPG; CTimerEvent_Record(time_t announceTime, time_t alarmTime, time_t stopTime, t_channel_id channel_id, - event_id_t epgID = 0, + t_event_id epg_id = 0, time_t epg_starttime = 0, unsigned char apids = TIMERD_APIDS_STD, CTimerd::CTimerEventRepeat evrepeat = CTimerd::TIMERREPEAT_ONCE, @@ -145,11 +145,11 @@ class CTimerEvent_Zapto : public CTimerEvent_Record public: CTimerEvent_Zapto(time_t lannounceTime, time_t lalarmTime, t_channel_id channel_id, - event_id_t epgID = 0, + t_event_id epg_id = 0, time_t epg_starttime = 0, CTimerd::CTimerEventRepeat evrepeat = CTimerd::TIMERREPEAT_ONCE, uint32_t repeatcount = 1): - CTimerEvent_Record(lannounceTime, lalarmTime, (time_t) 0, channel_id, epgID, epg_starttime, 0, evrepeat,repeatcount) + CTimerEvent_Record(lannounceTime, lalarmTime, (time_t) 0, channel_id, epg_id, epg_starttime, 0, evrepeat,repeatcount) {eventType = getEventType();}; CTimerEvent_Zapto(CConfigFile *config, int iId): CTimerEvent_Record(config, iId) @@ -169,7 +169,7 @@ class CTimerEvent_NextProgram : public CTimerEvent CTimerEvent_NextProgram(time_t announceTime, time_t alarmTime, time_t stopTime, t_channel_id channel_id, - event_id_t epgID = 0, + t_event_id epg_id = 0, time_t epg_starttime = 0, CTimerd::CTimerEventRepeat evrepeat = CTimerd::TIMERREPEAT_ONCE, uint32_t repeatcount = 1);