add startmmi
[enigma2.git] / lib / service / event.h
1 #ifndef __lib_service_event_h
2 #define __lib_service_event_h
3
4 #ifndef PYTHON
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 public:
15 #ifndef PYTHON
16         time_t m_begin;
17         int m_duration;
18         std::string m_event_name, m_short_description, m_extended_description;
19         // .. additional info
20         bool loadLanguage(Event *event, std::string lang);
21         RESULT parseFrom(Event *evt);
22 #endif
23         time_t getBeginTime() { return m_begin; }
24         int getDuration() { return m_duration; }
25         std::string getEventName() { return m_event_name; }
26         std::string getShortDescription() { return m_short_description; }
27         std::string getExtendedDescription() { return m_extended_description; }
28         std::string getBeginTimeString();
29 };
30
31 #ifndef PYTHON
32 TEMPLATE_TYPEDEF(ePtr<eServiceEvent>, eServiceEventPtr);
33
34 class eDebugClass: public iObject
35 {
36         DECLARE_REF(eDebugClass);
37 public:
38         int x;
39         static void getDebug(ePtr<eDebugClass> &ptr, int x) { ptr = new eDebugClass(x); }
40         eDebugClass(int i) { printf("build debug class %d\n", i); x = i; }
41         ~eDebugClass() { printf("remove debug class %d\n", x); }
42 };
43
44 // TEMPLATE_TYPEDEF(ePtr<eDebugClass>, eDebugClassPtr);
45 #endif
46
47 #endif