fix handylike jumping in servicelist
[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 <list>
8 #include <string>
9 class Event;
10 #endif
11
12 class eServiceEvent: public iObject
13 {
14 DECLARE_REF(eServiceEvent);
15 #ifndef SWIG
16         bool loadLanguage(Event *event, std::string lang, int tsidonid);
17 #endif
18 public:
19 #ifndef SWIG
20         struct linkage_service
21         {
22                 uint16_t sid;
23                 uint16_t onid;
24                 uint16_t tsid;
25                 std::string description;
26         };
27         std::list<linkage_service> m_linkage_services;
28         time_t m_begin;
29         int m_duration;
30         std::string m_event_name, m_short_description, m_extended_description;
31         // .. additional info
32         RESULT parseFrom(Event *evt, int tsidonid=0);
33 #endif
34         time_t getBeginTime() { return m_begin; }
35         int getDuration() { return m_duration; }
36         std::string getEventName() { return m_event_name; }
37         std::string getShortDescription() { return m_short_description; }
38         std::string getExtendedDescription() { return m_extended_description; }
39         std::string getBeginTimeString();
40 };
41
42 TEMPLATE_TYPEDEF(ePtr<eServiceEvent>, eServiceEventPtr);
43 #ifndef SWIG
44
45 class eDebugClass: public iObject
46 {
47         DECLARE_REF(eDebugClass);
48 public:
49         int x;
50         static void getDebug(ePtr<eDebugClass> &ptr, int x) { ptr = new eDebugClass(x); }
51         eDebugClass(int i) { printf("build debug class %d\n", i); x = i; }
52         ~eDebugClass() { printf("remove debug class %d\n", x); }
53 };
54
55 // TEMPLATE_TYPEDEF(ePtr<eDebugClass>, eDebugClassPtr);
56 #endif
57
58 #endif