lib/service/iservice.h, servicedvb.h, servicedvb.cpp: add possibility to play another...
[enigma2.git] / lib / service / iservice.h
index 8e3cec6f4ec951382386c91f89eeb7d0d0c541dc..d80733df265be1439ba67ec9bc007eaa2fef7915 100644 (file)
@@ -138,6 +138,10 @@ public:
                data[3]=data3;
                data[4]=data4;
        }
+       operator bool() const
+       {
+               return valid();
+       }
 #endif
        eServiceReference(int type, int flags, const std::string &path)
                : type(type), flags(flags), path(path)
@@ -170,10 +174,6 @@ public:
                        return r < 0;
                return path < c.path;
        }
-       operator bool() const
-       {
-               return valid();
-       }
        
        int valid() const
        {
@@ -286,6 +286,7 @@ public:
                sDescription,
                sServiceref,
                sTimeCreate,            /* unix time or string */
+               sFileSize,
 
                sCAIDs,
                sVideoType,             /* MPEG2 MPEG4 */
@@ -592,7 +593,8 @@ class iTimeshiftService: public iObject
 #endif
 public:
        virtual RESULT startTimeshift()=0;
-       virtual RESULT stopTimeshift()=0;
+       virtual RESULT stopTimeshift(bool swToLive=true)=0;
+       virtual RESULT setNextPlaybackFile(const char *fn)=0; // not needed by our internal timeshift.. but external plugin...
 
        virtual int isTimeshiftActive()=0;
                        /* this essentially seeks to the relative end of the timeshift buffer */
@@ -718,6 +720,9 @@ public:
 
                /* for transferring a service... */
        virtual SWIG_VOID(RESULT) getListOfFilenames(std::list<std::string> &SWIG_OUTPUT)=0;
+       
+               /* a blocking call to reindex a file */
+       virtual int reindex() = 0;
 
                // TODO: additional stuff, like a conversion interface?
 };
@@ -742,6 +747,19 @@ public:
 };
 SWIG_TEMPLATE_TYPEDEF(ePtr<iStreamableService>, iStreamableServicePtr);
 
+SWIG_IGNORE(iStreamedService);
+class iStreamedService: public iObject
+{
+#ifdef SWIG
+       iStreamedService();
+       ~iStreamedService();
+#endif
+public:
+       virtual PyObject *getBufferCharge()=0;
+       virtual int setBufferSize(int size)=0;
+};
+SWIG_TEMPLATE_TYPEDEF(ePtr<iStreamedService>, iStreamedServicePtr);
+
 class iServiceKeys_ENUMS
 {
 #ifdef SWIG
@@ -812,6 +830,8 @@ public:
                evVideoFramerateChanged,
                evVideoProgressiveChanged,
 
+               evBuffering,
+
                evStopped,
 
                evUser = 0x100
@@ -847,6 +867,7 @@ public:
        virtual SWIG_VOID(RESULT) audioDelay(ePtr<iAudioDelay> &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) streamed(ePtr<iStreamedService> &SWIG_OUTPUT)=0;
        virtual SWIG_VOID(RESULT) keys(ePtr<iServiceKeys> &SWIG_OUTPUT)=0;
 };
 SWIG_TEMPLATE_TYPEDEF(ePtr<iPlayableService>, iPlayableServicePtr);