X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/ed40f6f85c9c07c3c1224ae20601082c0309a631..1ff71d24c512a57686d8cdbef41bc0112ca9be72:/lib/service/event.h diff --git a/lib/service/event.h b/lib/service/event.h index d1e1d08b..4c354079 100644 --- a/lib/service/event.h +++ b/lib/service/event.h @@ -14,14 +14,16 @@ class Event; SWIG_IGNORE(eComponentData); struct eComponentData { -DECLARE_REF(eComponentData); -#ifndef SWIG + friend class eServiceEvent; + DECLARE_REF(eComponentData); uint8_t m_streamContent; uint8_t m_componentType; uint8_t m_componentTag; std::string m_iso639LanguageCode; std::string m_text; -#endif +public: + eComponentData(const eComponentData& d) { *this = d; } + eComponentData() { m_streamContent = m_componentType = m_componentTag = 0; } int getStreamContent(void) const { return m_streamContent; } int getComponentType(void) const { return m_componentType; } int getComponentTag(void) const { return m_componentTag; } @@ -30,6 +32,8 @@ DECLARE_REF(eComponentData); }; SWIG_TEMPLATE_TYPEDEF(ePtr, eComponentDataPtr); +SWIG_ALLOW_OUTPUT_SIMPLE(eServiceReference); // needed for SWIG_OUTPUT in eServiceEvent::getLinkageService + SWIG_IGNORE(eServiceEvent); class eServiceEvent: public iObject { @@ -47,8 +51,8 @@ public: #ifndef SWIG RESULT parseFrom(Event *evt, int tsidonid=0); RESULT parseFrom(const std::string filename, int tsidonid=0); -#endif static void setEPGLanguage( const std::string language ); +#endif time_t getBeginTime() const { return m_begin; } int getDuration() const { return m_duration; } int getEventId() const { return m_event_id; } @@ -57,10 +61,18 @@ public: std::string getExtendedDescription() const { return m_extended_description; } std::string getBeginTimeString() const; SWIG_VOID(RESULT) getComponentData(ePtr &SWIG_OUTPUT, int tagnum) const; + PyObject *getComponentData() const; int getNumOfLinkageServices() const { return m_linkage_services.size(); } SWIG_VOID(RESULT) getLinkageService(eServiceReference &SWIG_OUTPUT, eServiceReference &parent, int num) const; }; -SWIG_TEMPLATE_TYPEDEF(ePtr, eServiceEventPtr); +SWIG_TEMPLATE_TYPEDEF(ePtr, eServiceEvent); +SWIG_EXTEND(ePtr, + static void setEPGLanguage( const std::string language ) + { + extern void setServiceEventLanguage(const std::string language); + setServiceEventLanguage(language); + } +); #ifndef SWIG SWIG_IGNORE(eDebugClass);