X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/03582d8351bdcbbb1482d937e3d03667ff8d63b8..ce31b562c29e94d2421e0a2b0257030eca97f1cd:/lib/nav/pcore.cpp diff --git a/lib/nav/pcore.cpp b/lib/nav/pcore.cpp index 4fdfffc0..264817ce 100644 --- a/lib/nav/pcore.cpp +++ b/lib/nav/pcore.cpp @@ -10,10 +10,11 @@ pNavigation::pNavigation() ePtr service_center; eServiceCenter::getInstance(service_center); - assert(service_center); + ASSERT(service_center); m_core = new eNavigation(service_center); m_core->connectEvent(slot(*this, &pNavigation::navEvent), m_nav_event_connection); + m_core->connectRecordEvent(slot(*this, &pNavigation::navRecordEvent), m_nav_record_event_connection); } RESULT pNavigation::playService(const eServiceReference &service) @@ -21,11 +22,6 @@ RESULT pNavigation::playService(const eServiceReference &service) return m_core->playService(service); } -RESULT pNavigation::recordService(const eServiceReference &ref, ePtr &service) -{ - return m_core->recordService(ref, service); -} - RESULT pNavigation::getCurrentService(ePtr &service) { return m_core->getCurrentService(service); @@ -41,25 +37,29 @@ RESULT pNavigation::stopService() return m_core->stopService(); } -void pNavigation::navEvent(eNavigation *nav, int event) +RESULT pNavigation::recordService(const eServiceReference &ref, ePtr &service, bool simulate) +{ + return m_core->recordService(ref, service, simulate); +} + +RESULT pNavigation::stopRecordService(ePtr &service) +{ + return m_core->stopRecordService(service); +} + +PyObject *pNavigation::getRecordings(bool simulate) +{ + return m_core->getRecordings(simulate); +} + +void pNavigation::navEvent(int event) +{ + /* just relay the events here. */ + m_event(event); +} + +void pNavigation::navRecordEvent(ePtr service, int event) { /* just relay the events here. */ - switch (event) - { - case eNavigation::evStopService: - m_event(evStopService); - break; - case eNavigation::evNewService: - m_event(evNewService); - break; - case eNavigation::evPlayFailed: - m_event(evPlayFailed); - break; - case eNavigation::evUpdatedEventInfo: - m_event(evUpdatedEventInfo); - break; - case eNavigation::evUpdatedInfo: - m_event(evUpdatedInfo); - break; - } + m_record_event(service, event); }