aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb_ci/dvbci_ui.cpp
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-05-23 12:29:43 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-05-23 12:29:43 +0000
commit27ac653dea3ebb218d915604a8fce4b0d34d9278 (patch)
treeb5a2f64effe029c1b87f4f8f4b02d3f6ebabb82f /lib/dvb_ci/dvbci_ui.cpp
parentb1f62dfee6033cb1074c0b1063e68ef365ce6a76 (diff)
downloadenigma2-27ac653dea3ebb218d915604a8fce4b0d34d9278.tar.gz
enigma2-27ac653dea3ebb218d915604a8fce4b0d34d9278.zip
CI mmi is now working every time (for support alphacrypt parental control or other messages from CI)
Diffstat (limited to 'lib/dvb_ci/dvbci_ui.cpp')
-rw-r--r--lib/dvb_ci/dvbci_ui.cpp34
1 files changed, 33 insertions, 1 deletions
diff --git a/lib/dvb_ci/dvbci_ui.cpp b/lib/dvb_ci/dvbci_ui.cpp
index 306bcd13..56ca25fc 100644
--- a/lib/dvb_ci/dvbci_ui.cpp
+++ b/lib/dvb_ci/dvbci_ui.cpp
@@ -54,7 +54,10 @@ int eDVBCI_UI::getState(int slot)
void eDVBCI_UI::setState(int slot, int newState)
{
if (slot < MAX_SLOTS)
+ {
slotdata[slot].state = newState;
+ /*emit*/ ciStateChanged(slot);
+ }
}
std::string eDVBCI_UI::getAppName(int slot)
@@ -117,6 +120,28 @@ int eDVBCI_UI::availableMMI(int slot)
return false;
}
+int eDVBCI_UI::mmiScreenClose(int slot, int timeout)
+{
+ if (slot >= MAX_SLOTS)
+ return 0;
+
+ slot_ui_data &data = slotdata[slot];
+
+ data.mmiScreenReady = 0;
+
+ if (data.mmiScreen)
+ Py_DECREF(data.mmiScreen);
+ data.mmiScreen = PyList_New(1);
+
+ PyObject *tuple = PyTuple_New(2);
+ PyTuple_SET_ITEM(tuple, 0, PyString_FromString("CLOSE"));
+ PyTuple_SET_ITEM(tuple, 1, PyLong_FromLong(timeout));
+ PyList_SET_ITEM(data.mmiScreen, 0, tuple);
+ data.mmiScreenReady = 1;
+ /*emit*/ ciStateChanged(slot);
+ return 0;
+}
+
int eDVBCI_UI::mmiScreenEnq(int slot, int blind, int answerLen, char *text)
{
if (slot >= MAX_SLOTS)
@@ -144,6 +169,8 @@ int eDVBCI_UI::mmiScreenEnq(int slot, int blind, int answerLen, char *text)
data.mmiScreenReady = 1;
+ /*emit*/ ciStateChanged(slot);
+
return 0;
}
@@ -217,11 +244,16 @@ int eDVBCI_UI::mmiScreenFinish(int slot)
{
printf("eDVBCI_UI::mmiScreenFinish\n");
slotdata[slot].mmiScreenReady = 1;
- /*emit*/ mmiAvail(slot);
+ /*emit*/ ciStateChanged(slot);
}
return 0;
}
+void eDVBCI_UI::mmiSessionDestroyed(int slot)
+{
+ /*emit*/ ciStateChanged(slot);
+}
+
int eDVBCI_UI::getMMIState(int slot)
{
return eDVBCIInterfaces::getInstance()->getMMIState(slot);