fix bug
[enigma2.git] / lib / dvb_ci / dvbci_camgr.cpp
index 2ad1f1e363bb36c06a31ccd214138e78ae24477c..1d172b1cc2ed98b69e79a77ff9a3f3fe46a17cbb 100644 (file)
@@ -2,6 +2,17 @@
 
 #include <lib/dvb_ci/dvbci_camgr.h>
 
+eDVBCICAManagerSession::eDVBCICAManagerSession(eDVBCISlot *tslot)
+{
+       slot = tslot;
+       slot->ca_manager = this;
+}
+
+eDVBCICAManagerSession::~eDVBCICAManagerSession()
+{
+       slot->ca_manager = 0;
+}
+
 int eDVBCICAManagerSession::receivedAPDU(const unsigned char *tag, const void *data, int len)
 {
        printf("SESSION(%d)/CA %02x %02x %02x: ", session_nb, tag[0], tag[1],tag[2]);
@@ -18,7 +29,7 @@ int eDVBCICAManagerSession::receivedAPDU(const unsigned char *tag, const void *d
                        for (int i=0; i<len; i+=2)
                        {
                                printf("%04x ", (((const unsigned char*)data)[i]<<8)|(((const unsigned char*)data)[i+1]));
-                               caids.insert((((const unsigned char*)data)[i]<<8)|(((const unsigned char*)data)[i+1]));
+                               caids.push_back((((const unsigned char*)data)[i]<<8)|(((const unsigned char*)data)[i+1]));
                        }
                        printf("\n");
                        break;
@@ -47,3 +58,13 @@ int eDVBCICAManagerSession::doAction()
                return 0;
        }
 }
+
+int eDVBCICAManagerSession::sendCAPMT(unsigned char *data, int len)
+{
+       const unsigned char tag[3]={0x9F, 0x80, 0x32}; // ca_pmt
+
+  sendAPDU(tag, data, len);
+       
+       return 0;
+}
+