add ability to select default encoding for dvb texts in many ways.. ( take a look...
[enigma2.git] / lib / service / event.h
1 #ifndef __lib_service_event_h
2 #define __lib_service_event_h
3
4 #ifndef SWIG
5 #include <time.h>
6 #include <lib/base/object.h>
7 #include <string>
8 class Event;
9 #endif
10
11 class eServiceEvent: public iObject
12 {
13 DECLARE_REF(eServiceEvent);
14 #ifndef SWIG
15         bool loadLanguage(Event *event, std::string lang, int tsidonid);
16 #endif
17 public:
18 #ifndef SWIG
19         time_t m_begin;
20         int m_duration;
21         std::string m_event_name, m_short_description, m_extended_description;
22         // .. additional info
23         RESULT parseFrom(Event *evt, int tsidonid=0);
24 #endif
25         time_t getBeginTime() { return m_begin; }
26         int getDuration() { return m_duration; }
27         std::string getEventName() { return m_event_name; }
28         std::string getShortDescription() { return m_short_description; }
29         std::string getExtendedDescription() { return m_extended_description; }
30         std::string getBeginTimeString();
31 };
32
33 TEMPLATE_TYPEDEF(ePtr<eServiceEvent>, eServiceEventPtr);
34 #ifndef SWIG
35
36 class eDebugClass: public iObject
37 {
38         DECLARE_REF(eDebugClass);
39 public:
40         int x;
41         static void getDebug(ePtr<eDebugClass> &ptr, int x) { ptr = new eDebugClass(x); }
42         eDebugClass(int i) { printf("build debug class %d\n", i); x = i; }
43         ~eDebugClass() { printf("remove debug class %d\n", x); }
44 };
45
46 // TEMPLATE_TYPEDEF(ePtr<eDebugClass>, eDebugClassPtr);
47 #endif
48
49 #endif