m_extended_description += convertDVBUTF8(eed->getText());
retval=1;
}
+ const ExtendedEventList *itemlist = eed->getItems();
+ const ExtendedEventConstIterator it = itemlist->begin();
+ int num=0;
+ while(it != itemlist->end())
+ {
+ eDebug("%d %s : %s", ++num,
+ convertDVBUTF8((*it)->getItem()).c_str(),
+ convertDVBUTF8((*it)->getItemDescription()).c_str());
+ }
// TODO handling for extended event items? ( producer... )
break;
}
{
uint16_t stime_mjd = evt->getStartTimeMjd();
uint32_t stime_bcd = evt->getStartTimeBcd();
- uint16_t duration = evt->getDuration();
+ uint32_t duration = evt->getDuration();
m_begin = parseDVBtime(
stime_mjd >> 8,
stime_mjd&0xFF,
(stime_bcd >> 8)&0xFF,
stime_bcd & 0xFF
);
- m_duration = ((duration & 0xFF) + (duration >> 8) & 0xFF) * 24 * 60;
+ m_duration = fromBCD(duration>>16)*3600+fromBCD(duration>>8)*60+fromBCD(duration);
std::string country="de_DE"; // TODO use local data here
for (int i=0; i < MAX_LANG; i++)
if (country==ISOtbl[i][0])
return 0;
}
+std::string eServiceEvent::getBeginTimeString()
+{
+ tm t;
+ localtime_r(&m_begin, &t);
+ char tmp[13];
+ snprintf(tmp, 13, "%02d.%02d, %02d:%02d",
+ t.tm_mday, t.tm_mon+1,
+ t.tm_hour, t.tm_min);
+ return std::string(tmp, 12);
+}
+
DEFINE_REF(eDebugClass);
#ifndef __lib_service_event_h
#define __lib_service_event_h
+#ifndef PYTHON
+
#include <time.h>
#include <lib/base/object.h>
#include <string>
class Event;
+#endif
class eServiceEvent: public iObject
{
DECLARE_REF(eServiceEvent);
public:
+#ifndef PYTHON
time_t m_begin;
int m_duration;
std::string m_event_name, m_short_description, m_extended_description;
// .. additional info
-
bool loadLanguage(Event *event, std::string lang);
RESULT parseFrom(Event *evt);
+#endif
+ time_t getBeginTime() { return m_begin; }
+ int getDuration() { return m_duration; }
+ std::string getEventName() { return m_event_name; }
+ std::string getShortDescription() { return m_short_description; }
+ std::string getExtendedDescription() { return m_extended_description; }
+ std::string getBeginTimeString();
};
+#ifndef PYTHON
TEMPLATE_TYPEDEF(ePtr<eServiceEvent>, eServiceEventPtr);
class eDebugClass: public iObject
};
// TEMPLATE_TYPEDEF(ePtr<eDebugClass>, eDebugClassPtr);
+#endif
#endif