use convertDVBUTF8 for mmi texts
[enigma2.git] / lib / dvb_ci / dvbci_appmgr.cpp
index 6f6c95d3922c3c66fd2bc895245a5f484e3adb10..7843554d685e4df51c5197af51e58e9bf682e988 100644 (file)
@@ -3,6 +3,17 @@
 #include <lib/dvb_ci/dvbci_appmgr.h>
 #include <lib/dvb_ci/dvbci_ui.h>
 
+eDVBCIApplicationManagerSession::eDVBCIApplicationManagerSession(eDVBCISlot *tslot)
+{
+       slot = tslot;
+       slot->application_manager       = this;
+}
+
+eDVBCIApplicationManagerSession::~eDVBCIApplicationManagerSession()
+{
+       slot = 0;
+}
+
 int eDVBCIApplicationManagerSession::receivedAPDU(const unsigned char *tag,const void *data, int len)
 {
        printf("SESSION(%d)/APP %02x %02x %02x: ", session_nb, tag[0], tag[1], tag[2]);
@@ -30,7 +41,7 @@ int eDVBCIApplicationManagerSession::receivedAPDU(const unsigned char *tag,const
                                dl=len-6;
                        }
                        char str[dl + 1];
-                       memcpy(str, data + 6, dl);
+                       memcpy(str, ((char*)data) + 6, dl);
                        str[dl] = '\0';
                        for (int i = 0; i < dl; ++i)
                                printf("%c", ((unsigned char*)data)[i+6]);
@@ -75,3 +86,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);
+}
+