2014-09-27 09:25:14 +02:00
|
|
|
#include "displaychannel.h"
|
|
|
|
|
2016-01-26 18:32:38 +01:00
|
|
|
cSDDisplayChannel::cSDDisplayChannel(cViewChannel *channelView, bool WithInfo) {
|
|
|
|
view = channelView;
|
|
|
|
ok = view->Init();
|
|
|
|
if (!ok)
|
|
|
|
esyslog("skindesigner: Error initiating displaychannel view - aborting");
|
2014-09-27 09:25:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
cSDDisplayChannel::~cSDDisplayChannel() {
|
2016-01-26 18:32:38 +01:00
|
|
|
view->Close();
|
2014-09-27 09:25:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void cSDDisplayChannel::SetChannel(const cChannel *Channel, int Number) {
|
2016-01-26 18:32:38 +01:00
|
|
|
if (!ok)
|
2014-09-27 09:25:14 +02:00
|
|
|
return;
|
2016-01-26 18:32:38 +01:00
|
|
|
view->SetChannel(Channel, Number);
|
2014-09-27 09:25:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void cSDDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Following) {
|
2016-01-26 18:32:38 +01:00
|
|
|
if (!ok)
|
2014-09-27 09:25:14 +02:00
|
|
|
return;
|
2016-01-26 18:32:38 +01:00
|
|
|
view->SetEvents(Present, Following);
|
2014-09-27 09:25:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void cSDDisplayChannel::SetMessage(eMessageType Type, const char *Text) {
|
2016-01-26 18:32:38 +01:00
|
|
|
if (!ok)
|
2014-09-27 09:25:14 +02:00
|
|
|
return;
|
2016-01-26 18:32:38 +01:00
|
|
|
view->SetMessage(Type, Text);
|
2014-09-27 09:25:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void cSDDisplayChannel::Flush(void) {
|
2016-01-26 18:32:38 +01:00
|
|
|
if (!ok)
|
2014-09-27 09:25:14 +02:00
|
|
|
return;
|
2016-01-26 18:32:38 +01:00
|
|
|
view->Flush();
|
2015-05-10 12:55:23 +02:00
|
|
|
}
|