add possibility to disable debug output
[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
9 class eNavigation: public iObject, public Object
10 {
11         DECLARE_REF(eNavigation);
12         ePtr<iServiceHandler> m_servicehandler;
13
14         ePtr<iPlayableService> m_runningService;
15         Signal1<void,int> m_event;
16         ePtr<eConnection> m_service_event_conn;
17         void serviceEvent(iPlayableService* service, int event);
18
19         std::map<ePtr<iRecordableService>, ePtr<eConnection>, std::less<iRecordableService*> > m_recordings;
20         Signal2<void,ePtr<iRecordableService>,int> m_record_event;
21         void recordEvent(iRecordableService* service, int event);
22 public:
23         
24         RESULT playService(const eServiceReference &service);
25         RESULT connectEvent(const Slot1<void,int> &event, ePtr<eConnection> &connection);
26         RESULT connectRecordEvent(const Slot2<void,ePtr<iRecordableService>,int> &event, ePtr<eConnection> &connection);
27 /*      int connectServiceEvent(const Slot1<void,iPlayableService*,int> &event, ePtr<eConnection> &connection); */
28         RESULT getCurrentService(ePtr<iPlayableService> &service);
29         RESULT stopService(void);
30         
31         RESULT recordService(const eServiceReference &ref, ePtr<iRecordableService> &service);
32         RESULT stopRecordService(ePtr<iRecordableService> &service);
33         PyObject *getRecordings(void);
34         
35         RESULT pause(int p);
36         eNavigation(iServiceHandler *serviceHandler);
37         virtual ~eNavigation();
38 };
39
40 #endif