X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fdvb_ci%2Fdvbci.cpp;h=cf7acde6130bafb186ed9be3efd0567ebb776196;hp=6fa8e2ec8c0d17678030471ad6c8f19dcfea7358;hb=a95480c7a50e4ecf72cee72693ba6b2c6654f510;hpb=fb64ecb2733e4e4ebbc180466c4202645f18f9bc diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp index 6fa8e2e..cf7acde 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; @@ -91,14 +93,34 @@ int eDVBCIInterfaces::startMMI(int slotid) return slot->startMMI(); } -int eDVBCIInterfaces::answerMMI(int slotid, int answer, char *value) +int eDVBCIInterfaces::stopMMI(int slotid) { eDVBCISlot *slot; if( (slot = getSlot(slotid)) == 0 ) return -1; - return slot->answerMMI(answer, value); + 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) @@ -171,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); @@ -218,12 +243,36 @@ int eDVBCISlot::initialize() 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::answerMMI(int answer, char *value) +int eDVBCISlot::answerEnq(int answer, char *value) { - printf("edvbcislot: answerMMI()\n"); + printf("edvbcislot: answerMMI(%d,%s)\n", answer, value); return 0; }