1 #ifndef __lib_service_event_h
2 #define __lib_service_event_h
11 #include <lib/base/object.h>
12 #include <lib/service/iservice.h>
14 SWIG_IGNORE(eComponentData);
17 DECLARE_REF(eComponentData);
19 uint8_t m_streamContent;
20 uint8_t m_componentType;
21 uint8_t m_componentTag;
22 std::string m_iso639LanguageCode;
25 int getStreamContent(void) const { return m_streamContent; }
26 int getComponentType(void) const { return m_componentType; }
27 int getComponentTag(void) const { return m_componentTag; }
28 std::string getIso639LanguageCode(void) const { return m_iso639LanguageCode; }
29 std::string getText(void) const { return m_text; }
31 SWIG_TEMPLATE_TYPEDEF(ePtr<eComponentData>, eComponentDataPtr);
33 SWIG_IGNORE(eServiceEvent);
34 class eServiceEvent: public iObject
36 DECLARE_REF(eServiceEvent);
37 bool loadLanguage(Event *event, std::string lang, int tsidonid);
38 std::list<eComponentData> m_component_data;
39 std::list<eServiceReference> m_linkage_services;
43 std::string m_event_name, m_short_description, m_extended_description;
44 static std::string m_language;
48 RESULT parseFrom(Event *evt, int tsidonid=0);
49 RESULT parseFrom(const std::string filename, int tsidonid=0);
51 static void setEPGLanguage( const std::string language );
52 time_t getBeginTime() const { return m_begin; }
53 int getDuration() const { return m_duration; }
54 int getEventId() const { return m_event_id; }
55 std::string getEventName() const { return m_event_name; }
56 std::string getShortDescription() const { return m_short_description; }
57 std::string getExtendedDescription() const { return m_extended_description; }
58 std::string getBeginTimeString() const;
59 SWIG_VOID(RESULT) getComponentData(ePtr<eComponentData> &SWIG_OUTPUT, int tagnum) const;
60 int getNumOfLinkageServices() const { return m_linkage_services.size(); }
61 SWIG_VOID(RESULT) getLinkageService(eServiceReference &SWIG_OUTPUT, eServiceReference &parent, int num) const;
63 SWIG_TEMPLATE_TYPEDEF(ePtr<eServiceEvent>, eServiceEventPtr);
66 SWIG_IGNORE(eDebugClass);
67 class eDebugClass: public iObject
69 DECLARE_REF(eDebugClass);
72 static void getDebug(ePtr<eDebugClass> &ptr, int x) { ptr = new eDebugClass(x); }
73 eDebugClass(int i) { printf("build debug class %d\n", i); x = i; }
74 ~eDebugClass() { printf("remove debug class %d\n", x); }
76 SWIG_TEMPLATE_TYPEDEF(ePtr<eDebugClass>, eDebugClassPtr);