From 336aef8b0fcb7f6b58422d235526c6e7eb84161a Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 2 Mar 2025 11:03:35 +0100 Subject: [PATCH] Added the "override" keyword to virtual functions reimplemented in derived classes --- HISTORY | 5 + PLUGINS.html | 104 +++++++------- PLUGINS/src/epgtableid0/epgtableid0.c | 28 ++-- PLUGINS/src/hello/hello.c | 26 ++-- PLUGINS/src/osddemo/osddemo.c | 38 +++--- PLUGINS/src/pictures/entry.h | 6 +- PLUGINS/src/pictures/menu.h | 6 +- PLUGINS/src/pictures/pictures.c | 22 +-- PLUGINS/src/pictures/player.c | 4 +- PLUGINS/src/pictures/player.h | 10 +- PLUGINS/src/servicedemo/svccli.c | 12 +- PLUGINS/src/servicedemo/svcsvr.c | 8 +- PLUGINS/src/skincurses/skincurses.c | 140 +++++++++---------- PLUGINS/src/status/status.c | 58 ++++---- PLUGINS/src/svdrpdemo/svdrpdemo.c | 10 +- audio.h | 14 +- channels.c | 4 +- ci.c | 24 ++-- ci.h | 14 +- config.h | 14 +- cutter.c | 6 +- device.c | 6 +- device.h | 8 +- diseqc.h | 22 +-- dvbci.h | 14 +- dvbdevice.c | 12 +- dvbdevice.h | 58 ++++---- dvbplayer.c | 18 +-- dvbplayer.h | 4 +- dvbsubtitle.c | 4 +- dvbsubtitle.h | 6 +- eit.h | 6 +- eitscan.c | 4 +- epg.c | 4 +- epg.h | 8 +- filter.h | 4 +- font.c | 34 ++--- libsi/descriptor.h | 188 +++++++++++++------------- libsi/section.h | 54 ++++---- libsi/si.h | 12 +- libsi/util.h | 14 +- lirc.c | 6 +- lirc.h | 6 +- menu.c | 78 +++++------ menu.h | 56 ++++---- menuitems.h | 54 ++++---- mtd.h | 42 +++--- newplugin | 38 +++--- nit.h | 6 +- osd.h | 40 +++--- osdbase.h | 10 +- pat.c | 4 +- pat.h | 6 +- player.h | 4 +- plugin.h | 4 +- recorder.h | 10 +- recording.c | 12 +- recording.h | 14 +- remote.h | 8 +- remux.c | 10 +- ringbuffer.h | 16 +-- sdt.h | 6 +- sections.h | 6 +- skinclassic.c | 74 +++++----- skinclassic.h | 16 +-- skinlcars.c | 82 +++++------ skinlcars.h | 16 +-- skins.c | 4 +- skins.h | 14 +- skinsttng.c | 76 +++++------ skinsttng.h | 16 +-- status.h | 4 +- svdrp.c | 10 +- timers.h | 6 +- tools.h | 6 +- transfer.h | 10 +- 76 files changed, 904 insertions(+), 899 deletions(-) diff --git a/HISTORY b/HISTORY index 453ae26f..3c92e4b0 100644 --- a/HISTORY +++ b/HISTORY @@ -10089,3 +10089,8 @@ Video Disk Recorder Revision History - Fixed cPtsIndex::FindFrameNumber() to handle the case where Pts points to an I-frame. - Added missing locks to SetMenuItem() functions. - Revised locking in cMenuSchedule and cMenuWhatsOn. + +2025-03-02: + +- Added the "override" keyword to virtual functions reimplemented in derived classes. + Plugins may want to do the same, but don't have to. diff --git a/PLUGINS.html b/PLUGINS.html index ac6c7b7f..f9412818 100644 --- a/PLUGINS.html +++ b/PLUGINS.html @@ -850,7 +850,7 @@ private: int newGreetingTime; int newUseAlternateGreeting; protected: - virtual void Store(void); + virtual void Store(void) override; public: cMenuSetupHello(void); }; @@ -1296,7 +1296,7 @@ If a plugin wants to get informed on various events in VDR, it can derive a clas class cMyStatusMonitor : public cStatus { protected: - virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber, bool LiveView); + virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber, bool LiveView) override; }; void cMyStatusMonitor::ChannelSwitch(const cDevice *Device, int ChannelNumber, bool LiveView) @@ -1319,9 +1319,9 @@ private: cMyStatusMonitor *statusMonitor; public: cPluginStatus(void); - virtual ~cPluginStatus(); + virtual ~cPluginStatus() override; ... - virtual bool Start(void); + virtual bool Start(void) override; ... }; @@ -1369,10 +1369,10 @@ First you need the actual player class, which is derived from the abstract c class cMyPlayer : public cPlayer { protected: - virtual void Activate(bool On); + virtual void Activate(bool On) override; public: cMyPlayer(void); - virtual ~cMyPlayer(); + virtual ~cMyPlayer() override; };

@@ -1385,11 +1385,11 @@ thread which, e.g., reads data from a file, you can additionally derive your cl class cMyPlayer : public cPlayer, cThread { protected: - virtual void Activate(bool On); - virtual void Action(void); + virtual void Activate(bool On) override; + virtual void Action(void) override; public: cMyPlayer(void); - virtual ~cMyPlayer(); + virtual ~cMyPlayer() override; };

@@ -1424,7 +1424,7 @@ requirements in order to set a given track, it can implement the following function to allow the device to set a specific track:

-virtual void SetAudioTrack(eTrackType Type, const tTrackId *TrackId)
+virtual void SetAudioTrack(eTrackType Type, const tTrackId *TrackId);
 

A player that has special requirements about audio tracks should announce its @@ -1447,10 +1447,10 @@ private: cMyPlayer *player; public: cMyControl(void); - virtual ~cMyControl(); - virtual void Hide(void); - virtual cOsdObject *GetInfo(void); - virtual eOSState ProcessKey(eKeys Key); + virtual ~cMyControl() override; + virtual void Hide(void) override; + virtual cOsdObject *GetInfo(void) override; + virtual eOSState ProcessKey(eKeys Key) override; };

@@ -1550,8 +1550,8 @@ object derived from the cReceiver class: class cMyReceiver : public cReceiver, cThread { protected: - virtual void Activate(bool On); - virtual void Receive(uchar *Data, int Length); + virtual void Activate(bool On) override; + virtual void Receive(uchar *Data, int Length) override; public: cMyReceiver(int Pid); }; @@ -1617,7 +1617,7 @@ that sets the (initial) filter parameters: class cMyFilter : public cFilter { protected: - virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length); + virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length) override; public: cMyFilter(void); ... @@ -1762,13 +1762,13 @@ that provides the handling objects necessary to do the actual work: class cMySkin : public cSkin { public: cMySkin(void); - virtual const char *Description(void); - virtual cSkinDisplayChannel *DisplayChannel(bool WithInfo); - virtual cSkinDisplayMenu *DisplayMenu(void); - virtual cSkinDisplayReplay *DisplayReplay(bool ModeOnly); - virtual cSkinDisplayVolume *DisplayVolume(void); - virtual cSkinDisplayTracks *DisplayTracks(const char *Title, int NumTracks, const char * const *Tracks); - virtual cSkinDisplayMessage *DisplayMessage(void); + virtual const char *Description(void) override; + virtual cSkinDisplayChannel *DisplayChannel(bool WithInfo) override; + virtual cSkinDisplayMenu *DisplayMenu(void) override; + virtual cSkinDisplayReplay *DisplayReplay(bool ModeOnly) override; + virtual cSkinDisplayVolume *DisplayVolume(void) override; + virtual cSkinDisplayTracks *DisplayTracks(const char *Title, int NumTracks, const char * const *Tracks) override; + virtual cSkinDisplayMessage *DisplayMessage(void) override; };

@@ -1990,7 +1990,7 @@ access the device's OSD: class cMyOsdProvider : public cOsdProvider { public: cMyOsdProvider(void); - virtual cOsd *CreateOsd(int Left, int Top); + virtual cOsd *CreateOsd(int Left, int Top) override; };

@@ -2055,8 +2055,8 @@ This is where device hooks can be used. class cMyDeviceHook : public cDeviceHook { public: cMyDeviceHook(void); - virtual bool DeviceProvidesTransponder(const cDevice *Device, const cChannel *Channel) const; - virtual bool DeviceProvidesEIT(const cDevice *Device) const; + virtual bool DeviceProvidesTransponder(const cDevice *Device, const cChannel *Channel) const override; + virtual bool DeviceProvidesEIT(const cDevice *Device) const override; };

@@ -2124,16 +2124,16 @@ from cPositioner, as in class cMyPositioner : public cPositioner { public: cMyPositioner(void); - virtual void Drive(ePositionerDirection Direction); - virtual void Step(ePositionerDirection Direction, uint Steps = 1); - virtual void Halt(void); - virtual void SetLimit(ePositionerDirection Direction); - virtual void DisableLimits(void); - virtual void EnableLimits(void); - virtual void StorePosition(uint Number); - virtual void RecalcPositions(uint Number); - virtual void GotoPosition(uint Number, int Longitude); - virtual void GotoAngle(int Longitude); + virtual void Drive(ePositionerDirection Direction) override; + virtual void Step(ePositionerDirection Direction, uint Steps = 1) override; + virtual void Halt(void) override; + virtual void SetLimit(ePositionerDirection Direction) override; + virtual void DisableLimits(void) override; + virtual void EnableLimits(void) override; + virtual void StorePosition(uint Number) override; + virtual void RecalcPositions(uint Number) override; + virtual void GotoPosition(uint Number, int Longitude) override; + virtual void GotoAngle(int Longitude) override; };

@@ -2162,12 +2162,12 @@ as in class cMyAudio : public cAudio, private cThread { private: - virtual void Action(void); + virtual void Action(void) override; public: cMyAudio(void); - virtual void Play(const uchar *Data, int Length, uchar Id); - virtual void Mute(bool On); - virtual void Clear(void); + virtual void Play(const uchar *Data, int Length, uchar Id) override; + virtual void Mute(bool On) override; + virtual void Clear(void) override; };

@@ -2218,10 +2218,10 @@ own remote control class from cRemote, as in class cMyRemote : public cRemote, private cThread { private: - virtual void Action(void); + virtual void Action(void) override; public: cMyRemote(const char *Name); - virtual bool Initialize(void); + virtual bool Initialize(void) override; };

@@ -2363,7 +2363,7 @@ of the broadcaster's EPG with one from some external database, you could do: class cMyEpgHandler : public cEpgHandler { public: - virtual bool SetDescription(cEvent *Event, const char *Description); + virtual bool SetDescription(cEvent *Event, const char *Description) override; }; bool cMyEpgHandler::SetDescription(cEvent *Event, const char *Description) @@ -2394,14 +2394,14 @@ as in class cMyVideoDirectory : public cVideoDirectory { public: cMyVideoDirectory(void); - virtual ~cMyVideoDirectory(); - virtual int FreeMB(int *UsedMB = NULL); - virtual bool Register(const char *FileName); - virtual bool Rename(const char *OldName, const char *NewName); - virtual bool Move(const char *FromName, const char *ToName); - virtual bool Remove(const char *Name); - virtual void Cleanup(const char *IgnoreFiles[] = NULL); - virtual bool Contains(const char *Name); + virtual ~cMyVideoDirectory() override; + virtual int FreeMB(int *UsedMB = NULL) override; + virtual bool Register(const char *FileName) override; + virtual bool Rename(const char *OldName, const char *NewName) override; + virtual bool Move(const char *FromName, const char *ToName) override; + virtual bool Remove(const char *Name) override; + virtual void Cleanup(const char *IgnoreFiles[] = NULL) override; + virtual bool Contains(const char *Name) override; };

diff --git a/PLUGINS/src/epgtableid0/epgtableid0.c b/PLUGINS/src/epgtableid0/epgtableid0.c index aac18182..1bbeafda 100644 --- a/PLUGINS/src/epgtableid0/epgtableid0.c +++ b/PLUGINS/src/epgtableid0/epgtableid0.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: epgtableid0.c 4.1 2018/04/10 13:00:18 kls Exp $ + * $Id: epgtableid0.c 5.1 2025/03/02 11:03:35 kls Exp $ */ #include @@ -18,16 +18,16 @@ class cTable0Handler : public cEpgHandler { private: bool Ignore(cEvent *Event) { return Event->TableID() == 0x00; } public: - virtual bool SetEventID(cEvent *Event, tEventID EventID); - virtual bool SetStartTime(cEvent *Event, time_t StartTime); - virtual bool SetDuration(cEvent *Event, int Duration); - virtual bool SetTitle(cEvent *Event, const char *Title); - virtual bool SetShortText(cEvent *Event, const char *ShortText); - virtual bool SetDescription(cEvent *Event, const char *Description); - virtual bool SetContents(cEvent *Event, uchar *Contents); - virtual bool SetParentalRating(cEvent *Event, int ParentalRating); - virtual bool SetVps(cEvent *Event, time_t Vps); - virtual bool FixEpgBugs(cEvent *Event); + virtual bool SetEventID(cEvent *Event, tEventID EventID) override; + virtual bool SetStartTime(cEvent *Event, time_t StartTime) override; + virtual bool SetDuration(cEvent *Event, int Duration) override; + virtual bool SetTitle(cEvent *Event, const char *Title) override; + virtual bool SetShortText(cEvent *Event, const char *ShortText) override; + virtual bool SetDescription(cEvent *Event, const char *Description) override; + virtual bool SetContents(cEvent *Event, uchar *Contents) override; + virtual bool SetParentalRating(cEvent *Event, int ParentalRating) override; + virtual bool SetVps(cEvent *Event, time_t Vps) override; + virtual bool FixEpgBugs(cEvent *Event) override; }; bool cTable0Handler::SetEventID(cEvent *Event, tEventID EventID) @@ -84,9 +84,9 @@ bool cTable0Handler::FixEpgBugs(cEvent *Event) class cPluginEpgtableid0 : public cPlugin { public: - virtual const char *Version(void) { return VERSION; } - virtual const char *Description(void) { return DESCRIPTION; } - virtual bool Initialize(void); + virtual const char *Version(void) override { return VERSION; } + virtual const char *Description(void) override { return DESCRIPTION; } + virtual bool Initialize(void) override; }; bool cPluginEpgtableid0::Initialize(void) diff --git a/PLUGINS/src/hello/hello.c b/PLUGINS/src/hello/hello.c index 66ae7224..bc00a492 100644 --- a/PLUGINS/src/hello/hello.c +++ b/PLUGINS/src/hello/hello.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: hello.c 4.1 2018/04/10 13:00:22 kls Exp $ + * $Id: hello.c 5.1 2025/03/02 11:03:35 kls Exp $ */ #include @@ -23,17 +23,17 @@ private: bool option_b; public: cPluginHello(void); - virtual ~cPluginHello(); - virtual const char *Version(void) { return VERSION; } - virtual const char *Description(void) { return tr(DESCRIPTION); } - virtual const char *CommandLineHelp(void); - virtual bool ProcessArgs(int argc, char *argv[]); - virtual bool Start(void); - virtual void Housekeeping(void); - virtual const char *MainMenuEntry(void) { return tr(MAINMENUENTRY); } - virtual cOsdObject *MainMenuAction(void); - virtual cMenuSetupPage *SetupMenu(void); - virtual bool SetupParse(const char *Name, const char *Value); + virtual ~cPluginHello() override; + virtual const char *Version(void) { return VERSION; override} + virtual const char *Description(void) { return tr(DESCRIPTION); override} + virtual const char *CommandLineHelp(void) override; + virtual bool ProcessArgs(int argc, char *argv[]) override; + virtual bool Start(void) override; + virtual void Housekeeping(void) override; + virtual const char *MainMenuEntry(void) { return tr(MAINMENUENTRY); override} + virtual cOsdObject *MainMenuAction(void) override; + virtual cMenuSetupPage *SetupMenu(void) override; + virtual bool SetupParse(const char *Name, const char *Value) override; }; // Global variables that control the overall behaviour: @@ -48,7 +48,7 @@ private: int newGreetingTime; int newUseAlternateGreeting; protected: - virtual void Store(void); + virtual void Store(void) override; public: cMenuSetupHello(void); }; diff --git a/PLUGINS/src/osddemo/osddemo.c b/PLUGINS/src/osddemo/osddemo.c index 99688d9b..46c2aa96 100644 --- a/PLUGINS/src/osddemo/osddemo.c +++ b/PLUGINS/src/osddemo/osddemo.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: osddemo.c 4.5 2020/10/14 20:32:41 kls Exp $ + * $Id: osddemo.c 5.1 2025/03/02 11:03:35 kls Exp $ */ #include @@ -231,9 +231,9 @@ private: tColor color; public: cLineGame(void); - virtual ~cLineGame(); - virtual void Show(void); - virtual eOSState ProcessKey(eKeys Key); + virtual ~cLineGame() override; + virtual void Show(void) override; + virtual eOSState ProcessKey(eKeys Key) override; }; cLineGame::cLineGame(void) @@ -310,13 +310,13 @@ private: cPixmap *destroyablePixmap; cPixmap *toggleablePixmap; bool SetArea(void); - virtual void Action(void); + virtual void Action(void) override; cPixmap *CreateTextPixmap(const char *s, int Line, int Layer, tColor ColorFg, tColor ColorBg, const cFont *Font); public: cTrueColorDemo(void); - virtual ~cTrueColorDemo(); - virtual void Show(void); - virtual eOSState ProcessKey(eKeys Key); + virtual ~cTrueColorDemo() override; + virtual void Show(void) override; + virtual eOSState ProcessKey(eKeys Key) override; }; cTrueColorDemo::cTrueColorDemo(void) @@ -695,17 +695,17 @@ private: // Add any member variables or functions you may need here. public: cPluginOsddemo(void); - virtual ~cPluginOsddemo(); - virtual const char *Version(void) { return VERSION; } - virtual const char *Description(void) { return DESCRIPTION; } - virtual const char *CommandLineHelp(void); - virtual bool ProcessArgs(int argc, char *argv[]); - virtual bool Start(void); - virtual void Housekeeping(void); - virtual const char *MainMenuEntry(void) { return MAINMENUENTRY; } - virtual cOsdObject *MainMenuAction(void); - virtual cMenuSetupPage *SetupMenu(void); - virtual bool SetupParse(const char *Name, const char *Value); + virtual ~cPluginOsddemo() override; + virtual const char *Version(void) override { return VERSION; } + virtual const char *Description(void) override { return DESCRIPTION; } + virtual const char *CommandLineHelp(void) override; + virtual bool ProcessArgs(int argc, char *argv[]) override; + virtual bool Start(void) override; + virtual void Housekeeping(void) override; + virtual const char *MainMenuEntry(void) override { return MAINMENUENTRY; } + virtual cOsdObject *MainMenuAction(void) override; + virtual cMenuSetupPage *SetupMenu(void) override; + virtual bool SetupParse(const char *Name, const char *Value) override; }; cPluginOsddemo::cPluginOsddemo(void) diff --git a/PLUGINS/src/pictures/entry.h b/PLUGINS/src/pictures/entry.h index adb84f38..9728f06b 100644 --- a/PLUGINS/src/pictures/entry.h +++ b/PLUGINS/src/pictures/entry.h @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: entry.h 1.1 2008/01/13 11:29:27 kls Exp $ + * $Id: entry.h 5.1 2025/03/02 11:03:35 kls Exp $ */ #ifndef _ENTRY_H @@ -20,8 +20,8 @@ private: void Load(void) const; public: cPictureEntry(const char *Name, const cPictureEntry *Parent, bool IsDirectory); - virtual ~cPictureEntry(); - virtual int Compare(const cListObject &ListObject) const; + virtual ~cPictureEntry() override; + virtual int Compare(const cListObject &ListObject) const override; const char *Name(void) const { return name; } const cPictureEntry *Parent(void) const { return parent; } bool IsDirectory(void) const { return isDirectory; } diff --git a/PLUGINS/src/pictures/menu.h b/PLUGINS/src/pictures/menu.h index eb85cb33..94c375dc 100644 --- a/PLUGINS/src/pictures/menu.h +++ b/PLUGINS/src/pictures/menu.h @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: menu.h 1.1 2008/01/13 11:32:52 kls Exp $ + * $Id: menu.h 5.1 2025/03/02 11:03:35 kls Exp $ */ #ifndef _MENU_H @@ -23,8 +23,8 @@ private: eOSState SelectItem(const char *Path = NULL, bool SlideShow = false); public: cPictureMenu(const cPictureEntry *PictureEntry, const char *Path = NULL); - ~cPictureMenu(); - virtual eOSState ProcessKey(eKeys Key); + virtual ~cPictureMenu() override; + virtual eOSState ProcessKey(eKeys Key) override; static cPictureMenu *CreatePictureMenu(void); }; diff --git a/PLUGINS/src/pictures/pictures.c b/PLUGINS/src/pictures/pictures.c index afac1eee..035dfa2b 100644 --- a/PLUGINS/src/pictures/pictures.c +++ b/PLUGINS/src/pictures/pictures.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: pictures.c 5.1 2022/12/05 15:26:23 kls Exp $ + * $Id: pictures.c 5.2 2025/03/02 11:03:35 kls Exp $ */ #include @@ -22,7 +22,7 @@ private: char newPictureDirectory[PATH_MAX]; int newSlideShowDelay; protected: - virtual void Store(void); + virtual void Store(void) override; public: cMenuSetupPictures(void); }; @@ -48,15 +48,15 @@ private: // Add any member variables or functions you may need here. public: cPluginPictures(void); - virtual ~cPluginPictures(); - virtual const char *Version(void) { return VERSION; } - virtual const char *Description(void) { return tr(DESCRIPTION); } - virtual const char *CommandLineHelp(void); - virtual bool ProcessArgs(int argc, char *argv[]); - virtual const char *MainMenuEntry(void) { return tr(MAINMENUENTRY); } - virtual cOsdObject *MainMenuAction(void); - virtual cMenuSetupPage *SetupMenu(void); - virtual bool SetupParse(const char *Name, const char *Value); + virtual ~cPluginPictures() override; + virtual const char *Version(void) override { return VERSION; } + virtual const char *Description(void) override { return tr(DESCRIPTION); } + virtual const char *CommandLineHelp(void) override; + virtual bool ProcessArgs(int argc, char *argv[]) override; + virtual const char *MainMenuEntry(void) override { return tr(MAINMENUENTRY); } + virtual cOsdObject *MainMenuAction(void) override; + virtual cMenuSetupPage *SetupMenu(void) override; + virtual bool SetupParse(const char *Name, const char *Value) override; }; cPluginPictures::cPluginPictures(void) diff --git a/PLUGINS/src/pictures/player.c b/PLUGINS/src/pictures/player.c index e3efdb39..e75efa5b 100644 --- a/PLUGINS/src/pictures/player.c +++ b/PLUGINS/src/pictures/player.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: player.c 5.1 2022/12/05 15:26:23 kls Exp $ + * $Id: player.c 5.2 2025/03/02 11:03:35 kls Exp $ */ #include "player.h" @@ -33,7 +33,7 @@ private: int size; int length; uchar *buffer; - virtual void Activate(bool On); + virtual void Activate(bool On) override; public: cPicturePlayer(void); ~cPicturePlayer(); diff --git a/PLUGINS/src/pictures/player.h b/PLUGINS/src/pictures/player.h index 7a0b401f..336ab581 100644 --- a/PLUGINS/src/pictures/player.h +++ b/PLUGINS/src/pictures/player.h @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: player.h 2.1 2012/04/28 11:56:01 kls Exp $ + * $Id: player.h 5.1 2025/03/02 11:03:35 kls Exp $ */ #ifndef _PLAYER_H @@ -35,12 +35,12 @@ private: void NextPicture(int Direction); void NextDirectory(int Direction); void DisplayCaption(void); - virtual void Hide(void) {} + virtual void Hide(void) override {} public: cPictureControl(cPictureEntry *Pictures, const cPictureEntry *PictureEntry, bool SlideShow = false); - virtual ~cPictureControl(); - virtual cString GetHeader(void); - virtual eOSState ProcessKey(eKeys Key); + virtual ~cPictureControl() override; + virtual cString GetHeader(void) override; + virtual eOSState ProcessKey(eKeys Key) override; static bool Active(void) { return active > 0; } static const char *LastDisplayed(void); }; diff --git a/PLUGINS/src/servicedemo/svccli.c b/PLUGINS/src/servicedemo/svccli.c index e9046b4e..73b88d81 100644 --- a/PLUGINS/src/servicedemo/svccli.c +++ b/PLUGINS/src/servicedemo/svccli.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: svccli.c 4.1 2018/04/10 13:00:53 kls Exp $ + * $Id: svccli.c 5.1 2025/03/02 11:03:35 kls Exp $ */ #include @@ -16,11 +16,11 @@ static const char *MAINMENUENTRY = "Service demo"; class cPluginSvcCli : public cPlugin { public: - virtual const char *Version(void) { return VERSION; } - virtual const char *Description(void) { return DESCRIPTION; } - virtual const char *MainMenuEntry(void) { return MAINMENUENTRY; } - virtual cOsdObject *MainMenuAction(void); - virtual bool Service(const char *Id, void *Data); + virtual const char *Version(void) override { return VERSION; } + virtual const char *Description(void) override { return DESCRIPTION; } + virtual const char *MainMenuEntry(void) override { return MAINMENUENTRY; } + virtual cOsdObject *MainMenuAction(void) override; + virtual bool Service(const char *Id, void *Data) override; }; struct ReportBoredPlugin_v1_0 { diff --git a/PLUGINS/src/servicedemo/svcsvr.c b/PLUGINS/src/servicedemo/svcsvr.c index a7e653da..275dfa4c 100644 --- a/PLUGINS/src/servicedemo/svcsvr.c +++ b/PLUGINS/src/servicedemo/svcsvr.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: svcsvr.c 4.1 2018/04/10 13:00:57 kls Exp $ + * $Id: svcsvr.c 5.1 2025/03/02 11:03:35 kls Exp $ */ #include @@ -15,9 +15,9 @@ static const char *DESCRIPTION = "Service demo server"; class cPluginSvcSvr : public cPlugin { public: - virtual const char *Version(void) { return VERSION; } - virtual const char *Description(void) { return DESCRIPTION; } - virtual bool Service(const char *Id, void *Data); + virtual const char *Version(void) override { return VERSION; } + virtual const char *Description(void) override { return DESCRIPTION; } + virtual bool Service(const char *Id, void *Data) override; }; struct ReportBoredPlugin_v1_0 { diff --git a/PLUGINS/src/skincurses/skincurses.c b/PLUGINS/src/skincurses/skincurses.c index 2b671457..cfbc8515 100644 --- a/PLUGINS/src/skincurses/skincurses.c +++ b/PLUGINS/src/skincurses/skincurses.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: skincurses.c 5.1 2021/07/01 15:40:46 kls Exp $ + * $Id: skincurses.c 5.2 2025/03/02 11:03:35 kls Exp $ */ #include @@ -20,12 +20,12 @@ static const char *MAINMENUENTRY = NULL; class cCursesFont : public cFont { public: - virtual int Width(void) const { return 1; } - virtual int Width(uint c) const { return 1; } - virtual int Width(const char *s) const { return s ? Utf8StrLen(s) : 0; } - virtual int Height(void) const { return 1; } - virtual void DrawText(cBitmap *Bitmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const {} - virtual void DrawText(cPixmap *Pixmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const {} + virtual int Width(void) const override { return 1; } + virtual int Width(uint c) const override { return 1; } + virtual int Width(const char *s) const override { return s ? Utf8StrLen(s) : 0; } + virtual int Height(void) const override { return 1; } + virtual void DrawText(cBitmap *Bitmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const override {} + virtual void DrawText(cPixmap *Pixmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const override {} }; static const cCursesFont Font = cCursesFont(); // w/o the '= cCursesFont()' gcc 4.6 complains - can anybody explain why this is necessary? @@ -64,12 +64,12 @@ private: void SetColor(int colorFg, int colorBg = clrBackground); public: cCursesOsd(int Left, int Top); - virtual ~cCursesOsd(); - virtual void SaveRegion(int x1, int y1, int x2, int y2); - virtual void RestoreRegion(void); - virtual void DrawText(int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font, int Width = 0, int Height = 0, int Alignment = taDefault); - virtual void DrawRectangle(int x1, int y1, int x2, int y2, tColor Color); - virtual void Flush(void); + virtual ~cCursesOsd() override; + virtual void SaveRegion(int x1, int y1, int x2, int y2) override; + virtual void RestoreRegion(void) override; + virtual void DrawText(int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font, int Width = 0, int Height = 0, int Alignment = taDefault) override; + virtual void DrawRectangle(int x1, int y1, int x2, int y2, tColor Color) override; + virtual void Flush(void) override; }; cCursesOsd::cCursesOsd(int Left, int Top) @@ -193,11 +193,11 @@ private: bool message; public: cSkinCursesDisplayChannel(bool WithInfo); - virtual ~cSkinCursesDisplayChannel(); - virtual void SetChannel(const cChannel *Channel, int Number); - virtual void SetEvents(const cEvent *Present, const cEvent *Following); - virtual void SetMessage(eMessageType Type, const char *Text); - virtual void Flush(void); + virtual ~cSkinCursesDisplayChannel() override; + virtual void SetChannel(const cChannel *Channel, int Number) override; + virtual void SetEvents(const cEvent *Present, const cEvent *Following) override; + virtual void SetMessage(eMessageType Type, const char *Text) override; + virtual void Flush(void) override; }; cSkinCursesDisplayChannel::cSkinCursesDisplayChannel(bool WithInfo) @@ -268,20 +268,20 @@ private: void SetTextScrollbar(void); public: cSkinCursesDisplayMenu(void); - virtual ~cSkinCursesDisplayMenu(); - virtual void Scroll(bool Up, bool Page); - virtual int MaxItems(void); - virtual void Clear(void); - virtual void SetTitle(const char *Title); - virtual void SetButtons(const char *Red, const char *Green = NULL, const char *Yellow = NULL, const char *Blue = NULL); - virtual void SetMessage(eMessageType Type, const char *Text); - virtual void SetItem(const char *Text, int Index, bool Current, bool Selectable); - virtual void SetScrollbar(int Total, int Offset); - virtual void SetEvent(const cEvent *Event); - virtual void SetRecording(const cRecording *Recording); - virtual void SetText(const char *Text, bool FixedFont); - virtual const cFont *GetTextAreaFont(bool FixedFont) const { return &Font; } - virtual void Flush(void); + virtual ~cSkinCursesDisplayMenu() override; + virtual void Scroll(bool Up, bool Page) override; + virtual int MaxItems(void) override; + virtual void Clear(void) override; + virtual void SetTitle(const char *Title) override; + virtual void SetButtons(const char *Red, const char *Green = NULL, const char *Yellow = NULL, const char *Blue = NULL) override; + virtual void SetMessage(eMessageType Type, const char *Text) override; + virtual void SetItem(const char *Text, int Index, bool Current, bool Selectable) override; + virtual void SetScrollbar(int Total, int Offset) override; + virtual void SetEvent(const cEvent *Event) override; + virtual void SetRecording(const cRecording *Recording) override; + virtual void SetText(const char *Text, bool FixedFont) override; + virtual const cFont *GetTextAreaFont(bool FixedFont) const override { return &Font; } + virtual void Flush(void) override; }; cSkinCursesDisplayMenu::cSkinCursesDisplayMenu(void) @@ -507,15 +507,15 @@ private: bool message; public: cSkinCursesDisplayReplay(bool ModeOnly); - virtual ~cSkinCursesDisplayReplay(); - virtual void SetTitle(const char *Title); - virtual void SetMode(bool Play, bool Forward, int Speed); - virtual void SetProgress(int Current, int Total); - virtual void SetCurrent(const char *Current); - virtual void SetTotal(const char *Total); - virtual void SetJump(const char *Jump); - virtual void SetMessage(eMessageType Type, const char *Text); - virtual void Flush(void); + virtual ~cSkinCursesDisplayReplay() override; + virtual void SetTitle(const char *Title) override; + virtual void SetMode(bool Play, bool Forward, int Speed) override; + virtual void SetProgress(int Current, int Total) override; + virtual void SetCurrent(const char *Current) override; + virtual void SetTotal(const char *Total) override; + virtual void SetJump(const char *Jump) override; + virtual void SetMessage(eMessageType Type, const char *Text) override; + virtual void Flush(void) override; }; cSkinCursesDisplayReplay::cSkinCursesDisplayReplay(bool ModeOnly) @@ -598,9 +598,9 @@ private: cOsd *osd; public: cSkinCursesDisplayVolume(void); - virtual ~cSkinCursesDisplayVolume(); - virtual void SetVolume(int Current, int Total, bool Mute); - virtual void Flush(void); + virtual ~cSkinCursesDisplayVolume() override; + virtual void SetVolume(int Current, int Total, bool Mute) override; + virtual void Flush(void) override; }; cSkinCursesDisplayVolume::cSkinCursesDisplayVolume(void) @@ -645,10 +645,10 @@ private: void SetItem(const char *Text, int Index, bool Current); public: cSkinCursesDisplayTracks(const char *Title, int NumTracks, const char * const *Tracks); - virtual ~cSkinCursesDisplayTracks(); - virtual void SetTrack(int Index, const char * const *Tracks); - virtual void SetAudioChannel(int AudioChannel) {} - virtual void Flush(void); + virtual ~cSkinCursesDisplayTracks() override; + virtual void SetTrack(int Index, const char * const *Tracks) override; + virtual void SetAudioChannel(int AudioChannel) { override} + virtual void Flush(void) override; }; cSkinCursesDisplayTracks::cSkinCursesDisplayTracks(const char *Title, int NumTracks, const char * const *Tracks) @@ -705,9 +705,9 @@ private: cOsd *osd; public: cSkinCursesDisplayMessage(void); - virtual ~cSkinCursesDisplayMessage(); - virtual void SetMessage(eMessageType Type, const char *Text); - virtual void Flush(void); + virtual ~cSkinCursesDisplayMessage() override; + virtual void SetMessage(eMessageType Type, const char *Text) override; + virtual void Flush(void) override; }; cSkinCursesDisplayMessage::cSkinCursesDisplayMessage(void) @@ -735,13 +735,13 @@ void cSkinCursesDisplayMessage::Flush(void) class cSkinCurses : public cSkin { public: cSkinCurses(void); - virtual const char *Description(void); - virtual cSkinDisplayChannel *DisplayChannel(bool WithInfo); - virtual cSkinDisplayMenu *DisplayMenu(void); - virtual cSkinDisplayReplay *DisplayReplay(bool ModeOnly); - virtual cSkinDisplayVolume *DisplayVolume(void); - virtual cSkinDisplayTracks *DisplayTracks(const char *Title, int NumTracks, const char * const *Tracks); - virtual cSkinDisplayMessage *DisplayMessage(void); + virtual const char *Description(void) override; + virtual cSkinDisplayChannel *DisplayChannel(bool WithInfo) override; + virtual cSkinDisplayMenu *DisplayMenu(void) override; + virtual cSkinDisplayReplay *DisplayReplay(bool ModeOnly) override; + virtual cSkinDisplayVolume *DisplayVolume(void) override; + virtual cSkinDisplayTracks *DisplayTracks(const char *Title, int NumTracks, const char * const *Tracks) override; + virtual cSkinDisplayMessage *DisplayMessage(void) override; }; cSkinCurses::cSkinCurses(void) @@ -791,18 +791,18 @@ private: // Add any member variables or functions you may need here. public: cPluginSkinCurses(void); - virtual ~cPluginSkinCurses(); - virtual const char *Version(void) { return VERSION; } - virtual const char *Description(void) { return tr(DESCRIPTION); } - virtual const char *CommandLineHelp(void); - virtual bool ProcessArgs(int argc, char *argv[]); - virtual bool Initialize(void); - virtual bool Start(void); - virtual void Housekeeping(void); - virtual const char *MainMenuEntry(void) { return tr(MAINMENUENTRY); } - virtual cOsdObject *MainMenuAction(void); - virtual cMenuSetupPage *SetupMenu(void); - virtual bool SetupParse(const char *Name, const char *Value); + virtual ~cPluginSkinCurses() override; + virtual const char *Version(void) override { return VERSION; } + virtual const char *Description(void) override { return tr(DESCRIPTION); } + virtual const char *CommandLineHelp(void) override; + virtual bool ProcessArgs(int argc, char *argv[]) override; + virtual bool Initialize(void) override; + virtual bool Start(void) override; + virtual void Housekeeping(void) override; + virtual const char *MainMenuEntry(void) { return tr(MAINMENUENTRY); override} + virtual cOsdObject *MainMenuAction(void) override; + virtual cMenuSetupPage *SetupMenu(void) override; + virtual bool SetupParse(const char *Name, const char *Value) override; }; cPluginSkinCurses::cPluginSkinCurses(void) diff --git a/PLUGINS/src/status/status.c b/PLUGINS/src/status/status.c index 8bbd0a4f..4ad10471 100644 --- a/PLUGINS/src/status/status.c +++ b/PLUGINS/src/status/status.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: status.c 5.4 2025/02/12 21:18:53 kls Exp $ + * $Id: status.c 5.5 2025/03/02 11:03:35 kls Exp $ */ #include @@ -17,23 +17,23 @@ static const char *MAINMENUENTRY = NULL; class cStatusTest : public cStatus { protected: - virtual void TimerChange(const cTimer *Timer, eTimerChange Change); - virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber, bool LiveView); - virtual void Recording(const cDevice *Device, const char *Name, const char *FileName, bool On); - virtual void Replaying(const cControl *Control, const char *Name, const char *FileName, bool On); - virtual void SetVolume(int Volume, bool Absolute); - virtual void SetAudioTrack(int Index, const char * const *Tracks); - virtual void SetAudioChannel(int AudioChannel); - virtual void SetSubtitleTrack(int Index, const char * const *Tracks); - virtual void OsdClear(void); - virtual void OsdTitle(const char *Title); - virtual void OsdStatusMessage2(eMessageType Type, const char *Message); - virtual void OsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue); - virtual void OsdItem2(const char *Text, int Index, bool Selectable); - virtual void OsdCurrentItem2(const char *Text, int Index); - virtual void OsdTextItem(const char *Text, bool Scroll); - virtual void OsdChannel(const char *Text); - virtual void OsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle); + virtual void TimerChange(const cTimer *Timer, eTimerChange Change) override; + virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber, bool LiveView) override; + virtual void Recording(const cDevice *Device, const char *Name, const char *FileName, bool On) override; + virtual void Replaying(const cControl *Control, const char *Name, const char *FileName, bool On) override; + virtual void SetVolume(int Volume, bool Absolute) override; + virtual void SetAudioTrack(int Index, const char * const *Tracks) override; + virtual void SetAudioChannel(int AudioChannel) override; + virtual void SetSubtitleTrack(int Index, const char * const *Tracks) override; + virtual void OsdClear(void) override; + virtual void OsdTitle(const char *Title) override; + virtual void OsdStatusMessage2(eMessageType Type, const char *Message) override; + virtual void OsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue) override; + virtual void OsdItem2(const char *Text, int Index, bool Selectable) override; + virtual void OsdCurrentItem2(const char *Text, int Index) override; + virtual void OsdTextItem(const char *Text, bool Scroll) override; + virtual void OsdChannel(const char *Text) override; + virtual void OsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle) override; }; void cStatusTest::TimerChange(const cTimer *Timer, eTimerChange Change) @@ -137,17 +137,17 @@ private: cStatusTest *statusTest; public: cPluginStatus(void); - virtual ~cPluginStatus(); - virtual const char *Version(void) { return VERSION; } - virtual const char *Description(void) { return DESCRIPTION; } - virtual const char *CommandLineHelp(void); - virtual bool ProcessArgs(int argc, char *argv[]); - virtual bool Start(void); - virtual void Housekeeping(void); - virtual const char *MainMenuEntry(void) { return MAINMENUENTRY; } - virtual cOsdObject *MainMenuAction(void); - virtual cMenuSetupPage *SetupMenu(void); - virtual bool SetupParse(const char *Name, const char *Value); + virtual ~cPluginStatus() override; + virtual const char *Version(void) override { return VERSION; } + virtual const char *Description(void) override { return DESCRIPTION; } + virtual const char *CommandLineHelp(void) override; + virtual bool ProcessArgs(int argc, char *argv[]) override; + virtual bool Start(void) override; + virtual void Housekeeping(void) override; + virtual const char *MainMenuEntry(void) override { return MAINMENUENTRY; } + virtual cOsdObject *MainMenuAction(void) override; + virtual cMenuSetupPage *SetupMenu(void) override; + virtual bool SetupParse(const char *Name, const char *Value) override; }; cPluginStatus::cPluginStatus(void) diff --git a/PLUGINS/src/svdrpdemo/svdrpdemo.c b/PLUGINS/src/svdrpdemo/svdrpdemo.c index 3bf87171..49a5c101 100644 --- a/PLUGINS/src/svdrpdemo/svdrpdemo.c +++ b/PLUGINS/src/svdrpdemo/svdrpdemo.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: svdrpdemo.c 4.1 2018/04/10 13:01:07 kls Exp $ + * $Id: svdrpdemo.c 5.1 2025/03/02 11:03:35 kls Exp $ */ #include @@ -15,10 +15,10 @@ class cPluginSvdrpdemo : public cPlugin { private: // Add any member variables or functions you may need here. public: - virtual const char *Version(void) { return VERSION; } - virtual const char *Description(void) { return DESCRIPTION; } - virtual const char **SVDRPHelpPages(void); - virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode); + virtual const char *Version(void) override { return VERSION; } + virtual const char *Description(void) override { return DESCRIPTION; } + virtual const char **SVDRPHelpPages(void) override; + virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode) override; }; const char **cPluginSvdrpdemo::SVDRPHelpPages(void) diff --git a/audio.h b/audio.h index f99a84ae..ba6d6961 100644 --- a/audio.h +++ b/audio.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: audio.h 2.1 2008/07/06 11:39:21 kls Exp $ + * $Id: audio.h 5.1 2025/03/02 11:03:35 kls Exp $ */ #ifndef __AUDIO_H @@ -17,7 +17,7 @@ class cAudio : public cListObject { protected: cAudio(void); public: - virtual ~cAudio(); + virtual ~cAudio() override; virtual void Play(const uchar *Data, int Length, uchar Id) = 0; ///< Plays the given block of audio Data. Must return as soon as possible. ///< If the entire block of data can't be processed immediately, it must @@ -53,11 +53,11 @@ private: bool mute; public: cExternalAudio(const char *Command); - virtual ~cExternalAudio(); - virtual void Play(const uchar *Data, int Length, uchar Id); - virtual void PlayTs(const uchar *Data, int Length); - virtual void Mute(bool On); - virtual void Clear(void); + virtual ~cExternalAudio() override; + virtual void Play(const uchar *Data, int Length, uchar Id) override; + virtual void PlayTs(const uchar *Data, int Length) override; + virtual void Mute(bool On) override; + virtual void Clear(void) override; }; #endif //__AUDIO_H diff --git a/channels.c b/channels.c index eacd7603..c846918f 100644 --- a/channels.c +++ b/channels.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: channels.c 5.3 2024/03/02 16:21:16 kls Exp $ + * $Id: channels.c 5.4 2025/03/02 11:03:35 kls Exp $ */ #include "channels.h" @@ -834,7 +834,7 @@ public: channel = Channel; channelID = channel->GetChannelID(); } - virtual int Compare(const cListObject &ListObject) const { + virtual int Compare(const cListObject &ListObject) const override { cChannelSorter *cs = (cChannelSorter *)&ListObject; return memcmp(&channelID, &cs->channelID, sizeof(channelID)); } diff --git a/ci.c b/ci.c index d9d4b5ee..992fe56a 100644 --- a/ci.c +++ b/ci.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: ci.c 5.1 2021/06/09 09:41:18 kls Exp $ + * $Id: ci.c 5.2 2025/03/02 11:03:35 kls Exp $ */ #include "ci.h" @@ -130,8 +130,8 @@ private: void DelEmmPids(void); public: cCaPidReceiver(void); - virtual ~cCaPidReceiver() { Detach(); } - virtual void Receive(const uchar *Data, int Length); + virtual ~cCaPidReceiver() override { Detach(); } + virtual void Receive(const uchar *Data, int Length) override; bool HasCaPids(void) const { return NumPids() - emmPids.Size() - 1 > 0; } void Reset(void) { DelEmmPids(); catVersion = -1; } bool HandlingPid(void); @@ -314,10 +314,10 @@ private: time_t lastScrambledTime; int numTsPackets; protected: - virtual void Receive(const uchar *Data, int Length); + virtual void Receive(const uchar *Data, int Length) override; public: cCaActivationReceiver(const cChannel *Channel, cCamSlot *CamSlot); - virtual ~cCaActivationReceiver(); + virtual ~cCaActivationReceiver() override; }; cCaActivationReceiver::cCaActivationReceiver(const cChannel *Channel, cCamSlot *CamSlot) @@ -806,7 +806,7 @@ private: int state; public: cCiResourceManager(uint16_t SessionId, cCiTransportConnection *Tc); - virtual void Process(int Length = 0, const uint8_t *Data = NULL); + virtual void Process(int Length = 0, const uint8_t *Data = NULL) override; }; cCiResourceManager::cCiResourceManager(uint16_t SessionId, cCiTransportConnection *Tc) @@ -1117,7 +1117,7 @@ private: int numRetries; public: cCiConditionalAccessSupport(uint16_t SessionId, cCiTransportConnection *Tc); - virtual void Process(int Length = 0, const uint8_t *Data = NULL); + virtual void Process(int Length = 0, const uint8_t *Data = NULL) override; const int *GetCaSystemIds(void) { return caSystemIds; } void SendPMT(cCiCaPmt *CaPmt); bool RepliesToQuery(void) { return repliesToQuery; } @@ -1268,7 +1268,7 @@ void cCiConditionalAccessSupport::SendPMT(cCiCaPmt *CaPmt) class cCiHostControl : public cCiSession { public: cCiHostControl(uint16_t SessionId, cCiTransportConnection *Tc); - virtual void Process(int Length = 0, const uint8_t *Data = NULL); + virtual void Process(int Length = 0, const uint8_t *Data = NULL) override; }; cCiHostControl::cCiHostControl(uint16_t SessionId, cCiTransportConnection* Tc) @@ -1305,7 +1305,7 @@ private: void SendDateTime(void); public: cCiDateTime(uint16_t SessionId, cCiTransportConnection *Tc); - virtual void Process(int Length = 0, const uint8_t *Data = NULL); + virtual void Process(int Length = 0, const uint8_t *Data = NULL) override; }; cCiDateTime::cCiDateTime(uint16_t SessionId, cCiTransportConnection *Tc) @@ -1409,8 +1409,8 @@ private: cCiEnquiry *enquiry, *fetchedEnquiry; public: cCiMMI(uint16_t SessionId, cCiTransportConnection *Tc); - virtual ~cCiMMI(); - virtual void Process(int Length = 0, const uint8_t *Data = NULL); + virtual ~cCiMMI() override; + virtual void Process(int Length = 0, const uint8_t *Data = NULL) override; virtual bool HasUserIO(void) { return menu || enquiry; } cCiMenu *Menu(bool Clear = false); cCiEnquiry *Enquiry(bool Clear = false); @@ -1742,7 +1742,7 @@ cCiResourceHandler::~cCiResourceHandler() class cCiDefaultResourceHandler : public cCiResourceHandler { public: virtual const uint32_t *ResourceIds(void) const; - virtual cCiSession *GetNewCiSession(uint32_t ResourceId, uint16_t SessionId, cCiTransportConnection *Tc); + virtual cCiSession *GetNewCiSession(uint32_t ResourceId, uint16_t SessionId, cCiTransportConnection *Tc) override; }; const uint32_t *cCiDefaultResourceHandler::ResourceIds(void) const diff --git a/ci.h b/ci.h index df2d1564..6b8ff326 100644 --- a/ci.h +++ b/ci.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: ci.h 4.14 2019/05/28 14:58:08 kls Exp $ + * $Id: ci.h 5.1 2025/03/02 11:03:35 kls Exp $ */ #ifndef __CI_H @@ -74,8 +74,8 @@ protected: char *menuString; public: cCiApplicationInformation(uint16_t SessionId, cCiTransportConnection *Tc); - virtual ~cCiApplicationInformation(); - virtual void Process(int Length = 0, const uint8_t *Data = NULL); + virtual ~cCiApplicationInformation() override; + virtual void Process(int Length = 0, const uint8_t *Data = NULL) override; bool EnterMenu(void); const char *GetMenuString(void) { return menuString; } }; @@ -88,7 +88,7 @@ public: ///< registered with the global CiResourceHandlers, as in ///< CiResourceHandlers.Register(new cMyResourceHandler); ///< It will be automatically deleted at the end of the program. - virtual ~cCiResourceHandler(); + virtual ~cCiResourceHandler() override; virtual const uint32_t *ResourceIds(void) const = 0; ///< Returns a pointer to an array of resource identifiers, where the ///< last value is zero. @@ -180,7 +180,7 @@ protected: ///< Iterates over all added CAM slots of this adapter. Iter has to be ///< initialized to 0 and is required to store the iteration state. ///< Returns NULL if no further CAM slot is found. - virtual void Action(void); + virtual void Action(void) override; ///< Handles the attached CAM slots in a separate thread. ///< The derived class must call the Start() function to ///< actually start CAM handling. @@ -207,7 +207,7 @@ protected: ///< 'true'. public: cCiAdapter(void); - virtual ~cCiAdapter(); + virtual ~cCiAdapter() override; ///< The derived class must call Cancel(3) in its destructor. }; @@ -302,7 +302,7 @@ public: ///< one as their MasterSlot. This can speed up the search for a suitable CAM ///< when tuning to an encrypted channel, and it also makes the Setup/CAM menu ///< clearer because only the master CAM slots will be shown there. - virtual ~cCamSlot(); + virtual ~cCamSlot() override; bool IsMasterSlot(void) { return !masterSlot; } ///< Returns true if this CAM slot itself is a master slot (which means that ///< it doesn't have a pointer to another CAM slot that's its master). diff --git a/config.h b/config.h index dea6d483..0166f485 100644 --- a/config.h +++ b/config.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 5.26 2025/02/26 10:35:03 kls Exp $ + * $Id: config.h 5.27 2025/03/02 11:03:35 kls Exp $ */ #ifndef __CONFIG_H @@ -120,7 +120,7 @@ private: } public: cConfig(const char *NeedsLocking = NULL): cList(NeedsLocking) { fileName = NULL; } - virtual ~cConfig() { free(fileName); } + virtual ~cConfig() override { free(fileName); } const char *FileName(void) { return fileName; } bool Load(const char *FileName = NULL, bool AllowComments = false, bool MustExist = false) { @@ -197,8 +197,8 @@ private: cList *subItems; public: cNestedItem(const char *Text, bool WithSubItems = false); - virtual ~cNestedItem(); - virtual int Compare(const cListObject &ListObject) const; + virtual ~cNestedItem() override; + virtual int Compare(const cListObject &ListObject) const override; const char *Text(void) const { return text; } cList *SubItems(void) { return subItems; } void AddSubItem(cNestedItem *Item); @@ -213,7 +213,7 @@ private: bool Write(FILE *f, cList *List, int Indent = 0); public: cNestedItemList(void); - virtual ~cNestedItemList(); + virtual ~cNestedItemList() override; void Clear(void); bool Load(const char *FileName); bool Save(void); @@ -238,8 +238,8 @@ private: public: cSetupLine(void); cSetupLine(const char *Name, const char *Value, const char *Plugin = NULL); - virtual ~cSetupLine(); - virtual int Compare(const cListObject &ListObject) const; + virtual ~cSetupLine() override; + virtual int Compare(const cListObject &ListObject) const override; const char *Plugin(void) { return plugin; } const char *Name(void) { return name; } const char *Value(void) { return value; } diff --git a/cutter.c b/cutter.c index bfe4f3de..b070afc8 100644 --- a/cutter.c +++ b/cutter.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: cutter.c 5.4 2025/01/10 13:12:04 kls Exp $ + * $Id: cutter.c 5.5 2025/03/02 11:03:35 kls Exp $ */ #include "cutter.h" @@ -259,10 +259,10 @@ private: bool ProcessSequence(int LastEndIndex, int BeginIndex, int EndIndex, int NextBeginIndex); void HandleErrors(bool Force = false); protected: - virtual void Action(void); + virtual void Action(void) override; public: cCuttingThread(const char *FromFileName, const char *ToFileName, cRecordingInfo *RecordingInfo); - virtual ~cCuttingThread(); + virtual ~cCuttingThread() override; const char *Error(void) { return error; } }; diff --git a/device.c b/device.c index b9c52190..6473d2d0 100644 --- a/device.c +++ b/device.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 5.14 2024/07/06 11:19:21 kls Exp $ + * $Id: device.c 5.15 2025/03/02 11:03:35 kls Exp $ */ #include "device.h" @@ -24,10 +24,10 @@ class cLiveSubtitle : public cReceiver { protected: - virtual void Receive(const uchar *Data, int Length); + virtual void Receive(const uchar *Data, int Length) override; public: cLiveSubtitle(int SPid); - virtual ~cLiveSubtitle(); + virtual ~cLiveSubtitle() override; }; cLiveSubtitle::cLiveSubtitle(int SPid) diff --git a/device.h b/device.h index fe60b3ef..9cf24905 100644 --- a/device.h +++ b/device.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.h 5.6 2024/07/15 14:42:22 kls Exp $ + * $Id: device.h 5.7 2025/03/02 11:03:35 kls Exp $ */ #ifndef __DEVICE_H @@ -189,7 +189,7 @@ private: int cardIndex; protected: cDevice(void); - virtual ~cDevice(); + virtual ~cDevice() override; virtual bool Ready(void); ///< Returns true if this device is ready. Devices with conditional ///< access hardware may need some time until they are up and running. @@ -892,10 +892,10 @@ private: int deviceNumber; int delivered; cRingBufferLinear *ringBuffer; - virtual void Action(void); + virtual void Action(void) override; public: cTSBuffer(int File, int Size, int DeviceNumber); - virtual ~cTSBuffer(); + virtual ~cTSBuffer() override; uchar *Get(int *Available = NULL, bool CheckAvailable = false); ///< Returns a pointer to the first TS packet in the buffer. If Available is given, ///< it will return the total number of consecutive bytes pointed to in the buffer. diff --git a/diseqc.h b/diseqc.h index 9ae9dc72..6db2ed81 100644 --- a/diseqc.h +++ b/diseqc.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: diseqc.h 4.1 2017/01/09 15:11:19 kls Exp $ + * $Id: diseqc.h 5.1 2025/03/02 11:03:35 kls Exp $ */ #ifndef __DISEQC_H @@ -19,16 +19,16 @@ private: void SendDiseqc(uint8_t *Codes, int NumCodes); public: cDiseqcPositioner(void); - virtual void Drive(ePositionerDirection Direction); - virtual void Step(ePositionerDirection Direction, uint Steps = 1); - virtual void Halt(void); - virtual void SetLimit(ePositionerDirection Direction); - virtual void DisableLimits(void); - virtual void EnableLimits(void); - virtual void StorePosition(uint Number); - virtual void RecalcPositions(uint Number); - virtual void GotoPosition(uint Number, int Longitude); - virtual void GotoAngle(int Longitude); + virtual void Drive(ePositionerDirection Direction) override; + virtual void Step(ePositionerDirection Direction, uint Steps = 1) override; + virtual void Halt(void) override; + virtual void SetLimit(ePositionerDirection Direction) override; + virtual void DisableLimits(void) override; + virtual void EnableLimits(void) override; + virtual void StorePosition(uint Number) override; + virtual void RecalcPositions(uint Number) override; + virtual void GotoPosition(uint Number, int Longitude) override; + virtual void GotoAngle(int Longitude) override; }; class cScr : public cListObject { diff --git a/dvbci.h b/dvbci.h index e4c740a2..f01d7c8f 100644 --- a/dvbci.h +++ b/dvbci.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbci.h 1.1 2007/01/07 14:38:00 kls Exp $ + * $Id: dvbci.h 5.1 2025/03/02 11:03:35 kls Exp $ */ #ifndef __DVBCI_H @@ -17,14 +17,14 @@ private: cDevice *device; int fd; protected: - virtual int Read(uint8_t *Buffer, int MaxLength); - virtual void Write(const uint8_t *Buffer, int Length); - virtual bool Reset(int Slot); - virtual eModuleStatus ModuleStatus(int Slot); - virtual bool Assign(cDevice *Device, bool Query = false); + virtual int Read(uint8_t *Buffer, int MaxLength) override; + virtual void Write(const uint8_t *Buffer, int Length) override; + virtual bool Reset(int Slot) override; + virtual eModuleStatus ModuleStatus(int Slot) override; + virtual bool Assign(cDevice *Device, bool Query = false) override; cDvbCiAdapter(cDevice *Device, int Fd); public: - virtual ~cDvbCiAdapter(); + virtual ~cDvbCiAdapter() override; static cDvbCiAdapter *CreateCiAdapter(cDevice *Device, int Fd); }; diff --git a/dvbdevice.c b/dvbdevice.c index be7092fd..6bdfdde1 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 5.8 2024/09/09 08:53:57 kls Exp $ + * $Id: dvbdevice.c 5.9 2025/03/02 11:03:35 kls Exp $ */ #include "dvbdevice.h" @@ -570,10 +570,10 @@ private: void ExecuteDiseqc(const cDiseqc *Diseqc, int *Frequency); void ResetToneAndVoltage(void); bool SetFrontend(void); - virtual void Action(void); + virtual void Action(void) override; public: cDvbTuner(const cDvbDevice *Device, int Adapter, int Frontend); - virtual ~cDvbTuner(); + virtual ~cDvbTuner() override; bool ProvidesDeliverySystem(int DeliverySystem) const; bool ProvidesModulation(int System, int StreamId, int Modulation) const; bool ProvidesFrontend(const cChannel *Channel, bool Activate = false) const; @@ -1817,9 +1817,9 @@ private: cDvbTransponderParameters dtp; public: cDvbSourceParam(char Source, const char *Description); - virtual void SetData(cChannel *Channel); - virtual void GetData(cChannel *Channel); - virtual cOsdItem *GetOsdItem(void); + virtual void SetData(cChannel *Channel) override; + virtual void GetData(cChannel *Channel) override; + virtual cOsdItem *GetOsdItem(void) override; }; cDvbSourceParam::cDvbSourceParam(char Source, const char *Description) diff --git a/dvbdevice.h b/dvbdevice.h index 0c859eb3..f31f0660 100644 --- a/dvbdevice.h +++ b/dvbdevice.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.h 5.1 2024/07/08 09:34:33 kls Exp $ + * $Id: dvbdevice.h 5.2 2025/03/02 11:03:35 kls Exp $ */ #ifndef __DVBDEVICE_H @@ -179,7 +179,7 @@ public: ///< Returns true if any devices are available. protected: int adapter, frontend; - virtual bool IsBonded(void) const { return bondedDevice; } + virtual bool IsBonded(void) const override { return bondedDevice; } private: int fd_dvr, fd_ca; bool checkTsBuffer; @@ -188,11 +188,11 @@ private: mutable bool needsDetachBondedReceivers; public: cDvbDevice(int Adapter, int Frontend); - virtual ~cDvbDevice(); + virtual ~cDvbDevice() override; int Adapter(void) const { return adapter; } int Frontend(void) const; - virtual cString DeviceType(void) const; - virtual cString DeviceName(void) const; + virtual cString DeviceType(void) const override; + virtual cString DeviceName(void) const override; static bool BondDevices(const char *Bondings); ///< Bonds the devices as defined in the given Bondings string. ///< A bonding is a sequence of device numbers (starting at 1), @@ -232,39 +232,39 @@ private: cDvbTuner *dvbTuner; public: virtual bool ProvidesDeliverySystem(int DeliverySystem) const; - virtual bool ProvidesSource(int Source) const; - virtual bool ProvidesTransponder(const cChannel *Channel) const; - virtual bool ProvidesChannel(const cChannel *Channel, int Priority = IDLEPRIORITY, bool *NeedsDetachReceivers = NULL) const; - virtual bool ProvidesEIT(void) const; - virtual int NumProvidedSystems(void) const; - virtual const cPositioner *Positioner(void) const; - virtual bool SignalStats(int &Valid, double *Strength = NULL, double *Cnr = NULL, double *BerPre = NULL, double *BerPost = NULL, double *Per = NULL, int *Status = NULL) const; - virtual int SignalStrength(void) const; - virtual int SignalQuality(void) const; - virtual const cChannel *GetCurrentlyTunedTransponder(void) const; - virtual bool IsTunedToTransponder(const cChannel *Channel) const; - virtual bool MaySwitchTransponder(const cChannel *Channel) const; - virtual void SetPowerSaveMode(bool On); + virtual bool ProvidesSource(int Source) const override; + virtual bool ProvidesTransponder(const cChannel *Channel) const override; + virtual bool ProvidesChannel(const cChannel *Channel, int Priority = IDLEPRIORITY, bool *NeedsDetachReceivers = NULL) const override; + virtual bool ProvidesEIT(void) const override; + virtual int NumProvidedSystems(void) const override; + virtual const cPositioner *Positioner(void) const override; + virtual bool SignalStats(int &Valid, double *Strength = NULL, double *Cnr = NULL, double *BerPre = NULL, double *BerPost = NULL, double *Per = NULL, int *Status = NULL) const override; + virtual int SignalStrength(void) const override; + virtual int SignalQuality(void) const override; + virtual const cChannel *GetCurrentlyTunedTransponder(void) const override; + virtual bool IsTunedToTransponder(const cChannel *Channel) const override; + virtual bool MaySwitchTransponder(const cChannel *Channel) const override; + virtual void SetPowerSaveMode(bool On) override; protected: - virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView); + virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView) override; public: - virtual bool HasLock(int TimeoutMs = 0) const; + virtual bool HasLock(int TimeoutMs = 0) const override; // PID handle facilities protected: - virtual bool SetPid(cPidHandle *Handle, int Type, bool On); + virtual bool SetPid(cPidHandle *Handle, int Type, bool On) override; // Section filter facilities protected: - virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask); - virtual void CloseFilter(int Handle); + virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask) override; + virtual void CloseFilter(int Handle) override; // Common Interface facilities: public: - virtual bool HasCi(void); + virtual bool HasCi(void) override; // Audio facilities @@ -283,10 +283,10 @@ public: private: cTSBuffer *tsBuffer; protected: - virtual bool OpenDvr(void); - virtual void CloseDvr(void); - virtual bool GetTSPacket(uchar *&Data); - virtual void DetachAllReceivers(void); + virtual bool OpenDvr(void) override; + virtual void CloseDvr(void) override; + virtual bool GetTSPacket(uchar *&Data) override; + virtual void DetachAllReceivers(void) override; }; // A plugin that implements a DVB device derived from cDvbDevice needs to create @@ -298,7 +298,7 @@ protected: class cDvbDeviceProbe : public cListObject { public: cDvbDeviceProbe(void); - virtual ~cDvbDeviceProbe(); + virtual ~cDvbDeviceProbe() override; static uint32_t GetSubsystemId(int Adapter, int Frontend); virtual bool Probe(int Adapter, int Frontend) = 0; ///< Probes for a DVB device at the given Adapter and creates the appropriate diff --git a/dvbplayer.c b/dvbplayer.c index 5af036e4..c9639bac 100644 --- a/dvbplayer.c +++ b/dvbplayer.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbplayer.c 5.7 2025/02/19 15:39:16 kls Exp $ + * $Id: dvbplayer.c 5.8 2025/03/02 11:03:35 kls Exp $ */ #include "dvbplayer.h" @@ -267,11 +267,11 @@ private: int Resume(void); bool Save(void); protected: - virtual void Activate(bool On); - virtual void Action(void); + virtual void Activate(bool On) override; + virtual void Action(void) override; public: cDvbPlayer(const char *FileName, bool PauseLive); - virtual ~cDvbPlayer(); + virtual ~cDvbPlayer() override; void SetMarks(const cMarks *Marks); bool Active(void) { return cThread::Running(); } void Pause(void); @@ -282,11 +282,11 @@ public: void SkipSeconds(int Seconds); void Goto(int Position, bool Still = false); virtual double FramesPerSecond(void) { return framesPerSecond; } - virtual void SetAudioTrack(eTrackType Type, const tTrackId *TrackId); - virtual const cErrors *GetErrors(void); - virtual bool GetIndex(int &Current, int &Total, bool SnapToIFrame = false); - virtual bool GetFrameNumber(int &Current, int &Total); - virtual bool GetReplayMode(bool &Play, bool &Forward, int &Speed); + virtual void SetAudioTrack(eTrackType Type, const tTrackId *TrackId) override; + virtual const cErrors *GetErrors(void) override; + virtual bool GetIndex(int &Current, int &Total, bool SnapToIFrame = false) override; + virtual bool GetFrameNumber(int &Current, int &Total) override; + virtual bool GetReplayMode(bool &Play, bool &Forward, int &Speed) override; }; #define MAX_VIDEO_SLOWMOTION 63 // max. arg to pass to VIDEO_SLOWMOTION // TODO is this value correct? diff --git a/dvbplayer.h b/dvbplayer.h index bac5b0c4..22b66177 100644 --- a/dvbplayer.h +++ b/dvbplayer.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbplayer.h 5.1 2024/09/19 09:49:02 kls Exp $ + * $Id: dvbplayer.h 5.2 2025/03/02 11:03:35 kls Exp $ */ #ifndef __DVBPLAYER_H @@ -25,7 +25,7 @@ public: // If PauseLive is true, special care is taken to make sure the index // file of the recording is long enough to allow the player to display // the first frame in still picture mode. - virtual ~cDvbPlayerControl(); + virtual ~cDvbPlayerControl() override; void SetMarks(const cMarks *Marks); bool Active(void); void Stop(void); diff --git a/dvbsubtitle.c b/dvbsubtitle.c index d7f9ac93..d4407628 100644 --- a/dvbsubtitle.c +++ b/dvbsubtitle.c @@ -7,7 +7,7 @@ * Original author: Marco Schluessler * With some input from the "subtitles plugin" by Pekka Virtanen * - * $Id: dvbsubtitle.c 5.2 2022/12/06 16:57:01 kls Exp $ + * $Id: dvbsubtitle.c 5.3 2025/03/02 11:03:35 kls Exp $ */ #include "dvbsubtitle.h" @@ -1257,7 +1257,7 @@ private: cVector bitmaps; public: cDvbSubtitleBitmaps(int State, int64_t Pts, int Timeout, tArea *Areas, int NumAreas, double OsdFactorX, double OsdFactorY, tArea &AreaCombined, tArea &AreaOsd); - ~cDvbSubtitleBitmaps(); + virtual ~cDvbSubtitleBitmaps() override; int State(void) { return state; } int64_t Pts(void) { return pts; } int Timeout(void) { return timeout; } diff --git a/dvbsubtitle.h b/dvbsubtitle.h index 4d326015..0ff62e75 100644 --- a/dvbsubtitle.h +++ b/dvbsubtitle.h @@ -6,7 +6,7 @@ * * Original author: Marco Schluessler * - * $Id: dvbsubtitle.h 4.1 2015/04/28 09:25:57 kls Exp $ + * $Id: dvbsubtitle.h 5.1 2025/03/02 11:03:35 kls Exp $ */ #ifndef __DVBSUBTITLE_H @@ -47,8 +47,8 @@ private: void FinishPage(cDvbSubtitlePage *Page); public: cDvbSubtitleConverter(void); - virtual ~cDvbSubtitleConverter(); - virtual void Action(void); + virtual ~cDvbSubtitleConverter() override; + virtual void Action(void) override; void Reset(void); void Freeze(bool Status) { frozen = Status; } int ConvertFragments(const uchar *Data, int Length); // for legacy PES recordings diff --git a/eit.h b/eit.h index 8beae026..b3f6219c 100644 --- a/eit.h +++ b/eit.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: eit.h 5.2 2021/04/04 11:06:30 kls Exp $ + * $Id: eit.h 5.3 2025/03/02 11:03:35 kls Exp $ */ #ifndef __EIT_H @@ -51,10 +51,10 @@ private: cEitTablesHash eitTablesHash; static time_t disableUntil; protected: - virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length); + virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length) override; public: cEitFilter(void); - virtual void SetStatus(bool On); + virtual void SetStatus(bool On) override; static void SetDisableUntil(time_t Time); }; diff --git a/eitscan.c b/eitscan.c index 6adb4cc2..1a26e8fe 100644 --- a/eitscan.c +++ b/eitscan.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: eitscan.c 5.7 2024/07/13 20:12:24 kls Exp $ + * $Id: eitscan.c 5.8 2025/03/02 11:03:35 kls Exp $ */ #include "eitscan.h" @@ -21,7 +21,7 @@ private: cChannel channel; public: cScanData(const cChannel *Channel); - virtual int Compare(const cListObject &ListObject) const; + virtual int Compare(const cListObject &ListObject) const override; int Source(void) const { return channel.Source(); } int Transponder(void) const { return channel.Transponder(); } const cChannel *GetChannel(void) const { return &channel; } diff --git a/epg.c b/epg.c index 38dca989..5b0fea4f 100644 --- a/epg.c +++ b/epg.c @@ -7,7 +7,7 @@ * Original version (as used in VDR before 1.3.0) written by * Robert Schneider and Rolf Hakenes . * - * $Id: epg.c 5.13 2024/11/30 14:30:46 kls Exp $ + * $Id: epg.c 5.14 2025/03/02 11:03:35 kls Exp $ */ #include "epg.h" @@ -1226,7 +1226,7 @@ private: cMutex mutex; bool dump; protected: - virtual void Action(void); + virtual void Action(void) override; public: cEpgDataWriter(void); void SetDump(bool Dump) { dump = Dump; } diff --git a/epg.h b/epg.h index 5d295381..6ee6f417 100644 --- a/epg.h +++ b/epg.h @@ -7,7 +7,7 @@ * Original version (as used in VDR before 1.3.0) written by * Robert Schneider and Rolf Hakenes . * - * $Id: epg.h 5.8 2024/10/13 09:47:18 kls Exp $ + * $Id: epg.h 5.9 2025/03/02 11:03:35 kls Exp $ */ #ifndef __EPG_H @@ -95,7 +95,7 @@ private: public: cEvent(tEventID EventID); ~cEvent(); - virtual int Compare(const cListObject &ListObject) const; + virtual int Compare(const cListObject &ListObject) const override; tChannelID ChannelID(void) const; const cSchedule *Schedule(void) const { return schedule; } tEventID EventID(void) const { return eventID; } @@ -231,7 +231,7 @@ DEF_LIST_LOCK(Schedules); class cEpgDataReader : public cThread { public: cEpgDataReader(void); - virtual void Action(void); + virtual void Action(void) override; }; void ReportEpgBugFixStats(bool Force = false); @@ -247,7 +247,7 @@ public: ///< handlers returns true in a particular call, the default processing ///< will take place. ///< EPG handlers will be deleted automatically at the end of the program. - virtual ~cEpgHandler(); + virtual ~cEpgHandler() override; virtual bool IgnoreChannel(const cChannel *Channel) { return false; } ///< Before any EIT data for the given Channel is processed, the EPG handlers ///< are asked whether this Channel shall be completely ignored. If any of diff --git a/filter.h b/filter.h index 127a913b..c1754d05 100644 --- a/filter.h +++ b/filter.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: filter.h 5.5 2024/10/13 09:47:18 kls Exp $ + * $Id: filter.h 5.6 2025/03/02 11:03:35 kls Exp $ */ #ifndef __FILTER_H @@ -80,7 +80,7 @@ private: protected: cFilter(void); cFilter(u_short Pid, u_char Tid, u_char Mask = 0xFF); - virtual ~cFilter(); + virtual ~cFilter() override; virtual void SetStatus(bool On); ///< Turns this filter on or off, depending on the value of On. ///< If the filter is turned off, any filter data that has been diff --git a/font.c b/font.c index 03fe8082..a6b86073 100644 --- a/font.c +++ b/font.c @@ -6,7 +6,7 @@ * * BiDi support by Osama Alrawab @2008 Tripoli-Libya. * - * $Id: font.c 5.3 2025/02/17 11:13:13 kls Exp $ + * $Id: font.c 5.4 2025/03/02 11:03:35 kls Exp $ */ #include "font.h" @@ -49,7 +49,7 @@ private: cVector kerningCache; public: cGlyph(uint CharCode, FT_GlyphSlotRec_ *GlyphData); - virtual ~cGlyph(); + virtual ~cGlyph() override; uint CharCode(void) const { return charCode; } uchar *Bitmap(void) const { return bitmap; } int AdvanceX(void) const { return advanceX; } @@ -113,15 +113,15 @@ private: cGlyph* Glyph(uint CharCode, bool AntiAliased = false) const; public: cFreetypeFont(const char *Name, int CharHeight, int CharWidth = 0); - virtual ~cFreetypeFont(); - virtual const char *FontName(void) const { return fontName; } - virtual int Size(void) const { return size; } - virtual int Width(void) const { return width; } - virtual int Width(uint c) const; - virtual int Width(const char *s) const; - virtual int Height(void) const { return height; } - virtual void DrawText(cBitmap *Bitmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const; - virtual void DrawText(cPixmap *Pixmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const; + virtual ~cFreetypeFont() override; + virtual const char *FontName(void) const override { return fontName; } + virtual int Size(void) const override { return size; } + virtual int Width(void) const override { return width; } + virtual int Width(uint c) const override; + virtual int Width(const char *s) const override; + virtual int Height(void) const override { return height; } + virtual void DrawText(cBitmap *Bitmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const override; + virtual void DrawText(cPixmap *Pixmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const override; }; cFreetypeFont::cFreetypeFont(const char *Name, int CharHeight, int CharWidth) @@ -391,12 +391,12 @@ private: int width; public: cDummyFont(int CharHeight, int CharWidth) { height = CharHeight; width = CharWidth; } - virtual int Width(void) const { return width ? width : height; } - virtual int Width(uint c) const { return width ? width : height; } - virtual int Width(const char *s) const { return width ? width : height; } - virtual int Height(void) const { return height; } - virtual void DrawText(cBitmap *Bitmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const {} - virtual void DrawText(cPixmap *Pixmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const {}; + virtual int Width(void) const override { return width ? width : height; } + virtual int Width(uint c) const override { return width ? width : height; } + virtual int Width(const char *s) const override { return width ? width : height; } + virtual int Height(void) const override { return height; } + virtual void DrawText(cBitmap *Bitmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const override {} + virtual void DrawText(cPixmap *Pixmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const override {} }; // --- cFont ----------------------------------------------------------------- diff --git a/libsi/descriptor.h b/libsi/descriptor.h index 218609e3..d5f23f7b 100644 --- a/libsi/descriptor.h +++ b/libsi/descriptor.h @@ -6,7 +6,7 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * - * $Id: descriptor.h 4.2 2020/06/23 09:27:09 kls Exp $ + * $Id: descriptor.h 5.1 2025/03/02 11:03:35 kls Exp $ * * ***************************************************************************/ @@ -24,18 +24,18 @@ public: String name; //name of the event String text; //short description protected: - virtual void Parse(); + virtual void Parse() override; }; class ExtendedEventDescriptor : public GroupDescriptor { public: class Item : public LoopElement { public: - virtual int getLength() { return sizeof(item_extended_event)+sizeof(item_extended_event_mid)+item.getLength()+itemDescription.getLength(); } + virtual int getLength() override { return sizeof(item_extended_event)+sizeof(item_extended_event_mid)+item.getLength()+itemDescription.getLength(); } String item; String itemDescription; protected: - virtual void Parse(); + virtual void Parse() override; }; char languageCode[4]; int getDescriptorNumber(); @@ -43,7 +43,7 @@ public: StructureLoop itemLoop; String text; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_extended_event *s; }; @@ -80,7 +80,7 @@ public: int getReferenceServiceId() const; int getReferenceEventId() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_time_shifted_event *s; }; @@ -89,19 +89,19 @@ class ContentDescriptor : public Descriptor { public: class Nibble : public LoopElement { public: - virtual int getLength() { return sizeof(nibble_content); } + virtual int getLength() override { return sizeof(nibble_content); } int getContentNibbleLevel1() const; int getContentNibbleLevel2() const; int getUserNibble1() const; int getUserNibble2() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const nibble_content *s; }; StructureLoop nibbleLoop; protected: - virtual void Parse(); + virtual void Parse() override; }; class ParentalRatingDescriptor : public Descriptor { @@ -110,15 +110,15 @@ public: public: char languageCode[4]; int getRating() const; - virtual int getLength() { return sizeof(parental_rating); } + virtual int getLength() override { return sizeof(parental_rating); } protected: - virtual void Parse(); + virtual void Parse() override; private: const parental_rating *s; }; StructureLoop ratingLoop; protected: - virtual void Parse(); + virtual void Parse() override; }; class TeletextDescriptor : public Descriptor { @@ -129,15 +129,15 @@ public: int getTeletextType() const; int getTeletextMagazineNumber() const; int getTeletextPageNumber() const; - virtual int getLength() { return sizeof(item_teletext); } + virtual int getLength() override { return sizeof(item_teletext); } protected: - virtual void Parse(); + virtual void Parse() override; private: const item_teletext *s; }; StructureLoop teletextLoop; protected: - virtual void Parse(); + virtual void Parse() override; }; class CaDescriptor : public Descriptor { @@ -146,7 +146,7 @@ public: int getCaPid() const; CharArray privateData; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_ca *s; }; @@ -155,7 +155,7 @@ class StreamIdentifierDescriptor : public Descriptor { public: int getComponentTag() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_stream_identifier *s; }; @@ -164,14 +164,14 @@ class NetworkNameDescriptor : public Descriptor { public: String name; protected: - virtual void Parse(); + virtual void Parse() override; }; class CaIdentifierDescriptor : public Descriptor { public: TypeLoop identifiers; protected: - virtual void Parse(); + virtual void Parse() override; }; class CarouselIdentifierDescriptor : public Descriptor { @@ -179,7 +179,7 @@ public: int getCarouselId() const; int getFormatId() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_carousel_identifier *s; }; @@ -193,15 +193,15 @@ public: public: int getServiceId() const; int getServiceType() const; - virtual int getLength() { return sizeof(descr_service_list_loop); } + virtual int getLength() override { return sizeof(descr_service_list_loop); } protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_service_list_loop *s; }; StructureLoop serviceLoop; protected: - virtual void Parse(); + virtual void Parse() override; }; class SatelliteDeliverySystemDescriptor : public Descriptor { @@ -216,7 +216,7 @@ public: int getSymbolRate() const; int getFecInner() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_satellite_delivery_system *s; }; @@ -229,7 +229,7 @@ public: int getSymbolRate() const; int getFecInner() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_cable_delivery_system *s; }; @@ -249,7 +249,7 @@ public: int getTransmissionMode() const; bool getOtherFrequency() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_terrestrial_delivery *s; }; @@ -260,7 +260,7 @@ public: String serviceName; String providerName; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_service *s; }; @@ -272,22 +272,22 @@ public: int getTransportStream() const; int getOriginalNetworkId() const; int getServiceId() const; - virtual int getLength() { return sizeof(item_nvod_reference); } + virtual int getLength() override { return sizeof(item_nvod_reference); } protected: - virtual void Parse(); + virtual void Parse() override; private: const item_nvod_reference *s; }; StructureLoop serviceLoop; protected: - virtual void Parse(); + virtual void Parse() override; }; class TimeShiftedServiceDescriptor : public Descriptor { public: int getReferenceServiceId() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_time_shifted_service *s; }; @@ -301,7 +301,7 @@ public: char languageCode[4]; String description; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_component *s; }; @@ -310,7 +310,7 @@ class PrivateDataSpecifierDescriptor : public Descriptor { public: int getPrivateDataSpecifier() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_private_data_specifier *s; }; @@ -323,15 +323,15 @@ public: int getSubtitlingType() const; int getCompositionPageId() const; int getAncillaryPageId() const; - virtual int getLength() { return sizeof(item_subtitling); } + virtual int getLength() override { return sizeof(item_subtitling); } protected: - virtual void Parse(); + virtual void Parse() override; private: const item_subtitling *s; }; StructureLoop subtitlingLoop; protected: - virtual void Parse(); + virtual void Parse() override; }; class ServiceMoveDescriptor : public Descriptor { @@ -340,7 +340,7 @@ public: int getNewTransportStreamId() const; int getNewServiceId() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_service_move *s; }; @@ -350,7 +350,7 @@ public: int getCodingType() const; TypeLoop frequencies; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_frequency_list *s; }; @@ -359,7 +359,7 @@ class ServiceIdentifierDescriptor : public Descriptor { public: String textualServiceIdentifier; protected: - virtual void Parse(); + virtual void Parse() override; }; class ContentIdentifierDescriptor : public Descriptor { @@ -369,22 +369,22 @@ public: String identifier; int getCridType() const; int getCridLocation() const; - virtual int getLength() { return sizeof(content_identifier_entry)+identifier.getLength(); } + virtual int getLength() override { return sizeof(content_identifier_entry)+identifier.getLength(); } protected: - virtual void Parse(); + virtual void Parse() override; private: const content_identifier_entry *s; }; StructureLoop identifierLoop; protected: - virtual void Parse(); + virtual void Parse() override; }; class DefaultAuthorityDescriptor : public Descriptor { public: String DefaultAuthority; //ID protected: - virtual void Parse(); + virtual void Parse() override; }; //abstract base class @@ -394,13 +394,13 @@ public: public: char languageCode[4]; String name; - virtual int getLength() { return sizeof(entry_multilingual_name)+name.getLength(); } + virtual int getLength() override { return sizeof(entry_multilingual_name)+name.getLength(); } protected: - virtual void Parse(); + virtual void Parse() override; }; StructureLoop nameLoop; protected: - virtual void Parse(); + virtual void Parse() override; }; class MultilingualNetworkNameDescriptor : public MultilingualNameDescriptor { @@ -416,7 +416,7 @@ public: int getComponentTag() const; //inherits nameLoop from MultilingualNameDescriptor protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_multilingual_component *s; }; @@ -425,15 +425,15 @@ class MultilingualServiceNameDescriptor : public Descriptor { public: class Name : public MultilingualNameDescriptor::Name { public: - virtual int getLength() { return sizeof(entry_multilingual_name)+providerName.getLength()+sizeof(entry_multilingual_service_name_mid)+name.getLength(); } + virtual int getLength() override { return sizeof(entry_multilingual_name)+providerName.getLength()+sizeof(entry_multilingual_service_name_mid)+name.getLength(); } String providerName; //inherits name, meaning: service name; protected: - virtual void Parse(); + virtual void Parse() override; }; StructureLoop nameLoop; protected: - virtual void Parse(); + virtual void Parse() override; }; class LocalTimeOffsetDescriptor : public Descriptor { @@ -441,20 +441,20 @@ public: class LocalTimeOffset : public LoopElement { public: char countryCode[4]; - virtual int getLength() { return sizeof(local_time_offset_entry); } + virtual int getLength() override { return sizeof(local_time_offset_entry); } int getCountryId() const; int getLocalTimeOffsetPolarity() const; int getLocalTimeOffset() const; time_t getTimeOfChange() const; int getNextTimeOffset() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const local_time_offset_entry *s; }; StructureLoop localTimeOffsetLoop; protected: - virtual void Parse(); + virtual void Parse() override; }; class LinkageDescriptor : public Descriptor { @@ -468,7 +468,7 @@ public: int getId() const; CharArray privateData; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_linkage *s; const descr_linkage_8 *s1; @@ -479,17 +479,17 @@ public: char languageCode[4]; //for backwards compatibility class Language : public LoopElement { public: - virtual int getLength() { return sizeof(descr_iso_639_language_loop); } + virtual int getLength() override { return sizeof(descr_iso_639_language_loop); } char languageCode[4]; AudioType getAudioType(); protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_iso_639_language_loop *s; }; StructureLoop languageLoop; protected: - virtual void Parse(); + virtual void Parse() override; }; class PDCDescriptor : public Descriptor { @@ -499,7 +499,7 @@ public: int getHour() const; int getMinute() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_pdc *s; }; @@ -508,7 +508,7 @@ class AncillaryDataDescriptor : public Descriptor { public: int getAncillaryDataIdentifier() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_ancillary_data *s; }; @@ -521,7 +521,7 @@ public: int getScramblingSequenceIndex() const; int getInputStreamIdentifier() const { return input_stream_identifier; } protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_s2_satellite_delivery_system *s; const descr_scrambling_sequence_selector *sss; @@ -533,7 +533,7 @@ public: int getExtendedDataFlag() const; int getExtensionDescriptorTag() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_extension *s; int extended_data_flag; @@ -552,7 +552,7 @@ public: int getOtherFrequencyFlag() const; int getTfsFlag() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_t2_delivery_system *s; int extended_data_flag; @@ -565,15 +565,15 @@ public: int getServiceId() const; int getVisibleServiceFlag() const; int getLogicalChannelNumber() const; - virtual int getLength() { return sizeof(item_logical_channel); } + virtual int getLength() override { return sizeof(item_logical_channel); } protected: - virtual void Parse(); + virtual void Parse() override; private: const item_logical_channel *s; }; StructureLoop logicalChannelLoop; protected: - virtual void Parse(); + virtual void Parse() override; }; class HdSimulcastLogicalChannelDescriptor : public Descriptor { @@ -583,15 +583,15 @@ public: int getServiceId() const; int getVisibleServiceFlag() const; int getLogicalChannelNumber() const; - virtual int getLength() { return sizeof(item_hd_simulcast_logical_channel); } + virtual int getLength() override { return sizeof(item_hd_simulcast_logical_channel); } protected: - virtual void Parse(); + virtual void Parse() override; private: const item_hd_simulcast_logical_channel *s; }; StructureLoop hdSimulcastLogicalChannelLoop; protected: - virtual void Parse(); + virtual void Parse() override; }; // Private DVB Descriptor Premiere.de @@ -604,19 +604,19 @@ public: public: class StartTimeEntry : public LoopElement { public: - virtual int getLength() { return sizeof(item_premiere_content_transmission_time); } + virtual int getLength() override { return sizeof(item_premiere_content_transmission_time); } time_t getStartTime(int mjd) const; //UTC protected: - virtual void Parse(); + virtual void Parse() override; private: const item_premiere_content_transmission_time *s; }; StructureLoop startTimeLoop; - virtual int getLength(); + virtual int getLength() override; int getMJD() const; int getLoopLength() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const item_premiere_content_transmission_day *s; }; @@ -625,7 +625,7 @@ public: int getTransportStreamId() const; int getServiceId() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_premiere_content_transmission *s; }; @@ -633,31 +633,31 @@ private: //a descriptor currently unimplemented in this library class UnimplementedDescriptor : public Descriptor { protected: - virtual void Parse() {} + virtual void Parse() override {} }; class ApplicationSignallingDescriptor : public Descriptor { public: class ApplicationEntryDescriptor : public LoopElement { public: - virtual int getLength() { return sizeof(application_signalling_entry); } + virtual int getLength() override { return sizeof(application_signalling_entry); } int getApplicationType() const; int getAITVersionNumber() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const application_signalling_entry *s; }; StructureLoop entryLoop; protected: - virtual void Parse(); + virtual void Parse() override; }; class MHP_ApplicationDescriptor : public Descriptor { public: class Profile : public LoopElement { public: - virtual int getLength() { return sizeof(application_profile_entry); } + virtual int getLength() override { return sizeof(application_profile_entry); } int getApplicationProfile() const; int getVersionMajor() const; int getVersionMinor() const; @@ -665,7 +665,7 @@ public: private: const application_profile_entry *s; protected: - virtual void Parse(); + virtual void Parse() override; }; StructureLoop profileLoop; bool isServiceBound() const; @@ -675,32 +675,32 @@ public: private: const descr_application_end *s; protected: - virtual void Parse(); + virtual void Parse() override; }; class MHP_ApplicationNameDescriptor : public Descriptor { public: class NameEntry : public LoopElement { public: - virtual int getLength() { return sizeof(descr_application_name_entry)+name.getLength(); } + virtual int getLength() override { return sizeof(descr_application_name_entry)+name.getLength(); } char languageCode[4]; String name; protected: - virtual void Parse(); + virtual void Parse() override; }; StructureLoop nameLoop; protected: - virtual void Parse(); + virtual void Parse() override; }; class MHP_TransportProtocolDescriptor : public Descriptor { public: class UrlExtensionEntry : public LoopElement { public: - virtual int getLength() { return sizeof(descr_url_extension_entry)+UrlExtension.getLength(); } + virtual int getLength() override { return sizeof(descr_url_extension_entry)+UrlExtension.getLength(); } String UrlExtension; protected: - virtual void Parse(); + virtual void Parse() override; }; enum Protocol { ObjectCarousel = 0x01, IPviaDVB = 0x02, HTTPoverInteractionChannel = 0x03 }; @@ -712,7 +712,7 @@ public: StructureLoop UrlExtensionLoop; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_transport_protocol *s; bool remote; @@ -724,14 +724,14 @@ class MHP_DVBJApplicationDescriptor : public Descriptor { public: class ApplicationEntry : public LoopElement { public: - virtual int getLength() { return sizeof(descr_dvbj_application_entry)+parameter.getLength(); } + virtual int getLength() override { return sizeof(descr_dvbj_application_entry)+parameter.getLength(); } String parameter; protected: - virtual void Parse(); + virtual void Parse() override; }; StructureLoop applicationLoop; protected: - virtual void Parse(); + virtual void Parse() override; }; class MHP_DVBJApplicationLocationDescriptor : public Descriptor { @@ -740,7 +740,7 @@ public: String classPath; String initialClass; protected: - virtual void Parse(); + virtual void Parse() override; }; class MHP_ApplicationIconsDescriptor : public Descriptor { @@ -748,7 +748,7 @@ public: String iconLocator; int getIconFlags() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_application_icons_descriptor_end *s; }; @@ -757,7 +757,7 @@ class MHP_SimpleApplicationLocationDescriptor : public Descriptor { public: char *getLocation(char *buffer, int size); protected: - virtual void Parse(); + virtual void Parse() override; private: String location; }; @@ -767,7 +767,7 @@ public: int getFormatIdentifier() const; CharArray privateData; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_registration *s; }; @@ -788,7 +788,7 @@ public: int getFramePackingSEINotPresentFlag() const; CharArray privateData; protected: - virtual void Parse(); + virtual void Parse() override; private: const descr_avc *s; }; diff --git a/libsi/section.h b/libsi/section.h index 5b70a220..57905c64 100644 --- a/libsi/section.h +++ b/libsi/section.h @@ -6,7 +6,7 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * - * $Id: section.h 2.1 2012/02/26 13:58:26 kls Exp $ + * $Id: section.h 5.1 2025/03/02 11:03:35 kls Exp $ * * ***************************************************************************/ @@ -29,16 +29,16 @@ public: int getServiceId() const; int getPid() const; bool isNITPid() const { return getServiceId()==0; } - virtual int getLength() { return int(sizeof(pat_prog)); } + virtual int getLength() override { return int(sizeof(pat_prog)); } protected: - virtual void Parse(); + virtual void Parse() override; private: const pat_prog *s; }; int getTransportStreamId() const; StructureLoop associationLoop; protected: - virtual void Parse(); + virtual void Parse() override; private: const pat *s; }; @@ -49,7 +49,7 @@ public: CAT() {} DescriptorLoop loop; protected: - virtual void Parse(); + virtual void Parse() override; }; class PMT : public NumberedSection { @@ -61,9 +61,9 @@ public: int getPid() const; int getStreamType() const; DescriptorLoop streamDescriptors; - virtual int getLength() { return int(sizeof(pmt_info)+streamDescriptors.getLength()); } + virtual int getLength() override { return int(sizeof(pmt_info)+streamDescriptors.getLength()); } protected: - virtual void Parse(); + virtual void Parse() override; private: const pmt_info *s; }; @@ -72,7 +72,7 @@ public: int getServiceId() const; int getPCRPid() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const pmt *s; }; @@ -83,7 +83,7 @@ public: TSDT() {} DescriptorLoop transportStreamDescriptors; protected: - virtual void Parse(); + virtual void Parse() override; private: const tsdt *s; }; @@ -96,10 +96,10 @@ public: public: int getTransportStreamId() const; int getOriginalNetworkId() const; - virtual int getLength() { return int(sizeof(ni_ts)+transportStreamDescriptors.getLength()); } + virtual int getLength() override { return int(sizeof(ni_ts)+transportStreamDescriptors.getLength()); } DescriptorLoop transportStreamDescriptors; protected: - virtual void Parse(); + virtual void Parse() override; private: const ni_ts *s; }; @@ -107,7 +107,7 @@ public: StructureLoop transportStreamLoop; int getNetworkId() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const nit *s; }; @@ -131,10 +131,10 @@ public: int getEITpresentFollowingFlag() const; RunningStatus getRunningStatus() const; int getFreeCaMode() const; - virtual int getLength() { return int(sizeof(sdt_descr)+serviceDescriptors.getLength()); } + virtual int getLength() override { return int(sizeof(sdt_descr)+serviceDescriptors.getLength()); } DescriptorLoop serviceDescriptors; protected: - virtual void Parse(); + virtual void Parse() override; private: const sdt_descr *s; }; @@ -142,7 +142,7 @@ public: int getOriginalNetworkId() const; StructureLoop serviceLoop; protected: - virtual void Parse(); + virtual void Parse() override; private: const sdt *s; }; @@ -168,9 +168,9 @@ public: int getFreeCaMode() const; DescriptorLoop eventDescriptors; - virtual int getLength() { return int(sizeof(eit_event)+eventDescriptors.getLength()); } + virtual int getLength() override { return int(sizeof(eit_event)+eventDescriptors.getLength()); } protected: - virtual void Parse(); + virtual void Parse() override; private: const eit_event *s; }; @@ -186,7 +186,7 @@ public: //true if table describes TS on which it is broadcast, false if it describes other TS bool isActualTS() const; protected: - virtual void Parse(); + virtual void Parse() override; private: const eit *s; }; @@ -197,7 +197,7 @@ public: TDT() {} time_t getTime() const; //UTC protected: - virtual void Parse(); + virtual void Parse() override; private: const tdt *s; }; @@ -209,7 +209,7 @@ public: time_t getTime() const; DescriptorLoop descriptorLoop; protected: - virtual void Parse(); + virtual void Parse() override; private: const tot *s; }; @@ -225,15 +225,15 @@ public: int getServiceId() const; int getEventId() const; RunningStatus getRunningStatus() const; - virtual int getLength() { return int(sizeof(rst_info)); } + virtual int getLength() override { return int(sizeof(rst_info)); } protected: - virtual void Parse(); + virtual void Parse() override; private: const rst_info *s; }; StructureLoop infoLoop; protected: - virtual void Parse(); + virtual void Parse() override; }; class AIT : public NumberedSection { @@ -242,13 +242,13 @@ public: AIT() {} class Application : public LoopElement { public: - virtual int getLength() { return int(sizeof(ait_app)+applicationDescriptors.getLength()); } + virtual int getLength() override { return int(sizeof(ait_app)+applicationDescriptors.getLength()); } long getOrganisationId() const; int getApplicationId() const; int getControlCode() const; MHP_DescriptorLoop applicationDescriptors; protected: - virtual void Parse(); + virtual void Parse() override; const ait_app *s; }; MHP_DescriptorLoop commonDescriptors; @@ -257,7 +257,7 @@ public: int getAITVersion() const; protected: const ait *first; - virtual void Parse(); + virtual void Parse() override; }; /* Premiere Content Information Table */ @@ -270,7 +270,7 @@ public: time_t getDuration() const; PCIT_DescriptorLoop eventDescriptors; protected: - virtual void Parse(); + virtual void Parse() override; private: const pcit *s; }; diff --git a/libsi/si.h b/libsi/si.h index bcb5a2ac..fd5a4dbf 100644 --- a/libsi/si.h +++ b/libsi/si.h @@ -6,7 +6,7 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * - * $Id: si.h 5.1 2023/02/16 17:20:09 kls Exp $ + * $Id: si.h 5.2 2025/03/02 11:03:35 kls Exp $ * * ***************************************************************************/ @@ -252,7 +252,7 @@ public: Section(const unsigned char *data, bool doCopy=true); Section() {} TableId getTableId() const; - virtual int getLength(); + virtual int getLength() override; static int getLength(const unsigned char *d); static TableId getTableId(const unsigned char *d); @@ -290,7 +290,7 @@ public: void setData(CharArray d, int l) { Object::setData(d); checkSize(l); length=l; } //convenience method void setDataAndOffset(CharArray d, int l, int &offset) { Object::setData(d); checkSize(l); length=l; offset+=l; } - virtual int getLength() { return length; } + virtual int getLength() override { return length; } private: int length; }; @@ -300,7 +300,7 @@ class LoopElement : public Object { class Descriptor : public LoopElement { public: - virtual int getLength(); + virtual int getLength() override; DescriptorTag getDescriptorTag() const; static int getLength(const unsigned char *d); @@ -331,7 +331,7 @@ public: int i; }; protected: - virtual void Parse() {} + virtual void Parse() override {} }; //contains LoopElements of one type only @@ -519,7 +519,7 @@ public: //The emphasis marks 0x86 and 0x87 are still available in buffer, but not in shortVersion. char *getText(char *buffer, char *shortVersion, int sizeBuffer, int sizeShortVersion); protected: - virtual void Parse() {} + virtual void Parse() override {} void decodeText(char *buffer, int size, const char **fromCode = NULL); void decodeText(char *buffer, char *shortVersion, int sizeBuffer, int sizeShortVersion); }; diff --git a/libsi/util.h b/libsi/util.h index aa22e37a..d1a0f013 100644 --- a/libsi/util.h +++ b/libsi/util.h @@ -6,7 +6,7 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * - * $Id: util.h 5.1 2023/02/16 17:20:09 kls Exp $ + * $Id: util.h 5.2 2025/03/02 11:03:35 kls Exp $ * * ***************************************************************************/ @@ -106,16 +106,16 @@ private: class DataOwnData : public Data { public: DataOwnData() {} - virtual ~DataOwnData(); - virtual void assign(const unsigned char*data, int size); - virtual void Delete(); + virtual ~DataOwnData() override; + virtual void assign(const unsigned char*data, int size) override; + virtual void Delete() override; }; class DataForeignData : public Data { public: DataForeignData() {} - virtual ~DataForeignData(); - virtual void assign(const unsigned char*data, int size); - virtual void Delete(); + virtual ~DataForeignData() override; + virtual void assign(const unsigned char*data, int size) override; + virtual void Delete() override; }; Data* data_; int off; diff --git a/lirc.c b/lirc.c index 2b6db90d..ce1745fa 100644 --- a/lirc.c +++ b/lirc.c @@ -6,7 +6,7 @@ * * LIRC support added by Carsten Koch 2000-06-16. * - * $Id: lirc.c 5.2 2023/02/16 17:15:06 kls Exp $ + * $Id: lirc.c 5.3 2025/03/02 11:03:35 kls Exp $ */ #include "lirc.h" @@ -29,7 +29,7 @@ private: enum { LIRC_KEY_BUF = 30, LIRC_BUFFER_SIZE = 128 }; struct sockaddr_un addr; bool Connect(void); - virtual void Action(void); + virtual void Action(void) override; public: cLircUsrRemote(const char *DeviceName); }; @@ -37,7 +37,7 @@ public: #if HAVE_KERNEL_LIRC class cLircDevRemote : public cLircRemote { private: - virtual void Action(void); + virtual void Action(void) override; public: cLircDevRemote(void); bool Connect(const char *DeviceName); diff --git a/lirc.h b/lirc.h index bcdc0261..c7668a5d 100644 --- a/lirc.h +++ b/lirc.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: lirc.h 5.1 2022/11/26 13:37:06 kls Exp $ + * $Id: lirc.h 5.2 2025/03/02 11:03:35 kls Exp $ */ #ifndef __LIRC_H @@ -18,8 +18,8 @@ protected: int f; cLircRemote(const char *Name); public: - virtual ~cLircRemote(); - virtual bool Ready(void); + virtual ~cLircRemote() override; + virtual bool Ready(void) override; static void NewLircRemote(const char *Name); }; diff --git a/menu.c b/menu.c index 6e4a8c8d..d9c23d45 100644 --- a/menu.c +++ b/menu.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 5.23 2025/02/25 15:53:43 kls Exp $ + * $Id: menu.c 5.24 2025/03/02 11:03:35 kls Exp $ */ #include "menu.h" @@ -57,7 +57,7 @@ class cMenuEditCaItem : public cMenuEditIntItem { protected: - virtual void Set(void); + virtual void Set(void) override; public: cMenuEditCaItem(const char *Name, int *Value); eOSState ProcessKey(eKeys Key); @@ -100,7 +100,7 @@ class cMenuEditSrcItem : public cMenuEditIntItem { private: const cSource *source; protected: - virtual void Set(void); + virtual void Set(void) override; public: cMenuEditSrcItem(const char *Name, int *Value); eOSState ProcessKey(eKeys Key); @@ -170,7 +170,7 @@ private: public: cMenuEditChannel(cStateKey *ChannelsStateKey, cChannel *Channel, bool New = false); cChannel *Channel(void) { return channel; } - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; cMenuEditChannel::cMenuEditChannel(cStateKey *ChannelsStateKey, cChannel *Channel, bool New) @@ -295,10 +295,10 @@ public: static void SetSortMode(eChannelSortMode SortMode) { sortMode = SortMode; } static void IncSortMode(void) { sortMode = eChannelSortMode((sortMode == csmProvider) ? csmNumber : sortMode + 1); } static eChannelSortMode SortMode(void) { return sortMode; } - virtual int Compare(const cListObject &ListObject) const; - virtual void Set(void); + virtual int Compare(const cListObject &ListObject) const override; + virtual void Set(void) override; const cChannel *Channel(void) { return channel; } - virtual void SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable); + virtual void SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable) override; }; cMenuChannelItem::eChannelSortMode cMenuChannelItem::sortMode = csmNumber; @@ -365,11 +365,11 @@ protected: eOSState Edit(void); eOSState New(void); eOSState Delete(void); - virtual void Move(int From, int To); + virtual void Move(int From, int To) override; public: cMenuChannels(void); ~cMenuChannels(); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; cMenuChannels::cMenuChannels(void) @@ -676,7 +676,7 @@ class cMenuFolderItem : public cOsdItem { private: cNestedItem *folder; public: - virtual void Set(void); + virtual void Set(void) override; cMenuFolderItem(cNestedItem *Folder); cNestedItem *Folder(void) { return folder; } }; @@ -707,7 +707,7 @@ private: public: cMenuEditFolder(const char *Dir, cList *List, cNestedItem *Folder = NULL); cString GetFolder(void); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; cMenuEditFolder::cMenuEditFolder(const char *Dir, cList *List, cNestedItem *Folder) @@ -1229,10 +1229,10 @@ private: const cTimer *timer; public: cMenuTimerItem(const cTimer *Timer); - virtual int Compare(const cListObject &ListObject) const; - virtual void Set(void); + virtual int Compare(const cListObject &ListObject) const override; + virtual void Set(void) override; const cTimer *Timer(void) { return timer; } - virtual void SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable); + virtual void SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable) override; }; cMenuTimerItem::cMenuTimerItem(const cTimer *Timer) @@ -1315,8 +1315,8 @@ private: void SetHelpKeys(void); public: cMenuTimers(void); - virtual ~cMenuTimers(); - virtual eOSState ProcessKey(eKeys Key); + virtual ~cMenuTimers() override; + virtual eOSState ProcessKey(eKeys Key) override; }; cMenuTimers::cMenuTimers(void) @@ -1576,9 +1576,9 @@ public: static void SetSortMode(eScheduleSortMode SortMode) { sortMode = SortMode; } static void IncSortMode(void) { sortMode = eScheduleSortMode((sortMode == ssmAllAll) ? ssmAllThis : sortMode + 1); } static eScheduleSortMode SortMode(void) { return sortMode; } - virtual int Compare(const cListObject &ListObject) const; + virtual int Compare(const cListObject &ListObject) const override; bool Update(const cTimers *Timers, bool Force = false); - virtual void SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable); + virtual void SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable) override; }; cMenuScheduleItem::eScheduleSortMode cMenuScheduleItem::sortMode = ssmAllThis; @@ -1662,7 +1662,7 @@ public: static int CurrentChannel(void) { return currentChannel; } static void SetCurrentChannel(int ChannelNr) { currentChannel = ChannelNr; } static const cEvent *ScheduleEvent(void); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; int cMenuWhatsOn::currentChannel = 0; @@ -1873,8 +1873,8 @@ private: void SetHelpKeys(void); public: cMenuSchedule(void); - virtual ~cMenuSchedule(); - virtual eOSState ProcessKey(eKeys Key); + virtual ~cMenuSchedule() override; + virtual eOSState ProcessKey(eKeys Key) override; }; cMenuSchedule::cMenuSchedule(void) @@ -2323,8 +2323,8 @@ private: eOSState Select(void); public: cMenuCam(cCamSlot *CamSlot); - virtual ~cMenuCam(); - virtual eOSState ProcessKey(eKeys Key); + virtual ~cMenuCam() override; + virtual eOSState ProcessKey(eKeys Key) override; }; cMenuCam::cMenuCam(cCamSlot *CamSlot) @@ -2524,7 +2524,7 @@ private: eOSState ApplyChanges(void); public: cMenuPathEdit(const char *Path); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; cMenuPathEdit::cMenuPathEdit(const char *Path) @@ -2677,7 +2677,7 @@ private: eOSState ApplyChanges(void); public: cMenuRecordingEdit(const cRecording *Recording); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; cMenuRecordingEdit::cMenuRecordingEdit(const cRecording *Recording) @@ -2908,8 +2908,8 @@ private: bool RefreshRecording(void); public: cMenuRecording(const cRecording *Recording, bool WithButtons = false); - virtual void Display(void); - virtual eOSState ProcessKey(eKeys Key); + virtual void Display(void) override; + virtual eOSState ProcessKey(eKeys Key) override; }; cMenuRecording::cMenuRecording(const cRecording *Recording, bool WithButtons) @@ -3011,7 +3011,7 @@ public: const cRecording *Recording(void) const { return recording; } bool IsDirectory(void) const { return name != NULL; } void SetRecording(const cRecording *Recording) { recording = Recording; } - virtual void SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable); + virtual void SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable) override; }; cMenuRecordingItem::cMenuRecordingItem(const cRecording *Recording, int Level) @@ -3438,7 +3438,7 @@ eOSState cMenuRecordings::ProcessKey(eKeys Key) class cMenuSetupBase : public cMenuSetupPage { protected: cSetup data; - virtual void Store(void); + virtual void Store(void) override; public: cMenuSetupBase(void); }; @@ -3476,8 +3476,8 @@ private: virtual void Set(void); public: cMenuSetupOSD(void); - virtual ~cMenuSetupOSD(); - virtual eOSState ProcessKey(eKeys Key); + virtual ~cMenuSetupOSD() override; + virtual eOSState ProcessKey(eKeys Key) override; }; cMenuSetupOSD::cMenuSetupOSD(void) @@ -3636,7 +3636,7 @@ private: void Setup(void); public: cMenuSetupEPG(void); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; cMenuSetupEPG::cMenuSetupEPG(void) @@ -3735,7 +3735,7 @@ private: const char *standardComplianceTexts[3]; public: cMenuSetupDVB(void); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; cMenuSetupDVB::cMenuSetupDVB(void) @@ -3878,7 +3878,7 @@ private: void Setup(void); public: cMenuSetupLNB(void); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; cMenuSetupLNB::cMenuSetupLNB(void) @@ -4012,7 +4012,7 @@ private: void SetHelpKeys(void); public: cMenuSetupCAM(void); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; cMenuSetupCAM::cMenuSetupCAM(void) @@ -4195,7 +4195,7 @@ cMenuSetupRecord::cMenuSetupRecord(void) class cMenuSetupReplay : public cMenuSetupBase { protected: - virtual void Store(void); + virtual void Store(void) override; public: cMenuSetupReplay(void); }; @@ -4240,7 +4240,7 @@ private: void Set(void); public: cMenuSetupMisc(void); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; cMenuSetupMisc::cMenuSetupMisc(void) @@ -4338,7 +4338,7 @@ cMenuSetupPluginItem::cMenuSetupPluginItem(const char *Name, int Index) class cMenuSetupPlugins : public cMenuSetupBase { public: cMenuSetupPlugins(void); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; cMenuSetupPlugins::cMenuSetupPlugins(void) @@ -4392,7 +4392,7 @@ private: eOSState Restart(void); public: cMenuSetup(void); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; cMenuSetup::cMenuSetup(void) diff --git a/menu.h b/menu.h index c3b32cf4..9b5dc883 100644 --- a/menu.h +++ b/menu.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.h 5.5 2024/10/11 14:10:50 kls Exp $ + * $Id: menu.h 5.6 2025/03/02 11:03:35 kls Exp $ */ #ifndef __MENU_H @@ -25,10 +25,10 @@ private: eDvbFont font; public: cMenuText(const char *Title, const char *Text, eDvbFont Font = fontOsd); - virtual ~cMenuText(); + virtual ~cMenuText() override; void SetText(const char *Text); - virtual void Display(void); - virtual eOSState ProcessKey(eKeys Key); + virtual void Display(void) override; + virtual eOSState ProcessKey(eKeys Key) override; }; class cMenuFolder : public cOsdMenu { @@ -51,7 +51,7 @@ private: public: cMenuFolder(const char *Title, cNestedItemList *NestedItemList, const char *Path = NULL); cString GetFolder(void); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; class cMenuCommands : public cOsdMenu { @@ -66,8 +66,8 @@ private: eOSState Execute(void); public: cMenuCommands(const char *Title, cList *Commands, const char *Parameters = NULL); - virtual ~cMenuCommands(); - virtual eOSState ProcessKey(eKeys Key); + virtual ~cMenuCommands() override; + virtual eOSState ProcessKey(eKeys Key) override; }; class cMenuEditTimer : public cOsdMenu { @@ -89,8 +89,8 @@ private: void SetHelpKeys(void); public: cMenuEditTimer(cTimer *Timer, bool New = false); - virtual ~cMenuEditTimer(); - virtual eOSState ProcessKey(eKeys Key); + virtual ~cMenuEditTimer() override; + virtual eOSState ProcessKey(eKeys Key) override; static const cTimer *AddedTimer(void); }; @@ -99,8 +99,8 @@ private: const cEvent *event; public: cMenuEvent(const cTimers *Timers, const cChannels *Channels, const cEvent *Event, bool CanSwitch = false, bool Buttons = false); - virtual void Display(void); - virtual eOSState ProcessKey(eKeys Key); + virtual void Display(void) override; + virtual eOSState ProcessKey(eKeys Key) override; }; class cMenuMain : public cOsdMenu { @@ -115,7 +115,7 @@ private: bool Update(bool Force = false); public: cMenuMain(eOSState State = osUnknown, bool OpenSubMenus = false); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; static cOsdObject *PluginOsdObject(void); }; @@ -140,8 +140,8 @@ private: public: cDisplayChannel(int Number, bool Switched); cDisplayChannel(eKeys FirstKey); - virtual ~cDisplayChannel(); - virtual eOSState ProcessKey(eKeys Key); + virtual ~cDisplayChannel() override; + virtual eOSState ProcessKey(eKeys Key) override; static bool IsOpen(void) { return currentDisplayChannel != NULL; } }; @@ -150,10 +150,10 @@ private: cSkinDisplayVolume *displayVolume; cTimeMs timeout; static cDisplayVolume *currentDisplayVolume; - virtual void Show(void); + virtual void Show(void) override; cDisplayVolume(void); public: - virtual ~cDisplayVolume(); + virtual ~cDisplayVolume() override; static cDisplayVolume *Create(void); static void Process(eKeys Key); eOSState ProcessKey(eKeys Key); @@ -167,10 +167,10 @@ private: char *descriptions[ttMaxTrackTypes + 1]; // list is NULL terminated int numTracks, track, audioChannel; static cDisplayTracks *currentDisplayTracks; - virtual void Show(void); + virtual void Show(void) override; cDisplayTracks(void); public: - virtual ~cDisplayTracks(); + virtual ~cDisplayTracks() override; static bool IsOpen(void) { return currentDisplayTracks != NULL; } static cDisplayTracks *Create(void); static void Process(eKeys Key); @@ -185,10 +185,10 @@ private: char *descriptions[ttMaxTrackTypes + 1]; // list is NULL terminated int numTracks, track; static cDisplaySubtitleTracks *currentDisplayTracks; - virtual void Show(void); + virtual void Show(void) override; cDisplaySubtitleTracks(void); public: - virtual ~cDisplaySubtitleTracks(); + virtual ~cDisplaySubtitleTracks() override; static bool IsOpen(void) { return currentDisplayTracks != NULL; } static cDisplaySubtitleTracks *Create(void); static void Process(eKeys Key); @@ -230,7 +230,7 @@ protected: public: cMenuRecordings(const char *Base = NULL, int Level = 0, bool OpenSubMenus = false, const cRecordingFilter *Filter = NULL); ~cMenuRecordings(); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; static void SetRecording(const char *FileName); }; @@ -321,15 +321,15 @@ private: void EditTest(void); public: cReplayControl(bool PauseLive = false); - virtual ~cReplayControl(); + virtual ~cReplayControl() override; void Stop(void); - virtual cOsdObject *GetInfo(void); - virtual const cRecording *GetRecording(void); - virtual eOSState ProcessKey(eKeys Key); - virtual void Show(void); - virtual void Hide(void); + virtual cOsdObject *GetInfo(void) override; + virtual const cRecording *GetRecording(void) override; + virtual eOSState ProcessKey(eKeys Key) override; + virtual void Show(void) override; + virtual void Hide(void) override; bool Visible(void) { return visible; } - virtual void ClearEditingMarks(void); + virtual void ClearEditingMarks(void) override; static void SetRecording(const char *FileName); static const char *NowReplaying(void); static const char *LastReplayed(void); diff --git a/menuitems.h b/menuitems.h index f3e7c1e5..1174c0c6 100644 --- a/menuitems.h +++ b/menuitems.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menuitems.h 5.1 2020/12/26 15:49:01 kls Exp $ + * $Id: menuitems.h 5.2 2025/03/02 11:03:35 kls Exp $ */ #ifndef __MENUITEMS_H @@ -35,16 +35,16 @@ protected: int *value; int min, max; const char *minString, *maxString; - virtual void Set(void); + virtual void Set(void) override; public: cMenuEditIntItem(const char *Name, int *Value, int Min = 0, int Max = INT_MAX, const char *MinString = NULL, const char *MaxString = NULL); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; class cMenuEditBoolItem : public cMenuEditIntItem { protected: const char *falseString, *trueString; - virtual void Set(void); + virtual void Set(void) override; public: cMenuEditBoolItem(const char *Name, int *Value, const char *FalseString = NULL, const char *TrueString = NULL); }; @@ -54,7 +54,7 @@ protected: uint *value; uint mask; int bit; - virtual void Set(void); + virtual void Set(void) override; public: cMenuEditBitItem(const char *Name, uint *Value, uint Mask, const char *FalseString = NULL, const char *TrueString = NULL); }; @@ -64,10 +64,10 @@ protected: char *value; int length; bool blind; - virtual void Set(void); + virtual void Set(void) override; public: cMenuEditNumItem(const char *Name, char *Value, int Length, bool Blind = false); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; class cMenuEditIntxItem : public cMenuEditIntItem { @@ -75,10 +75,10 @@ private: int factor; const char *negString, *posString; void SetHelpKeys(void); - virtual void Set(void); + virtual void Set(void) override; public: cMenuEditIntxItem(const char *Name, int *Value, int Min = INT_MIN, int Max = INT_MAX, int Factor = 1, const char *NegString = NULL, const char *PosString = NULL); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; class cMenuEditPrcItem : public cMenuEditItem { @@ -87,10 +87,10 @@ protected: double min, max; int decimals; int factor; - virtual void Set(void); + virtual void Set(void) override; public: cMenuEditPrcItem(const char *Name, double *Value, double Min = 0.0, double Max = 1.0, int Decimals = 0); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; class cMenuEditChrItem : public cMenuEditItem { @@ -98,11 +98,11 @@ private: char *value; char *allowed; const char *current; - virtual void Set(void); + virtual void Set(void) override; public: cMenuEditChrItem(const char *Name, char *Value, const char *Allowed); ~cMenuEditChrItem(); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; class cMenuEditStrItem : public cMenuEditItem { @@ -125,7 +125,7 @@ private: void SetHelpKeys(void); uint *IsAllowed(uint c); void AdvancePos(void); - virtual void Set(void); + virtual void Set(void) override; uint Inc(uint c, bool Up); void Type(uint c); void Insert(void); @@ -140,14 +140,14 @@ public: ~cMenuEditStrItem(); void SetKeepSpace(void) { keepSpace = true; } void SetMacros(const char **Macros); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; class cMenuEditStraItem : public cMenuEditIntItem { private: const char * const *strings; protected: - virtual void Set(void); + virtual void Set(void) override; public: cMenuEditStraItem(const char *Name, int *Value, int NumStrings, const char * const *Strings); }; @@ -159,7 +159,7 @@ private: char *value; int length; protected: - virtual void Set(void); + virtual void Set(void) override; public: cMenuEditStrlItem(const char *Name, char *Value, int Length, const cStringList *Strings); }; @@ -169,11 +169,11 @@ protected: const char *noneString; int dummyValue; cString *channelID; - virtual void Set(void); + virtual void Set(void) override; public: cMenuEditChanItem(const char *Name, int *Value, const char *NoneString = NULL); cMenuEditChanItem(const char *Name, cString *ChannelID, const char *NoneString = NULL); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; class cMenuEditTranItem : public cMenuEditChanItem { @@ -183,7 +183,7 @@ private: int *transponder; public: cMenuEditTranItem(const char *Name, int *Value, int *Source); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; class cMenuEditDateItem : public cMenuEditItem { @@ -195,11 +195,11 @@ private: int oldweekdays; int dayindex; int FindDayIndex(int WeekDays); - virtual void Set(void); + virtual void Set(void) override; public: cMenuEditDateItem(const char *Name, time_t *Value, int *WeekDays = NULL); void ToggleRepeating(void); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; class cMenuEditTimeItem : public cMenuEditItem { @@ -207,10 +207,10 @@ protected: int *value; int hh, mm; int pos; - virtual void Set(void); + virtual void Set(void) override; public: cMenuEditTimeItem(const char *Name, int *Value); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; class cMenuEditMapItem : public cMenuEditItem { @@ -218,10 +218,10 @@ protected: int *value; const tDvbParameterMap *map; const char *zeroString; - virtual void Set(void); + virtual void Set(void) override; public: cMenuEditMapItem(const char *Name, int *Value, const tDvbParameterMap *Map, const char *ZeroString = NULL); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; class cPlugin; @@ -236,7 +236,7 @@ protected: void SetupStore(const char *Name, int Value); public: cMenuSetupPage(void); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; void SetPlugin(cPlugin *Plugin); }; diff --git a/mtd.h b/mtd.h index 914b8b95..72cb0425 100644 --- a/mtd.h +++ b/mtd.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: mtd.h 1.11 2020/06/16 14:33:32 kls Exp $ + * $Id: mtd.h 5.1 2025/03/02 11:03:35 kls Exp $ */ #ifndef __MTD_H @@ -160,35 +160,35 @@ private: cRingBufferLinear *mtdBuffer; bool delivered; protected: - virtual const int *GetCaSystemIds(void); - virtual void SendCaPmt(uint8_t CmdId); + virtual const int *GetCaSystemIds(void) override; + virtual void SendCaPmt(uint8_t CmdId) override; public: cMtdCamSlot(cCamSlot *MasterSlot, int Index); ///< Creates a new "Multi Transponder Decryption" CAM slot, connected to the ///< given physical MasterSlot, using the given Index for mapping PIDs. - virtual ~cMtdCamSlot(); + virtual ~cMtdCamSlot() override; cMtdMapper *MtdMapper(void) { return mtdMapper; } - virtual bool RepliesToQuery(void); - virtual bool ProvidesCa(const int *CaSystemIds); - virtual bool CanDecrypt(const cChannel *Channel, cMtdMapper *MtdMapper = NULL); - virtual void StartDecrypting(void); - virtual void StopDecrypting(void); - virtual uchar *Decrypt(uchar *Data, int &Count); - virtual bool TsPostProcess(uchar *Data); - virtual void InjectEit(int Sid); + virtual bool RepliesToQuery(void) override; + virtual bool ProvidesCa(const int *CaSystemIds) override; + virtual bool CanDecrypt(const cChannel *Channel, cMtdMapper *MtdMapper = NULL) override; + virtual void StartDecrypting(void) override; + virtual void StopDecrypting(void) override; + virtual uchar *Decrypt(uchar *Data, int &Count) override; + virtual bool TsPostProcess(uchar *Data) override; + virtual void InjectEit(int Sid) override; int PutData(const uchar *Data, int Count); int PutCat(const uchar *Data, int Count); // The following functions shall not be called for a cMtdCamSlot: virtual cCamSlot *Spawn(void) { MTD_DONT_CALL(NULL); } - virtual bool Reset(void) { MTD_DONT_CALL(false); } - virtual eModuleStatus ModuleStatus(void) { MTD_DONT_CALL(msNone); } - virtual const char *GetCamName(void) { MTD_DONT_CALL(NULL); } - virtual bool Ready(void) { MTD_DONT_CALL(false); } - virtual bool HasMMI(void) { MTD_DONT_CALL(false); } - virtual bool HasUserIO(void) { MTD_DONT_CALL(false); } - virtual bool EnterMenu(void) { MTD_DONT_CALL(false); } - virtual cCiMenu *GetMenu(void) { MTD_DONT_CALL(NULL); } - virtual cCiEnquiry *GetEnquiry(void) { MTD_DONT_CALL(NULL); } + virtual bool Reset(void) override { MTD_DONT_CALL(false); } + virtual eModuleStatus ModuleStatus(void) override { MTD_DONT_CALL(msNone); } + virtual const char *GetCamName(void) override { MTD_DONT_CALL(NULL); } + virtual bool Ready(void) override { MTD_DONT_CALL(false); } + virtual bool HasMMI(void) override { MTD_DONT_CALL(false); } + virtual bool HasUserIO(void) override { MTD_DONT_CALL(false); } + virtual bool EnterMenu(void) override { MTD_DONT_CALL(false); } + virtual cCiMenu *GetMenu(void) override { MTD_DONT_CALL(NULL); } + virtual cCiEnquiry *GetEnquiry(void) override { MTD_DONT_CALL(NULL); } }; #endif //__MTD_H diff --git a/newplugin b/newplugin index 2ed7c4d1..d0887161 100755 --- a/newplugin +++ b/newplugin @@ -12,7 +12,7 @@ # See the main source file 'vdr.c' for copyright information and # how to reach the author. # -# $Id: newplugin 5.2 2025/02/12 22:22:20 kls Exp $ +# $Id: newplugin 5.3 2025/03/02 11:03:35 kls Exp $ $PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin \n"; @@ -207,24 +207,24 @@ private: // Add any member variables or functions you may need here. public: cPlugin$PLUGIN_CLASS(void); - virtual ~cPlugin$PLUGIN_CLASS(); - virtual const char *Version(void) { return VERSION; } - virtual const char *Description(void) { return DESCRIPTION; } - virtual const char *CommandLineHelp(void); - virtual bool ProcessArgs(int argc, char *argv[]); - virtual bool Initialize(void); - virtual bool Start(void); - virtual void Stop(void); - virtual void Housekeeping(void); - virtual cString Active(void); - virtual time_t WakeupTime(void); - virtual const char *MainMenuEntry(void) { return MAINMENUENTRY; } - virtual cOsdObject *MainMenuAction(void); - virtual cMenuSetupPage *SetupMenu(void); - virtual bool SetupParse(const char *Name, const char *Value); - virtual bool Service(const char *Id, void *Data = NULL); - virtual const char **SVDRPHelpPages(void); - virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode); + virtual ~cPlugin$PLUGIN_CLASS() override; + virtual const char *Version(void) override { return VERSION; } + virtual const char *Description(void) override { return DESCRIPTION; } + virtual const char *CommandLineHelp(void) override; + virtual bool ProcessArgs(int argc, char *argv[]) override; + virtual bool Initialize(void) override; + virtual bool Start(void) override; + virtual void Stop(void) override; + virtual void Housekeeping(void) override; + virtual cString Active(void) override; + virtual time_t WakeupTime(void) override; + virtual const char *MainMenuEntry(void) override { return MAINMENUENTRY; } + virtual cOsdObject *MainMenuAction(void) override; + virtual cMenuSetupPage *SetupMenu(void) override; + virtual bool SetupParse(const char *Name, const char *Value) override; + virtual bool Service(const char *Id, void *Data = NULL) override; + virtual const char **SVDRPHelpPages(void) override; + virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode) override; }; cPlugin${PLUGIN_CLASS}::cPlugin$PLUGIN_CLASS(void) diff --git a/nit.h b/nit.h index 52676c0d..d0185bff 100644 --- a/nit.h +++ b/nit.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: nit.h 4.1 2015/03/16 12:41:38 kls Exp $ + * $Id: nit.h 5.1 2025/03/02 11:03:35 kls Exp $ */ #ifndef __NIT_H @@ -18,10 +18,10 @@ private: cSectionSyncer sectionSyncer; cSdtFilter *sdtFilter; protected: - virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length); + virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length) override; public: cNitFilter(cSdtFilter *SdtFilter); - virtual void SetStatus(bool On); + virtual void SetStatus(bool On) override; }; #endif //__NIT_H diff --git a/osd.h b/osd.h index 55be4823..fc9adad8 100644 --- a/osd.h +++ b/osd.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osd.h 5.2 2024/01/18 12:04:57 kls Exp $ + * $Id: osd.h 5.3 2025/03/02 11:03:35 kls Exp $ */ #ifndef __OSD_H @@ -182,7 +182,7 @@ public: ///< Creates a bitmap and loads an XPM image from the given file. cBitmap(const char *const Xpm[]); ///< Creates a bitmap from the given XPM data. - virtual ~cBitmap(); + virtual ~cBitmap() override; int X0(void) const { return x0; } int Y0(void) const { return y0; } int Width(void) const { return width; } @@ -716,25 +716,25 @@ private: public: cPixmapMemory(void); cPixmapMemory(int Layer, const cRect &ViewPort, const cRect &DrawPort = cRect::Null); - virtual ~cPixmapMemory(); + virtual ~cPixmapMemory() override; const uint8_t *Data(void) { return (uint8_t *)data; } - virtual void Clear(void); - virtual void Fill(tColor Color); - virtual void DrawImage(const cPoint &Point, const cImage &Image); - virtual void DrawImage(const cPoint &Point, int ImageHandle); - virtual void DrawScaledImage(const cPoint &Point, const cImage &Image, double FactorX, double FactorY, bool AntiAlias = false); - virtual void DrawScaledImage(const cPoint &Point, int ImageHandle, double FactorX, double FactorY, bool AntiAlias = false); - virtual void DrawPixel(const cPoint &Point, tColor Color); - virtual void DrawBlendedPixel(const cPoint &Point, tColor Color, uint8_t AlphaLayer = ALPHA_OPAQUE); - virtual void DrawBitmap(const cPoint &Point, const cBitmap &Bitmap, tColor ColorFg = 0, tColor ColorBg = 0, bool Overlay = false); - virtual void DrawText(const cPoint &Point, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font, int Width = 0, int Height = 0, int Alignment = taDefault); - virtual void DrawRectangle(const cRect &Rect, tColor Color); - virtual void DrawEllipse(const cRect &Rect, tColor Color, int Quadrants = 0); - virtual void DrawSlope(const cRect &Rect, tColor Color, int Type); - virtual void Render(const cPixmap *Pixmap, const cRect &Source, const cPoint &Dest); - virtual void Copy(const cPixmap *Pixmap, const cRect &Source, const cPoint &Dest); - virtual void Scroll(const cPoint &Dest, const cRect &Source = cRect::Null); - virtual void Pan(const cPoint &Dest, const cRect &Source = cRect::Null); + virtual void Clear(void) override; + virtual void Fill(tColor Color) override; + virtual void DrawImage(const cPoint &Point, const cImage &Image) override; + virtual void DrawImage(const cPoint &Point, int ImageHandle) override; + virtual void DrawScaledImage(const cPoint &Point, const cImage &Image, double FactorX, double FactorY, bool AntiAlias = false) override; + virtual void DrawScaledImage(const cPoint &Point, int ImageHandle, double FactorX, double FactorY, bool AntiAlias = false) override; + virtual void DrawPixel(const cPoint &Point, tColor Color) override; + virtual void DrawBlendedPixel(const cPoint &Point, tColor Color, uint8_t AlphaLayer = ALPHA_OPAQUE) override; + virtual void DrawBitmap(const cPoint &Point, const cBitmap &Bitmap, tColor ColorFg = 0, tColor ColorBg = 0, bool Overlay = false) override; + virtual void DrawText(const cPoint &Point, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font, int Width = 0, int Height = 0, int Alignment = taDefault) override; + virtual void DrawRectangle(const cRect &Rect, tColor Color) override; + virtual void DrawEllipse(const cRect &Rect, tColor Color, int Quadrants = 0) override; + virtual void DrawSlope(const cRect &Rect, tColor Color, int Type) override; + virtual void Render(const cPixmap *Pixmap, const cRect &Source, const cPoint &Dest) override; + virtual void Copy(const cPixmap *Pixmap, const cRect &Source, const cPoint &Dest) override; + virtual void Scroll(const cPoint &Dest, const cRect &Source = cRect::Null) override; + virtual void Pan(const cPoint &Dest, const cRect &Source = cRect::Null) override; }; #define MAXOSDAREAS 16 diff --git a/osdbase.h b/osdbase.h index a63f222b..abe0a083 100644 --- a/osdbase.h +++ b/osdbase.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osdbase.h 5.2 2025/02/17 10:49:10 kls Exp $ + * $Id: osdbase.h 5.3 2025/03/02 11:03:35 kls Exp $ */ #ifndef __OSDBASE_H @@ -55,7 +55,7 @@ protected: public: cOsdItem(eOSState State = osUnknown); cOsdItem(const char *Text, eOSState State = osUnknown, bool Selectable = true); - virtual ~cOsdItem(); + virtual ~cOsdItem() override; bool Selectable(void) const { return selectable; } void SetText(const char *Text, bool Copy = true); void SetSelectable(bool Selectable); @@ -136,15 +136,15 @@ protected: virtual void Del(int Index); public: cOsdMenu(const char *Title, int c0 = 0, int c1 = 0, int c2 = 0, int c3 = 0, int c4 = 0); - virtual ~cOsdMenu(); - virtual bool NeedsFastResponse(void) { return subMenu ? subMenu->NeedsFastResponse() : cOsdObject::NeedsFastResponse(); } + virtual ~cOsdMenu() override; + virtual bool NeedsFastResponse(void) override { return subMenu ? subMenu->NeedsFastResponse() : cOsdObject::NeedsFastResponse(); } void SetMenuCategory(eMenuCategory MenuCategory); void SetMenuSortMode(eMenuSortMode MenuSortMode); int Current(void) const { return current; } void Add(cOsdItem *Item, bool Current = false, cOsdItem *After = NULL); void Ins(cOsdItem *Item, bool Current = false, cOsdItem *Before = NULL); virtual void Display(void); - virtual eOSState ProcessKey(eKeys Key); + virtual eOSState ProcessKey(eKeys Key) override; }; #endif //__OSDBASE_H diff --git a/pat.c b/pat.c index acda0f55..21a28465 100644 --- a/pat.c +++ b/pat.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: pat.c 5.4 2021/06/21 20:13:55 kls Exp $ + * $Id: pat.c 5.5 2025/03/02 11:03:35 kls Exp $ */ #include "pat.h" @@ -26,7 +26,7 @@ private: uchar *data; public: cCaDescriptor(int CaSystem, int CaPid, int EsPid, int Length, const uchar *Data); - virtual ~cCaDescriptor(); + virtual ~cCaDescriptor() override; bool operator== (const cCaDescriptor &arg) const; int CaSystem(void) { return caSystem; } int CaPid(void) { return caPid; } diff --git a/pat.h b/pat.h index 8b55ec9b..6526beeb 100644 --- a/pat.h +++ b/pat.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: pat.h 5.3 2021/06/21 20:13:55 kls Exp $ + * $Id: pat.h 5.4 2025/03/02 11:03:35 kls Exp $ */ #ifndef __PAT_H @@ -37,10 +37,10 @@ private: int NumSidRequests(int Sid); void SwitchToNextPmtPid(void); protected: - virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length); + virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length) override; public: cPatFilter(void); - virtual void SetStatus(bool On); + virtual void SetStatus(bool On) override; void Trigger(int = 0); // triggers reading the PMT PIDs that are currently not requested (dummy parameter for backwards compatibility, value is ignored) void Request(int Sid); // requests permanent reading of the PMT PID for this SID void Release(int Sid); // releases permanent reading of the PMT PID for this SID diff --git a/player.h b/player.h index ea8ee004..e6b5ae29 100644 --- a/player.h +++ b/player.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: player.h 5.6 2024/10/13 09:47:18 kls Exp $ + * $Id: player.h 5.7 2025/03/02 11:03:35 kls Exp $ */ #ifndef __PLAYER_H @@ -89,7 +89,7 @@ protected: cPlayer *player; public: cControl(cPlayer *Player, bool Hidden = false); - virtual ~cControl(); + virtual ~cControl() override; virtual void Hide(void) = 0; virtual cOsdObject *GetInfo(void); ///< Returns an OSD object that displays information about the currently diff --git a/plugin.h b/plugin.h index a419f3f2..e472ea22 100644 --- a/plugin.h +++ b/plugin.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: plugin.h 5.1 2025/02/12 22:22:20 kls Exp $ + * $Id: plugin.h 5.2 2025/03/02 11:03:35 kls Exp $ */ #ifndef __PLUGIN_H @@ -80,7 +80,7 @@ private: destroy_t *destroy; public: cDll(const char *FileName, const char *Args); - virtual ~cDll(); + virtual ~cDll() override; bool Load(bool Log = false); cPlugin *Plugin(void) { return plugin; } }; diff --git a/recorder.h b/recorder.h index a1858635..26ac272d 100644 --- a/recorder.h +++ b/recorder.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: recorder.h 5.3 2024/09/17 09:39:50 kls Exp $ + * $Id: recorder.h 5.4 2025/03/02 11:03:35 kls Exp $ */ #ifndef __RECORDER_H @@ -37,18 +37,18 @@ private: bool NextFile(void); void HandleErrors(bool Force = false); protected: - virtual void Activate(bool On); + virtual void Activate(bool On) override; ///< If you override Activate() you need to call Detach() (which is a ///< member of the cReceiver class) from your own destructor in order ///< to properly get a call to Activate(false) when your object is ///< destroyed. - virtual void Receive(const uchar *Data, int Length); - virtual void Action(void); + virtual void Receive(const uchar *Data, int Length) override; + virtual void Action(void) override; public: cRecorder(const char *FileName, const cChannel *Channel, int Priority); ///< Creates a new recorder for the given Channel and ///< the given Priority that will record into the file FileName. - virtual ~cRecorder(); + virtual ~cRecorder() override; int Errors(void) { return oldErrors + errors; }; ///< Returns the number of errors that were detected during recording. ///< Each frame that is missing or contains (any number of) errors counts as one error. diff --git a/recording.c b/recording.c index d3796322..88581c6e 100644 --- a/recording.c +++ b/recording.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: recording.c 5.37 2025/01/18 20:57:06 kls Exp $ + * $Id: recording.c 5.38 2025/03/02 11:03:35 kls Exp $ */ #include "recording.h" @@ -80,7 +80,7 @@ int InstanceId = 0; class cRemoveDeletedRecordingsThread : public cThread { protected: - virtual void Action(void); + virtual void Action(void) override; public: cRemoveDeletedRecordingsThread(void); }; @@ -1504,7 +1504,7 @@ private: bool initial; void ScanVideoDir(const char *DirName, int LinkLevel = 0, int DirLevel = 0); protected: - virtual void Action(void); + virtual void Action(void) override; public: cVideoDirectoryScannerThread(cRecordings *Recordings, cRecordings *DeletedRecordings); ~cVideoDirectoryScannerThread(); @@ -1823,10 +1823,10 @@ private: bool error; bool suspensionLogged; bool Throttled(void); - virtual void Action(void); + virtual void Action(void) override; public: cDirCopier(const char *DirNameSrc, const char *DirNameDst); - virtual ~cDirCopier(); + virtual ~cDirCopier() override; bool Error(void) { return error; } }; @@ -2523,7 +2523,7 @@ private: cString recordingName; bool update; protected: - virtual void Action(void); + virtual void Action(void) override; public: cIndexFileGenerator(const char *RecordingName, bool Update = false); ~cIndexFileGenerator(); diff --git a/recording.h b/recording.h index 22b5bf2b..505c4bbd 100644 --- a/recording.h +++ b/recording.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: recording.h 5.12 2025/01/15 10:50:29 kls Exp $ + * $Id: recording.h 5.13 2025/03/02 11:03:35 kls Exp $ */ #ifndef __RECORDING_H @@ -143,14 +143,14 @@ private: public: cRecording(cTimer *Timer, const cEvent *Event); cRecording(const char *FileName); - virtual ~cRecording(); + virtual ~cRecording() override; int Id(void) const { return id; } time_t Start(void) const { return start; } int Priority(void) const { return priority; } int Lifetime(void) const { return lifetime; } time_t Deleted(void) const { return deleted; } void SetDeleted(void) { deleted = time(NULL); } - virtual int Compare(const cListObject &ListObject) const; + virtual int Compare(const cListObject &ListObject) const override; bool IsInPath(const char *Path) const; ///< Returns true if this recording is stored anywhere under the given Path. ///< If Path is NULL or an empty string, the entire video directory is checked. @@ -257,7 +257,7 @@ private: static const char *UpdateFileName(void); public: cRecordings(bool Deleted = false); - virtual ~cRecordings(); + virtual ~cRecordings() override; static const cRecordings *GetRecordingsRead(cStateKey &StateKey, int TimeoutMs = 0) { return recordings.Lock(StateKey, false, TimeoutMs) ? &recordings : NULL; } ///< Gets the list of recordings for read access. ///< See cTimers::GetTimersRead() for details. @@ -340,10 +340,10 @@ private: bool error; cRecordingsHandlerEntry *Get(const char *FileName); protected: - virtual void Action(void); + virtual void Action(void) override; public: cRecordingsHandler(void); - virtual ~cRecordingsHandler(); + virtual ~cRecordingsHandler() override; bool Add(int Usage, const char *FileNameSrc, const char *FileNameDst = NULL); ///< Adds the given FileNameSrc to the recordings handler for (later) ///< processing. Usage can be either ruCut, ruMove or ruCopy. FileNameDst @@ -384,7 +384,7 @@ private: cString comment; public: cMark(int Position = 0, const char *Comment = NULL, double FramesPerSecond = DEFAULTFRAMESPERSECOND); - virtual ~cMark(); + virtual ~cMark() override; int Position(void) const { return position; } const char *Comment(void) const { return comment; } void SetPosition(int Position) { position = Position; } diff --git a/remote.h b/remote.h index 415f2e77..51dd6286 100644 --- a/remote.h +++ b/remote.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: remote.h 3.1 2013/12/25 12:32:44 kls Exp $ + * $Id: remote.h 5.1 2025/03/02 11:03:35 kls Exp $ */ #ifndef __REMOTE_H @@ -40,7 +40,7 @@ protected: bool Put(uint64_t Code, bool Repeat = false, bool Release = false); bool Put(const char *Code, bool Repeat = false, bool Release = false); public: - virtual ~cRemote(); + virtual ~cRemote() override; virtual bool Ready(void) { return true; } virtual bool Initialize(void); const char *Name(void) { return name; } @@ -108,14 +108,14 @@ private: static bool rawMode; bool systemIsUtf8; struct termios savedTm; - virtual void Action(void); + virtual void Action(void) override; int ReadKey(void); uint64_t ReadKeySequence(void); int MapCodeToFunc(uint64_t Code); void PutKey(uint64_t Code, bool Repeat = false, bool Release = false); public: cKbdRemote(void); - virtual ~cKbdRemote(); + virtual ~cKbdRemote() override; static bool KbdAvailable(void) { return kbdAvailable; } static uint64_t MapFuncToCode(int Func); static void SetRawMode(bool RawMode); diff --git a/remux.c b/remux.c index b48fe33b..10da4e11 100644 --- a/remux.c +++ b/remux.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: remux.c 5.18 2024/12/05 10:37:15 kls Exp $ + * $Id: remux.c 5.19 2025/03/02 11:03:35 kls Exp $ */ #include "remux.h" @@ -1220,7 +1220,7 @@ cFrameParser::cFrameParser(void) class cAudioParser : public cFrameParser { public: cAudioParser(void); - virtual int Parse(const uchar *Data, int Length, int Pid); + virtual int Parse(const uchar *Data, int Length, int Pid) override; }; cAudioParser::cAudioParser(void) @@ -1260,7 +1260,7 @@ private: }; public: cMpeg2Parser(void); - virtual int Parse(const uchar *Data, int Length, int Pid); + virtual int Parse(const uchar *Data, int Length, int Pid) override; }; cMpeg2Parser::cMpeg2Parser(void) @@ -1395,7 +1395,7 @@ public: ///< Sets up a new H.264 parser. ///< This class parses only the data absolutely necessary to determine the ///< frame borders and field count of the given H264 material. - virtual int Parse(const uchar *Data, int Length, int Pid); + virtual int Parse(const uchar *Data, int Length, int Pid) override; }; cH264Parser::cH264Parser(void) @@ -1697,7 +1697,7 @@ private: void ParseSequenceParameterSet(void); public: cH265Parser(void); - virtual int Parse(const uchar *Data, int Length, int Pid); + virtual int Parse(const uchar *Data, int Length, int Pid) override; }; cH265Parser::cH265Parser(void) diff --git a/ringbuffer.h b/ringbuffer.h index 746fc51e..5504d4d4 100644 --- a/ringbuffer.h +++ b/ringbuffer.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: ringbuffer.h 4.2 2017/03/19 13:11:39 kls Exp $ + * $Id: ringbuffer.h 5.1 2025/03/02 11:03:35 kls Exp $ */ #ifndef __RINGBUFFER_H @@ -75,10 +75,10 @@ public: ///< The buffer will be able to hold at most Size-Margin-1 bytes of data, and will ///< be guaranteed to return at least Margin bytes in one consecutive block. ///< The optional Description is used for debugging only. - virtual ~cRingBufferLinear(); - virtual int Available(void); - virtual int Free(void) { return Size() - Available() - 1 - margin; } - virtual void Clear(void); + virtual ~cRingBufferLinear() override; + virtual int Available(void) override; + virtual int Free(void) override { return Size() - Available() - 1 - margin; } + virtual void Clear(void) override; ///< Immediately clears the ring buffer. ///< This function may safely be called from the reading thread without additional ///< locking. If called from the writing thread, proper locking must be used. @@ -140,9 +140,9 @@ private: void Unlock(void) { mutex.Unlock(); } public: cRingBufferFrame(int Size, bool Statistics = false); - virtual ~cRingBufferFrame(); - virtual int Available(void); - virtual void Clear(void); + virtual ~cRingBufferFrame() override; + virtual int Available(void) override; + virtual void Clear(void) override; // Immediately clears the ring buffer. bool Put(cFrame *Frame); // Puts the Frame into the ring buffer. diff --git a/sdt.h b/sdt.h index 128b51ad..1e5d0d80 100644 --- a/sdt.h +++ b/sdt.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: sdt.h 4.1 2020/05/04 08:50:20 kls Exp $ + * $Id: sdt.h 5.1 2025/03/02 11:03:35 kls Exp $ */ #ifndef __SDT_H @@ -26,10 +26,10 @@ private: cPatFilter *patFilter; enum eTransponderState transponderState; protected: - virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length); + virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length) override; public: cSdtFilter(cPatFilter *PatFilter); - virtual void SetStatus(bool On); + virtual void SetStatus(bool On) override; void Trigger(int Source); bool TransponderVerified(void) const { return transponderState == tsVerified; } // returns true if the expected NIT/TID have been received in the SDT bool TransponderWrong(void) const { return transponderState == tsWrong; } // returns true if an expected change of NIT/TID has not happened diff --git a/sections.h b/sections.h index 2e9a4490..5a52dec1 100644 --- a/sections.h +++ b/sections.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: sections.h 5.1 2021/06/08 15:10:51 kls Exp $ + * $Id: sections.h 5.2 2025/03/02 11:03:35 kls Exp $ */ #ifndef __SECTIONS_H @@ -34,10 +34,10 @@ private: cList filterHandles; void Add(const cFilterData *FilterData); void Del(const cFilterData *FilterData); - virtual void Action(void); + virtual void Action(void) override; public: cSectionHandler(cDevice *Device); - virtual ~cSectionHandler(); + virtual ~cSectionHandler() override; int Source(void); int Transponder(void); const cChannel *Channel(void); diff --git a/skinclassic.c b/skinclassic.c index bcc83fe2..8d9e3b7b 100644 --- a/skinclassic.c +++ b/skinclassic.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: skinclassic.c 5.4 2024/09/21 10:53:07 kls Exp $ + * $Id: skinclassic.c 5.5 2025/03/02 11:03:35 kls Exp $ */ #include "skinclassic.h" @@ -84,11 +84,11 @@ private: cString lastDate; public: cSkinClassicDisplayChannel(bool WithInfo); - virtual ~cSkinClassicDisplayChannel(); - virtual void SetChannel(const cChannel *Channel, int Number); - virtual void SetEvents(const cEvent *Present, const cEvent *Following); - virtual void SetMessage(eMessageType Type, const char *Text); - virtual void Flush(void); + virtual ~cSkinClassicDisplayChannel() override; + virtual void SetChannel(const cChannel *Channel, int Number) override; + virtual void SetEvents(const cEvent *Present, const cEvent *Following) override; + virtual void SetMessage(eMessageType Type, const char *Text) override; + virtual void Flush(void) override; }; cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(bool WithInfo) @@ -180,21 +180,21 @@ private: void SetTextScrollbar(void); public: cSkinClassicDisplayMenu(void); - virtual ~cSkinClassicDisplayMenu(); - virtual void Scroll(bool Up, bool Page); - virtual int MaxItems(void); - virtual void Clear(void); - virtual void SetTitle(const char *Title); - virtual void SetButtons(const char *Red, const char *Green = NULL, const char *Yellow = NULL, const char *Blue = NULL); - virtual void SetMessage(eMessageType Type, const char *Text); - virtual void SetItem(const char *Text, int Index, bool Current, bool Selectable); - virtual void SetScrollbar(int Total, int Offset); - virtual void SetEvent(const cEvent *Event); - virtual void SetRecording(const cRecording *Recording); - virtual void SetText(const char *Text, bool FixedFont); + virtual ~cSkinClassicDisplayMenu() override; + virtual void Scroll(bool Up, bool Page) override; + virtual int MaxItems(void) override; + virtual void Clear(void) override; + virtual void SetTitle(const char *Title) override; + virtual void SetButtons(const char *Red, const char *Green = NULL, const char *Yellow = NULL, const char *Blue = NULL) override; + virtual void SetMessage(eMessageType Type, const char *Text) override; + virtual void SetItem(const char *Text, int Index, bool Current, bool Selectable) override; + virtual void SetScrollbar(int Total, int Offset) override; + virtual void SetEvent(const cEvent *Event) override; + virtual void SetRecording(const cRecording *Recording) override; + virtual void SetText(const char *Text, bool FixedFont) override; virtual int GetTextAreaWidth(void) const; virtual const cFont *GetTextAreaFont(bool FixedFont) const; - virtual void Flush(void); + virtual void Flush(void) override; }; cSkinClassicDisplayMenu::cSkinClassicDisplayMenu(void) @@ -475,15 +475,15 @@ private: int lastCurrentWidth; public: cSkinClassicDisplayReplay(bool ModeOnly); - virtual ~cSkinClassicDisplayReplay(); - virtual void SetTitle(const char *Title); - virtual void SetMode(bool Play, bool Forward, int Speed); - virtual void SetProgress(int Current, int Total); - virtual void SetCurrent(const char *Current); - virtual void SetTotal(const char *Total); - virtual void SetJump(const char *Jump); - virtual void SetMessage(eMessageType Type, const char *Text); - virtual void Flush(void); + virtual ~cSkinClassicDisplayReplay() override; + virtual void SetTitle(const char *Title) override; + virtual void SetMode(bool Play, bool Forward, int Speed) override; + virtual void SetProgress(int Current, int Total) override; + virtual void SetCurrent(const char *Current) override; + virtual void SetTotal(const char *Total) override; + virtual void SetJump(const char *Jump) override; + virtual void SetMessage(eMessageType Type, const char *Text) override; + virtual void Flush(void) override; }; cSkinClassicDisplayReplay::cSkinClassicDisplayReplay(bool ModeOnly) @@ -583,9 +583,9 @@ private: cOsd *osd; public: cSkinClassicDisplayVolume(void); - virtual ~cSkinClassicDisplayVolume(); - virtual void SetVolume(int Current, int Total, bool Mute); - virtual void Flush(void); + virtual ~cSkinClassicDisplayVolume() override; + virtual void SetVolume(int Current, int Total, bool Mute) override; + virtual void Flush(void) override; }; cSkinClassicDisplayVolume::cSkinClassicDisplayVolume(void) @@ -642,10 +642,10 @@ private: void SetItem(const char *Text, int Index, bool Current); public: cSkinClassicDisplayTracks(const char *Title, int NumTracks, const char * const *Tracks); - virtual ~cSkinClassicDisplayTracks(); - virtual void SetTrack(int Index, const char * const *Tracks); + virtual ~cSkinClassicDisplayTracks() override; + virtual void SetTrack(int Index, const char * const *Tracks) override; virtual void SetAudioChannel(int AudioChannel) {} - virtual void Flush(void); + virtual void Flush(void) override; }; cSkinClassicDisplayTracks::cSkinClassicDisplayTracks(const char *Title, int NumTracks, const char * const *Tracks) @@ -721,9 +721,9 @@ private: cOsd *osd; public: cSkinClassicDisplayMessage(void); - virtual ~cSkinClassicDisplayMessage(); - virtual void SetMessage(eMessageType Type, const char *Text); - virtual void Flush(void); + virtual ~cSkinClassicDisplayMessage() override; + virtual void SetMessage(eMessageType Type, const char *Text) override; + virtual void Flush(void) override; }; cSkinClassicDisplayMessage::cSkinClassicDisplayMessage(void) diff --git a/skinclassic.h b/skinclassic.h index 2ac69b1b..f472c1a3 100644 --- a/skinclassic.h +++ b/skinclassic.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: skinclassic.h 1.2 2005/01/02 14:38:56 kls Exp $ + * $Id: skinclassic.h 5.1 2025/03/02 11:03:35 kls Exp $ */ #ifndef __SKINCLASSIC_H @@ -15,13 +15,13 @@ class cSkinClassic : public cSkin { public: cSkinClassic(void); - virtual const char *Description(void); - virtual cSkinDisplayChannel *DisplayChannel(bool WithInfo); - virtual cSkinDisplayMenu *DisplayMenu(void); - virtual cSkinDisplayReplay *DisplayReplay(bool ModeOnly); - virtual cSkinDisplayVolume *DisplayVolume(void); - virtual cSkinDisplayTracks *DisplayTracks(const char *Title, int NumTracks, const char * const *Tracks); - virtual cSkinDisplayMessage *DisplayMessage(void); + virtual const char *Description(void) override; + virtual cSkinDisplayChannel *DisplayChannel(bool WithInfo) override; + virtual cSkinDisplayMenu *DisplayMenu(void) override; + virtual cSkinDisplayReplay *DisplayReplay(bool ModeOnly) override; + virtual cSkinDisplayVolume *DisplayVolume(void) override; + virtual cSkinDisplayTracks *DisplayTracks(const char *Title, int NumTracks, const char * const *Tracks) override; + virtual cSkinDisplayMessage *DisplayMessage(void) override; }; #endif //__SKINCLASSIC_H diff --git a/skinlcars.c b/skinlcars.c index cc06ba0a..a3d72f7d 100644 --- a/skinlcars.c +++ b/skinlcars.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: skinlcars.c 5.8 2024/12/02 12:40:56 kls Exp $ + * $Id: skinlcars.c 5.9 2025/03/02 11:03:35 kls Exp $ */ // "Star Trek: The Next Generation"(R) is a registered trademark of Paramount Pictures, @@ -373,12 +373,12 @@ private: void DrawSignal(void); public: cSkinLCARSDisplayChannel(bool WithInfo); - virtual ~cSkinLCARSDisplayChannel(); - virtual void SetChannel(const cChannel *Channel, int Number); - virtual void SetEvents(const cEvent *Present, const cEvent *Following); - virtual void SetMessage(eMessageType Type, const char *Text); - virtual void SetPositioner(const cPositioner *Positioner); - virtual void Flush(void); + virtual ~cSkinLCARSDisplayChannel() override; + virtual void SetChannel(const cChannel *Channel, int Number) override; + virtual void SetEvents(const cEvent *Present, const cEvent *Following) override; + virtual void SetMessage(eMessageType Type, const char *Text) override; + virtual void SetPositioner(const cPositioner *Positioner) override; + virtual void Flush(void) override; }; cBitmap cSkinLCARSDisplayChannel::bmTeletext(teletext_xpm); @@ -746,22 +746,22 @@ private: void DrawTextScrollbar(void); public: cSkinLCARSDisplayMenu(void); - virtual ~cSkinLCARSDisplayMenu(); - virtual void Scroll(bool Up, bool Page); - virtual int MaxItems(void); - virtual void Clear(void); - virtual void SetMenuCategory(eMenuCategory MenuCategory); - virtual void SetTitle(const char *Title); - virtual void SetButtons(const char *Red, const char *Green = NULL, const char *Yellow = NULL, const char *Blue = NULL); - virtual void SetMessage(eMessageType Type, const char *Text); - virtual void SetItem(const char *Text, int Index, bool Current, bool Selectable); - virtual void SetScrollbar(int Total, int Offset); - virtual void SetEvent(const cEvent *Event); - virtual void SetRecording(const cRecording *Recording); - virtual void SetText(const char *Text, bool FixedFont); + virtual ~cSkinLCARSDisplayMenu() override; + virtual void Scroll(bool Up, bool Page) override; + virtual int MaxItems(void) override; + virtual void Clear(void) override; + virtual void SetMenuCategory(eMenuCategory MenuCategory) override; + virtual void SetTitle(const char *Title) override; + virtual void SetButtons(const char *Red, const char *Green = NULL, const char *Yellow = NULL, const char *Blue = NULL) override; + virtual void SetMessage(eMessageType Type, const char *Text) override; + virtual void SetItem(const char *Text, int Index, bool Current, bool Selectable) override; + virtual void SetScrollbar(int Total, int Offset) override; + virtual void SetEvent(const cEvent *Event) override; + virtual void SetRecording(const cRecording *Recording) override; + virtual void SetText(const char *Text, bool FixedFont) override; virtual int GetTextAreaWidth(void) const; virtual const cFont *GetTextAreaFont(bool FixedFont) const; - virtual void Flush(void); + virtual void Flush(void) override; }; cBitmap cSkinLCARSDisplayMenu::bmArrowUp(arrowup_xpm); @@ -1801,16 +1801,16 @@ private: void DrawTrack(void); public: cSkinLCARSDisplayReplay(bool ModeOnly); - virtual ~cSkinLCARSDisplayReplay(); - virtual void SetRecording(const cRecording *Recording); - virtual void SetTitle(const char *Title); - virtual void SetMode(bool Play, bool Forward, int Speed); - virtual void SetProgress(int Current, int Total); - virtual void SetCurrent(const char *Current); - virtual void SetTotal(const char *Total); - virtual void SetJump(const char *Jump); - virtual void SetMessage(eMessageType Type, const char *Text); - virtual void Flush(void); + virtual ~cSkinLCARSDisplayReplay() override; + virtual void SetRecording(const cRecording *Recording) override; + virtual void SetTitle(const char *Title) override; + virtual void SetMode(bool Play, bool Forward, int Speed) override; + virtual void SetProgress(int Current, int Total) override; + virtual void SetCurrent(const char *Current) override; + virtual void SetTotal(const char *Total) override; + virtual void SetJump(const char *Jump) override; + virtual void SetMessage(eMessageType Type, const char *Text) override; + virtual void Flush(void) override; }; cSkinLCARSDisplayReplay::cSkinLCARSDisplayReplay(bool ModeOnly) @@ -1986,9 +1986,9 @@ private: int mute; public: cSkinLCARSDisplayVolume(void); - virtual ~cSkinLCARSDisplayVolume(); - virtual void SetVolume(int Current, int Total, bool Mute); - virtual void Flush(void); + virtual ~cSkinLCARSDisplayVolume() override; + virtual void SetVolume(int Current, int Total, bool Mute) override; + virtual void Flush(void) override; }; cSkinLCARSDisplayVolume::cSkinLCARSDisplayVolume(void) @@ -2070,10 +2070,10 @@ private: void SetItem(const char *Text, int Index, bool Current); public: cSkinLCARSDisplayTracks(const char *Title, int NumTracks, const char * const *Tracks); - virtual ~cSkinLCARSDisplayTracks(); - virtual void SetTrack(int Index, const char * const *Tracks); - virtual void SetAudioChannel(int AudioChannel); - virtual void Flush(void); + virtual ~cSkinLCARSDisplayTracks() override; + virtual void SetTrack(int Index, const char * const *Tracks) override; + virtual void SetAudioChannel(int AudioChannel) override; + virtual void Flush(void) override; }; cBitmap cSkinLCARSDisplayTracks::bmAudioLeft(audioleft_xpm); @@ -2213,9 +2213,9 @@ private: int y0, y1; public: cSkinLCARSDisplayMessage(void); - virtual ~cSkinLCARSDisplayMessage(); - virtual void SetMessage(eMessageType Type, const char *Text); - virtual void Flush(void); + virtual ~cSkinLCARSDisplayMessage() override; + virtual void SetMessage(eMessageType Type, const char *Text) override; + virtual void Flush(void) override; }; cSkinLCARSDisplayMessage::cSkinLCARSDisplayMessage(void) diff --git a/skinlcars.h b/skinlcars.h index 882e8571..a5afebb3 100644 --- a/skinlcars.h +++ b/skinlcars.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: skinlcars.h 2.1 2012/06/02 13:10:00 kls Exp $ + * $Id: skinlcars.h 5.1 2025/03/02 11:03:35 kls Exp $ */ #ifndef __SKINLCARS_H @@ -15,13 +15,13 @@ class cSkinLCARS : public cSkin { public: cSkinLCARS(void); - virtual const char *Description(void); - virtual cSkinDisplayChannel *DisplayChannel(bool WithInfo); - virtual cSkinDisplayMenu *DisplayMenu(void); - virtual cSkinDisplayReplay *DisplayReplay(bool ModeOnly); - virtual cSkinDisplayVolume *DisplayVolume(void); - virtual cSkinDisplayTracks *DisplayTracks(const char *Title, int NumTracks, const char * const *Tracks); - virtual cSkinDisplayMessage *DisplayMessage(void); + virtual const char *Description(void) override; + virtual cSkinDisplayChannel *DisplayChannel(bool WithInfo) override; + virtual cSkinDisplayMenu *DisplayMenu(void) override; + virtual cSkinDisplayReplay *DisplayReplay(bool ModeOnly) override; + virtual cSkinDisplayVolume *DisplayVolume(void) override; + virtual cSkinDisplayTracks *DisplayTracks(const char *Title, int NumTracks, const char * const *Tracks) override; + virtual cSkinDisplayMessage *DisplayMessage(void) override; }; #endif //__SKINLCARS_H diff --git a/skins.c b/skins.c index ccd57843..dcf66ce4 100644 --- a/skins.c +++ b/skins.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: skins.c 5.5 2025/02/12 21:18:53 kls Exp $ + * $Id: skins.c 5.6 2025/03/02 11:03:35 kls Exp $ */ #include "skins.h" @@ -27,7 +27,7 @@ private: cCondVar condVar; public: cSkinQueuedMessage(eMessageType Type, const char *s, int Seconds, int Timeout); - virtual ~cSkinQueuedMessage(); + virtual ~cSkinQueuedMessage() override; }; cSkinQueuedMessage::cSkinQueuedMessage(eMessageType Type, const char *s, int Seconds, int Timeout) diff --git a/skins.h b/skins.h index 15c729f2..43f56e9f 100644 --- a/skins.h +++ b/skins.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: skins.h 5.6 2024/09/19 09:49:02 kls Exp $ + * $Id: skins.h 5.7 2025/03/02 11:03:35 kls Exp $ */ #ifndef __SKINS_H @@ -77,7 +77,7 @@ public: virtual void SetEvents(const cEvent *Present, const cEvent *Following) = 0; ///< Sets the Present and Following EPG events. If either of these ///< is not available, NULL will be given. - virtual void SetMessage(eMessageType Type, const char *Text) = 0; + virtual void SetMessage(eMessageType Type, const char *Text) override = 0; ///< Sets a one line message Text, with the given Type. Type can be used ///< to determine, e.g., the colors for displaying the Text. ///< If Text is NULL, any previously displayed message must be removed, and @@ -216,7 +216,7 @@ public: virtual void SetButtons(const char *Red, const char *Green = NULL, const char *Yellow = NULL, const char *Blue = NULL) = 0; ///< Sets the color buttons to the given strings. If any of the values is ///< NULL, any previous text must be removed from the related button. - virtual void SetMessage(eMessageType Type, const char *Text) = 0; + virtual void SetMessage(eMessageType Type, const char *Text) override = 0; ///< Sets a one line message Text, with the given Type. Type can be used ///< to determine, e.g., the colors for displaying the Text. ///< If Text is NULL, any previously displayed message must be removed, and @@ -360,7 +360,7 @@ public: ///< needs to be able to handle variations in the length of this ///< string, which will occur when the user enters an actual value. ///< If Jump is NULL, the jump prompt shall be removed from the display. - virtual void SetMessage(eMessageType Type, const char *Text) = 0; + virtual void SetMessage(eMessageType Type, const char *Text) override = 0; ///< Sets a one line message Text, with the given Type. Type can be used ///< to determine, e.g., the colors for displaying the Text. ///< If Text is NULL, any previously displayed message must be removed, and @@ -390,7 +390,7 @@ public: class cSkinDisplayMessage : public cSkinDisplay { ///< This class implements a simple message display. public: - virtual void SetMessage(eMessageType Type, const char *Text) = 0; + virtual void SetMessage(eMessageType Type, const char *Text) override = 0; ///< Sets the message to Text. Type can be used to decide how to display ///< the message, for instance in which colors. }; @@ -413,7 +413,7 @@ public: ///< be done in the pure functions below. ///< A cSkin object must be created on the heap and shall not be ///< explicitly deleted. - virtual ~cSkin(); + virtual ~cSkin() override; const char *Name(void) { return name; } cTheme *Theme(void) { return theme; } virtual const char *Description(void) = 0; @@ -504,7 +504,7 @@ public: ///< Processes the first queued message, if any. void Flush(void); ///< Flushes the currently active cSkinDisplay, if any. - virtual void Clear(void); + virtual void Clear(void) override; ///< Free up all registered skins }; diff --git a/skinsttng.c b/skinsttng.c index 93f11d32..7bb3f78e 100644 --- a/skinsttng.c +++ b/skinsttng.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: skinsttng.c 5.4 2024/09/21 10:53:07 kls Exp $ + * $Id: skinsttng.c 5.5 2025/03/02 11:03:35 kls Exp $ */ // "Star Trek: The Next Generation"(R) is a registered trademark of Paramount Pictures @@ -146,11 +146,11 @@ private: static cBitmap bmTeletext, bmRadio, bmAudio, bmDolbyDigital, bmEncrypted, bmRecording; public: cSkinSTTNGDisplayChannel(bool WithInfo); - virtual ~cSkinSTTNGDisplayChannel(); - virtual void SetChannel(const cChannel *Channel, int Number); - virtual void SetEvents(const cEvent *Present, const cEvent *Following); - virtual void SetMessage(eMessageType Type, const char *Text); - virtual void Flush(void); + virtual ~cSkinSTTNGDisplayChannel() override; + virtual void SetChannel(const cChannel *Channel, int Number) override; + virtual void SetEvents(const cEvent *Present, const cEvent *Following) override; + virtual void SetMessage(eMessageType Type, const char *Text) override; + virtual void Flush(void) override; }; cBitmap cSkinSTTNGDisplayChannel::bmTeletext(teletext_xpm); @@ -412,21 +412,21 @@ private: void SetTextScrollbar(void); public: cSkinSTTNGDisplayMenu(void); - virtual ~cSkinSTTNGDisplayMenu(); - virtual void Scroll(bool Up, bool Page); - virtual int MaxItems(void); - virtual void Clear(void); - virtual void SetTitle(const char *Title); - virtual void SetButtons(const char *Red, const char *Green = NULL, const char *Yellow = NULL, const char *Blue = NULL); - virtual void SetMessage(eMessageType Type, const char *Text); - virtual void SetItem(const char *Text, int Index, bool Current, bool Selectable); - virtual void SetScrollbar(int Total, int Offset); - virtual void SetEvent(const cEvent *Event); - virtual void SetRecording(const cRecording *Recording); - virtual void SetText(const char *Text, bool FixedFont); + virtual ~cSkinSTTNGDisplayMenu() override; + virtual void Scroll(bool Up, bool Page) override; + virtual int MaxItems(void) override; + virtual void Clear(void) override; + virtual void SetTitle(const char *Title) override; + virtual void SetButtons(const char *Red, const char *Green = NULL, const char *Yellow = NULL, const char *Blue = NULL) override; + virtual void SetMessage(eMessageType Type, const char *Text) override; + virtual void SetItem(const char *Text, int Index, bool Current, bool Selectable) override; + virtual void SetScrollbar(int Total, int Offset) override; + virtual void SetEvent(const cEvent *Event) override; + virtual void SetRecording(const cRecording *Recording) override; + virtual void SetText(const char *Text, bool FixedFont) override; virtual int GetTextAreaWidth(void) const; virtual const cFont *GetTextAreaFont(bool FixedFont) const; - virtual void Flush(void); + virtual void Flush(void) override; }; cSkinSTTNGDisplayMenu::cSkinSTTNGDisplayMenu(void) @@ -807,15 +807,15 @@ private: int lastCurrentWidth; public: cSkinSTTNGDisplayReplay(bool ModeOnly); - virtual ~cSkinSTTNGDisplayReplay(); - virtual void SetTitle(const char *Title); - virtual void SetMode(bool Play, bool Forward, int Speed); - virtual void SetProgress(int Current, int Total); - virtual void SetCurrent(const char *Current); - virtual void SetTotal(const char *Total); - virtual void SetJump(const char *Jump); - virtual void SetMessage(eMessageType Type, const char *Text); - virtual void Flush(void); + virtual ~cSkinSTTNGDisplayReplay() override; + virtual void SetTitle(const char *Title) override; + virtual void SetMode(bool Play, bool Forward, int Speed) override; + virtual void SetProgress(int Current, int Total) override; + virtual void SetCurrent(const char *Current) override; + virtual void SetTotal(const char *Total) override; + virtual void SetJump(const char *Jump) override; + virtual void SetMessage(eMessageType Type, const char *Text) override; + virtual void Flush(void) override; }; cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(bool ModeOnly) @@ -958,9 +958,9 @@ private: int mute; public: cSkinSTTNGDisplayVolume(void); - virtual ~cSkinSTTNGDisplayVolume(); - virtual void SetVolume(int Current, int Total, bool Mute); - virtual void Flush(void); + virtual ~cSkinSTTNGDisplayVolume() override; + virtual void SetVolume(int Current, int Total, bool Mute) override; + virtual void Flush(void) override; }; cSkinSTTNGDisplayVolume::cSkinSTTNGDisplayVolume(void) @@ -1052,10 +1052,10 @@ private: void SetItem(const char *Text, int Index, bool Current); public: cSkinSTTNGDisplayTracks(const char *Title, int NumTracks, const char * const *Tracks); - virtual ~cSkinSTTNGDisplayTracks(); - virtual void SetTrack(int Index, const char * const *Tracks); - virtual void SetAudioChannel(int AudioChannel); - virtual void Flush(void); + virtual ~cSkinSTTNGDisplayTracks() override; + virtual void SetTrack(int Index, const char * const *Tracks) override; + virtual void SetAudioChannel(int AudioChannel) override; + virtual void Flush(void) override; }; cBitmap cSkinSTTNGDisplayTracks::bmAudioLeft(audioleft_xpm); @@ -1212,9 +1212,9 @@ private: int y0, y1; public: cSkinSTTNGDisplayMessage(void); - virtual ~cSkinSTTNGDisplayMessage(); - virtual void SetMessage(eMessageType Type, const char *Text); - virtual void Flush(void); + virtual ~cSkinSTTNGDisplayMessage() override; + virtual void SetMessage(eMessageType Type, const char *Text) override; + virtual void Flush(void) override; }; cSkinSTTNGDisplayMessage::cSkinSTTNGDisplayMessage(void) diff --git a/skinsttng.h b/skinsttng.h index 11a96422..3d9a9c7a 100644 --- a/skinsttng.h +++ b/skinsttng.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: skinsttng.h 1.2 2005/01/02 14:39:29 kls Exp $ + * $Id: skinsttng.h 5.1 2025/03/02 11:03:35 kls Exp $ */ #ifndef __SKINSTTNG_H @@ -15,13 +15,13 @@ class cSkinSTTNG : public cSkin { public: cSkinSTTNG(void); - virtual const char *Description(void); - virtual cSkinDisplayChannel *DisplayChannel(bool WithInfo); - virtual cSkinDisplayMenu *DisplayMenu(void); - virtual cSkinDisplayReplay *DisplayReplay(bool ModeOnly); - virtual cSkinDisplayVolume *DisplayVolume(void); - virtual cSkinDisplayTracks *DisplayTracks(const char *Title, int NumTracks, const char * const *Tracks); - virtual cSkinDisplayMessage *DisplayMessage(void); + virtual const char *Description(void) override; + virtual cSkinDisplayChannel *DisplayChannel(bool WithInfo) override; + virtual cSkinDisplayMenu *DisplayMenu(void) override; + virtual cSkinDisplayReplay *DisplayReplay(bool ModeOnly) override; + virtual cSkinDisplayVolume *DisplayVolume(void) override; + virtual cSkinDisplayTracks *DisplayTracks(const char *Title, int NumTracks, const char * const *Tracks) override; + virtual cSkinDisplayMessage *DisplayMessage(void) override; }; #endif //__SKINSTTNG_H diff --git a/status.h b/status.h index f89c8b80..b847f9d8 100644 --- a/status.h +++ b/status.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: status.h 5.3 2025/02/12 21:18:53 kls Exp $ + * $Id: status.h 5.4 2025/03/02 11:03:35 kls Exp $ */ #ifndef __STATUS_H @@ -109,7 +109,7 @@ protected: // The OSD displays the given programme information. public: cStatus(void); - virtual ~cStatus(); + virtual ~cStatus() override; // These functions are called whenever the related status information changes: static void MsgChannelChange(const cChannel *Channel); static void MsgTimerChange(const cTimer *Timer, eTimerChange Change); diff --git a/svdrp.c b/svdrp.c index be40a38b..e07354c2 100644 --- a/svdrp.c +++ b/svdrp.c @@ -10,7 +10,7 @@ * and interact with the Video Disk Recorder - or write a full featured * graphical interface that sits on top of an SVDRP connection. * - * $Id: svdrp.c 5.10 2024/09/09 13:39:05 kls Exp $ + * $Id: svdrp.c 5.11 2025/03/02 11:03:35 kls Exp $ */ #include "svdrp.h" @@ -600,10 +600,10 @@ private: void ProcessConnections(void); cSVDRPClient *GetClientForServer(const char *ServerName); protected: - virtual void Action(void); + virtual void Action(void) override; public: cSVDRPClientHandler(int TcpPort, int UdpPort); - virtual ~cSVDRPClientHandler(); + virtual ~cSVDRPClientHandler() override; void AddClient(cSVDRPServerParams &ServerParams, const char *IpAddress); bool Execute(const char *ServerName, const char *Command, cStringList *Response = NULL); bool GetServerNames(cStringList *ServerNames); @@ -2746,10 +2746,10 @@ private: void HandleServerConnection(void); void ProcessConnections(void); protected: - virtual void Action(void); + virtual void Action(void) override; public: cSVDRPServerHandler(int TcpPort); - virtual ~cSVDRPServerHandler(); + virtual ~cSVDRPServerHandler() override; void WaitUntilReady(void); }; diff --git a/timers.h b/timers.h index 853fba00..bdc823dd 100644 --- a/timers.h +++ b/timers.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: timers.h 5.11 2024/03/06 14:37:15 kls Exp $ + * $Id: timers.h 5.12 2025/03/02 11:03:35 kls Exp $ */ #ifndef __TIMERS_H @@ -57,10 +57,10 @@ public: cTimer(bool Instant = false, bool Pause = false, const cChannel *Channel = NULL); cTimer(const cEvent *Event, const char *FileName = NULL, const cTimer *PatternTimer = NULL); cTimer(const cTimer &Timer); - virtual ~cTimer(); + virtual ~cTimer() override; cTimer& operator= (const cTimer &Timer); void CalcMargins(int &MarginStart, int &MarginStop, const cEvent *Event); - virtual int Compare(const cListObject &ListObject) const; + virtual int Compare(const cListObject &ListObject) const override; int Id(void) const { return id; } bool Recording(void) const { return HasFlags(tfRecording); } bool Pending(void) const { return pending; } diff --git a/tools.h b/tools.h index 3b9b7df3..b14e468b 100644 --- a/tools.h +++ b/tools.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.h 5.11 2025/01/13 13:18:42 kls Exp $ + * $Id: tools.h 5.12 2025/03/02 11:03:35 kls Exp $ */ #ifndef __TOOLS_H @@ -838,7 +838,7 @@ inline int CompareStringsNumerically(const void *a, const void *b) class cStringList : public cVector { public: cStringList(int Allocated = 10): cVector(Allocated) {} - virtual ~cStringList(); + virtual ~cStringList() override; int Find(const char *s) const; void Sort(bool IgnoreCase = false) { @@ -851,7 +851,7 @@ public: { cVector::Sort(CompareStringsNumerically); } - virtual void Clear(void); + virtual void Clear(void) override; }; class cFileNameList : public cStringList { diff --git a/transfer.h b/transfer.h index a10ed7b2..56cfb7ae 100644 --- a/transfer.h +++ b/transfer.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: transfer.h 4.2 2017/12/07 14:56:22 kls Exp $ + * $Id: transfer.h 5.1 2025/03/02 11:03:35 kls Exp $ */ #ifndef __TRANSFER_H @@ -20,11 +20,11 @@ private: int numLostPackets; cPatPmtGenerator patPmtGenerator; protected: - virtual void Activate(bool On); - virtual void Receive(const uchar *Data, int Length); + virtual void Activate(bool On) override; + virtual void Receive(const uchar *Data, int Length) override; public: cTransfer(const cChannel *Channel); - virtual ~cTransfer(); + virtual ~cTransfer() override; }; class cTransferControl : public cControl { @@ -34,7 +34,7 @@ private: public: cTransferControl(cDevice *ReceiverDevice, const cChannel *Channel); ~cTransferControl(); - virtual void Hide(void) {} + virtual void Hide(void) override {} static cDevice *ReceiverDevice(void) { return receiverDevice; } };