From 4cdeb9ebe328382bb4ef6a01b67ff840adcc84ad Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Sun, 8 Jan 2006 14:55:16 +0000 Subject: add subservice selection to timer (when linkage services are avail for the selected event) better layout in timerlist (more space for service name and event description) --- lib/service/event.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'lib/service/event.cpp') diff --git a/lib/service/event.cpp b/lib/service/event.cpp index f84c38b7..2d0f83a4 100644 --- a/lib/service/event.cpp +++ b/lib/service/event.cpp @@ -204,7 +204,7 @@ RESULT eServiceEvent::getComponentData(ePtr &dest, int tagnum) c return -1; } -RESULT eServiceEvent::getLinkageService(eServiceReference &service, int num) const +RESULT eServiceEvent::getLinkageService(eServiceReference &service, eServiceReference &parent, int num) const { std::list::const_iterator it = m_linkage_services.begin(); @@ -213,6 +213,25 @@ RESULT eServiceEvent::getLinkageService(eServiceReference &service, int num) con if ( it != m_linkage_services.end() ) { service = *it; + eServiceReferenceDVB &subservice = (eServiceReferenceDVB&) service; + eServiceReferenceDVB ¤t = (eServiceReferenceDVB&) parent; + subservice.setDVBNamespace(current.getDVBNamespace()); + if ( current.getParentTransportStreamID().get() ) + { + subservice.setParentTransportStreamID( current.getParentTransportStreamID() ); + subservice.setParentServiceID( current.getParentServiceID() ); + } + else + { + subservice.setParentTransportStreamID( current.getTransportStreamID() ); + subservice.setParentServiceID( current.getServiceID() ); + } + if ( subservice.getParentTransportStreamID() == subservice.getTransportStreamID() && + subservice.getParentServiceID() == subservice.getServiceID() ) + { + subservice.setParentTransportStreamID( eTransportStreamID(0) ); + subservice.setParentServiceID( eServiceID(0) ); + } return 0; } service.type = eServiceReference::idInvalid; -- cgit v1.2.3