X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/71efef08fb67e1287dc8f295e4ffe3cfc1aa23c1..4b8b88b747f1229b3538320d934d686e0d71e812:/lib/dvb_ci/dvbci.cpp diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp index 74fa66c7..cf7acde6 100644 --- a/lib/dvb_ci/dvbci.cpp +++ b/lib/dvb_ci/dvbci.cpp @@ -10,6 +10,8 @@ #include #include +#include +#include eDVBCIInterfaces *eDVBCIInterfaces::instance = 0; @@ -71,6 +73,16 @@ int eDVBCIInterfaces::reset(int slotid) return slot->reset(); } +int eDVBCIInterfaces::initialize(int slotid) +{ + eDVBCISlot *slot; + + if( (slot = getSlot(slotid)) == 0 ) + return -1; + + return slot->initialize(); +} + int eDVBCIInterfaces::startMMI(int slotid) { eDVBCISlot *slot; @@ -81,6 +93,36 @@ int eDVBCIInterfaces::startMMI(int slotid) return slot->startMMI(); } +int eDVBCIInterfaces::stopMMI(int slotid) +{ + eDVBCISlot *slot; + + if( (slot = getSlot(slotid)) == 0 ) + return -1; + + return slot->stopMMI(); +} + +int eDVBCIInterfaces::answerText(int slotid, int answer) +{ + eDVBCISlot *slot; + + if( (slot = getSlot(slotid)) == 0 ) + return -1; + + return slot->answerText(answer); +} + +int eDVBCIInterfaces::answerEnq(int slotid, int answer, char *value) +{ + eDVBCISlot *slot; + + if( (slot = getSlot(slotid)) == 0 ) + return -1; + + return slot->answerEnq(answer, value); +} + int eDVBCISlot::send(const unsigned char *data, size_t len) { int res; @@ -151,6 +193,9 @@ eDVBCISlot::eDVBCISlot(eMainloop *context, int nr) { char filename[128]; + application_manager = 0; + mmi_session = 0; + slotid = nr; sprintf(filename, "/dev/ci%d", nr); @@ -189,9 +234,45 @@ int eDVBCISlot::reset() return 0; } +int eDVBCISlot::initialize() +{ + printf("edvbcislot: initialize()\n"); + return 0; +} + int eDVBCISlot::startMMI() { printf("edvbcislot: startMMI()\n"); + + if(application_manager) + application_manager->startMMI(); + + return 0; +} + +int eDVBCISlot::stopMMI() +{ + printf("edvbcislot: stopMMI()\n"); + + if(mmi_session) + mmi_session->stopMMI(); + + return 0; +} + +int eDVBCISlot::answerText(int answer) +{ + printf("edvbcislot: answerText(%d)\n", answer); + + if(mmi_session) + mmi_session->answerText(answer); + + return 0; +} + +int eDVBCISlot::answerEnq(int answer, char *value) +{ + printf("edvbcislot: answerMMI(%d,%s)\n", answer, value); return 0; }