aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb/dvb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dvb/dvb.cpp')
-rw-r--r--lib/dvb/dvb.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp
index e0df1dc1..f1f5580a 100644
--- a/lib/dvb/dvb.cpp
+++ b/lib/dvb/dvb.cpp
@@ -321,6 +321,7 @@ RESULT eDVBResourceManager::addChannel(const eDVBChannelID &chid, eDVBChannel *c
{
eDebug("add channel %p", ch);
m_active_channels.push_back(active_channel(chid, ch));
+ /* emit */ m_channelAdded(ch);
return 0;
}
@@ -333,6 +334,7 @@ RESULT eDVBResourceManager::removeChannel(eDVBChannel *ch)
{
i = m_active_channels.erase(i);
++cnt;
+ /* emit */ m_channelRemoved(ch);
} else
++i;
}
@@ -342,6 +344,24 @@ RESULT eDVBResourceManager::removeChannel(eDVBChannel *ch)
return -ENOENT;
}
+RESULT eDVBResourceManager::connectChannelAdded(const Slot1<void,eDVBChannel*> &channelAdded, ePtr<eConnection> &connection)
+{
+ connection = new eConnection((eDVBResourceManager*)this, m_channelAdded.connect(channelAdded));
+ return 0;
+}
+
+RESULT eDVBResourceManager::connectChannelRemoved(const Slot1<void,eDVBChannel*> &channelRemoved, ePtr<eConnection> &connection)
+{
+ connection = new eConnection((eDVBResourceManager*)this, m_channelRemoved.connect(channelRemoved));
+ return 0;
+}
+
+RESULT eDVBResourceManager::connectChannelRunning(const Slot1<void,iDVBChannel*> &channelRunning, ePtr<eConnection> &connection)
+{
+ connection = new eConnection((eDVBResourceManager*)this, m_channelRunning.connect(channelRunning));
+ return 0;
+}
+
DEFINE_REF(eDVBChannel);
eDVBChannel::eDVBChannel(eDVBResourceManager *mgr, eDVBAllocatedFrontend *frontend, eDVBAllocatedDemux *demux): m_state(state_idle), m_mgr(mgr)