X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/f2c69b1c3a49b8b03866894fe3e3f3a4f330f517..ba1b105a176e5f62faf9d6d1f4c1a4c19764a2e4:/lib/dvb/dvb.h diff --git a/lib/dvb/dvb.h b/lib/dvb/dvb.h index 3451e48b..037c1974 100644 --- a/lib/dvb/dvb.h +++ b/lib/dvb/dvb.h @@ -23,6 +23,7 @@ class eDVBRegisteredFrontend: public iObject, public Object { DECLARE_REF(eDVBRegisteredFrontend); eTimer *disable; + Signal0 stateChanged; void closeFrontend() { if (!m_inuse && m_frontend->closeFrontend()) // frontend busy @@ -38,12 +39,18 @@ public: void dec_use() { if (!--m_inuse) + { + /* emit */ stateChanged(); disable->start(3000, true); + } } void inc_use() { if (++m_inuse == 1) + { m_frontend->openFrontend(); + /* emit */ stateChanged(); + } } iDVBAdapter *m_adapter; ePtr m_frontend; @@ -168,13 +175,14 @@ class eDVBResourceManager: public iObject, public Object Signal1 m_channelAdded; - bool canAllocateFrontend(ePtr &feparm); + int canAllocateFrontend(ePtr &feparm); eUsePtr m_cached_channel; Connection m_cached_channel_state_changed_conn; eTimer m_releaseCachedChannelTimer; void DVBChannelStateChanged(iDVBChannel*); void releaseCachedChannel(); + void feStateChanged(); #ifndef SWIG public: #endif @@ -191,7 +199,7 @@ public: }; RESULT connectChannelAdded(const Slot1 &channelAdded, ePtr &connection); - bool canAllocateChannel(const eDVBChannelID &channelid, const eDVBChannelID &ignore); + int canAllocateChannel(const eDVBChannelID &channelid, const eDVBChannelID &ignore); /* allocate channel... */ RESULT allocateChannel(const eDVBChannelID &channelid, eUsePtr &channel); @@ -199,10 +207,11 @@ public: #ifdef SWIG public: #endif - RESULT allocateRawChannel(eUsePtr &channel, int frontend_index); - static RESULT getInstance(ePtr &ptr) { if (instance) { ptr = instance; return 0; } return -1; } + PSignal1 frontendUseMaskChanged; + RESULT allocateRawChannel(eUsePtr &, int frontend_index); + static RESULT getInstance(ePtr &); }; - +TEMPLATE_TYPEDEF(ePtr, eDVBResourceManagerPtr); #ifndef SWIG /* iDVBPVRChannel includes iDVBChannel. don't panic. */