1 #ifndef __lib_service_event_h
2 #define __lib_service_event_h
6 #include <lib/base/object.h>
7 #include <lib/service/iservice.h>
15 DECLARE_REF(eComponentData);
17 uint8_t m_streamContent;
18 uint8_t m_componentType;
19 uint8_t m_componentTag;
20 std::string m_iso639LanguageCode;
23 int getStreamContent(void) const { return m_streamContent; }
24 int getComponentType(void) const { return m_componentType; }
25 int getComponentTag(void) const { return m_componentTag; }
26 std::string getIso639LanguageCode(void) const { return m_iso639LanguageCode; }
27 std::string getText(void) const { return m_text; }
30 TEMPLATE_TYPEDEF(ePtr<eComponentData>, eComponentDataPtr);
32 class eServiceEvent: public iObject
34 DECLARE_REF(eServiceEvent);
35 bool loadLanguage(Event *event, std::string lang, int tsidonid);
36 std::list<eComponentData> m_component_data;
37 std::list<eServiceReference> m_linkage_services;
41 std::string m_event_name, m_short_description, m_extended_description;
45 RESULT parseFrom(Event *evt, int tsidonid=0);
47 time_t getBeginTime() const { return m_begin; }
48 int getDuration() const { return m_duration; }
49 int getEventId() const { return m_event_id; }
50 std::string getEventName() const { return m_event_name; }
51 std::string getShortDescription() const { return m_short_description; }
52 std::string getExtendedDescription() const { return m_extended_description; }
53 std::string getBeginTimeString() const;
54 SWIG_VOID(RESULT) getComponentData(ePtr<eComponentData> &SWIG_OUTPUT, int tagnum) const;
55 int getNumOfLinkageServices() const { return m_linkage_services.size(); }
56 SWIG_VOID(RESULT) getLinkageService(eServiceReference &SWIG_OUTPUT, eServiceReference &parent, int num) const;
59 TEMPLATE_TYPEDEF(ePtr<eServiceEvent>, eServiceEventPtr);
62 class eDebugClass: public iObject
64 DECLARE_REF(eDebugClass);
67 static void getDebug(ePtr<eDebugClass> &ptr, int x) { ptr = new eDebugClass(x); }
68 eDebugClass(int i) { printf("build debug class %d\n", i); x = i; }
69 ~eDebugClass() { printf("remove debug class %d\n", x); }
72 // TEMPLATE_TYPEDEF(ePtr<eDebugClass>, eDebugClassPtr);