From e7d8a193a77b5a13e8ac9677ca890359e88959f5 Mon Sep 17 00:00:00 2001 From: louis Date: Sun, 26 Apr 2015 14:05:14 +0200 Subject: implemented dvbapi service interface, added viewelement ecminfo in displaychannel --- HISTORY | 2 ++ displaychannel.c | 12 ++++++- displaychannel.h | 2 ++ dtd/displaychannel.dtd | 8 ++++- libtemplate/templateview.c | 6 ++++ libtemplate/templateviewelement.h | 1 + services/dvbapi.h | 18 ++++++++++ skins/blackhole/xmlfiles/displaychannel.xml | 21 ++++++++++- skinskeleton/xmlfiles/displaychannel.xml | 12 +++++++ views/displaychannelview.c | 17 +++++++++ views/displaychannelview.h | 2 ++ views/viewhelpers.c | 54 +++++++++++++++++++++++++++++ views/viewhelpers.h | 5 +++ 13 files changed, 157 insertions(+), 3 deletions(-) create mode 100644 services/dvbapi.h diff --git a/HISTORY b/HISTORY index ccea680..5ed1575 100644 --- a/HISTORY +++ b/HISTORY @@ -300,4 +300,6 @@ Version 0.4.3 to compare strings in conditions - fixed sort order in lastrecordings viewelement - added tokens for progressbars in displamenudefault +- implemented dvbapi service interface, added viewelement ecminfo + in displaychannel diff --git a/displaychannel.c b/displaychannel.c index 603e80e..05c12d3 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -16,6 +16,8 @@ cSDDisplayChannel::cSDDisplayChannel(cTemplate *channelTemplate, bool WithInfo) channelChange = false; initial = true; devicesLast = cTimeMs::Now(); + currentChannelSid = -1; + isEncrypted = false; channelView = new cDisplayChannelView(channelTemplate->GetRootView()); if (!channelView->createOsd()) { @@ -33,17 +35,20 @@ cSDDisplayChannel::~cSDDisplayChannel() { void cSDDisplayChannel::SetChannel(const cChannel *Channel, int Number) { if (!doOutput) return; - channelChange = true; groupSep = false; cString ChannelNumber(""); cString ChannelName(""); cString ChannelID(""); + currentChannelSid = -1; + isEncrypted = false; if (Channel) { ChannelName = Channel->Name() ? Channel->Name() : ""; ChannelID = Channel->GetChannelID().ToString(); + currentChannelSid = Channel->Sid(); + isEncrypted = Channel->Ca(); if (!Channel->GroupSep()) { ChannelNumber = cString::sprintf("%d%s", Channel->Number(), Number ? "-" : ""); } else { @@ -54,12 +59,14 @@ void cSDDisplayChannel::SetChannel(const cChannel *Channel, int Number) { } else { ChannelName = ChannelString(NULL, 0); } + channelView->ClearChannel(); channelView->ClearEPGInfo(); channelView->ClearStatusIcons(); channelView->ClearChannelGroups(); channelView->ClearScraperContent(); channelView->ClearAudioInfo(); + channelView->ClearEncryptionInfo(); if (!groupSep) { channelView->DrawChannel(ChannelNumber, ChannelName, ChannelID, (Number > 0)?true:false); channelView->DrawProgressBarBack(); @@ -189,6 +196,9 @@ void cSDDisplayChannel::Flush(void) { channelView->DrawDevices(initial); devicesLast = cTimeMs::Now(); } + if (isEncrypted) { + channelView->DrawEncryptionInfo(currentChannelSid); + } } else { channelView->ClearStatusIcons(); channelView->ClearScreenResolution(); diff --git a/displaychannel.h b/displaychannel.h index 12c6922..b8d8973 100644 --- a/displaychannel.h +++ b/displaychannel.h @@ -20,6 +20,8 @@ private: int currentLast; uint64_t devicesLast; const cEvent *present; + int currentChannelSid; + int isEncrypted; void SetProgressBar(const cEvent *present); public: cSDDisplayChannel(cTemplate *channelTemplate, bool WithInfo); diff --git a/dtd/displaychannel.dtd b/dtd/displaychannel.dtd index baea223..2038d12 100644 --- a/dtd/displaychannel.dtd +++ b/dtd/displaychannel.dtd @@ -3,7 +3,7 @@ + + + + + + + + + + + + + + +