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