some cleanup
[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
8 class eNavigation: public iObject, public Object
9 {
10         DECLARE_REF;
11 private:
12         ePtr<iPlayableService> m_runningService;
13         ePtr<iServiceHandler> m_servicehandler;
14         Signal2<void,eNavigation*,int> m_event;
15         ePtr<eConnection> m_service_event_conn;
16         void serviceEvent(iPlayableService* service, int event);
17         
18         std::list<eServiceReference> m_playlist;
19 public:
20         enum
21         {
22                 evStopService,  /** the "current" service was just stopped and likes to be deallocated (clear refs!) */
23                 evNewService, /** a new "current" service was just started */
24                 evPlayFailed,
25                 evPlaylistDone
26         };
27         RESULT playService(const eServiceReference &service);
28         RESULT enqueueService(const eServiceReference &service);
29         RESULT connectEvent(const Slot2<void,eNavigation*,int> &event, ePtr<eConnection> &connection);
30 /*      int connectServiceEvent(const Slot1<void,iPlayableService*,int> &event, ePtr<eConnection> &connection); */
31         RESULT getCurrentService(ePtr<iPlayableService> &service);
32         
33         RESULT pause(int p);
34         eNavigation(iServiceHandler *serviceHandler);
35         virtual ~eNavigation();
36 };
37
38 #endif