X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fservice%2Fiservice.h;h=c809e813db440f2467e96339bf686ae14a03291b;hp=ba14245ef9fbe0cd5577919518452c076a219f8a;hb=55c2a88ecd94a2eb6aa00f1227912fcd2659932b;hpb=7f38db72b754a1a5205f2e904aaacf5822793198 diff --git a/lib/service/iservice.h b/lib/service/iservice.h index ba14245..c809e81 100644 --- a/lib/service/iservice.h +++ b/lib/service/iservice.h @@ -39,7 +39,8 @@ public: shouldSort=8, // should be ASCII-sorted according to service_name. great for directories. hasSortKey=16, // has a sort key in data[3]. not having a sort key implies 0. sort1=32, // sort key is 1 instead of 0 - isMarker=64 // Marker + isMarker=64, // Marker + isGroup=128 // is a group of services }; int flags; // flags will NOT be compared. @@ -137,12 +138,12 @@ public: data[3]=data3; data[4]=data4; } +#endif eServiceReference(int type, int flags, const std::string &path) : type(type), flags(flags), path(path) { memset(data, 0, sizeof(data)); } -#endif eServiceReference(const std::string &string); std::string toString() const; std::string toCompareString() const; @@ -184,6 +185,22 @@ SWIG_ALLOW_OUTPUT_SIMPLE(eServiceReference); extern PyObject *New_eServiceReference(const eServiceReference &ref); // defined in enigma_python.i +#ifndef SWIG +#ifdef PYTHON_REFCOUNT_DEBUG +inline ePyObject Impl_New_eServiceReference(const char* file, int line, const eServiceReference &ref) +{ + return ePyObject(New_eServiceReference(ref), file, line); +} +#define NEW_eServiceReference(ref) Impl_New_eServiceReference(__FILE__, __LINE__, ref) +#else +inline ePyObject Impl_New_eServiceReference(const eServiceReference &ref) +{ + return New_eServiceReference(ref); +} +#define NEW_eServiceReference(ref) Impl_New_eServiceReference(ref) +#endif +#endif // SWIG + typedef long long pts_t; /* the reason we have the servicereference as additional argument is @@ -222,10 +239,14 @@ public: virtual int getLength(const eServiceReference &ref); virtual SWIG_VOID(RESULT) getEvent(const eServiceReference &ref, ePtr &SWIG_OUTPUT, time_t start_time=-1); // returns true when not implemented - virtual bool isPlayable(const eServiceReference &ref, const eServiceReference &ignore); + virtual int isPlayable(const eServiceReference &ref, const eServiceReference &ignore); virtual int getInfo(const eServiceReference &ref, int w); virtual std::string getInfoString(const eServiceReference &ref,int w); + virtual PyObject *getInfoObject(const eServiceReference &ref, int w); + + virtual int setInfo(const eServiceReference &ref, int w, int v); + virtual int setInfoString(const eServiceReference &ref, int w, const char *v); }; TEMPLATE_TYPEDEF(ePtr, iStaticServiceInformationPtr); @@ -279,12 +300,22 @@ public: sVideoType, // MPEG2 MPEG4 sTags, /* space seperated list of tags */ + + sDVBState, /* states as defined in pmt handler (as events there) */ + + sVideoHeight, + sVideoWidth, + + sTransponderData /* transponderdata as python dict */ }; enum { resNA = -1, resIsString = -2, resIsPyObject = -3 }; virtual int getInfo(int w); virtual std::string getInfoString(int w); virtual PyObject *getInfoObject(int w); + + virtual int setInfo(int w, int v); + virtual int setInfoString(int w, const char *v); }; TEMPLATE_TYPEDEF(ePtr, iServiceInformationPtr); @@ -454,7 +485,7 @@ class iCueSheet: public iObject public: /* returns a list of (pts, what)-tuples */ virtual PyObject *getCutList() = 0; - virtual void setCutList(PyObject *list) = 0; + virtual void setCutList(SWIG_PYOBJECT(ePyObject) list) = 0; virtual void setCutListEnable(int enable) = 0; enum { cutIn = 0, cutOut = 1, cutMark = 2 }; }; @@ -467,9 +498,10 @@ class PyList; class iSubtitleOutput: public iObject { public: - virtual RESULT enableSubtitles(eWidget *parent, PyObject *entry)=0; + virtual RESULT enableSubtitles(eWidget *parent, SWIG_PYOBJECT(ePyObject) entry)=0; virtual RESULT disableSubtitles(eWidget *parent)=0; virtual PyObject *getSubtitleList()=0; + virtual PyObject *getCachedSubtitle()=0; }; TEMPLATE_TYPEDEF(ePtr, iSubtitleOutputPtr); @@ -503,9 +535,13 @@ public: /* only when cueSheet is implemented */ evCuesheetChanged, - evUpdatedRadioText + evUpdatedRadioText, + + evVideoSizeChanged }; +#ifndef SWIG virtual RESULT connectEvent(const Slot2 &event, ePtr &connection)=0; +#endif virtual RESULT start()=0; virtual RESULT stop()=0; /* might have to be changed... */ @@ -533,6 +569,31 @@ class iRecordableService: public iObject ~iRecordableService(); #endif public: + enum + { + evStart, + evStop, + evTunedIn, + evTuneFailed, + evRecordRunning, + evRecordStopped, + evNewProgramInfo, + evRecordFailed +// evDiskFull + }; + enum + { + NoError=0, + errOpenRecordFile=-1, + errNoDemuxAvailable=-2, + errNoTsRecorderAvailable=-3, + errDiskFull=-4, + errTuneFailed=-255 + }; +#ifndef SWIG + virtual RESULT connectEvent(const Slot2 &event, ePtr &connection)=0; +#endif + virtual RESULT getError(int &)=0; virtual RESULT prepare(const char *filename, time_t begTime=-1, time_t endTime=-1, int eit_event_id=-1)=0; virtual RESULT start()=0; virtual RESULT stop()=0; @@ -541,6 +602,29 @@ public: TEMPLATE_TYPEDEF(ePtr, iRecordableServicePtr); +extern PyObject *New_iRecordableServicePtr(const ePtr &ref); // defined in enigma_python.i + +inline PyObject *PyFrom(ePtr &c) +{ + return New_iRecordableServicePtr(c); +} + +#ifndef SWIG +#ifdef PYTHON_REFCOUNT_DEBUG +inline ePyObject Impl_New_iRecordableServicePtr(const char* file, int line, const ePtr &ptr) +{ + return ePyObject(New_iRecordableServicePtr(ptr), file, line); +} +#define NEW_iRecordableServicePtr(ptr) Impl_New_iRecordableServicePtr(__FILE__, __LINE__, ptr) +#else +inline ePyObject Impl_New_iRecordableServicePtr(const ePtr &ptr) +{ + return New_iRecordableServicePtr(ptr); +} +#define NEW_iRecordableServicePtr(ptr) Impl_New_iRecordableServicePtr(ptr) +#endif +#endif // SWIG + // TEMPLATE_TYPEDEF(std::list, eServiceReferenceList); class iMutableServiceList: public iObject @@ -572,8 +656,10 @@ class iListableService: public iObject ~iListableService(); #endif public: +#ifndef SWIG /* legacy interface: get a list */ virtual RESULT getContent(std::list &list, bool sorted=false)=0; +#endif virtual PyObject *getContent(const char* format, bool sorted=false)=0; /* new, shiny interface: streaming. */