use eit component tags to get language info of audio streams (premiere)
[enigma2.git] / lib / service / event.h
index 3bbb322efd127ffe4e82a991395b8922e2fbafde..d224c183de311f9f42119657afec2e4e5c5d3f4a 100644 (file)
@@ -9,21 +9,42 @@
 class Event;
 #endif
 
+struct eComponentData
+{
+DECLARE_REF(eComponentData);
+#ifndef SWIG
+       uint8_t m_streamContent;
+       uint8_t m_componentType;
+       uint8_t m_componentTag;
+       std::string m_iso639LanguageCode;
+       std::string m_text;
+#endif
+       int getStreamContent(void) const { return m_streamContent; }
+       int getComponentType(void) const { return m_componentType; }
+       int getComponentTag(void) const { return m_componentTag; }
+       std::string getIso639LanguageCode(void) const { return m_iso639LanguageCode; }
+       std::string getText(void) const { return m_text; }
+};
+
+TEMPLATE_TYPEDEF(ePtr<eComponentData>, eComponentDataPtr);
+
+struct linkage_service
+{
+       uint16_t m_sid;
+       uint16_t m_onid;
+       uint16_t m_tsid;
+       std::string m_description;
+};
+
 class eServiceEvent: public iObject
 {
 DECLARE_REF(eServiceEvent);
 #ifndef SWIG
        bool loadLanguage(Event *event, std::string lang, int tsidonid);
+       std::list<eComponentData> m_component_data;
 #endif
 public:
 #ifndef SWIG
-       struct linkage_service
-       {
-               uint16_t sid;
-               uint16_t onid;
-               uint16_t tsid;
-               std::string description;
-       };
        std::list<linkage_service> m_linkage_services;
        time_t m_begin;
        int m_duration;
@@ -31,12 +52,13 @@ public:
        // .. additional info
        RESULT parseFrom(Event *evt, int tsidonid=0);
 #endif
-       time_t getBeginTime() { return m_begin; }
-       int getDuration() { return m_duration; }
-       std::string getEventName() { return m_event_name; }
-       std::string getShortDescription() { return m_short_description; }
-       std::string getExtendedDescription() { return m_extended_description; }
-       std::string getBeginTimeString();
+       time_t getBeginTime() const { return m_begin; }
+       int getDuration() const { return m_duration; }
+       std::string getEventName() const { return m_event_name; }
+       std::string getShortDescription() const { return m_short_description; }
+       std::string getExtendedDescription() const { return m_extended_description; }
+       std::string getBeginTimeString() const;
+       SWIG_VOID(RESULT) getComponentData(ePtr<eComponentData> &SWIG_OUTPUT, int tagnum) const;
 };
 
 TEMPLATE_TYPEDEF(ePtr<eServiceEvent>, eServiceEventPtr);