lib/dvb/dvb.cpp: allow non relative seeking even without valid decoding demux here
[enigma2.git] / lib / nav / core.h
1 #ifndef __nav_core_h
2 #define __nav_core_h
3
4 #include <lib/base/object.h>
5 #include <lib/service/iservice.h>
6 #include <connection.h>
7 #include <map>
8 #include <set>
9
10 class eNavigation: public iObject, public Object
11 {
12         DECLARE_REF(eNavigation);
13         ePtr<iServiceHandler> m_servicehandler;
14
15         ePtr<iPlayableService> m_runningService;
16         Signal1<void,int> m_event;
17         ePtr<eConnection> m_service_event_conn;
18         void serviceEvent(iPlayableService* service, int event);
19
20         std::map<ePtr<iRecordableService>, ePtr<eConnection>, std::less<iRecordableService*> > m_recordings;
21         std::set<ePtr<iRecordableService>, std::less<iRecordableService*> > m_simulate_recordings;
22
23         Signal2<void,ePtr<iRecordableService>,int> m_record_event;
24         void recordEvent(iRecordableService* service, int event);
25 public:
26         
27         RESULT playService(const eServiceReference &service);
28         RESULT connectEvent(const Slot1<void,int> &event, ePtr<eConnection> &connection);
29         RESULT connectRecordEvent(const Slot2<void,ePtr<iRecordableService>,int> &event, ePtr<eConnection> &connection);
30 /*      int connectServiceEvent(const Slot1<void,iPlayableService*,int> &event, ePtr<eConnection> &connection); */
31         RESULT getCurrentService(ePtr<iPlayableService> &service);
32         RESULT stopService(void);
33         
34         RESULT recordService(const eServiceReference &ref, ePtr<iRecordableService> &service, bool simulate=false);
35         RESULT stopRecordService(ePtr<iRecordableService> &service);
36         PyObject *getRecordings(bool simulate=false);
37         
38         RESULT pause(int p);
39         eNavigation(iServiceHandler *serviceHandler);
40         virtual ~eNavigation();
41 };
42
43 #endif