fdcb385e283567621a4179612c43c90e700c05b2
[enigma2.git] / lib / nav / pcore.cpp
1 #include <lib/nav/pcore.h>
2 #include <lib/service/service.h>
3 #include <lib/service/event.h>
4 #include <lib/base/eerror.h>
5
6 DEFINE_REF(pNavigation);
7
8 pNavigation::pNavigation()
9 {
10         ePtr<iServiceHandler> service_center;
11         eServiceCenter::getInstance(service_center);
12
13         assert(service_center);
14         m_core = new eNavigation(service_center);
15         
16         m_core->connectEvent(slot(*this, &pNavigation::navEvent), m_nav_event_connection);
17 }
18
19 RESULT pNavigation::playService(const eServiceReference &service)
20 {
21         return m_core->playService(service);
22 }
23
24 RESULT pNavigation::recordService(const eServiceReference &ref, ePtr<iRecordableService> &service)
25 {
26         return m_core->recordService(ref, service);
27 }
28
29 RESULT pNavigation::getCurrentService(ePtr<iPlayableService> &service)
30 {
31         return m_core->getCurrentService(service);
32 }
33
34 RESULT pNavigation::pause(int p)
35 {
36         return m_core->pause(p);
37 }
38
39 RESULT pNavigation::stopService()
40 {
41         return m_core->stopService();
42 }
43
44 void pNavigation::navEvent(eNavigation *nav, int event)
45 {
46                 /* just relay the events here. */
47         m_event(event);
48 }