add seekTitle to iSeekableService interface
[enigma2.git] / lib / service / iservice.h
index feaa771eae5cb7ff02fc41675c2a544b775c1507..dac398495bb12fa635e2e60476d0b13726ca8ec7 100644 (file)
@@ -84,7 +84,7 @@ public:
 #ifndef SWIG
        std::string name;
 #endif
-       std::string getName() { return name; }
+       std::string getName() const { return name; }
        void setName( const std::string &n ) { name=n; }
 
        eServiceReference()
@@ -301,7 +301,9 @@ public:
                sVideoHeight,
                sVideoWidth,
 
-               sTransponderData        /* transponderdata as python dict */
+               sTransponderData,       /* transponderdata as python dict */
+
+               sUser = 0x100
        };
        enum {
                resNA = -1,
@@ -354,7 +356,8 @@ public:
                signalQuality,
                lockState,
                syncState,
-               frontendNumber
+               frontendNumber,
+               signalQualitydB,
        };
 };
 
@@ -417,6 +420,8 @@ public:
                   audio will be switched off, sync will be disabled etc. */
        virtual RESULT setTrickmode(int trick=0)=0;
        virtual RESULT isCurrentlySeekable()=0;
+       virtual RESULT seekChapter(int chapter) { return -1; }
+       virtual RESULT seekTitle(int chapter) { return -1; }
 };
 SWIG_TEMPLATE_TYPEDEF(ePtr<iSeekableService>, iSeekableServicePtr);
 
@@ -425,9 +430,11 @@ struct iAudioTrackInfo
 #ifndef SWIG
        std::string m_description;
        std::string m_language; /* iso639 */
+       int m_pid; /* for association with the stream. */
 #endif
        std::string getDescription() { return m_description; }
        std::string getLanguage() { return m_language; }
+       int getPID() { return m_pid; }
 };
 SWIG_ALLOW_OUTPUT_SIMPLE(iAudioTrackInfo);
 
@@ -442,6 +449,7 @@ public:
        virtual int getNumberOfTracks()=0;
        virtual RESULT selectTrack(unsigned int i)=0;
        virtual SWIG_VOID(RESULT) getTrackInfo(struct iAudioTrackInfo &SWIG_OUTPUT, unsigned int n)=0;
+       virtual int getCurrentTrack()=0;
 };
 SWIG_TEMPLATE_TYPEDEF(ePtr<iAudioTrackSelection>, iAudioTrackSelectionPtr);
 
@@ -483,17 +491,30 @@ public:
 };
 SWIG_TEMPLATE_TYPEDEF(ePtr<iAudioDelay>, iAudioDelayPtr);
 
-SWIG_IGNORE(iRadioText);
-class iRadioText: public iObject
+class iRdsDecoder_ENUMS
+{
+#ifdef SWIG
+       iRdsDecoder_ENUMS();
+       ~iRdsDecoder_ENUMS();
+#endif
+public:
+       enum { RadioText, RtpText };
+};
+
+SWIG_IGNORE(iRdsDecoder);
+class iRdsDecoder: public iObject, public iRdsDecoder_ENUMS
 {
 #ifdef SWIG
-       iRadioText();
-       ~iRadioText();
+       iRdsDecoder();
+       ~iRdsDecoder();
 #endif
 public:
-       virtual std::string getRadioText(int x=0)=0;
+       virtual std::string getText(int x=RadioText)=0;
+       virtual void showRassSlidePicture()=0;
+       virtual void showRassInteractivePic(int page, int subpage)=0;
+       virtual SWIG_PYOBJECT(ePyObject) getRassInteractiveMask()=0;
 };
-SWIG_TEMPLATE_TYPEDEF(ePtr<iRadioText>, iRadioTextPtr);
+SWIG_TEMPLATE_TYPEDEF(ePtr<iRdsDecoder>, iRdsDecoderPtr);
 
 SWIG_IGNORE(iSubserviceList);
 class iSubserviceList: public iObject
@@ -648,6 +669,54 @@ public:
 };
 SWIG_TEMPLATE_TYPEDEF(ePtr<iServiceOfflineOperations>, iServiceOfflineOperationsPtr);
 
+SWIG_IGNORE(iStreamableService);
+class iStreamableService: public iObject
+{
+#ifdef SWIG
+       iStreamableService();
+       ~iStreamableService();
+#endif
+public:
+               /* returns a dict:
+                       { "demux": <n>,
+                         "pids": [(x,type),(y,type),(z,type),..],
+                         ...
+                       }
+                       with type being "video", "audio", "pmt", "pat"...
+               */
+       virtual PyObject *getStreamingData()=0;
+};
+SWIG_TEMPLATE_TYPEDEF(ePtr<iStreamableService>, iStreamableServicePtr);
+
+class iServiceKeys_ENUMS
+{
+#ifdef SWIG
+       iServiceKeys_ENUMS();
+       ~iServiceKeys_ENUMS();
+#endif
+public:
+       enum {
+               keyLeft,
+               keyRight,
+               keyUp,
+               keyDown,
+               keyOk,
+               keyUser = 0x100
+       };
+};
+
+SWIG_IGNORE(iServiceKeys);
+class iServiceKeys: public iServiceKeys_ENUMS, public iObject
+{
+#ifdef SWIG
+       iServiceKeys();
+       ~iServiceKeys();
+#endif
+public:
+       virtual SWIG_VOID(RESULT) keyPressed(int key)=0;
+};
+SWIG_TEMPLATE_TYPEDEF(ePtr<iServiceKeys>, iServiceKeysPtr);
+
 class iPlayableService_ENUMS
 {
 #ifdef SWIG
@@ -676,12 +745,19 @@ public:
                        /* when cueSheet is implemented */
                evCuesheetChanged,
 
-                       /* when radioText is implemented */
+                       /* when rdsDecoder is implemented */
                evUpdatedRadioText,
+               evUpdatedRtpText,
+
+                       /* Radio Screenshow Support */
+               evUpdatedRassSlidePic,
+               evUpdatedRassInteractivePicMask,
 
                evVideoSizeChanged,
 
-               evStopped
+               evStopped,
+
+               evUser = 0x100
        };
 };
 
@@ -712,29 +788,12 @@ public:
        virtual SWIG_VOID(RESULT) cueSheet(ePtr<iCueSheet> &SWIG_OUTPUT)=0;
        virtual SWIG_VOID(RESULT) subtitle(ePtr<iSubtitleOutput> &SWIG_OUTPUT)=0;
        virtual SWIG_VOID(RESULT) audioDelay(ePtr<iAudioDelay> &SWIG_OUTPUT)=0;
-       virtual SWIG_VOID(RESULT) radioText(ePtr<iRadioText> &SWIG_OUTPUT)=0;
+       virtual SWIG_VOID(RESULT) rdsDecoder(ePtr<iRdsDecoder> &SWIG_OUTPUT)=0;
+       virtual SWIG_VOID(RESULT) stream(ePtr<iStreamableService> &SWIG_OUTPUT)=0;
+       virtual SWIG_VOID(RESULT) keys(ePtr<iServiceKeys> &SWIG_OUTPUT)=0;
 };
 SWIG_TEMPLATE_TYPEDEF(ePtr<iPlayableService>, iPlayableServicePtr);
 
-SWIG_IGNORE(iStreamableService);
-class iStreamableService: public iObject
-{
-#ifdef SWIG
-       iStreamableService();
-       ~iStreamableService();
-#endif
-public:
-               /* returns a dict:
-                       { "demux": <n>,
-                         "pids": [(x,type),(y,type),(z,type),..],
-                         ...
-                       }
-                       with type being "video", "audio", "pmt", "pat"...
-               */
-       virtual PyObject *getStreamingData()=0;
-};
-SWIG_TEMPLATE_TYPEDEF(ePtr<iStreamableService>, iStreamableServicePtr);
-
 class iRecordableService_ENUMS
 {
 #ifdef SWIG
@@ -750,8 +809,8 @@ public:
                evRecordRunning,
                evRecordStopped,
                evNewProgramInfo,
-               evRecordFailed
-               /*evDiskFull*/
+               evRecordFailed,
+               evRecordWriteError
        };
        enum {
                NoError=0,
@@ -759,7 +818,9 @@ public:
                errNoDemuxAvailable=-2,
                errNoTsRecorderAvailable=-3,
                errDiskFull=-4,
-               errTuneFailed=-255
+               errTuneFailed=-255,
+               errMisconfiguration = -256,
+               errNoResources = -257,
        };
 };