ad5d461be718f405062ff5b63f6377358a6f5454
[enigma2.git] / lib / nav / pcore.h
1 #ifndef __lib_nav_pcore_h
2 #define __lib_nav_pcore_h
3
4 #include <lib/nav/core.h>
5 #include <lib/python/connections.h>
6
7 /* a subset of eNavigation */
8
9 class pNavigation: public iObject, public Object
10 {
11 DECLARE_REF(pNavigation);
12 public:
13         PSignal1<void, int> m_event;
14         
15         enum
16         {
17                 evStopService,  /** the "current" service was just stopped and likes to be deallocated (clear refs!) */
18                 evNewService,   /** a new "current" service was just started */
19                 evPlayFailed,   /** the next service (in playlist) or the one given in playService failed to play */
20                 evUpdatedEventInfo, /** the "currently running" event info was updated */
21                 evUpdatedInfo, /** the program info of this service was updated */
22                 evSeekableStatusChanged,
23         };
24         
25         pNavigation();
26         
27         RESULT playService(const eServiceReference &service);
28         SWIG_VOID(RESULT) recordService(const eServiceReference &ref, ePtr<iRecordableService> &SWIG_OUTPUT);
29         
30         SWIG_VOID(RESULT) getCurrentService(ePtr<iPlayableService> &SWIG_OUTPUT);
31         RESULT stopService();
32         
33         RESULT pause(int p);
34 private:
35         ePtr<eNavigation> m_core;
36         ePtr<eConnection> m_nav_event_connection;
37         void navEvent(eNavigation *nav, int event);
38 };
39
40 #endif