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