mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Disabled/removed deprecated code
This commit is contained in:
parent
930e3b4200
commit
8d82b05071
21
HISTORY
21
HISTORY
@ -9951,3 +9951,24 @@ Video Disk Recorder Revision History
|
||||
Device->SetPowerSaveIfUnused() low.
|
||||
- Added the lines from 'Fixed a timeout in cDvbDevice while tuning after the frontend
|
||||
has been reopened' to cDvbTuner::ProvidesFrontend() (suggested by Markus Ehrnsperger).
|
||||
|
||||
2024-07-15:
|
||||
|
||||
- Removed deprecated function cDevice::SetCurrentChannel(const cChannel *Channel).
|
||||
- Removed deprecated function cSkinDisplayMenu::SetItemEvent(const cEvent *Event, int Index,
|
||||
bool Current, bool Selectable, const cChannel *Channel, bool WithDate, eTimerMatch TimerMatch).
|
||||
- Removed deprecated functions from cFile.
|
||||
- The default for DEPRECATED_SCHEDULE_GET_EVENT has been set to 0, which means that
|
||||
the function GetEvent(tEventID EventID, time_t StartTime = 0) is no longer available.
|
||||
You can add 'DEPRECATED_SCHEDULE_GET_EVENT=1' when compiling in order to restore this
|
||||
functionality. However, it is recommended to use GetEventById() and GetEventByTime()
|
||||
instead.
|
||||
- The default for DEPRECATED_SECTIONSYNCER_SYNC_REPEAT has been set to 0, which means that
|
||||
the functions Repeat() and Sync() are no longer available.
|
||||
You can add 'DEPRECATED_SECTIONSYNCER_SYNC_REPEAT=1' when compiling in order to restore this
|
||||
functionality. However, it is recommended to use Check() and Processed() instead.
|
||||
- The default for DEPRECATED_CCONTROL has been set to 0, which means that
|
||||
the function Control(bool Hidden) is no longer available.
|
||||
You can add 'DEPRECATED_CCONTROL=1' when compiling in order to restore this
|
||||
functionality. However, it is recommended to use Control(cMutexLock &MutexLock, bool Hidden)
|
||||
instead.
|
||||
|
8
device.h
8
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.5 2024/07/06 11:19:21 kls Exp $
|
||||
* $Id: device.h 5.6 2024/07/15 14:42:22 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __DEVICE_H
|
||||
@ -370,12 +370,6 @@ protected:
|
||||
public:
|
||||
static int CurrentChannel(void) { return primaryDevice ? currentChannel : 0; }
|
||||
///< Returns the number of the current channel on the primary device.
|
||||
#ifndef DEPRECATED_SETCURRENTCHANNEL
|
||||
#define DEPRECATED_SETCURRENTCHANNEL 0
|
||||
#endif
|
||||
#if DEPRECATED_SETCURRENTCHANNEL
|
||||
static void SetCurrentChannel(const cChannel *Channel) { currentChannel = Channel ? Channel->Number() : 0; }
|
||||
#endif
|
||||
static void SetCurrentChannel(int ChannelNumber) { currentChannel = ChannelNumber; }
|
||||
///< Sets the number of the current channel on the primary device, without
|
||||
///< actually switching to it. This can be used to correct the current
|
||||
|
6
epg.h
6
epg.h
@ -7,7 +7,7 @@
|
||||
* Original version (as used in VDR before 1.3.0) written by
|
||||
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
|
||||
*
|
||||
* $Id: epg.h 5.3 2022/12/24 11:37:17 kls Exp $
|
||||
* $Id: epg.h 5.4 2024/07/15 14:42:22 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __EPG_H
|
||||
@ -187,7 +187,9 @@ public:
|
||||
const cList<cEvent> *Events(void) const { return &events; }
|
||||
const cEvent *GetPresentEvent(void) const;
|
||||
const cEvent *GetFollowingEvent(void) const;
|
||||
#define DEPRECATED_SCHEDULE_GET_EVENT 1
|
||||
#ifndef DEPRECATED_SCHEDULE_GET_EVENT
|
||||
#define DEPRECATED_SCHEDULE_GET_EVENT 0
|
||||
#endif
|
||||
#if DEPRECATED_SCHEDULE_GET_EVENT
|
||||
const cEvent *GetEvent(tEventID EventID, time_t StartTime = 0) const;
|
||||
#endif
|
||||
|
6
filter.h
6
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.1 2021/03/16 15:10:54 kls Exp $
|
||||
* $Id: filter.h 5.2 2024/07/15 14:42:22 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __FILTER_H
|
||||
@ -13,7 +13,9 @@
|
||||
#include <sys/types.h>
|
||||
#include "tools.h"
|
||||
|
||||
#define DEPRECATED_SECTIONSYNCER_SYNC_REPEAT 1
|
||||
#ifndef DEPRECATED_SECTIONSYNCER_SYNC_REPEAT
|
||||
#define DEPRECATED_SECTIONSYNCER_SYNC_REPEAT 0
|
||||
#endif
|
||||
|
||||
class cSectionSyncer {
|
||||
private:
|
||||
|
6
player.h
6
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.1 2022/12/05 14:45:51 kls Exp $
|
||||
* $Id: player.h 5.2 2024/07/15 14:42:22 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __PLAYER_H
|
||||
@ -115,7 +115,9 @@ public:
|
||||
static void Launch(cControl *Control);
|
||||
static void Attach(void);
|
||||
static void Shutdown(void);
|
||||
#define DEPRECATED_CCONTROL 1
|
||||
#ifndef DEPRECATED_CCONTROL
|
||||
#define DEPRECATED_CCONTROL 0
|
||||
#endif
|
||||
#if DEPRECATED_CCONTROL
|
||||
static cControl *Control(bool Hidden = false);
|
||||
///< Old version of this function, for backwards compatibility with plugins.
|
||||
|
11
skins.h
11
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.3 2024/07/13 09:12:18 kls Exp $
|
||||
* $Id: skins.h 5.4 2024/07/15 14:42:22 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __SKINS_H
|
||||
@ -244,15 +244,6 @@ public:
|
||||
///< If the skin displays the Event item in its own way, it shall return true.
|
||||
///< The default implementation does nothing and returns false, which results in
|
||||
///< a call to SetItem() with a proper text.
|
||||
#ifndef DEPRECATED_SKIN_SETITEMEVENT
|
||||
#define DEPRECATED_SKIN_SETITEMEVENT 0
|
||||
#endif
|
||||
#if DEPRECATED_SKIN_SETITEMEVENT
|
||||
virtual bool SetItemEvent(const cEvent *Event, int Index, bool Current, bool Selectable, const cChannel *Channel, bool WithDate, eTimerMatch TimerMatch) { return SetItemEvent(Event, Index, Current, Selectable, Channel, WithDate, TimerMatch, true); }
|
||||
///< This function is here for comaptibility with older plugins and may be removed
|
||||
///< in a future version. Use the above version of SetItemEvent() with the TimerActive
|
||||
///< parameter instead.
|
||||
#endif
|
||||
virtual bool SetItemTimer(const cTimer *Timer, int Index, bool Current, bool Selectable) { return false; }
|
||||
///< Sets the item at the given Index to Timer. See SetItem() for more information.
|
||||
///< If a derived skin class implements this function, it can display a Timer item
|
||||
|
63
tools.c
63
tools.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: tools.c 5.12 2024/07/10 14:50:07 kls Exp $
|
||||
* $Id: tools.c 5.13 2024/07/15 14:42:22 kls Exp $
|
||||
*/
|
||||
|
||||
#include "tools.h"
|
||||
@ -1664,11 +1664,6 @@ bool cFileNameList::Load(const char *Directory, bool DirsOnly)
|
||||
|
||||
// --- cFile -----------------------------------------------------------------
|
||||
|
||||
#if DEPRECATED_CFILE
|
||||
bool cFile::files[FD_SETSIZE] = { false };
|
||||
int cFile::maxFiles = 0;
|
||||
#endif
|
||||
|
||||
cFile::cFile(void)
|
||||
{
|
||||
f = -1;
|
||||
@ -1690,24 +1685,8 @@ bool cFile::Open(const char *FileName, int Flags, mode_t Mode)
|
||||
bool cFile::Open(int FileDes)
|
||||
{
|
||||
if (FileDes >= 0) {
|
||||
if (!IsOpen()) {
|
||||
if (!IsOpen())
|
||||
f = FileDes;
|
||||
#if DEPRECATED_CFILE
|
||||
if (f >= 0) {
|
||||
if (f < FD_SETSIZE) {
|
||||
if (f >= maxFiles)
|
||||
maxFiles = f + 1;
|
||||
if (!files[f])
|
||||
files[f] = true;
|
||||
else
|
||||
esyslog("ERROR: file descriptor %d already in files[]", f);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
esyslog("ERROR: file descriptor %d is larger than FD_SETSIZE (%d)", f, FD_SETSIZE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
esyslog("ERROR: attempt to re-open file descriptor %d", FileDes);
|
||||
}
|
||||
@ -1718,9 +1697,6 @@ void cFile::Close(void)
|
||||
{
|
||||
if (f >= 0) {
|
||||
close(f);
|
||||
#if DEPRECATED_CFILE
|
||||
files[f] = false;
|
||||
#endif
|
||||
f = -1;
|
||||
}
|
||||
}
|
||||
@ -1730,26 +1706,6 @@ bool cFile::Ready(bool Wait)
|
||||
return f >= 0 && FileReady(f, Wait ? 1000 : 0);
|
||||
}
|
||||
|
||||
#if DEPRECATED_CFILE
|
||||
bool cFile::AnyFileReady(int FileDes, int TimeoutMs)
|
||||
{
|
||||
fd_set set;
|
||||
FD_ZERO(&set);
|
||||
for (int i = 0; i < maxFiles; i++) {
|
||||
if (files[i])
|
||||
FD_SET(i, &set);
|
||||
}
|
||||
if (0 <= FileDes && FileDes < FD_SETSIZE && !files[FileDes])
|
||||
FD_SET(FileDes, &set); // in case we come in with an arbitrary descriptor
|
||||
if (TimeoutMs == 0)
|
||||
TimeoutMs = 10; // load gets too heavy with 0
|
||||
struct timeval timeout;
|
||||
timeout.tv_sec = TimeoutMs / 1000;
|
||||
timeout.tv_usec = (TimeoutMs % 1000) * 1000;
|
||||
return select(FD_SETSIZE, &set, NULL, NULL, &timeout) > 0 && (FileDes < 0 || FD_ISSET(FileDes, &set));
|
||||
}
|
||||
#endif
|
||||
|
||||
bool cFile::FileReady(int FileDes, int TimeoutMs)
|
||||
{
|
||||
fd_set set;
|
||||
@ -1765,21 +1721,6 @@ bool cFile::FileReady(int FileDes, int TimeoutMs)
|
||||
return select(FD_SETSIZE, &set, NULL, NULL, (TimeoutMs >= 0) ? &timeout : NULL) > 0 && FD_ISSET(FileDes, &set);
|
||||
}
|
||||
|
||||
#if DEPRECATED_CFILE
|
||||
bool cFile::FileReadyForWriting(int FileDes, int TimeoutMs)
|
||||
{
|
||||
fd_set set;
|
||||
struct timeval timeout;
|
||||
FD_ZERO(&set);
|
||||
FD_SET(FileDes, &set);
|
||||
if (TimeoutMs < 100)
|
||||
TimeoutMs = 100;
|
||||
timeout.tv_sec = 0;
|
||||
timeout.tv_usec = TimeoutMs * 1000;
|
||||
return select(FD_SETSIZE, NULL, &set, NULL, &timeout) > 0 && FD_ISSET(FileDes, &set);
|
||||
}
|
||||
#endif
|
||||
|
||||
// --- cSafeFile -------------------------------------------------------------
|
||||
|
||||
cSafeFile::cSafeFile(const char *FileName)
|
||||
|
15
tools.h
15
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.8 2024/01/20 13:59:55 kls Exp $
|
||||
* $Id: tools.h 5.9 2024/07/15 14:42:22 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __TOOLS_H
|
||||
@ -460,15 +460,8 @@ public:
|
||||
struct dirent *Next(void);
|
||||
};
|
||||
|
||||
#ifndef DEPRECATED_CFILE
|
||||
#define DEPRECATED_CFILE 0
|
||||
#endif
|
||||
class cFile {
|
||||
private:
|
||||
#if DEPRECATED_CFILE
|
||||
static bool files[];
|
||||
static int maxFiles;
|
||||
#endif
|
||||
int f;
|
||||
public:
|
||||
cFile(void);
|
||||
@ -479,13 +472,7 @@ public:
|
||||
void Close(void);
|
||||
bool IsOpen(void) { return f >= 0; }
|
||||
bool Ready(bool Wait = true);
|
||||
#if DEPRECATED_CFILE
|
||||
static bool AnyFileReady(int FileDes = -1, int TimeoutMs = 1000);
|
||||
#endif
|
||||
static bool FileReady(int FileDes, int TimeoutMs = 1000);
|
||||
#if DEPRECATED_CFILE
|
||||
static bool FileReadyForWriting(int FileDes, int TimeoutMs = 1000);
|
||||
#endif
|
||||
};
|
||||
|
||||
class cSafeFile {
|
||||
|
Loading…
x
Reference in New Issue
Block a user