fix seekable status when service is already running, only show infobar if InfoBarShow...
[enigma2.git] / lib / service / event.h
index d224c183de311f9f42119657afec2e4e5c5d3f4a..f315aca8cd608535e6bfb0980a2ecc87ab9aed87 100644 (file)
@@ -3,12 +3,15 @@
 
 #ifndef SWIG
 #include <time.h>
-#include <lib/base/object.h>
 #include <list>
 #include <string>
 class Event;
 #endif
 
+#include <lib/base/object.h>
+#include <lib/service/iservice.h>
+
+SWIG_IGNORE(eComponentData);
 struct eComponentData
 {
 DECLARE_REF(eComponentData);
@@ -25,45 +28,51 @@ DECLARE_REF(eComponentData);
        std::string getIso639LanguageCode(void) const { return m_iso639LanguageCode; }
        std::string getText(void) const { return m_text; }
 };
+SWIG_TEMPLATE_TYPEDEF(ePtr<eComponentData>, eComponentDataPtr);
 
-TEMPLATE_TYPEDEF(ePtr<eComponentData>, eComponentDataPtr);
-
-struct linkage_service
-{
-       uint16_t m_sid;
-       uint16_t m_onid;
-       uint16_t m_tsid;
-       std::string m_description;
-};
+SWIG_ALLOW_OUTPUT_SIMPLE(eServiceReference);  // needed for SWIG_OUTPUT in eServiceEvent::getLinkageService
 
+SWIG_IGNORE(eServiceEvent);
 class eServiceEvent: public iObject
 {
-DECLARE_REF(eServiceEvent);
-#ifndef SWIG
+       DECLARE_REF(eServiceEvent);
        bool loadLanguage(Event *event, std::string lang, int tsidonid);
        std::list<eComponentData> m_component_data;
-#endif
-public:
-#ifndef SWIG
-       std::list<linkage_service> m_linkage_services;
+       std::list<eServiceReference> m_linkage_services;
        time_t m_begin;
        int m_duration;
+       int m_event_id;
        std::string m_event_name, m_short_description, m_extended_description;
+       static std::string m_language;
        // .. additional info
+public:
+#ifndef SWIG
        RESULT parseFrom(Event *evt, int tsidonid=0);
+       RESULT parseFrom(const std::string filename, int tsidonid=0);
+       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; }
        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;
+       int getNumOfLinkageServices() const { return m_linkage_services.size(); }
+       SWIG_VOID(RESULT) getLinkageService(eServiceReference &SWIG_OUTPUT, eServiceReference &parent, int num) const;
 };
+SWIG_TEMPLATE_TYPEDEF(ePtr<eServiceEvent>, eServiceEvent);
+SWIG_EXTEND(ePtr<eServiceEvent>,
+       static void setEPGLanguage( const std::string language )
+       {
+               extern void setServiceEventLanguage(const std::string language);
+               setServiceEventLanguage(language);
+       }
+);
 
-TEMPLATE_TYPEDEF(ePtr<eServiceEvent>, eServiceEventPtr);
 #ifndef SWIG
-
+SWIG_IGNORE(eDebugClass);
 class eDebugClass: public iObject
 {
        DECLARE_REF(eDebugClass);
@@ -73,8 +82,7 @@ public:
        eDebugClass(int i) { printf("build debug class %d\n", i); x = i; }
        ~eDebugClass() { printf("remove debug class %d\n", x); }
 };
-
-// TEMPLATE_TYPEDEF(ePtr<eDebugClass>, eDebugClassPtr);
+SWIG_TEMPLATE_TYPEDEF(ePtr<eDebugClass>, eDebugClassPtr);
 #endif
 
 #endif