finaly removed dummy
[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 <lib/nav/playlist.h>
7 #include <connection.h>
8
9 class eNavigation: public iObject, public Object
10 {
11         DECLARE_REF(eNavigation);
12 private:
13         ePtr<iPlayableService> m_runningService;
14         
15         ePtr<iServiceHandler> m_servicehandler;
16         Signal2<void,eNavigation*,int> m_event;
17         ePtr<eConnection> m_service_event_conn;
18         void serviceEvent(iPlayableService* service, int event);
19         
20         ePtr<ePlaylist> m_playlist;
21 public:
22         enum
23         {
24                 evStopService,  /** the "current" service was just stopped and likes to be deallocated (clear refs!) */
25                 evNewService,   /** a new "current" service was just started */
26                 evPlayFailed,   /** the next service (in playlist) or the one given in playService failed to play */
27                 evPlaylistDone, /** the last service in the playlist was just played */
28                 evUpdatedEventInfo /** the "currently running" event info was updated */
29         };
30         
31         RESULT playService(const eServiceReference &service);
32         RESULT enqueueService(const eServiceReference &service);
33         RESULT connectEvent(const Slot2<void,eNavigation*,int> &event, ePtr<eConnection> &connection);
34 /*      int connectServiceEvent(const Slot1<void,iPlayableService*,int> &event, ePtr<eConnection> &connection); */
35         RESULT getCurrentService(ePtr<iPlayableService> &service);
36         RESULT getPlaylist(ePtr<ePlaylist> &playlist);
37         RESULT stopService(void);
38         
39         RESULT recordService(const eServiceReference &ref, ePtr<iRecordableService> &service);
40         
41         RESULT pause(int p);
42         eNavigation(iServiceHandler *serviceHandler);
43         virtual ~eNavigation();
44 };
45
46 #endif