add multisat scan setup for the case of using a dish positioner
[enigma2.git] / lib / service / event.cpp
1 #include <lib/service/event.h>
2 #include <lib/base/estring.h>
3 #include <dvbsi++/event_information_section.h>
4 #include <dvbsi++/short_event_descriptor.h>
5 #include <dvbsi++/descriptor_tag.h>
6
7 DEFINE_REF(eServiceEvent);
8
9 RESULT eServiceEvent::parseFrom(Event *evt)
10 {
11         m_begin = 0;    // ich bin FAUL
12         m_duration = (evt->getDuration() & 0xFF) + ((evt->getDuration() >> 8) & 0xFF) * 60 + ((evt->getDuration() >> 16) & 0xFF) * 24 * 60;
13         
14         for (DescriptorConstIterator desc = evt->getDescriptors()->begin(); desc != evt->getDescriptors()->end(); ++desc)
15         {
16                 switch ((*desc)->getTag())
17                 {
18                 case SHORT_EVENT_DESCRIPTOR:
19                 {
20                         const ShortEventDescriptor *sed = (ShortEventDescriptor*)*desc;
21                         m_event_name = convertDVBUTF8(sed->getEventName());
22                         m_description = convertDVBUTF8(sed->getText());
23                         break;
24                 }
25                 }
26         }
27         return 0;
28 }
29
30 DEFINE_REF(eDebugClass);