4 #include <lib/base/object.h>
5 #include <lib/service/iservice.h>
6 #include <lib/nav/playlist.h>
7 #include <connection.h>
9 class eNavigation: public iObject, public Object
11 DECLARE_REF(eNavigation);
13 ePtr<iPlayableService> m_runningService;
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);
20 ePtr<ePlaylist> m_playlist;
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 */
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);
39 RESULT recordService(const eServiceReference &ref, ePtr<iRecordableService> &service);
42 eNavigation(iServiceHandler *serviceHandler);
43 virtual ~eNavigation();