diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2002-05-19 15:50:11 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2002-05-19 15:50:11 +0200 |
commit | 9f9d6a8a9354960eb9c42f9c45ed507f05804ff4 (patch) | |
tree | 6e7de2a8ce6d3cedc78038e4d70ef2ff56f24528 /status.c | |
parent | 82725f53b5c23d3436f3b71845a1b61447b9780f (diff) | |
download | vdr-9f9d6a8a9354960eb9c42f9c45ed507f05804ff4.tar.gz vdr-9f9d6a8a9354960eb9c42f9c45ed507f05804ff4.tar.bz2 |
Implemented cStatusMonitor to allow plugins to set up a status monitor
Diffstat (limited to 'status.c')
-rw-r--r-- | status.c | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/status.c b/status.c new file mode 100644 index 00000000..cc01ad3b --- /dev/null +++ b/status.c @@ -0,0 +1,96 @@ +/* + * status.c: Status monitoring + * + * See the main source file 'vdr.c' for copyright information and + * how to reach the author. + * + * $Id: status.c 1.1 2002/05/19 14:54:30 kls Exp $ + */ + +#include "status.h" + +// --- cStatusMonitor -------------------------------------------------------- + +cList<cStatusMonitor> cStatusMonitor::statusMonitors; + +cStatusMonitor::cStatusMonitor(void) +{ + statusMonitors.Add(this); +} + +cStatusMonitor::~cStatusMonitor() +{ + statusMonitors.Del(this, false); +} + +void cStatusMonitor::MsgChannelSwitch(const cDvbApi *DvbApi, int ChannelNumber) +{ + for (cStatusMonitor *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) + sm->ChannelSwitch(DvbApi, ChannelNumber); +} + +void cStatusMonitor::MsgRecording(const cDvbApi *DvbApi, const char *Name) +{ + for (cStatusMonitor *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) + sm->Recording(DvbApi, Name); +} + +void cStatusMonitor::MsgReplaying(const cDvbApi *DvbApi, const char *Name) +{ + for (cStatusMonitor *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) + sm->Replaying(DvbApi, Name); +} + +void cStatusMonitor::MsgSetVolume(int Volume, bool Absolute) +{ + for (cStatusMonitor *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) + sm->SetVolume(Volume, Absolute); +} + +void cStatusMonitor::MsgOsdClear(void) +{ + for (cStatusMonitor *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) + sm->OsdClear(); +} + +void cStatusMonitor::MsgOsdTitle(const char *Title) +{ + for (cStatusMonitor *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) + sm->OsdTitle(Title); +} + +void cStatusMonitor::MsgOsdStatusMessage(const char *Message) +{ + for (cStatusMonitor *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) + sm->OsdStatusMessage(Message); +} + +void cStatusMonitor::MsgOsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue) +{ + for (cStatusMonitor *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) + sm->OsdHelpKeys(Red, Green, Yellow, Blue); +} + +void cStatusMonitor::MsgOsdCurrentItem(const char *Text) +{ + for (cStatusMonitor *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) + sm->OsdCurrentItem(Text); +} + +void cStatusMonitor::MsgOsdTextItem(const char *Text, bool Scroll) +{ + for (cStatusMonitor *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) + sm->OsdTextItem(Text, Scroll); +} + +void cStatusMonitor::MsgOsdChannel(const char *Text) +{ + for (cStatusMonitor *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) + sm->OsdChannel(Text); +} + +void cStatusMonitor::MsgOsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle) +{ + for (cStatusMonitor *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) + sm->OsdProgramme(PresentTime, PresentTitle, PresentSubtitle, FollowingTime, FollowingTitle, FollowingSubtitle); +} |