summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Neumann <fnu@yavdr.org>2017-05-07 11:17:04 +0200
committerFrank Neumann <fnu@yavdr.org>2017-05-07 11:17:04 +0200
commit089dacafdf8b91155486e10e4cb32a791a771182 (patch)
treefb9b44bd792790b639f258db137d7cb138368252
parent2697e779f4034db48f342835cd40269693a2aacd (diff)
downloadvdr-plugin-epgsearch-089dacafdf8b91155486e10e4cb32a791a771182.tar.gz
vdr-plugin-epgsearch-089dacafdf8b91155486e10e4cb32a791a771182.tar.bz2
Drop legacy code prior VDR 2.0.0
-rw-r--r--changrp.c4
-rw-r--r--conflictcheck.c4
-rw-r--r--conflictcheck.h10
-rw-r--r--epgsearchcfg.c4
-rw-r--r--epgsearchext.c3
-rw-r--r--epgsearchsetup.c2
-rw-r--r--epgsearchtools.c2
-rw-r--r--epgsearchtools.h6
-rw-r--r--menu_announcelist.c2
-rw-r--r--menu_blacklistedit.c2
-rw-r--r--menu_blacklists.c2
-rw-r--r--menu_commands.c2
-rw-r--r--menu_conflictcheck.c4
-rw-r--r--menu_deftimercheckmethod.c2
-rw-r--r--menu_dirselect.c6
-rw-r--r--menu_dirselect.h2
-rw-r--r--menu_event.c2
-rw-r--r--menu_main.c2
-rw-r--r--menu_myedittimer.c2
-rw-r--r--menu_recsdone.c2
-rw-r--r--menu_search.c2
-rw-r--r--menu_searchactions.c2
-rw-r--r--menu_searchedit.c18
-rw-r--r--menu_searchresults.c14
-rw-r--r--menu_searchtemplate.c2
-rw-r--r--menu_switchtimers.c4
-rw-r--r--menu_timersdone.c2
-rw-r--r--menu_whatson.c6
-rw-r--r--recstatus.c28
-rw-r--r--searchtimer_thread.c17
30 files changed, 0 insertions, 160 deletions
diff --git a/changrp.c b/changrp.c
index 66cd6a1..d45b229 100644
--- a/changrp.c
+++ b/changrp.c
@@ -305,9 +305,7 @@ void cMenuChannelGroupItem::Set(void)
cMenuChannelGroups::cMenuChannelGroups(char** GroupName)
:cOsdMenu(tr("Channel groups"),20)
{
-#if VDRVERSNUM >= 10734
SetMenuCategory(mcSetupPlugins);
-#endif
groupSel = -1;
groupName = GroupName;
if (groupName && *groupName)
@@ -410,9 +408,7 @@ eOSState cMenuChannelGroups::ProcessKey(eKeys Key)
cMenuEditChannelGroup::cMenuEditChannelGroup(cChannelGroup *Group, bool New)
:cOsdMenu(tr("Edit channel group"),30)
{
-#if VDRVERSNUM >= 10734
SetMenuCategory(mcSetupPlugins);
-#endif
group = Group;
channelSel = group->CreateChannelSel();
strcpy(name, group->name);
diff --git a/conflictcheck.c b/conflictcheck.c
index eb7fa57..c4552d4 100644
--- a/conflictcheck.c
+++ b/conflictcheck.c
@@ -205,14 +205,11 @@ void cConflictCheck::InitDevicesInfo()
devices[i].device = cDevice::GetDevice(i);
#endif
-#if APIVERSNUM > 10721
BondDevices(Setup.DeviceBondings);
-#endif
}
void cConflictCheck::BondDevices(const char *Bondings)
{
-#if APIVERSNUM > 10721
LogFile.Log(3, "Bond Devices");
if (Bondings) {
cSatCableNumbers SatCableNumbers(MAXDEVICES, Bondings);
@@ -227,7 +224,6 @@ void cConflictCheck::BondDevices(const char *Bondings)
}
}
LogFile.Log(3, "Bond Devices done.");
-#endif
}
diff --git a/conflictcheck.h b/conflictcheck.h
index 089c367..291fd37 100644
--- a/conflictcheck.h
+++ b/conflictcheck.h
@@ -165,20 +165,12 @@ class cConflictCheckDevice
result = true;
#ifdef DO_REC_AND_PLAY_ON_PRIMARY_DEVICE
else
-#if APIVERSNUM < 10725
- result = Priority >= Setup.PrimaryLimit;
-#else
result = Priority >= 0;
#endif
#endif
-#endif
}
else
-#if APIVERSNUM < 10725
- result = !IsPrimaryDevice() || Priority >= Setup.PrimaryLimit;
-#else
result = !IsPrimaryDevice() || Priority >= 0;
-#endif
}
else
needsDetachReceivers = true;
@@ -234,7 +226,6 @@ class cConflictCheckDevice
cString GetBondingParams(const cChannel *Channel) const //copied from cDVBTuner
{
-#if APIVERSNUM > 10721
cDvbTransponderParameters dtp(Channel->Parameters());
if (Setup.DiSEqC) {
if (const cDiseqc *diseqc = Diseqcs.Get(device->CardIndex() + 1, Channel->Source(), Channel->Frequency(), dtp.Polarization(), NULL))
@@ -245,7 +236,6 @@ class cConflictCheckDevice
bool VoltOff = dtp.Polarization() == 'V' || dtp.Polarization() == 'R';
return cString::sprintf("%c %c", ToneOff ? 't' : 'T', VoltOff ? 'v' : 'V');
}
-#endif
return "";
}
};
diff --git a/epgsearchcfg.c b/epgsearchcfg.c
index f09f957..25fcb42 100644
--- a/epgsearchcfg.c
+++ b/epgsearchcfg.c
@@ -35,11 +35,7 @@ cEPGSearchConfig::cEPGSearchConfig(void)
showChannelNr = 0;
useSearchTimers = 0;
UpdateIntervall = 30;
-#if APIVERSNUM >= 10715
SVDRPPort = 6419;
-#else
- SVDRPPort = 2001;
-#endif
timeShiftValue = 30;
toggleGreenYellow = 1;
StartMenu = 0;
diff --git a/epgsearchext.c b/epgsearchext.c
index 9d11c3b..1a050fa 100644
--- a/epgsearchext.c
+++ b/epgsearchext.c
@@ -1453,9 +1453,6 @@ void cSearchExt::SetContentFilter(int* contentStringsFlags)
bool cSearchExt::MatchesContentsFilter(const cEvent* e)
{
-#if APIVERSNUM < 10711
- return true;
-#else
if (!e) return false;
// check if each content filter ID is contained in the events descriptors
for(unsigned int i=0; i<contentsFilter.size();i+=2)
diff --git a/epgsearchsetup.c b/epgsearchsetup.c
index 72ac690..5ca7952 100644
--- a/epgsearchsetup.c
+++ b/epgsearchsetup.c
@@ -54,9 +54,7 @@ const char *cMenuSetupMailNotification::MailBoxChars = " abcdefghijklmnopqrs
cMenuSetupSubMenu::cMenuSetupSubMenu(const char* Title, cEPGSearchConfig* Data)
: cOsdMenu(Title, 33)
{
-#if VDRVERSNUM >= 10734
SetMenuCategory(mcSetupPlugins);
-#endif
data = Data;
}
diff --git a/epgsearchtools.c b/epgsearchtools.c
index 6f7485a..c936d0e 100644
--- a/epgsearchtools.c
+++ b/epgsearchtools.c
@@ -986,7 +986,6 @@ long getAddrFromString(const char* hostnameOrIp, struct sockaddr_in* addr)
}
}
-#if VDRVERSNUM >= 10712
char *cCommand::result = NULL;
cCommand::cCommand(void)
@@ -1049,4 +1048,3 @@ const char *cCommand::Execute(const char *Parameters)
esyslog("ERROR: can't open pipe for command '%s'", cmd);
return result;
}
-#endif
diff --git a/epgsearchtools.h b/epgsearchtools.h
index dc68f8b..d9d72ac 100644
--- a/epgsearchtools.h
+++ b/epgsearchtools.h
@@ -31,10 +31,6 @@ The project's page is at http://winni.vdr-developer.org/epgsearch
using std::string;
-#if VDRVERSNUM < 10733
-#define eTimerMatch int
-#endif
-
#define MAXPARSEBUFFER KILOBYTE(10)
#undef CHANNELNAME
@@ -253,7 +249,6 @@ typedef std::basic_string<char,ignorecase_traits> icstring;
// --- eTimerMod -------------------------------------------------------------
enum eTimerMod { tmNoChange=0, tmStartStop=1, tmFile=2, tmAuxEventID=4 };
-#if VDRVERSNUM >= 10712
// --- cCommands -------------------------------------------------------------------
class cCommand : public cListObject {
private:
@@ -271,6 +266,5 @@ public:
};
class cCommands : public cConfig<cCommand> {};
-#endif
#endif
diff --git a/menu_announcelist.c b/menu_announcelist.c
index 6034ca2..5a80b62 100644
--- a/menu_announcelist.c
+++ b/menu_announcelist.c
@@ -88,9 +88,7 @@ eOSState cMenuAnnounceList::ProcessKey(eKeys Key)
cMenuAnnounceDetails::cMenuAnnounceDetails(const cEvent* Event, const cSearchExt* Search)
:cOsdMenu("", 25), event(Event)
{
-#if VDRVERSNUM >= 10728
SetMenuCategory(mcEvent);
-#endif
cMenuAnnounceList::showsDetails = true;
if (event && !isempty(event->Title()))
{
diff --git a/menu_blacklistedit.c b/menu_blacklistedit.c
index 4173cdb..e9b5e8c 100644
--- a/menu_blacklistedit.c
+++ b/menu_blacklistedit.c
@@ -42,9 +42,7 @@ extern const char AllowedChars[];
cMenuBlacklistEdit::cMenuBlacklistEdit(cBlacklist *Blacklist, bool New)
:cOsdMenu(tr("Edit blacklist"),32)
{
-#if VDRVERSNUM >= 10734
SetMenuCategory(mcSetupPlugins);
-#endif
SearchModes[0] = strdup(tr("phrase"));
SearchModes[1] = strdup(tr("all words"));
SearchModes[2] = strdup(tr("at least one word"));
diff --git a/menu_blacklists.c b/menu_blacklists.c
index e6f500a..5290484 100644
--- a/menu_blacklists.c
+++ b/menu_blacklists.c
@@ -99,9 +99,7 @@ int cMenuBlacklistsItem::Compare(const cListObject &ListObject) const
cMenuBlacklists::cMenuBlacklists()
:cOsdMenu(tr("Blacklists"), 3, 20, 11, 6, 5)
{
-#if VDRVERSNUM >= 10734
SetMenuCategory(mcSetupPlugins);
-#endif
cMutexLock BlacklistLock(&Blacklists);
cBlacklist *Blacklist = Blacklists.First();
while (Blacklist) {
diff --git a/menu_commands.c b/menu_commands.c
index 174cf7f..f15d9a6 100644
--- a/menu_commands.c
+++ b/menu_commands.c
@@ -45,9 +45,7 @@ The project's page is at http://winni.vdr-developer.org/epgsearch
cMenuSearchCommands::cMenuSearchCommands(const char *Title, const cEvent* Event, bool DirectCall, cSearchExt* Search)
:cOsdMenu(Title)
{
-#if VDRVERSNUM >= 10728
SetMenuCategory(mcCommand);
-#endif
directCall = DirectCall;
SetHasHotkeys();
diff --git a/menu_conflictcheck.c b/menu_conflictcheck.c
index 562842e..9f6cfe2 100644
--- a/menu_conflictcheck.c
+++ b/menu_conflictcheck.c
@@ -62,9 +62,7 @@ cMenuConflictCheckItem::cMenuConflictCheckItem(cConflictCheckTime* Ct, cConflict
cMenuConflictCheck::cMenuConflictCheck()
:cOsdMenu("", 4, 12, 4, 5, 30)
{
-#if VDRVERSNUM >= 10734
SetMenuCategory(mcTimerEdit);
-#endif
showAll = false;
lastSel = -1;
BuildList();
@@ -197,9 +195,7 @@ bool cMenuConflictCheckDetailsItem::Update(bool Force)
cMenuConflictCheckDetails::cMenuConflictCheckDetails(cConflictCheckTimerObj* TimerObj, cConflictCheck* ConflictCheck)
:cOsdMenu(tr("Timer conflicts"), 2, 4, 13, 3, 2)
{
-#if VDRVERSNUM >= 10734
SetMenuCategory(mcTimerEdit);
-#endif
timerObj = TimerObj;
checktime = timerObj->conflCheckTime;
conflictCheck = ConflictCheck;
diff --git a/menu_deftimercheckmethod.c b/menu_deftimercheckmethod.c
index 0476211..12b12b1 100644
--- a/menu_deftimercheckmethod.c
+++ b/menu_deftimercheckmethod.c
@@ -120,9 +120,7 @@ void cDefTimerCheckModes::SetMode(const cChannel* channel, int mode)
cMenuDefTimerCheckMethod::cMenuDefTimerCheckMethod()
:cOsdMenu(tr("Default timer check method"), 20)
{
-#if VDRVERSNUM >= 10734
SetMenuCategory(mcSetupPlugins);
-#endif
CheckModes[0] = tr("no check");
CheckModes[UPD_CHDUR] = tr("by channel and time");
CheckModes[UPD_EVENTID] = tr("by event ID");
diff --git a/menu_dirselect.c b/menu_dirselect.c
index 2fc24a8..8ea283c 100644
--- a/menu_dirselect.c
+++ b/menu_dirselect.c
@@ -64,9 +64,7 @@ int cMenuDirItem::Compare(const cListObject &ListObject) const
cMenuDirSelect::cMenuDirSelect(char* szDirectory)
:cOsdMenu(tr("Select directory"))
{
-#if VDRVERSNUM >= 10733
SetMenuCategory(mcTimerEdit);
-#endif
Directory = szDirectory;
yellow=NULL;
@@ -177,11 +175,9 @@ void cMenuDirSelect::CreateDirSet(bool extraDirs)
free(dir);
}
-#if APIVERSNUM >= 10712
// add distinct directories from folders.conf
for(cNestedItem* item = Folders.First(); item; item = Folders.Next(item))
AddVDRFolders(item);
-#endif
if (extraDirs)
{
@@ -212,7 +208,6 @@ void cMenuDirSelect::CreateDirSet(bool extraDirs)
}
}
-#if APIVERSNUM >= 10712
void cMenuDirSelect::AddVDRFolders(cNestedItem* folder, string parentDirectory)
{
if (folder == NULL) return;
@@ -222,7 +217,6 @@ void cMenuDirSelect::AddVDRFolders(cNestedItem* folder, string parentDirectory)
for(cNestedItem* subfolder = folder->SubItems()->First(); subfolder; subfolder = folder->SubItems()->Next(subfolder))
AddVDRFolders(subfolder, folderDirectory);
}
-#endif
void cMenuDirSelect::Load()
{
diff --git a/menu_dirselect.h b/menu_dirselect.h
index a9e9fa6..c1d9aa3 100644
--- a/menu_dirselect.h
+++ b/menu_dirselect.h
@@ -63,9 +63,7 @@ private:
~cMenuDirSelect();
void Load();
void AddDistinct(const char* szText);
-#if APIVERSNUM >= 10712
static void AddVDRFolders(cNestedItem* folder, string parentDirectory = "");
-#endif
virtual eOSState ProcessKey(eKeys Key);
int Level(const char* szDir);
void ReplaceDirVars();
diff --git a/menu_event.c b/menu_event.c
index 77a03a6..abcecc8 100644
--- a/menu_event.c
+++ b/menu_event.c
@@ -34,9 +34,7 @@ cMenuEventSearch::cMenuEventSearch(const cEvent* Event, cEventObjects& EventObje
eventObjects(EventObjects),
surfMode(SurfMode)
{
-#if VDRVERSNUM >= 10728
SetMenuCategory(mcEvent);
-#endif
eventObjects.SetCurrent(Event);
szGreen = szYellow = NULL;
diff --git a/menu_main.c b/menu_main.c
index 5203e35..c1f271c 100644
--- a/menu_main.c
+++ b/menu_main.c
@@ -49,9 +49,7 @@ int cMenuSearchMain::forceMenu = 0; // 1 = now, 2 = schedule, 3 = summary
cMenuSearchMain::cMenuSearchMain(void)
:cOsdMenu("", GetTab(1), GetTab(2), GetTab(3), GetTab(4), GetTab(5))
{
-#if VDRVERSNUM >= 10734
SetMenuCategory(mcSchedule);
-#endif
helpKeys = -1;
otherChannel = 0;
toggleKeys = 0;
diff --git a/menu_myedittimer.c b/menu_myedittimer.c
index a6529a4..e359d49 100644
--- a/menu_myedittimer.c
+++ b/menu_myedittimer.c
@@ -40,9 +40,7 @@ const char *cMenuMyEditTimer::CheckModes[3];
cMenuMyEditTimer::cMenuMyEditTimer(cTimer *Timer, bool New, const cEvent* Event, const cChannel* forcechannel)
:cOsdMenu(trVDR("Edit timer"), 14)
{
-#if VDRVERSNUM >= 10734
SetMenuCategory(mcTimerEdit);
-#endif
CheckModes[0] = tr("no check");
CheckModes[UPD_CHDUR] = tr("by channel and time");
CheckModes[UPD_EVENTID] = tr("by event ID");
diff --git a/menu_recsdone.c b/menu_recsdone.c
index fae8d16..4f0eb80 100644
--- a/menu_recsdone.c
+++ b/menu_recsdone.c
@@ -71,10 +71,8 @@ int cMenuRecDoneItem::Compare(const cListObject &ListObject) const
cMenuRecsDone::cMenuRecsDone(cSearchExt* Search)
:cOsdMenu("", 16)
{
-#if VDRVERSNUM >= 10734
//SetMenuCategory(mcRecordingInfo);
SetMenuCategory(mcUnknown);
-#endif
search = Search;
showMode = SHOW_RECDONE_ALL;
showEpisodeOnly = false;
diff --git a/menu_search.c b/menu_search.c
index 0261ff3..5aef353 100644
--- a/menu_search.c
+++ b/menu_search.c
@@ -108,9 +108,7 @@ int cMenuSearchExtItem::Compare(const cListObject &ListObject) const
cMenuEPGSearchExt::cMenuEPGSearchExt()
:cOsdMenu("", 2, 20, 11, 6, 5)
{
-#if VDRVERSNUM >= 10728
SetMenuCategory(mcPlugin);
-#endif
cMutexLock SearchExtsLock(&SearchExts);
cSearchExt *SearchExt = SearchExts.First();
while (SearchExt) {
diff --git a/menu_searchactions.c b/menu_searchactions.c
index abf01ff..ef700cc 100644
--- a/menu_searchactions.c
+++ b/menu_searchactions.c
@@ -48,9 +48,7 @@ extern int updateForced;
cMenuSearchActions::cMenuSearchActions(cSearchExt* Search, bool DirectCall)
:cOsdMenu(tr("Search actions"))
{
-#if VDRVERSNUM >= 10728
SetMenuCategory(mcCommand);
-#endif
directCall = DirectCall;
SetHasHotkeys();
diff --git a/menu_searchedit.c b/menu_searchedit.c
index e44e8c8..1313995 100644
--- a/menu_searchedit.c
+++ b/menu_searchedit.c
@@ -49,9 +49,7 @@ cSearchExtCats SearchExtCats;
cMenuEditSearchExt::cMenuEditSearchExt(cSearchExt *SearchExt, bool New, bool Template, bool FromEPG)
:cOsdMenu(tr("Edit search"),32)
{
-#if VDRVERSNUM >= 10728
SetMenuCategory(mcPlugin);
-#endif
templateMode = Template;
SearchModes[0] = strdup(tr("phrase"));
@@ -102,7 +100,6 @@ cMenuEditSearchExt::cMenuEditSearchExt(cSearchExt *SearchExt, bool New, bool Tem
CompareDateModes[2] = strdup(tr("same week"));
CompareDateModes[3] = strdup(tr("same month"));
-#if APIVERSNUM > 10710
// collect content string IDs
std::set<std::string> contentStrings;
for(unsigned int i=0; i<CONTENT_DESCRIPTOR_MAX;i++)
@@ -114,7 +111,6 @@ cMenuEditSearchExt::cMenuEditSearchExt(cSearchExt *SearchExt, bool New, bool Tem
contentStringIDs.push_back(i);
}
}
-#endif
useContentDescriptors = false;
if (!templateMode && New)
@@ -174,13 +170,11 @@ cMenuEditSearchExt::cMenuEditSearchExt(cSearchExt *SearchExt, bool New, bool Tem
}
contentStringsFlags = NULL;
-#if APIVERSNUM > 10710
// set the flags for the content descriptors
contentStringsFlags = (int*) malloc((CONTENT_DESCRIPTOR_MAX+1) * sizeof(int));
for(unsigned int i=0; i<=CONTENT_DESCRIPTOR_MAX;i++)
contentStringsFlags[i] = data.HasContent(i);
useContentDescriptors = (data.contentsFilter.size() > 0);
-#endif
catarrayAvoidRepeats = NULL;
catvaluesNumeric = NULL;
@@ -254,7 +248,6 @@ void cMenuEditSearchExt::Set()
Add(new cMenuEditBoolItem( tr("Use description"), &data.useDescription, trVDR("no"), trVDR("yes")));
AddHelp(tr("Help$Set this to 'Yes' if you like to search in the summary of an event."));
-#if APIVERSNUM > 10710
Add(new cMenuEditBoolItem( tr("Use content descriptor"), &useContentDescriptors, trVDR("no"), trVDR("yes")));
AddHelp(tr("Help$Set this to 'Yes' if you want to search the contents by a descriptor."));
if (useContentDescriptors)
@@ -266,7 +259,6 @@ void cMenuEditSearchExt::Set()
Add(new cMenuEditBoolItem(IndentMenuItem(tr(cEvent::ContentToString(contentStringIDs[i])), level), &contentStringsFlags[contentStringIDs[i]], trVDR("no"), trVDR("yes")));
}
}
-#endif
// show Categories only if we have them
if (SearchExtCats.Count() > 0)
@@ -827,9 +819,7 @@ eOSState cMenuEditSearchExt::ProcessKey(eKeys Key)
cMenuEditDaysOfWeek::cMenuEditDaysOfWeek(int* DaysOfWeek, int Offset, bool Negate)
:cOsdMenu(tr("Edit user-defined days of week"),30)
{
-#if VDRVERSNUM >= 10728
SetMenuCategory(mcPlugin);
-#endif
int i=0;
offset = Offset;
negate = Negate;
@@ -873,9 +863,7 @@ eOSState cMenuEditDaysOfWeek::ProcessKey(eKeys Key)
cMenuSearchEditCompCats::cMenuSearchEditCompCats(int* catarrayAvoidRepeats)
:cOsdMenu(tr("Compare categories"),30)
{
-#if VDRVERSNUM >= 10728
SetMenuCategory(mcPlugin);
-#endif
search_catarrayAvoidRepeats = catarrayAvoidRepeats;
edit_catarrayAvoidRepeats = (int*) malloc(SearchExtCats.Count() * sizeof(int));
cSearchExtCat *SearchExtCat = SearchExtCats.First();
@@ -923,9 +911,7 @@ eOSState cMenuSearchEditCompCats::ProcessKey(eKeys Key)
cMenuBlacklistsSelection::cMenuBlacklistsSelection(cList<cBlacklistObject>* pBlacklists)
:cOsdMenu(tr("Select blacklists"),30)
{
-#if VDRVERSNUM >= 10728
SetMenuCategory(mcPlugin);
-#endif
blacklists = pBlacklists;
blacklistsSel = new int[Blacklists.Count()];
cMutexLock BlacklistLock(&Blacklists);
@@ -1068,9 +1054,7 @@ eOSState cMenuBlacklistsSelection::ProcessKey(eKeys Key)
cMenuCatValuesSelect::cMenuCatValuesSelect(char* CatValues, int CatIndex, int SearchMode)
:cOsdMenu(tr("Values for EPG category"), 1, 40)
{
-#if VDRVERSNUM >= 10728
SetMenuCategory(mcPlugin);
-#endif
catValues = CatValues;
catIndex = CatIndex;
@@ -1201,9 +1185,7 @@ eOSState cMenuCatValuesSelect::ProcessKey(eKeys Key)
cMenuSearchActivSettings::cMenuSearchActivSettings(cSearchExt *SearchExt)
:cOsdMenu(tr("Activation of search timer"), 25)
{
-#if VDRVERSNUM >= 10728
SetMenuCategory(mcPlugin);
-#endif
searchExt = SearchExt;
if (searchExt)
diff --git a/menu_searchresults.c b/menu_searchresults.c
index dd46d95..56fb75d 100644
--- a/menu_searchresults.c
+++ b/menu_searchresults.c
@@ -47,11 +47,7 @@ extern bool isUTF8;
static int CompareRecording(const void *p1, const void *p2)
{
-#if APIVERSNUM < 10721
- return (int)((*(cRecording **)p1)->start - (*(cRecording **)p2)->start);
-#else
return (int)((*(cRecording **)p1)->Start() - (*(cRecording **)p2)->Start());
-#endif
}
// --- cMenuSearchResultsItem -------------------------------------------------------
@@ -186,13 +182,11 @@ cMenuSearchResultsItem::cMenuSearchResultsItem(cRecording *Recording)
void cMenuSearchResultsItem::SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable)
{
-#if APIVERSNUM >= 10733
cChannel *channel = event?Channels.GetByChannelID(event->ChannelID(), true, true):NULL;
if (!event)
DisplayMenu->SetItem(Text(), Index, Current, Selectable);
else if (!DisplayMenu->SetItemEvent(event, Index, Current, Selectable, channel, true, timerMatch))
DisplayMenu->SetItem(Text(), Index, Current, Selectable);
-#endif
}
// --- cMenuSearchResults -------------------------------------------------------
@@ -202,9 +196,7 @@ const cEvent *cMenuSearchResults::scheduleEventInfo = NULL;
cMenuSearchResults::cMenuSearchResults(cMenuTemplate* MenuTemplate)
:cOsdMenu("", MenuTemplate->Tab(0), MenuTemplate->Tab(1), MenuTemplate->Tab(2), MenuTemplate->Tab(3), MenuTemplate->Tab(4))
{
-#if VDRVERSNUM >= 10728
SetMenuCategory(mcSchedule);
-#endif
helpKeys = -1;
menuTemplate = MenuTemplate;
@@ -750,9 +742,7 @@ bool cMenuSearchResultsForQuery::BuildList()
cMenuSearchResultsForRecs::cMenuSearchResultsForRecs(const char *query)
:cMenuSearchResultsForQuery(NULL)
{
-#if VDRVERSNUM >= 10728
SetMenuCategory(mcCommand);
-#endif
SetTitle(tr("found recordings"));
if (query)
{
@@ -844,11 +834,7 @@ eOSState cMenuSearchResultsForRecs::Play(void)
{
cRecording *recording = GetRecording(ri);
if (recording) {
-#if APIVERSNUM < 10728
- cReplayControl::SetRecording(recording->FileName(), recording->Title());
-#else
cReplayControl::SetRecording(recording->FileName());
-#endif
return osReplay;
}
}
diff --git a/menu_searchtemplate.c b/menu_searchtemplate.c
index 32685cd..a38484c 100644
--- a/menu_searchtemplate.c
+++ b/menu_searchtemplate.c
@@ -107,9 +107,7 @@ int cMenuSearchTemplateItem::Compare(const cListObject &ListObject) const
cMenuEPGSearchTemplate::cMenuEPGSearchTemplate(cSearchExt* Search, cBlacklist* Blacklist, bool New)
:cOsdMenu(tr("Search templates"), 2, 20, 11, 6, 5)
{
-#if VDRVERSNUM >= 10728
SetMenuCategory(mcPlugin);
-#endif
search = Search;
blacklist = Blacklist;
newSearch = New;
diff --git a/menu_switchtimers.c b/menu_switchtimers.c
index 1a8139a..28a55d2 100644
--- a/menu_switchtimers.c
+++ b/menu_switchtimers.c
@@ -40,9 +40,7 @@ public:
cMenuEditSwitchTimer::cMenuEditSwitchTimer(cSwitchTimer* SwitchTimer, bool New)
:cOsdMenu(tr("Edit entry"),30)
{
-#if VDRVERSNUM >= 10728
SetMenuCategory(mcPlugin);
-#endif
SwitchModes[0] = strdup(tr("Switch"));
SwitchModes[1] = strdup(tr("Announce only"));
@@ -155,9 +153,7 @@ int cMenuSwitchTimerItem::Compare(const cListObject &ListObject) const
cMenuSwitchTimers::cMenuSwitchTimers()
:cOsdMenu(tr("Switch list"), 2, 4, 6, 6, 4)
{
-#if VDRVERSNUM >= 10728
SetMenuCategory(mcPlugin);
-#endif
Set();
Display();
diff --git a/menu_timersdone.c b/menu_timersdone.c
index a239892..caa3349 100644
--- a/menu_timersdone.c
+++ b/menu_timersdone.c
@@ -67,9 +67,7 @@ int cMenuTimerDoneItem::Compare(const cListObject &ListObject) const
cMenuTimersDone::cMenuTimersDone(cSearchExt* Search)
:cOsdMenu("", 4, 15)
{
-#if VDRVERSNUM >= 10728
SetMenuCategory(mcTimer);
-#endif
search = Search;
showAll = true;
diff --git a/menu_whatson.c b/menu_whatson.c
index daa4359..dc30996 100644
--- a/menu_whatson.c
+++ b/menu_whatson.c
@@ -249,11 +249,9 @@ bool cMenuMyScheduleItem::Update(bool Force)
void cMenuMyScheduleItem::SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable)
{
-#if APIVERSNUM >= 10733
bool withDate = (channel == NULL); // search for a better way to determine this
if (!DisplayMenu->SetItemEvent(event, Index, Current, Selectable, channel, withDate, timerMatch))
DisplayMenu->SetItem(Text(), Index, Current, Selectable);
-#endif
}
// --- cMenuMyScheduleSepItem ------------------------------------------------------
@@ -288,11 +286,9 @@ bool cMenuMyScheduleSepItem::Update(bool Force)
void cMenuMyScheduleSepItem::SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable)
{
-#if APIVERSNUM >= 10733
bool withDate = (channel == NULL); // search for a better way to determine this
if (!DisplayMenu->SetItemEvent(dummyEvent, Index, Current, Selectable, channel, withDate, timerMatch))
DisplayMenu->SetItem(Text(), Index, Current, Selectable);
-#endif
}
@@ -309,14 +305,12 @@ int cMenuWhatsOnSearch::shiftTime = 0;
cMenuWhatsOnSearch::cMenuWhatsOnSearch(const cSchedules *Schedules, int CurrentChannelNr)
:cOsdMenu("", GetTab(1), GetTab(2), GetTab(3), GetTab(4), GetTab(5))
{
-#if VDRVERSNUM >= 10734
if (currentShowMode == showNow)
SetMenuCategory(mcScheduleNow);
else if (currentShowMode == showNext)
SetMenuCategory(mcScheduleNext);
else
SetMenuCategory(mcSchedule);
-#endif
helpKeys = -1;
shiftTime = 0;
diff --git a/recstatus.c b/recstatus.c
index 8e6afd8..5a41a90 100644
--- a/recstatus.c
+++ b/recstatus.c
@@ -203,38 +203,11 @@ int cRecStatusMonitor::TimerRecDevice(cTimer* timer)
bool cRecStatusMonitor::IsPesRecording(cRecording *pRecording)
{
-#if VDRVERSNUM < 10703
- return true;
-#else
return pRecording && pRecording->IsPesRecording();
-#endif
}
#define LOC_INDEXFILESUFFIX "/index"
-#if VDRVERSNUM < 10703
-
-int cRecStatusMonitor::RecLengthInSecs(cRecording *pRecording)
-{
- struct stat buf;
- cString fullname = cString::sprintf("%s%s", pRecording->FileName(), "/index.vdr");
- if (stat(fullname, &buf) == 0)
- {
- struct tIndex { int offset; uchar type; uchar number; short reserved; };
- int delta = buf.st_size % sizeof(tIndex);
- if (delta)
- {
- delta = sizeof(tIndex) - delta;
- esyslog("ERROR: invalid file size (%ld) in '%s'", buf.st_size, *fullname);
- }
- return (buf.st_size + delta) / sizeof(tIndex) / SecondsToFrames(1);
- }
- else
- return -1;
-}
-
-#else
-
struct tIndexTs {
uint64_t offset:40; // up to 1TB per file (not using off_t here - must definitely be exactly 64 bit!)
int reserved:7; // reserved for future use
@@ -262,5 +235,4 @@ int cRecStatusMonitor::RecLengthInSecs(cRecording *pRecording)
}
return -1;
}
-#endif
diff --git a/searchtimer_thread.c b/searchtimer_thread.c
index 34d625f..25cf559 100644
--- a/searchtimer_thread.c
+++ b/searchtimer_thread.c
@@ -777,13 +777,8 @@ void cSearchTimerThread::CheckExpiredRecs()
cList<cRecordingObj> DelRecordings;
for (cRecording *recording = Recordings.First(); recording && m_Active; recording = Recordings.Next(recording))
{
-#if APIVERSNUM < 10721
- LogFile.Log(3, "check recording %s from %s for expiration", recording->Name(), DAYDATETIME(recording->start));
- if (recording->start == 0)
-#else
LogFile.Log(3, "check recording %s from %s for expiration", recording->Name(), DAYDATETIME(recording->Start()));
if (recording->Start() == 0)
-#endif
{
LogFile.Log(2, "oops, recording %s has no start time, skipped", recording->Name());
continue;
@@ -815,11 +810,7 @@ void cSearchTimerThread::CheckExpiredRecs()
if (search->delAfterDays == 0) continue;
time_t now = time(NULL);
-#if APIVERSNUM < 10721
- int daysBetween = int(double((now - recording->start)) / (60*60*24));
-#else
int daysBetween = int(double((now - recording->Start())) / (60*60*24));
-#endif
if (daysBetween >= search->delAfterDays)
DelRecordings.Add(new cRecordingObj(recording, search));
else
@@ -831,18 +822,10 @@ void cSearchTimerThread::CheckExpiredRecs()
cSearchExt* search = recordingObj->search;
if (search->recordingsKeep > 0 && search->recordingsKeep >= search->GetCountRecordings())
{
-#if APIVERSNUM < 10721
- LogFile.Log(1, "recording '%s' from %s expired, but will be kept, search timer %s", recording->Name(), DAYDATETIME(recording->start), recordingObj->search->search);
-#else
LogFile.Log(1, "recording '%s' from %s expired, but will be kept, search timer %s", recording->Name(), DAYDATETIME(recording->Start()), recordingObj->search->search);
-#endif
continue;
}
-#if APIVERSNUM < 10721
- LogFile.Log(1, "delete expired recording '%s' from %s, search timer %s", recording->Name(), DAYDATETIME(recording->start), recordingObj->search->search);
-#else
LogFile.Log(1, "delete expired recording '%s' from %s, search timer %s", recording->Name(), DAYDATETIME(recording->Start()), recordingObj->search->search);
-#endif
cRecordControl *rc = cRecordControls::GetRecordControl(recording->FileName());
if (!rc)
{