SASC-NG
DVBSoftCAM

status.h

Go to the documentation of this file.
00001 /*
00002  * status.h: Status monitoring
00003  *
00004  * See the main source file 'vdr.c' for copyright information and
00005  * how to reach the author.
00006  *
00007  * $Id: status.h 1.9 2005/12/31 15:15:25 kls Exp $
00008  */
00009 
00010 #ifndef __STATUS_H
00011 #define __STATUS_H
00012 
00013 #include "config.h"
00014 #include "device.h"
00015 #include "player.h"
00016 #include "tools.h"
00017 
00018 class cStatus : public cListObject {
00019 private:
00020   static cList<cStatus> statusMonitors;
00021 protected:
00022   // These functions can be implemented by derived classes to receive status information:
00023   virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber) {}
00024                // Indicates a channel switch on the given DVB device.
00025                // If ChannelNumber is 0, this is before the channel is being switched,
00026                // otherwise ChannelNumber is the number of the channel that has been switched to.
00027   virtual void Recording(const cDevice *Device, const char *Name, const char *FileName, bool On) {}
00028                // The given DVB device has started (On = true) or stopped (On = false) recording Name.
00029                // Name is the name of the recording, without any directory path. The full file name
00030                // of the recording is given in FileName, which may be NULL in case there is no
00031                // actual file involved. If On is false, Name may be NULL.
00032   virtual void Replaying(const cControl *Control, const char *Name, const char *FileName, bool On) {}
00033                // The given player control has started (On = true) or stopped (On = false) replaying Name.
00034                // Name is the name of the recording, without any directory path. In case of a player that can't provide
00035                // a name, Name can be a string that identifies the player type (like, e.g., "DVD").
00036                // The full file name of the recording is given in FileName, which may be NULL in case there is no
00037                // actual file involved. If On is false, Name may be NULL.
00038   virtual void SetVolume(int Volume, bool Absolute) {}
00039                // The volume has been set to the given value, either
00040                // absolutely or relative to the current volume.
00041   virtual void SetAudioTrack(int Index, const char * const *Tracks) {}
00042                // The audio track has been set to the one given by Index, which
00043                // points into the Tracks array of strings.
00044   virtual void SetAudioChannel(int AudioChannel) {}
00045                // The audio channel has been set to the given value.
00046                // 0=stereo, 1=left, 2=right, -1=no information available.
00047   virtual void OsdClear(void) {}
00048                // The OSD has been cleared.
00049   virtual void OsdTitle(const char *Title) {}
00050                // Title has been displayed in the title line of the menu.
00051   virtual void OsdStatusMessage(const char *Message) {}
00052                // Message has been displayed in the status line of the menu.
00053                // If Message is NULL, the status line has been cleared.
00054   virtual void OsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue) {}
00055                // The help keys have been set to the given values (may be NULL).
00056   virtual void OsdItem(const char *Text, int Index) {}
00057                // The OSD displays the given single line Text as menu item at Index.
00058   virtual void OsdCurrentItem(const char *Text) {}
00059                // The OSD displays the given single line Text as the current menu item.
00060   virtual void OsdTextItem(const char *Text, bool Scroll) {}
00061                // The OSD displays the given multi line text. If Text points to an
00062                // actual string, that text shall be displayed and Scroll has no
00063                // meaning. If Text is NULL, Scroll defines whether the previously
00064                // received text shall be scrolled up (true) or down (false) and
00065                // the text shall be redisplayed with the new offset.
00066   virtual void OsdChannel(const char *Text) {}
00067                // The OSD displays the single line Text with the current channel information.
00068   virtual void OsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle) {}
00069                // The OSD displays the given programme information.
00070 public:
00071   cStatus(void);
00072   virtual ~cStatus();
00073   // These functions are called whenever the related status information changes:
00074   static void MsgChannelSwitch(const cDevice *Device, int ChannelNumber);
00075   static void MsgRecording(const cDevice *Device, const char *Name, const char *FileName, bool On);
00076   static void MsgReplaying(const cControl *Control, const char *Name, const char *FileName, bool On);
00077   static void MsgSetVolume(int Volume, bool Absolute);
00078   static void MsgSetAudioTrack(int Index, const char * const *Tracks);
00079   static void MsgSetAudioChannel(int AudioChannel);
00080   static void MsgOsdClear(void);
00081   static void MsgOsdTitle(const char *Title);
00082   static void MsgOsdStatusMessage(const char *Message);
00083   static void MsgOsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue);
00084   static void MsgOsdItem(const char *Text, int Index);
00085   static void MsgOsdCurrentItem(const char *Text);
00086   static void MsgOsdTextItem(const char *Text,  bool Scroll = false);
00087   static void MsgOsdChannel(const char *Text);
00088   static void MsgOsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle);
00089   };
00090 
00091 #endif //__STATUS_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines