aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRonny Strutz <ronny.strutz@multimedia-labs.de>2005-11-18 03:28:24 +0000
committerRonny Strutz <ronny.strutz@multimedia-labs.de>2005-11-18 03:28:24 +0000
commit22dd42bd9ac717c439bd339f0c85adbf3defe2b6 (patch)
treeea95ac93c400520636af645cf4bac420104092ab /lib
parentbf057ab3c120bf104f66dbaecd53edffffb0fb38 (diff)
downloadenigma2-22dd42bd9ac717c439bd339f0c85adbf3defe2b6.tar.gz
enigma2-22dd42bd9ac717c439bd339f0c85adbf3defe2b6.zip
everything else
Diffstat (limited to 'lib')
-rw-r--r--lib/dvb_ci/dvbci.cpp32
-rw-r--r--lib/dvb_ci/dvbci.h4
-rw-r--r--lib/dvb_ci/dvbci_appmgr.cpp8
-rw-r--r--lib/dvb_ci/dvbci_appmgr.h1
4 files changed, 45 insertions, 0 deletions
diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp
index 6fa8e2ec..71994538 100644
--- a/lib/dvb_ci/dvbci.cpp
+++ b/lib/dvb_ci/dvbci.cpp
@@ -10,6 +10,8 @@
#include <lib/dvb_ci/dvbci_session.h>
#include <lib/dvb_ci/dvbci_ui.h>
+#include <lib/dvb_ci/dvbci_appmgr.h>
+#include <lib/dvb_ci/dvbci_mmi.h>
eDVBCIInterfaces *eDVBCIInterfaces::instance = 0;
@@ -91,6 +93,16 @@ 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::answerMMI(int slotid, int answer, char *value)
{
eDVBCISlot *slot;
@@ -128,6 +140,9 @@ void eDVBCISlot::data(int what)
notifier->setRequested(eSocketNotifier::Read);
//HACK
eDVBCI_UI::getInstance()->setState(0,0);
+ //FIXME; do in deconstructor of the appmgr class
+ application_manager = 0;
+ mmi_session = 0;
}
return;
}
@@ -170,6 +185,9 @@ DEFINE_REF(eDVBCISlot);
eDVBCISlot::eDVBCISlot(eMainloop *context, int nr)
{
char filename[128];
+
+ application_manager = 0;
+ mmi_session = 0;
slotid = nr;
@@ -218,6 +236,20 @@ 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;
}
diff --git a/lib/dvb_ci/dvbci.h b/lib/dvb_ci/dvbci.h
index c6166555..e9de4876 100644
--- a/lib/dvb_ci/dvbci.h
+++ b/lib/dvb_ci/dvbci.h
@@ -6,6 +6,7 @@
class eDVBCISession;
class eDVBCIApplicationManagerSession;
class eDVBCICAManagerSession;
+class eDVBCIMMISession;
class eDVBCISlot: public iObject, public Object
{
@@ -26,11 +27,13 @@ public:
eDVBCIApplicationManagerSession *application_manager;
eDVBCICAManagerSession *ca_manager;
+ eDVBCIMMISession *mmi_session;
int getSlotID();
int reset();
int initialize();
int startMMI();
+ int stopMMI();
int answerMMI(int answer, char *value);
};
@@ -50,6 +53,7 @@ public:
int reset(int slot);
int initialize(int slot);
int startMMI(int slot);
+ int stopMMI(int slot);
int answerMMI(int slot, int answer, char *value);
};
diff --git a/lib/dvb_ci/dvbci_appmgr.cpp b/lib/dvb_ci/dvbci_appmgr.cpp
index 5aad5b6e..f07ea999 100644
--- a/lib/dvb_ci/dvbci_appmgr.cpp
+++ b/lib/dvb_ci/dvbci_appmgr.cpp
@@ -75,3 +75,11 @@ int eDVBCIApplicationManagerSession::doAction()
return 0;
}
}
+
+int eDVBCIApplicationManagerSession::startMMI()
+{
+ printf("in appmanager -> startmmi()\n");
+ const unsigned char tag[3]={0x9F, 0x80, 0x22}; // Tenter_menu
+ sendAPDU(tag);
+}
+
diff --git a/lib/dvb_ci/dvbci_appmgr.h b/lib/dvb_ci/dvbci_appmgr.h
index b8ea87fc..1d6e7b15 100644
--- a/lib/dvb_ci/dvbci_appmgr.h
+++ b/lib/dvb_ci/dvbci_appmgr.h
@@ -13,6 +13,7 @@ class eDVBCIApplicationManagerSession: public eDVBCISession
int doAction();
public:
int enterMenu();
+ int startMMI();
};
#endif