1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00
vdr/status.c

115 lines
3.4 KiB
C
Raw Normal View History

/*
* status.c: Status monitoring
*
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: status.c 1.8 2005/12/31 15:10:10 kls Exp $
*/
#include "status.h"
2002-06-16 13:26:00 +02:00
// --- cStatus ---------------------------------------------------------------
2002-06-16 13:26:00 +02:00
cList<cStatus> cStatus::statusMonitors;
2002-06-16 13:26:00 +02:00
cStatus::cStatus(void)
{
statusMonitors.Add(this);
}
2002-06-16 13:26:00 +02:00
cStatus::~cStatus()
{
statusMonitors.Del(this, false);
}
2002-06-16 13:26:00 +02:00
void cStatus::MsgChannelSwitch(const cDevice *Device, int ChannelNumber)
{
2002-06-16 13:26:00 +02:00
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
sm->ChannelSwitch(Device, ChannelNumber);
}
void cStatus::MsgRecording(const cDevice *Device, const char *Name, const char *FileName, bool On)
{
2002-06-16 13:26:00 +02:00
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
sm->Recording(Device, Name, FileName, On);
}
void cStatus::MsgReplaying(const cControl *Control, const char *Name, const char *FileName, bool On)
{
2002-06-16 13:26:00 +02:00
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
sm->Replaying(Control, Name, FileName, On);
}
2002-06-16 13:26:00 +02:00
void cStatus::MsgSetVolume(int Volume, bool Absolute)
{
2002-06-16 13:26:00 +02:00
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
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);
}
2002-06-16 13:26:00 +02:00
void cStatus::MsgOsdClear(void)
{
2002-06-16 13:26:00 +02:00
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
sm->OsdClear();
}
2002-06-16 13:26:00 +02:00
void cStatus::MsgOsdTitle(const char *Title)
{
2002-06-16 13:26:00 +02:00
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
sm->OsdTitle(Title);
}
2002-06-16 13:26:00 +02:00
void cStatus::MsgOsdStatusMessage(const char *Message)
{
2002-06-16 13:26:00 +02:00
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
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-06-16 13:26:00 +02:00
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
sm->OsdHelpKeys(Red, Green, Yellow, Blue);
}
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-06-16 13:26:00 +02:00
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
sm->OsdCurrentItem(Text);
}
2002-06-16 13:26:00 +02:00
void cStatus::MsgOsdTextItem(const char *Text, bool Scroll)
{
2002-06-16 13:26:00 +02:00
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
sm->OsdTextItem(Text, Scroll);
}
2002-06-16 13:26:00 +02:00
void cStatus::MsgOsdChannel(const char *Text)
{
2002-06-16 13:26:00 +02:00
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
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-06-16 13:26:00 +02:00
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
sm->OsdProgramme(PresentTime, PresentTitle, PresentSubtitle, FollowingTime, FollowingTitle, FollowingSubtitle);
}