}
}
-void eDVBResourceManager::setFrontendSlotInformations(ePyObject list)
+PyObject *eDVBResourceManager::setFrontendSlotInformations(ePyObject list)
{
if (!PyList_Check(list))
{
PyErr_SetString(PyExc_StandardError, "eDVBResourceManager::setFrontendSlotInformations argument should be a python list");
- return;
+ return NULL;
}
if ((unsigned int)PyList_Size(list) != m_frontend.size())
{
sprintf(blasel, "eDVBResourceManager::setFrontendSlotInformations list size incorrect %d frontends avail, but %d entries in slotlist",
m_frontend.size(), PyList_Size(list));
PyErr_SetString(PyExc_StandardError, blasel);
- return;
+ return NULL;
}
int pos=0;
for (eSmartPtrList<eDVBRegisteredFrontend>::iterator i(m_frontend.begin()); i != m_frontend.end(); ++i)
{
ePyObject obj = PyList_GET_ITEM(list, pos++);
- i->m_frontend->setSlotInfo(obj);
+ if (!i->m_frontend->setSlotInfo(obj))
+ return NULL;
}
+ Py_RETURN_NONE;
}
RESULT eDVBResourceManager::allocateFrontend(ePtr<eDVBAllocatedFrontend> &fe, ePtr<iDVBFrontendParameters> &feparm)
#endif
PSignal1<void,int> frontendUseMaskChanged;
SWIG_VOID(RESULT) allocateRawChannel(eUsePtr<iDVBChannel> &SWIG_OUTPUT, int slot_index);
- void setFrontendSlotInformations(SWIG_PYOBJECT(ePyObject) list);
+ PyObject *setFrontendSlotInformations(SWIG_PYOBJECT(ePyObject) list);
};
SWIG_TEMPLATE_TYPEDEF(ePtr<eDVBResourceManager>, eDVBResourceManager);
SWIG_EXTEND(ePtr<eDVBResourceManager>,
return 1;
}
-void eDVBFrontend::setSlotInfo(ePyObject obj)
+bool eDVBFrontend::setSlotInfo(ePyObject obj)
{
ePyObject Id, Descr, Enabled;
if (!PyTuple_Check(obj) || PyTuple_Size(obj) != 3)
strcpy(m_description, PyString_AS_STRING(Descr));
m_slotid = PyInt_AsLong(Id);
m_enabled = Enabled == Py_True;
-
// HACK.. the rotor workaround is neede for all NIMs with LNBP21 voltage regulator...
m_need_rotor_workaround = !!strstr(m_description, "Alps BSBE1") || !!strstr(m_description, "Alps -S");
-
eDebug("setSlotInfo for dvb frontend %d to slotid %d, descr %s, need rotorworkaround %s, enabled %s",
m_dvbid, m_slotid, m_description, m_need_rotor_workaround ? "Yes" : "No", m_enabled ? "Yes" : "No" );
- return;
+ return true;
arg_error:
PyErr_SetString(PyExc_StandardError,
- "eDVBFrontend::setSlotInfo must get a tuple with first param slotid and second param slot description");
+ "eDVBFrontend::setSlotInfo must get a tuple with first param slotid, second param slot description and third param enabled boolean");
+ return false;
}
int isCompatibleWith(ePtr<iDVBFrontendParameters> &feparm);
int getDVBID() { return m_dvbid; }
int getSlotID() { return m_slotid; }
- void setSlotInfo(ePyObject obj); // get a tuple (slotid, slotdescr)
+ bool setSlotInfo(ePyObject obj); // get a tuple (slotid, slotdescr)
int openFrontend();
int closeFrontend();