diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2007-07-22 22:24:46 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2007-07-22 22:24:46 +0000 |
| commit | 9b87953a3079afb59b930bbe96e0e3aefda02595 (patch) | |
| tree | 38f9e547a349c0b66bdf98b9c514393c08a66fc7 /lib/service/event.cpp | |
| parent | 6fc7f7eb3df8cf3bed07cf9c2aae843734e87fbd (diff) | |
| download | enigma2-9b87953a3079afb59b930bbe96e0e3aefda02595.tar.gz enigma2-9b87953a3079afb59b930bbe96e0e3aefda02595.zip | |
add possibility to get all component descriptors for a event from python
Diffstat (limited to 'lib/service/event.cpp')
| -rw-r--r-- | lib/service/event.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/service/event.cpp b/lib/service/event.cpp index 07eafbc9..e78ddc4e 100644 --- a/lib/service/event.cpp +++ b/lib/service/event.cpp @@ -240,6 +240,23 @@ RESULT eServiceEvent::getComponentData(ePtr<eComponentData> &dest, int tagnum) c return -1; } +PyObject *eServiceEvent::getComponentData() const +{ + ePyObject ret = PyList_New(m_component_data.size()); + int cnt=0; + for (std::list<eComponentData>::const_iterator it(m_component_data.begin()); it != m_component_data.end(); ++it) + { + ePyObject tuple = PyTuple_New(5); + PyTuple_SET_ITEM(tuple, 0, PyInt_FromLong(it->m_componentTag)); + PyTuple_SET_ITEM(tuple, 1, PyInt_FromLong(it->m_componentType)); + PyTuple_SET_ITEM(tuple, 2, PyInt_FromLong(it->m_streamContent)); + PyTuple_SET_ITEM(tuple, 3, PyString_FromString(it->m_iso639LanguageCode.c_str())); + PyTuple_SET_ITEM(tuple, 4, PyString_FromString(it->m_text.c_str())); + PyList_SET_ITEM(ret, cnt++, tuple); + } + return ret; +} + RESULT eServiceEvent::getLinkageService(eServiceReference &service, eServiceReference &parent, int num) const { std::list<eServiceReference>::const_iterator it = |
