Support turbo2.
[vuplus_dvbapp] / 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 #include <lib/dvb/fcc.h>
10
11 class eNavigation: public iObject, public Object
12 {
13         DECLARE_REF(eNavigation);
14         int m_decoder;
15         ePtr<iServiceHandler> m_servicehandler;
16
17         ePtr<iPlayableService> m_runningService;
18         Signal1<void,int> m_event;
19         ePtr<eConnection> m_service_event_conn;
20         void serviceEvent(iPlayableService* service, int event);
21
22         std::map<ePtr<iRecordableService>, ePtr<eConnection>, std::less<iRecordableService*> > m_recordings;
23         std::set<ePtr<iRecordableService>, std::less<iRecordableService*> > m_simulate_recordings;
24
25         Signal2<void,ePtr<iRecordableService>,int> m_record_event;
26         void recordEvent(iRecordableService* service, int event);
27
28         friend class eFCCServiceManager;
29         ePtr<eFCCServiceManager> m_fccmgr;
30
31 public:
32         
33         RESULT playService(const eServiceReference &service);
34         RESULT connectEvent(const Slot1<void,int> &event, ePtr<eConnection> &connection);
35         RESULT connectRecordEvent(const Slot2<void,ePtr<iRecordableService>,int> &event, ePtr<eConnection> &connection);
36 /*      int connectServiceEvent(const Slot1<void,iPlayableService*,int> &event, ePtr<eConnection> &connection); */
37         RESULT getCurrentService(ePtr<iPlayableService> &service);
38         RESULT stopService(void);
39         
40         RESULT recordService(const eServiceReference &ref, ePtr<iRecordableService> &service, bool simulate=false);
41         RESULT stopRecordService(ePtr<iRecordableService> &service);
42         PyObject *getRecordings(bool simulate=false);
43         
44         RESULT pause(int p);
45         eNavigation(iServiceHandler *serviceHandler, int decoder = 0);
46         virtual ~eNavigation();
47 };
48
49 #endif