+PyObject *eDVBCIInterfaces::readCICaIds(int slotid)
+{
+ eDVBCISlot *slot = getSlot(slotid);
+ if (!slot)
+ {
+ char tmp[255];
+ snprintf(tmp, 255, "eDVBCIInterfaces::readCICaIds try to get CAIds for CI Slot %d... but just %d slots are available", slotid, m_slots.size());
+ PyErr_SetString(PyExc_StandardError, tmp);
+ }
+ else
+ {
+ int idx=0;
+ eDVBCICAManagerSession *ca_manager = slot->getCAManager();
+ const std::vector<uint16_t> *ci_caids = ca_manager ? &ca_manager->getCAIDs() : 0;
+ ePyObject list = PyList_New(ci_caids ? ci_caids->size() : 0);
+ if (ci_caids)
+ {
+ for (std::vector<uint16_t>::const_iterator it = ci_caids->begin(); it != ci_caids->end(); ++it)
+ PyList_SET_ITEM(list, idx++, PyLong_FromLong(*it));
+ }
+ return list;
+ }
+ return 0;
+}
+
+int eDVBCIInterfaces::setCIClockRate(int slotid, int rate)
+{
+ eDVBCISlot *slot = getSlot(slotid);
+ if (slot)
+ return slot->setClockRate(rate);
+ return -1;
+}
+