aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-03-21 09:35:01 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-03-21 09:35:01 +0000
commit43eacf2ca5189458bd43ca947242ec3b3bc5a5f4 (patch)
tree565e59d3e398cdc833d169cc411c41b8b80c42ad
parent0f281025475d23b6c41b405b94f305b7ead78279 (diff)
downloadenigma2-43eacf2ca5189458bd43ca947242ec3b3bc5a5f4.tar.gz
enigma2-43eacf2ca5189458bd43ca947242ec3b3bc5a5f4.zip
add function to set epg language
-rw-r--r--lib/service/event.cpp12
-rw-r--r--lib/service/event.h2
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/service/event.cpp b/lib/service/event.cpp
index 2d0f83a4..07c92c52 100644
--- a/lib/service/event.cpp
+++ b/lib/service/event.cpp
@@ -10,6 +10,15 @@
#include <dvbsi++/component_descriptor.h>
#include <dvbsi++/descriptor_tag.h>
+// static members / methods
+std::string eServiceEvent::m_language = "de_DE";
+
+void eServiceEvent::setEPGLanguage( const std::string language )
+{
+ m_language = language;
+}
+///////////////////////////
+
DEFINE_REF(eServiceEvent);
DEFINE_REF(eComponentData);
@@ -165,9 +174,8 @@ RESULT eServiceEvent::parseFrom(Event *evt, int tsidonid)
);
m_event_id = evt->getEventId();
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])
+ if (m_language==ISOtbl[i][0])
if (loadLanguage(evt, ISOtbl[i][1], tsidonid))
return 0;
if (loadLanguage(evt, "eng", tsidonid))
diff --git a/lib/service/event.h b/lib/service/event.h
index 9ee6538b..285a4ae3 100644
--- a/lib/service/event.h
+++ b/lib/service/event.h
@@ -39,11 +39,13 @@ class eServiceEvent: public iObject
int m_duration;
int m_event_id;
std::string m_event_name, m_short_description, m_extended_description;
+ static std::string m_language;
// .. additional info
public:
#ifndef SWIG
RESULT parseFrom(Event *evt, int tsidonid=0);
#endif
+ static void setEPGLanguage( const std::string language );
time_t getBeginTime() const { return m_begin; }
int getDuration() const { return m_duration; }
int getEventId() const { return m_event_id; }