1 /* DVB CI Application Manager */
3 #include <lib/dvb_ci/dvbci_appmgr.h>
4 #include <lib/dvb_ci/dvbci_ui.h>
6 eDVBCIApplicationManagerSession::eDVBCIApplicationManagerSession(eDVBCISlot *tslot)
9 slot->setAppManager(this);
12 eDVBCIApplicationManagerSession::~eDVBCIApplicationManagerSession()
14 slot->setAppManager(NULL);
17 int eDVBCIApplicationManagerSession::receivedAPDU(const unsigned char *tag,const void *data, int len)
19 printf("SESSION(%d)/APP %02x %02x %02x: ", session_nb, tag[0], tag[1], tag[2]);
20 for (int i=0; i<len; i++)
21 printf("%02x ", ((const unsigned char*)data)[i]);
24 if ((tag[0]==0x9f) && (tag[1]==0x80))
31 printf("application info:\n");
32 printf(" len: %d\n", len);
33 printf(" application_type: %d\n", ((unsigned char*)data)[0]);
34 printf(" application_manufacturer: %02x %02x\n", ((unsigned char*)data)[2], ((unsigned char*)data)[1]);
35 printf(" manufacturer_code: %02x %02x\n", ((unsigned char*)data)[4],((unsigned char*)data)[3]);
36 printf(" menu string: ");
37 dl=((unsigned char*)data)[5];
40 printf("warning, invalid length (%d vs %d)\n", dl+6, len);
44 memcpy(str, ((char*)data) + 6, dl);
46 for (int i = 0; i < dl; ++i)
47 printf("%c", ((unsigned char*)data)[i+6]);
50 eDVBCI_UI::getInstance()->setState(0,2);
51 eDVBCI_UI::getInstance()->setAppName(0,str);
55 printf("unknown APDU tag 9F 80 %02x\n", tag[2]);
62 int eDVBCIApplicationManagerSession::doAction()
68 const unsigned char tag[3]={0x9F, 0x80, 0x20}; // application manager info e sendAPDU(tag);
74 printf("in final state.\n");
78 printf("wantmenu: sending Tenter_menu\n");
79 const unsigned char tag[3]={0x9F, 0x80, 0x22}; // Tenter_menu
90 int eDVBCIApplicationManagerSession::startMMI()
92 printf("in appmanager -> startmmi()\n");
93 const unsigned char tag[3]={0x9F, 0x80, 0x22}; // Tenter_menu