Merge branch 'master' of git.opendreambox.org:/git/enigma2
[enigma2.git] / lib / nav / core.h
index 1751de981f5ee92bc0b2ad2d76ed7e659420dc3d..9f7be884dd15c3e1c6c26a2b16658393d03c09ef 100644 (file)
@@ -4,34 +4,36 @@
 #include <lib/base/object.h>
 #include <lib/service/iservice.h>
 #include <connection.h>
+#include <map>
+#include <set>
 
 class eNavigation: public iObject, public Object
 {
        DECLARE_REF(eNavigation);
-private:
-       ePtr<iPlayableService> m_runningService;
-       
        ePtr<iServiceHandler> m_servicehandler;
-       Signal2<void,eNavigation*,int> m_event;
+
+       ePtr<iPlayableService> m_runningService;
+       Signal1<void,int> m_event;
        ePtr<eConnection> m_service_event_conn;
        void serviceEvent(iPlayableService* service, int event);
+
+       std::map<ePtr<iRecordableService>, ePtr<eConnection>, std::less<iRecordableService*> > m_recordings;
+       std::set<ePtr<iRecordableService>, std::less<iRecordableService*> > m_simulate_recordings;
+
+       Signal2<void,ePtr<iRecordableService>,int> m_record_event;
+       void recordEvent(iRecordableService* service, int event);
 public:
-       enum
-       {
-               evStopService,  /** the "current" service was just stopped and likes to be deallocated (clear refs!) */
-               evNewService,   /** a new "current" service was just started */
-               evPlayFailed,   /** the next service (in playlist) or the one given in playService failed to play */
-               evUpdatedEventInfo, /** the "currently running" event info was updated */
-               evUpdatedInfo /** the program info of this service was updated */
-       };
        
        RESULT playService(const eServiceReference &service);
-       RESULT connectEvent(const Slot2<void,eNavigation*,int> &event, ePtr<eConnection> &connection);
+       RESULT connectEvent(const Slot1<void,int> &event, ePtr<eConnection> &connection);
+       RESULT connectRecordEvent(const Slot2<void,ePtr<iRecordableService>,int> &event, ePtr<eConnection> &connection);
 /*     int connectServiceEvent(const Slot1<void,iPlayableService*,int> &event, ePtr<eConnection> &connection); */
        RESULT getCurrentService(ePtr<iPlayableService> &service);
        RESULT stopService(void);
        
-       RESULT recordService(const eServiceReference &ref, ePtr<iRecordableService> &service);
+       RESULT recordService(const eServiceReference &ref, ePtr<iRecordableService> &service, bool simulate=false);
+       RESULT stopRecordService(ePtr<iRecordableService> &service);
+       PyObject *getRecordings(bool simulate=false);
        
        RESULT pause(int p);
        eNavigation(iServiceHandler *serviceHandler);