1 /* DVB CI CA Manager */
3 #include <lib/base/eerror.h>
4 #include <lib/dvb_ci/dvbci_camgr.h>
6 eDVBCICAManagerSession::eDVBCICAManagerSession(eDVBCISlot *tslot)
9 slot->setCAManager(this);
12 eDVBCICAManagerSession::~eDVBCICAManagerSession()
14 slot->setCAManager(NULL);
17 int eDVBCICAManagerSession::receivedAPDU(const unsigned char *tag, const void *data, int len)
19 eDebugNoNewLine("SESSION(%d)/CA %02x %02x %02x: ", session_nb, tag[0], tag[1],tag[2]);
20 for (int i=0; i<len; i++)
21 eDebugNoNewLine("%02x ", ((const unsigned char*)data)[i]);
24 if ((tag[0]==0x9f) && (tag[1]==0x80))
30 for (int i=0; i<len; i+=2)
32 eDebugNoNewLine("%04x ", (((const unsigned char*)data)[i]<<8)|(((const unsigned char*)data)[i+1]));
33 caids.push_back((((const unsigned char*)data)[i]<<8)|(((const unsigned char*)data)[i+1]));
35 std::sort(caids.begin(), caids.end());
37 eDVBCIInterfaces::getInstance()->recheckPMTHandlers();
40 eDebug("unknown APDU tag 9F 80 %02x", tag[2]);
47 int eDVBCICAManagerSession::doAction()
53 const unsigned char tag[3]={0x9F, 0x80, 0x30}; // ca info enq
59 eDebug("stateFinal und action! kann doch garnicht sein ;)");
65 int eDVBCICAManagerSession::sendCAPMT(unsigned char *data, int len)
67 const unsigned char tag[3]={0x9F, 0x80, 0x32}; // ca_pmt
69 sendAPDU(tag, data, len);