2002-05-19 15:50:11 +02:00
|
|
|
/*
|
|
|
|
* status.c: Status monitoring
|
|
|
|
*
|
|
|
|
* See the main source file 'vdr.c' for copyright information and
|
|
|
|
* how to reach the author.
|
|
|
|
*
|
2014-01-25 10:54:51 +01:00
|
|
|
* $Id: status.c 3.1 2014/01/25 10:47:39 kls Exp $
|
2002-05-19 15:50:11 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "status.h"
|
|
|
|
|
2002-06-16 13:26:00 +02:00
|
|
|
// --- cStatus ---------------------------------------------------------------
|
2002-05-19 15:50:11 +02:00
|
|
|
|
2002-06-16 13:26:00 +02:00
|
|
|
cList<cStatus> cStatus::statusMonitors;
|
2002-05-19 15:50:11 +02:00
|
|
|
|
2002-06-16 13:26:00 +02:00
|
|
|
cStatus::cStatus(void)
|
2002-05-19 15:50:11 +02:00
|
|
|
{
|
|
|
|
statusMonitors.Add(this);
|
|
|
|
}
|
|
|
|
|
2002-06-16 13:26:00 +02:00
|
|
|
cStatus::~cStatus()
|
2002-05-19 15:50:11 +02:00
|
|
|
{
|
|
|
|
statusMonitors.Del(this, false);
|
|
|
|
}
|
|
|
|
|
2014-01-25 10:54:51 +01:00
|
|
|
void cStatus::MsgChannelChange(const cChannel *Channel)
|
|
|
|
{
|
|
|
|
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
|
|
|
|
sm->ChannelChange(Channel);
|
|
|
|
}
|
|
|
|
|
2008-02-16 15:04:49 +01:00
|
|
|
void cStatus::MsgTimerChange(const cTimer *Timer, eTimerChange Change)
|
|
|
|
{
|
|
|
|
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
|
|
|
|
sm->TimerChange(Timer, Change);
|
|
|
|
}
|
|
|
|
|
2012-03-07 14:39:38 +01:00
|
|
|
void cStatus::MsgChannelSwitch(const cDevice *Device, int ChannelNumber, bool LiveView)
|
2002-05-19 15:50:11 +02:00
|
|
|
{
|
2002-06-16 13:26:00 +02:00
|
|
|
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
|
2012-03-07 14:39:38 +01:00
|
|
|
sm->ChannelSwitch(Device, ChannelNumber, LiveView);
|
2002-05-19 15:50:11 +02:00
|
|
|
}
|
|
|
|
|
2005-12-31 15:20:19 +01:00
|
|
|
void cStatus::MsgRecording(const cDevice *Device, const char *Name, const char *FileName, bool On)
|
2002-05-19 15:50:11 +02:00
|
|
|
{
|
2002-06-16 13:26:00 +02:00
|
|
|
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
|
2005-12-31 15:20:19 +01:00
|
|
|
sm->Recording(Device, Name, FileName, On);
|
2002-05-19 15:50:11 +02:00
|
|
|
}
|
|
|
|
|
2005-12-31 15:20:19 +01:00
|
|
|
void cStatus::MsgReplaying(const cControl *Control, const char *Name, const char *FileName, bool On)
|
2002-05-19 15:50:11 +02:00
|
|
|
{
|
2002-06-16 13:26:00 +02:00
|
|
|
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
|
2005-12-31 15:20:19 +01:00
|
|
|
sm->Replaying(Control, Name, FileName, On);
|
2002-05-19 15:50:11 +02:00
|
|
|
}
|
|
|
|
|
2002-06-16 13:26:00 +02:00
|
|
|
void cStatus::MsgSetVolume(int Volume, bool Absolute)
|
2002-05-19 15:50:11 +02:00
|
|
|
{
|
2002-06-16 13:26:00 +02:00
|
|
|
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
|
2002-05-19 15:50:11 +02:00
|
|
|
sm->SetVolume(Volume, Absolute);
|
|
|
|
}
|
|
|
|
|
2005-01-02 15:11:44 +01:00
|
|
|
void cStatus::MsgSetAudioTrack(int Index, const char * const *Tracks)
|
|
|
|
{
|
|
|
|
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
|
|
|
|
sm->SetAudioTrack(Index, Tracks);
|
|
|
|
}
|
|
|
|
|
2005-01-09 12:08:34 +01:00
|
|
|
void cStatus::MsgSetAudioChannel(int AudioChannel)
|
|
|
|
{
|
|
|
|
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
|
|
|
|
sm->SetAudioChannel(AudioChannel);
|
|
|
|
}
|
|
|
|
|
2008-02-16 13:59:09 +01:00
|
|
|
void cStatus::MsgSetSubtitleTrack(int Index, const char * const *Tracks)
|
|
|
|
{
|
|
|
|
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
|
|
|
|
sm->SetSubtitleTrack(Index, Tracks);
|
|
|
|
}
|
|
|
|
|
2002-06-16 13:26:00 +02:00
|
|
|
void cStatus::MsgOsdClear(void)
|
2002-05-19 15:50:11 +02:00
|
|
|
{
|
2002-06-16 13:26:00 +02:00
|
|
|
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
|
2002-05-19 15:50:11 +02:00
|
|
|
sm->OsdClear();
|
|
|
|
}
|
|
|
|
|
2002-06-16 13:26:00 +02:00
|
|
|
void cStatus::MsgOsdTitle(const char *Title)
|
2002-05-19 15:50:11 +02:00
|
|
|
{
|
2002-06-16 13:26:00 +02:00
|
|
|
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
|
2002-05-19 15:50:11 +02:00
|
|
|
sm->OsdTitle(Title);
|
|
|
|
}
|
|
|
|
|
2002-06-16 13:26:00 +02:00
|
|
|
void cStatus::MsgOsdStatusMessage(const char *Message)
|
2002-05-19 15:50:11 +02:00
|
|
|
{
|
2002-06-16 13:26:00 +02:00
|
|
|
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
|
2002-05-19 15:50:11 +02:00
|
|
|
sm->OsdStatusMessage(Message);
|
|
|
|
}
|
|
|
|
|
2002-06-16 13:26:00 +02:00
|
|
|
void cStatus::MsgOsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue)
|
2002-05-19 15:50:11 +02:00
|
|
|
{
|
2002-06-16 13:26:00 +02:00
|
|
|
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
|
2002-05-19 15:50:11 +02:00
|
|
|
sm->OsdHelpKeys(Red, Green, Yellow, Blue);
|
|
|
|
}
|
|
|
|
|
2003-05-03 14:55:17 +02:00
|
|
|
void cStatus::MsgOsdItem(const char *Text, int Index)
|
|
|
|
{
|
|
|
|
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
|
|
|
|
sm->OsdItem(Text, Index);
|
|
|
|
}
|
|
|
|
|
2002-06-16 13:26:00 +02:00
|
|
|
void cStatus::MsgOsdCurrentItem(const char *Text)
|
2002-05-19 15:50:11 +02:00
|
|
|
{
|
2002-06-16 13:26:00 +02:00
|
|
|
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
|
2002-05-19 15:50:11 +02:00
|
|
|
sm->OsdCurrentItem(Text);
|
|
|
|
}
|
|
|
|
|
2002-06-16 13:26:00 +02:00
|
|
|
void cStatus::MsgOsdTextItem(const char *Text, bool Scroll)
|
2002-05-19 15:50:11 +02:00
|
|
|
{
|
2002-06-16 13:26:00 +02:00
|
|
|
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
|
2002-05-19 15:50:11 +02:00
|
|
|
sm->OsdTextItem(Text, Scroll);
|
|
|
|
}
|
|
|
|
|
2002-06-16 13:26:00 +02:00
|
|
|
void cStatus::MsgOsdChannel(const char *Text)
|
2002-05-19 15:50:11 +02:00
|
|
|
{
|
2002-06-16 13:26:00 +02:00
|
|
|
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
|
2002-05-19 15:50:11 +02:00
|
|
|
sm->OsdChannel(Text);
|
|
|
|
}
|
|
|
|
|
2002-06-16 13:26:00 +02:00
|
|
|
void cStatus::MsgOsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle)
|
2002-05-19 15:50:11 +02:00
|
|
|
{
|
2002-06-16 13:26:00 +02:00
|
|
|
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
|
2002-05-19 15:50:11 +02:00
|
|
|
sm->OsdProgramme(PresentTime, PresentTitle, PresentSubtitle, FollowingTime, FollowingTitle, FollowingSubtitle);
|
|
|
|
}
|