mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Some changes for VDR < 2.3.0
This commit is contained in:
parent
dfb2c2b031
commit
e399518900
68
recmanager.c
68
recmanager.c
@ -56,26 +56,21 @@ bool cRecManager::CheckEventForTimer(const cEvent *event) {
|
|||||||
return hasTimer;
|
return hasTimer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cTimer *cRecManager::GetTimerForEvent(const cEvent *event) {
|
const cTimer *cRecManager::GetTimerForEvent(const cEvent *event) {
|
||||||
const cTimer *timer = NULL;
|
const cTimer *timer = NULL;
|
||||||
#else
|
|
||||||
cTimer *cRecManager::GetTimerForEvent(const cEvent *event) {
|
|
||||||
cTimer *timer = NULL;
|
|
||||||
#endif
|
|
||||||
if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
|
if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
|
||||||
RemoteTimers_GetMatch_v1_0 rtMatch;
|
RemoteTimers_GetMatch_v1_0 rtMatch;
|
||||||
rtMatch.event = event;
|
rtMatch.event = event;
|
||||||
pRemoteTimers->Service("RemoteTimers::GetMatch-v1.0", &rtMatch);
|
pRemoteTimers->Service("RemoteTimers::GetMatch-v1.0", &rtMatch);
|
||||||
timer = rtMatch.timer;
|
timer = rtMatch.timer;
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
return timer;
|
return timer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if VDRVERSNUM >= 20301
|
||||||
LOCK_TIMERS_READ;
|
LOCK_TIMERS_READ;
|
||||||
timer = Timers->GetMatch(event);
|
timer = Timers->GetMatch(event);
|
||||||
#else
|
#else
|
||||||
} else
|
timer = Timers.GetMatch(event);
|
||||||
timer = Timers.GetMatch(event);
|
|
||||||
#endif
|
#endif
|
||||||
return timer;
|
return timer;
|
||||||
}
|
}
|
||||||
@ -208,41 +203,42 @@ void cRecManager::DeleteTimer(const cEvent *event) {
|
|||||||
|
|
||||||
void cRecManager::DeleteLocalTimer(const cEvent *event) {
|
void cRecManager::DeleteLocalTimer(const cEvent *event) {
|
||||||
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
|
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
|
||||||
|
const cTimer *t;
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
cTimer *t;
|
|
||||||
{
|
{
|
||||||
LOCK_TIMERS_WRITE;
|
LOCK_TIMERS_READ;
|
||||||
t = Timers->GetMatch(event);
|
t = Timers->GetMatch(event);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
cTimer *t = Timers.GetMatch(event);
|
t = Timers.GetMatch(event);
|
||||||
#endif
|
#endif
|
||||||
if (!t)
|
if (!t)
|
||||||
return;
|
return;
|
||||||
DeleteTimer(t);
|
DeleteTimer(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cRecManager::DeleteTimer(cTimer *timer) {
|
void cRecManager::DeleteTimer(const cTimer *timer) {
|
||||||
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
|
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
LOCK_TIMERS_WRITE;
|
LOCK_TIMERS_WRITE;
|
||||||
|
cTimers* timers = Timers;
|
||||||
|
cTimer* t = timers->GetTimer(timer);
|
||||||
|
#else
|
||||||
|
cTimers* timers = &Timers;
|
||||||
|
cTimer* t = timers->GetTimer((cTimer*)timer);
|
||||||
#endif
|
#endif
|
||||||
if (timer->Recording()) {
|
|
||||||
timer->Skip();
|
if (t->Recording()) {
|
||||||
|
t->Skip();
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
cRecordControls::Process(Timers, time(NULL));
|
cRecordControls::Process(timers, time(NULL));
|
||||||
#else
|
#else
|
||||||
cRecordControls::Process(time(NULL));
|
cRecordControls::Process(time(NULL));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
isyslog("timer %s deleted", *timer->ToDescr());
|
isyslog("timer %s deleted", *t->ToDescr());
|
||||||
#if VDRVERSNUM >= 20301
|
timers->Del(t, true);
|
||||||
Timers->Del(timer, true);
|
timers->SetModified();
|
||||||
Timers->SetModified();
|
|
||||||
#else
|
|
||||||
Timers.Del(timer, true);
|
|
||||||
Timers.SetModified();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cRecManager::DeleteRemoteTimer(const cEvent *event) {
|
void cRecManager::DeleteRemoteTimer(const cEvent *event) {
|
||||||
@ -259,19 +255,17 @@ void cRecManager::DeleteRemoteTimer(const cEvent *event) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
void cRecManager::SaveTimer(const cTimer *t, cTimer newTimerSettings) {
|
void cRecManager::SaveTimer(const cTimer *t, cTimer newTimerSettings) {
|
||||||
if (!t)
|
if (!t)
|
||||||
#else
|
|
||||||
void cRecManager::SaveTimer(cTimer *timer, cTimer newTimerSettings) {
|
|
||||||
if (!timer)
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
LOCK_TIMERS_WRITE;
|
LOCK_TIMERS_WRITE;
|
||||||
cTimer *timer = Timers->GetTimer(t);
|
cTimer *timer = Timers->GetTimer(t);
|
||||||
|
#else
|
||||||
|
cTimer *timer = Timers.GetTimer((cTimer*)t);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool active = newTimerSettings.HasFlags(tfActive);
|
bool active = newTimerSettings.HasFlags(tfActive);
|
||||||
int prio = newTimerSettings.Priority();
|
int prio = newTimerSettings.Priority();
|
||||||
int lifetime = newTimerSettings.Lifetime();
|
int lifetime = newTimerSettings.Lifetime();
|
||||||
@ -622,24 +616,20 @@ void cRecManager::DeleteSwitchTimer(const cEvent *event) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cRecording **cRecManager::SearchForRecordings(std::string searchString, int &numResults) {
|
const cRecording **cRecManager::SearchForRecordings(std::string searchString, int &numResults) {
|
||||||
|
|
||||||
const cRecording **matchingRecordings = NULL;
|
const cRecording **matchingRecordings = NULL;
|
||||||
#else
|
|
||||||
cRecording **cRecManager::SearchForRecordings(std::string searchString, int &numResults) {
|
|
||||||
|
|
||||||
cRecording **matchingRecordings = NULL;
|
|
||||||
#endif
|
|
||||||
int num = 0;
|
int num = 0;
|
||||||
numResults = 0;
|
numResults = 0;
|
||||||
|
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
LOCK_RECORDINGS_READ;
|
LOCK_RECORDINGS_READ;
|
||||||
for (const cRecording *recording = Recordings->First(); recording; recording = Recordings->Next(recording)) {
|
const cRecordings* recordings = Recordings;
|
||||||
#else
|
#else
|
||||||
for (cRecording *recording = Recordings.First(); recording; recording = Recordings.Next(recording)) {
|
const cRecordings* recordings = &Recordings;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
for (const cRecording *recording = recordings->First(); recording; recording = recordings->Next(recording)) {
|
||||||
std::string s1 = recording->Name();
|
std::string s1 = recording->Name();
|
||||||
std::string s2 = searchString;
|
std::string s2 = searchString;
|
||||||
if (s1.empty() || s2.empty()) continue;
|
if (s1.empty() || s2.empty()) continue;
|
||||||
@ -670,11 +660,7 @@ cRecording **cRecManager::SearchForRecordings(std::string searchString, int &num
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (match) {
|
if (match) {
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
matchingRecordings = (const cRecording **)realloc(matchingRecordings, (num + 1) * sizeof(cRecording *));
|
matchingRecordings = (const cRecording **)realloc(matchingRecordings, (num + 1) * sizeof(cRecording *));
|
||||||
#else
|
|
||||||
matchingRecordings = (cRecording **)realloc(matchingRecordings, (num + 1) * sizeof(cRecording *));
|
|
||||||
#endif
|
|
||||||
matchingRecordings[num++] = recording;
|
matchingRecordings[num++] = recording;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
14
recmanager.h
14
recmanager.h
@ -28,25 +28,17 @@ public:
|
|||||||
bool EpgSearchAvailable(void) {return epgSearchAvailable;};
|
bool EpgSearchAvailable(void) {return epgSearchAvailable;};
|
||||||
bool RefreshRemoteTimers(void);
|
bool RefreshRemoteTimers(void);
|
||||||
bool CheckEventForTimer(const cEvent *event);
|
bool CheckEventForTimer(const cEvent *event);
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cTimer *GetTimerForEvent(const cEvent *event);
|
const cTimer *GetTimerForEvent(const cEvent *event);
|
||||||
#else
|
|
||||||
cTimer *GetTimerForEvent(const cEvent *event);
|
|
||||||
#endif
|
|
||||||
cTimer *createTimer(const cEvent *event, std::string path = "");
|
cTimer *createTimer(const cEvent *event, std::string path = "");
|
||||||
cTimer *createLocalTimer(const cEvent *event, std::string path);
|
cTimer *createLocalTimer(const cEvent *event, std::string path);
|
||||||
cTimer *createRemoteTimer(const cEvent *event, std::string path);
|
cTimer *createRemoteTimer(const cEvent *event, std::string path);
|
||||||
void SetTimerPath(cTimer *timer, const cEvent *event, std::string path);
|
void SetTimerPath(cTimer *timer, const cEvent *event, std::string path);
|
||||||
void DeleteTimer(cTimer *timer);
|
void DeleteTimer(const cTimer *timer);
|
||||||
void DeleteTimer(int timerID);
|
void DeleteTimer(int timerID);
|
||||||
void DeleteTimer(const cEvent *event);
|
void DeleteTimer(const cEvent *event);
|
||||||
void DeleteLocalTimer(const cEvent *event);
|
void DeleteLocalTimer(const cEvent *event);
|
||||||
void DeleteRemoteTimer(const cEvent *event);
|
void DeleteRemoteTimer(const cEvent *event);
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
void SaveTimer(const cTimer *timer, cTimer newTimerSettings);
|
void SaveTimer(const cTimer *timer, cTimer newTimerSettings);
|
||||||
#else
|
|
||||||
void SaveTimer(cTimer *timer, cTimer newTimerSettings);
|
|
||||||
#endif
|
|
||||||
bool IsRecorded(const cEvent *event);
|
bool IsRecorded(const cEvent *event);
|
||||||
cTVGuideTimerConflicts *CheckTimerConflict(void);
|
cTVGuideTimerConflicts *CheckTimerConflict(void);
|
||||||
void CreateSeriesTimer(cTimer *seriesTimer);
|
void CreateSeriesTimer(cTimer *seriesTimer);
|
||||||
@ -60,11 +52,7 @@ public:
|
|||||||
void UpdateSearchTimers(void);
|
void UpdateSearchTimers(void);
|
||||||
bool CreateSwitchTimer(const cEvent *event, cSwitchTimer switchTimer);
|
bool CreateSwitchTimer(const cEvent *event, cSwitchTimer switchTimer);
|
||||||
void DeleteSwitchTimer(const cEvent *event);
|
void DeleteSwitchTimer(const cEvent *event);
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cRecording **SearchForRecordings(std::string searchString, int &numResults);
|
const cRecording **SearchForRecordings(std::string searchString, int &numResults);
|
||||||
#else
|
|
||||||
cRecording **SearchForRecordings(std::string searchString, int &numResults);
|
|
||||||
#endif
|
|
||||||
const cEvent **LoadReruns(const cEvent *event, int &numResults);
|
const cEvent **LoadReruns(const cEvent *event, int &numResults);
|
||||||
void GetFavorites(std::vector<cTVGuideSearchTimer> *favorites);
|
void GetFavorites(std::vector<cTVGuideSearchTimer> *favorites);
|
||||||
const cEvent **WhatsOnNow(bool nowOrNext, int &numResults);
|
const cEvent **WhatsOnNow(bool nowOrNext, int &numResults);
|
||||||
|
@ -2259,11 +2259,7 @@ eRecMenuState cRecMenuItemDayChooser::ProcessKey(eKeys Key) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// --- cRecMenuItemRecording -------------------------------------------------------
|
// --- cRecMenuItemRecording -------------------------------------------------------
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
cRecMenuItemRecording::cRecMenuItemRecording(const cRecording *recording, bool active) {
|
cRecMenuItemRecording::cRecMenuItemRecording(const cRecording *recording, bool active) {
|
||||||
#else
|
|
||||||
cRecMenuItemRecording::cRecMenuItemRecording(cRecording *recording, bool active) {
|
|
||||||
#endif
|
|
||||||
selectable = true;
|
selectable = true;
|
||||||
this->recording = recording;
|
this->recording = recording;
|
||||||
this->active = active;
|
this->active = active;
|
||||||
@ -2511,11 +2507,7 @@ void cRecMenuItemTimelineHeader::Show(void) {
|
|||||||
|
|
||||||
|
|
||||||
// --- cRecMenuItemTimelineTimer -------------------------------------------------------
|
// --- cRecMenuItemTimelineTimer -------------------------------------------------------
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
cRecMenuItemTimelineTimer::cRecMenuItemTimelineTimer(const cTimer *timer, time_t start, time_t stop, std::vector<cTVGuideTimerConflict*> conflictsToday, cRecMenuItemTimelineHeader *header, bool active) {
|
cRecMenuItemTimelineTimer::cRecMenuItemTimelineTimer(const cTimer *timer, time_t start, time_t stop, std::vector<cTVGuideTimerConflict*> conflictsToday, cRecMenuItemTimelineHeader *header, bool active) {
|
||||||
#else
|
|
||||||
cRecMenuItemTimelineTimer::cRecMenuItemTimelineTimer(cTimer *timer, time_t start, time_t stop, std::vector<cTVGuideTimerConflict*> conflictsToday, cRecMenuItemTimelineHeader *header, bool active) {
|
|
||||||
#endif
|
|
||||||
conflicts = conflictsToday;
|
conflicts = conflictsToday;
|
||||||
defaultBackground = false;
|
defaultBackground = false;
|
||||||
pixmapBack = NULL;
|
pixmapBack = NULL;
|
||||||
@ -2662,11 +2654,7 @@ void cRecMenuItemTimelineTimer::Show(void) {
|
|||||||
if (pixmapTimerConflicts) pixmapTimerConflicts->SetLayer(6);
|
if (pixmapTimerConflicts) pixmapTimerConflicts->SetLayer(6);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cTimer *cRecMenuItemTimelineTimer::GetTimerValue(void) {
|
const cTimer *cRecMenuItemTimelineTimer::GetTimerValue(void) {
|
||||||
#else
|
|
||||||
cTimer *cRecMenuItemTimelineTimer::GetTimerValue(void) {
|
|
||||||
#endif
|
|
||||||
return timer;
|
return timer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,11 +123,7 @@ public:
|
|||||||
virtual bool GetBoolValue(void) { return false; };
|
virtual bool GetBoolValue(void) { return false; };
|
||||||
virtual cString GetStringValue(void) { return cString(""); };
|
virtual cString GetStringValue(void) { return cString(""); };
|
||||||
virtual const cEvent *GetEventValue(void) { return NULL; };
|
virtual const cEvent *GetEventValue(void) { return NULL; };
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
virtual const cTimer *GetTimerValue(void) { return NULL; };
|
virtual const cTimer *GetTimerValue(void) { return NULL; };
|
||||||
#else
|
|
||||||
virtual cTimer *GetTimerValue(void) { return NULL; };
|
|
||||||
#endif
|
|
||||||
virtual eRecMenuState ProcessKey(eKeys Key) { return rmsNotConsumed; };
|
virtual eRecMenuState ProcessKey(eKeys Key) { return rmsNotConsumed; };
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -560,18 +556,10 @@ public:
|
|||||||
// --- cRecMenuItemRecording -------------------------------------------------------
|
// --- cRecMenuItemRecording -------------------------------------------------------
|
||||||
class cRecMenuItemRecording : public cRecMenuItem {
|
class cRecMenuItemRecording : public cRecMenuItem {
|
||||||
private:
|
private:
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cRecording *recording;
|
const cRecording *recording;
|
||||||
#else
|
|
||||||
cRecording *recording;
|
|
||||||
#endif
|
|
||||||
cPixmap *pixmapText;
|
cPixmap *pixmapText;
|
||||||
public:
|
public:
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
cRecMenuItemRecording(const cRecording *recording, bool active);
|
cRecMenuItemRecording(const cRecording *recording, bool active);
|
||||||
#else
|
|
||||||
cRecMenuItemRecording(cRecording *recording, bool active);
|
|
||||||
#endif
|
|
||||||
virtual ~cRecMenuItemRecording(void);
|
virtual ~cRecMenuItemRecording(void);
|
||||||
void SetPixmaps(void);
|
void SetPixmaps(void);
|
||||||
void Hide(void);
|
void Hide(void);
|
||||||
@ -583,11 +571,7 @@ public:
|
|||||||
class cRecMenuItemTimelineHeader : public cRecMenuItem {
|
class cRecMenuItemTimelineHeader : public cRecMenuItem {
|
||||||
private:
|
private:
|
||||||
time_t day;
|
time_t day;
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cTimer *timer;
|
const cTimer *timer;
|
||||||
#else
|
|
||||||
cTimer *timer;
|
|
||||||
#endif
|
|
||||||
std::vector<cTVGuideTimerConflict*> conflicts;
|
std::vector<cTVGuideTimerConflict*> conflicts;
|
||||||
cPixmap *pixmapTimeline;
|
cPixmap *pixmapTimeline;
|
||||||
cPixmap *pixmapTimerInfo;
|
cPixmap *pixmapTimerInfo;
|
||||||
@ -603,11 +587,7 @@ public:
|
|||||||
virtual ~cRecMenuItemTimelineHeader(void);
|
virtual ~cRecMenuItemTimelineHeader(void);
|
||||||
void SetDay(time_t day) { this->day = day; };
|
void SetDay(time_t day) { this->day = day; };
|
||||||
void SetPixmaps(void);
|
void SetPixmaps(void);
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
void SetCurrentTimer(const cTimer *timer) { this->timer = timer; };
|
void SetCurrentTimer(const cTimer *timer) { this->timer = timer; };
|
||||||
#else
|
|
||||||
void SetCurrentTimer(cTimer *timer) { this->timer = timer; };
|
|
||||||
#endif
|
|
||||||
void UnsetCurrentTimer(void) { timer = NULL; };
|
void UnsetCurrentTimer(void) { timer = NULL; };
|
||||||
void RefreshTimerDisplay(void);
|
void RefreshTimerDisplay(void);
|
||||||
void Hide(void);
|
void Hide(void);
|
||||||
@ -618,11 +598,7 @@ public:
|
|||||||
// --- cRecMenuItemTimelineTimer -------------------------------------------------------
|
// --- cRecMenuItemTimelineTimer -------------------------------------------------------
|
||||||
class cRecMenuItemTimelineTimer : public cRecMenuItem {
|
class cRecMenuItemTimelineTimer : public cRecMenuItem {
|
||||||
private:
|
private:
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cTimer *timer;
|
const cTimer *timer;
|
||||||
#else
|
|
||||||
cTimer *timer;
|
|
||||||
#endif
|
|
||||||
std::vector<cTVGuideTimerConflict*> conflicts;
|
std::vector<cTVGuideTimerConflict*> conflicts;
|
||||||
cPixmap *pixmapBack;
|
cPixmap *pixmapBack;
|
||||||
cPixmap *pixmapTimerConflicts;
|
cPixmap *pixmapTimerConflicts;
|
||||||
@ -637,11 +613,7 @@ private:
|
|||||||
void DrawTimerConflicts(void);
|
void DrawTimerConflicts(void);
|
||||||
void DrawNoTimerInfo(void);
|
void DrawNoTimerInfo(void);
|
||||||
public:
|
public:
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
cRecMenuItemTimelineTimer(const cTimer *timer, time_t start, time_t stop, std::vector<cTVGuideTimerConflict*> conflictsToday, cRecMenuItemTimelineHeader *header, bool active);
|
cRecMenuItemTimelineTimer(const cTimer *timer, time_t start, time_t stop, std::vector<cTVGuideTimerConflict*> conflictsToday, cRecMenuItemTimelineHeader *header, bool active);
|
||||||
#else
|
|
||||||
cRecMenuItemTimelineTimer(cTimer *timer, time_t start, time_t stop, std::vector<cTVGuideTimerConflict*> conflictsToday, cRecMenuItemTimelineHeader *header, bool active);
|
|
||||||
#endif
|
|
||||||
virtual ~cRecMenuItemTimelineTimer(void);
|
virtual ~cRecMenuItemTimelineTimer(void);
|
||||||
void setActive(void);
|
void setActive(void);
|
||||||
void setInactive(void);
|
void setInactive(void);
|
||||||
@ -649,11 +621,7 @@ public:
|
|||||||
void Hide(void);
|
void Hide(void);
|
||||||
void Show(void);
|
void Show(void);
|
||||||
void Draw(void);
|
void Draw(void);
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cTimer *GetTimerValue(void);
|
const cTimer *GetTimerValue(void);
|
||||||
#else
|
|
||||||
cTimer *GetTimerValue(void);
|
|
||||||
#endif
|
|
||||||
eRecMenuState ProcessKey(eKeys Key);
|
eRecMenuState ProcessKey(eKeys Key);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -721,4 +689,4 @@ public:
|
|||||||
eRecMenuState ProcessKey(eKeys Key);
|
eRecMenuState ProcessKey(eKeys Key);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__TVGUIDE_RECMENUITEM_H
|
#endif //__TVGUIDE_RECMENUITEM_H
|
||||||
|
@ -166,7 +166,7 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
|
|||||||
LOCK_TIMERS_READ;
|
LOCK_TIMERS_READ;
|
||||||
const cTimer *timer = Timers->Get(timerID);
|
const cTimer *timer = Timers->Get(timerID);
|
||||||
#else
|
#else
|
||||||
cTimer *timer = Timers.Get(timerID);
|
const cTimer *timer = Timers.Get(timerID);
|
||||||
#endif
|
#endif
|
||||||
if (timer) {
|
if (timer) {
|
||||||
delete activeMenu;
|
delete activeMenu;
|
||||||
@ -178,11 +178,7 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
|
|||||||
//caller: cRecMenuEditTimer
|
//caller: cRecMenuEditTimer
|
||||||
//save timer from current timer conflict
|
//save timer from current timer conflict
|
||||||
cTimer timerModified;
|
cTimer timerModified;
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cTimer *originalTimer;
|
const cTimer *originalTimer;
|
||||||
#else
|
|
||||||
cTimer *originalTimer;
|
|
||||||
#endif
|
|
||||||
if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) {
|
if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) {
|
||||||
timerModified = menu->GetTimer();
|
timerModified = menu->GetTimer();
|
||||||
originalTimer = menu->GetOriginalTimer();
|
originalTimer = menu->GetOriginalTimer();
|
||||||
@ -216,14 +212,14 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
|
|||||||
break;
|
break;
|
||||||
case rmsEditTimer: {
|
case rmsEditTimer: {
|
||||||
//edit timer for active event
|
//edit timer for active event
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cTimer *timer;
|
const cTimer *timer;
|
||||||
|
#if VDRVERSNUM >= 20301
|
||||||
{
|
{
|
||||||
LOCK_TIMERS_READ;
|
LOCK_TIMERS_READ;
|
||||||
timer = recManager->GetTimerForEvent(event);
|
timer = recManager->GetTimerForEvent(event);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
cTimer *timer = recManager->GetTimerForEvent(event);
|
timer = recManager->GetTimerForEvent(event);
|
||||||
#endif
|
#endif
|
||||||
if (timer) {
|
if (timer) {
|
||||||
delete activeMenu;
|
delete activeMenu;
|
||||||
@ -235,11 +231,7 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
|
|||||||
//caller: cRecMenuEditTimer
|
//caller: cRecMenuEditTimer
|
||||||
//save timer for active event
|
//save timer for active event
|
||||||
cTimer timerModified;
|
cTimer timerModified;
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cTimer *originalTimer;
|
const cTimer *originalTimer;
|
||||||
#else
|
|
||||||
cTimer *originalTimer;
|
|
||||||
#endif
|
|
||||||
if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) {
|
if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) {
|
||||||
timerModified = menu->GetTimer();
|
timerModified = menu->GetTimer();
|
||||||
originalTimer = menu->GetOriginalTimer();
|
originalTimer = menu->GetOriginalTimer();
|
||||||
@ -505,11 +497,7 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
|
|||||||
activeMenu = new cRecMenuRecordingSearch(searchString);
|
activeMenu = new cRecMenuRecordingSearch(searchString);
|
||||||
} else {
|
} else {
|
||||||
int numSearchResults = 0;
|
int numSearchResults = 0;
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cRecording **searchResult = recManager->SearchForRecordings(searchString, numSearchResults);
|
const cRecording **searchResult = recManager->SearchForRecordings(searchString, numSearchResults);
|
||||||
#else
|
|
||||||
cRecording **searchResult = recManager->SearchForRecordings(searchString, numSearchResults);
|
|
||||||
#endif
|
|
||||||
if (numSearchResults == 0) {
|
if (numSearchResults == 0) {
|
||||||
activeMenu = new cRecMenuRecordingSearchNotFound(searchString);
|
activeMenu = new cRecMenuRecordingSearchNotFound(searchString);
|
||||||
} else {
|
} else {
|
||||||
@ -721,11 +709,7 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
|
|||||||
activeMenu->Display();
|
activeMenu->Display();
|
||||||
break; }
|
break; }
|
||||||
case rmsTimelineTimerEdit: {
|
case rmsTimelineTimerEdit: {
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cTimer *timer;
|
const cTimer *timer;
|
||||||
#else
|
|
||||||
cTimer *timer;
|
|
||||||
#endif
|
|
||||||
if (cRecMenuTimeline *menu = dynamic_cast<cRecMenuTimeline*>(activeMenu)) {
|
if (cRecMenuTimeline *menu = dynamic_cast<cRecMenuTimeline*>(activeMenu)) {
|
||||||
timer = menu->GetTimer();
|
timer = menu->GetTimer();
|
||||||
} else break;
|
} else break;
|
||||||
@ -737,11 +721,7 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
|
|||||||
break;}
|
break;}
|
||||||
case rmsTimelineTimerSave: {
|
case rmsTimelineTimerSave: {
|
||||||
cTimer timerModified;
|
cTimer timerModified;
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cTimer *originalTimer;
|
const cTimer *originalTimer;
|
||||||
#else
|
|
||||||
cTimer *originalTimer;
|
|
||||||
#endif
|
|
||||||
if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) {
|
if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) {
|
||||||
timerModified = menu->GetTimer();
|
timerModified = menu->GetTimer();
|
||||||
originalTimer = menu->GetOriginalTimer();
|
originalTimer = menu->GetOriginalTimer();
|
||||||
@ -756,11 +736,7 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
|
|||||||
activeMenu->Display();
|
activeMenu->Display();
|
||||||
break; }
|
break; }
|
||||||
case rmsTimelineTimerDelete: {
|
case rmsTimelineTimerDelete: {
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cTimer *timer;
|
const cTimer *timer;
|
||||||
#else
|
|
||||||
cTimer *timer;
|
|
||||||
#endif
|
|
||||||
if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) {
|
if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) {
|
||||||
timer = menu->GetOriginalTimer();
|
timer = menu->GetOriginalTimer();
|
||||||
} else break;
|
} else break;
|
||||||
@ -770,7 +746,7 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
|
|||||||
recManager->DeleteTimer(Timers->GetTimer(timer));
|
recManager->DeleteTimer(Timers->GetTimer(timer));
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
recManager->DeleteTimer(Timers.GetTimer(timer));
|
recManager->DeleteTimer(Timers.GetTimer((cTimer*)timer));
|
||||||
#endif
|
#endif
|
||||||
delete activeMenu;
|
delete activeMenu;
|
||||||
if (timerConflicts) {
|
if (timerConflicts) {
|
||||||
@ -884,15 +860,13 @@ void cRecMenuManager::DisplaySearchTimerList(void) {
|
|||||||
activeMenu->Display();
|
activeMenu->Display();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
bool cRecMenuManager::DisplayTimerConflict(const cTimer *timer) {
|
bool cRecMenuManager::DisplayTimerConflict(const cTimer *timer) {
|
||||||
int timerID = 0;
|
int timerID = 0;
|
||||||
|
#if VDRVERSNUM >= 20301
|
||||||
LOCK_TIMERS_READ;
|
LOCK_TIMERS_READ;
|
||||||
for (const cTimer *t = Timers->First(); t; t = Timers->Next(t)) {
|
for (const cTimer *t = Timers->First(); t; t = Timers->Next(t)) {
|
||||||
#else
|
#else
|
||||||
bool cRecMenuManager::DisplayTimerConflict(cTimer *timer) {
|
for (const cTimer *t = Timers.First(); t; t = Timers.Next(t)) {
|
||||||
int timerID = 0;
|
|
||||||
for (cTimer *t = Timers.First(); t; t = Timers.Next(t)) {
|
|
||||||
#endif
|
#endif
|
||||||
if (t == timer)
|
if (t == timer)
|
||||||
return DisplayTimerConflict(timerID);
|
return DisplayTimerConflict(timerID);
|
||||||
|
@ -15,6 +15,7 @@ private:
|
|||||||
cRecMenu *activeMenuBuffer;
|
cRecMenu *activeMenuBuffer;
|
||||||
cRecMenu *activeMenuBuffer2;
|
cRecMenu *activeMenuBuffer2;
|
||||||
const cEvent *event;
|
const cEvent *event;
|
||||||
|
const cEvent *displayEvent;
|
||||||
cRecManager *recManager;
|
cRecManager *recManager;
|
||||||
cTVGuideTimerConflicts *timerConflicts;
|
cTVGuideTimerConflicts *timerConflicts;
|
||||||
cDetailView *detailView;
|
cDetailView *detailView;
|
||||||
@ -23,14 +24,11 @@ private:
|
|||||||
void SetBackground(void);
|
void SetBackground(void);
|
||||||
void DeleteBackground(void);
|
void DeleteBackground(void);
|
||||||
void DisplaySearchTimerList(void);
|
void DisplaySearchTimerList(void);
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
bool DisplayTimerConflict(const cTimer *timer);
|
bool DisplayTimerConflict(const cTimer *timer);
|
||||||
#else
|
|
||||||
bool DisplayTimerConflict(cTimer *timer);
|
|
||||||
#endif
|
|
||||||
bool DisplayTimerConflict(int timerID);
|
bool DisplayTimerConflict(int timerID);
|
||||||
void DisplayDetailedView(const cEvent *ev);
|
void DisplayDetailedView(const cEvent *ev);
|
||||||
void DisplayFavoriteResults(std::string header, const cEvent **result, int numResults);
|
void DisplayFavoriteResults(std::string header, const cEvent **result, int numResults);
|
||||||
|
eOSState StateMachine(eRecMenuState nextState);
|
||||||
public:
|
public:
|
||||||
cRecMenuManager(void);
|
cRecMenuManager(void);
|
||||||
virtual ~cRecMenuManager(void);
|
virtual ~cRecMenuManager(void);
|
||||||
@ -39,8 +37,7 @@ public:
|
|||||||
void Start(const cEvent *event);
|
void Start(const cEvent *event);
|
||||||
void StartFavorites(void);
|
void StartFavorites(void);
|
||||||
void Close(void);
|
void Close(void);
|
||||||
eOSState StateMachine(eRecMenuState nextState);
|
|
||||||
eOSState ProcessKey(eKeys Key);
|
eOSState ProcessKey(eKeys Key);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__TVGUIDE_RECMENUMANAGER_H
|
#endif //__TVGUIDE_RECMENUMANAGER_H
|
||||||
|
43
recmenus.c
43
recmenus.c
@ -111,7 +111,7 @@ cRecMenuConfirmTimer::cRecMenuConfirmTimer(const cEvent *event) {
|
|||||||
LOCK_CHANNELS_READ;
|
LOCK_CHANNELS_READ;
|
||||||
const cString channelName = Channels->GetByChannelID(event->ChannelID())->Name();
|
const cString channelName = Channels->GetByChannelID(event->ChannelID())->Name();
|
||||||
#else
|
#else
|
||||||
cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
|
const cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
|
||||||
#endif
|
#endif
|
||||||
cString message;
|
cString message;
|
||||||
bool eventHasTimer = false;
|
bool eventHasTimer = false;
|
||||||
@ -155,7 +155,7 @@ cRecMenuConfirmDeleteTimer::cRecMenuConfirmDeleteTimer(const cEvent *event) {
|
|||||||
LOCK_CHANNELS_READ;
|
LOCK_CHANNELS_READ;
|
||||||
const cString channelName = Channels->GetByChannelID(event->ChannelID())->Name();
|
const cString channelName = Channels->GetByChannelID(event->ChannelID())->Name();
|
||||||
#else
|
#else
|
||||||
cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
|
const cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
|
||||||
#endif
|
#endif
|
||||||
cString text = cString::sprintf("%s\n%s\n%s %s - %s\n%s",
|
cString text = cString::sprintf("%s\n%s\n%s %s - %s\n%s",
|
||||||
tr("Timer deleted"),
|
tr("Timer deleted"),
|
||||||
@ -183,7 +183,7 @@ cRecMenuAskDeleteTimer::cRecMenuAskDeleteTimer(const cEvent *event) {
|
|||||||
LOCK_CHANNELS_READ;
|
LOCK_CHANNELS_READ;
|
||||||
const cString channelName = Channels->GetByChannelID(event->ChannelID())->Name();
|
const cString channelName = Channels->GetByChannelID(event->ChannelID())->Name();
|
||||||
#else
|
#else
|
||||||
cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
|
const cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
|
||||||
#endif
|
#endif
|
||||||
cString text = cString::sprintf("%s \"%s, %s\" %s",
|
cString text = cString::sprintf("%s \"%s, %s\" %s",
|
||||||
tr("Timer"),
|
tr("Timer"),
|
||||||
@ -387,8 +387,8 @@ cRecMenuConfirmRerunUsed::cRecMenuConfirmRerunUsed(const cEvent *original, const
|
|||||||
const cString channelOrig = Channels->GetByChannelID(original->ChannelID())->Name();
|
const cString channelOrig = Channels->GetByChannelID(original->ChannelID())->Name();
|
||||||
const cString channelReplace = Channels->GetByChannelID(replace->ChannelID())->Name();
|
const cString channelReplace = Channels->GetByChannelID(replace->ChannelID())->Name();
|
||||||
#else
|
#else
|
||||||
cString channelOrig = Channels.GetByChannelID(original->ChannelID())->Name();
|
const cString channelOrig = Channels.GetByChannelID(original->ChannelID())->Name();
|
||||||
cString channelReplace = Channels.GetByChannelID(replace->ChannelID())->Name();
|
const cString channelReplace = Channels.GetByChannelID(replace->ChannelID())->Name();
|
||||||
#endif
|
#endif
|
||||||
cString message1 = tr("Timer for");
|
cString message1 = tr("Timer for");
|
||||||
cString message2 = tr("replaced by rerun");
|
cString message2 = tr("replaced by rerun");
|
||||||
@ -413,12 +413,7 @@ cRecMenuConfirmRerunUsed::cRecMenuConfirmRerunUsed(const cEvent *original, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// --- cRecMenuEditTimer ---------------------------------------------------------
|
// --- cRecMenuEditTimer ---------------------------------------------------------
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
cRecMenuEditTimer::cRecMenuEditTimer(const cTimer *timer, eRecMenuState nextState) {
|
cRecMenuEditTimer::cRecMenuEditTimer(const cTimer *timer, eRecMenuState nextState) {
|
||||||
// const cTimer *originalTimer;
|
|
||||||
#else
|
|
||||||
cRecMenuEditTimer::cRecMenuEditTimer(cTimer *timer, eRecMenuState nextState) {
|
|
||||||
#endif
|
|
||||||
SetWidthPercent(70);
|
SetWidthPercent(70);
|
||||||
if (!timer)
|
if (!timer)
|
||||||
return;
|
return;
|
||||||
@ -475,11 +470,7 @@ cRecMenuEditTimer::cRecMenuEditTimer(cTimer *timer, eRecMenuState nextState) {
|
|||||||
Arrange();
|
Arrange();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cTimer *cRecMenuEditTimer::GetOriginalTimer(void) {
|
const cTimer *cRecMenuEditTimer::GetOriginalTimer(void) {
|
||||||
#else
|
|
||||||
cTimer *cRecMenuEditTimer::GetOriginalTimer(void) {
|
|
||||||
#endif
|
|
||||||
return originalTimer;
|
return originalTimer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -517,11 +508,7 @@ cTimer cRecMenuEditTimer::GetTimer(void) {
|
|||||||
******************************************************************************************/
|
******************************************************************************************/
|
||||||
|
|
||||||
// --- cRecMenuSeriesTimer ---------------------------------------------------------
|
// --- cRecMenuSeriesTimer ---------------------------------------------------------
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
cRecMenuSeriesTimer::cRecMenuSeriesTimer(const cChannel *initialChannel, const cEvent *event, std::string folder) {
|
cRecMenuSeriesTimer::cRecMenuSeriesTimer(const cChannel *initialChannel, const cEvent *event, std::string folder) {
|
||||||
#else
|
|
||||||
cRecMenuSeriesTimer::cRecMenuSeriesTimer(cChannel *initialChannel, const cEvent *event, std::string folder) {
|
|
||||||
#endif
|
|
||||||
if (!initialChannel)
|
if (!initialChannel)
|
||||||
return;
|
return;
|
||||||
timerActive = true;
|
timerActive = true;
|
||||||
@ -540,7 +527,11 @@ cRecMenuSeriesTimer::cRecMenuSeriesTimer(cChannel *initialChannel, const cEvent
|
|||||||
SetHeader(infoItem);
|
SetHeader(infoItem);
|
||||||
|
|
||||||
AddMenuItem(new cRecMenuItemBool(tr("Timer Active"), timerActive, false, false, &timerActive));
|
AddMenuItem(new cRecMenuItemBool(tr("Timer Active"), timerActive, false, false, &timerActive));
|
||||||
|
#if VDRVERSNUM >= 20301
|
||||||
AddMenuItem(new cRecMenuItemChannelChooser(tr("Channel"), initialChannel, false, &channel));
|
AddMenuItem(new cRecMenuItemChannelChooser(tr("Channel"), initialChannel, false, &channel));
|
||||||
|
#else
|
||||||
|
AddMenuItem(new cRecMenuItemChannelChooser(tr("Channel"), (cChannel*)initialChannel, false, &channel));
|
||||||
|
#endif
|
||||||
AddMenuItem(new cRecMenuItemTime(tr("Series Timer start time"), start, false, &start));
|
AddMenuItem(new cRecMenuItemTime(tr("Series Timer start time"), start, false, &start));
|
||||||
AddMenuItem(new cRecMenuItemTime(tr("Series Timer stop time"), stop, false, &stop));
|
AddMenuItem(new cRecMenuItemTime(tr("Series Timer stop time"), stop, false, &stop));
|
||||||
AddMenuItem(new cRecMenuItemDayChooser(tr("Days to record"), dayOfWeek, false, &dayOfWeek));
|
AddMenuItem(new cRecMenuItemDayChooser(tr("Days to record"), dayOfWeek, false, &dayOfWeek));
|
||||||
@ -1277,7 +1268,7 @@ cRecMenuSearchConfirmTimer::cRecMenuSearchConfirmTimer(const cEvent *event, eRec
|
|||||||
LOCK_CHANNELS_READ;
|
LOCK_CHANNELS_READ;
|
||||||
const cString channelName = Channels->GetByChannelID(event->ChannelID())->Name();
|
const cString channelName = Channels->GetByChannelID(event->ChannelID())->Name();
|
||||||
#else
|
#else
|
||||||
cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
|
const cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
|
||||||
#endif
|
#endif
|
||||||
cString message = tr("Timer created");
|
cString message = tr("Timer created");
|
||||||
cString text = cString::sprintf("%s\n%s\n%s %s - %s\n%s",
|
cString text = cString::sprintf("%s\n%s\n%s %s - %s\n%s",
|
||||||
@ -1343,11 +1334,7 @@ cRecMenuRecordingSearch::cRecMenuRecordingSearch(std::string search) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// --- cRecMenuRecordingSearchResults ---------------------------------------------------------
|
// --- cRecMenuRecordingSearchResults ---------------------------------------------------------
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
cRecMenuRecordingSearchResults::cRecMenuRecordingSearchResults(std::string searchString, const cRecording **searchResults, int numResults) {
|
cRecMenuRecordingSearchResults::cRecMenuRecordingSearchResults(std::string searchString, const cRecording **searchResults, int numResults) {
|
||||||
#else
|
|
||||||
cRecMenuRecordingSearchResults::cRecMenuRecordingSearchResults(std::string searchString, cRecording **searchResults, int numResults) {
|
|
||||||
#endif
|
|
||||||
this->searchString = searchString;
|
this->searchString = searchString;
|
||||||
this->searchResults = searchResults;
|
this->searchResults = searchResults;
|
||||||
SetWidthPercent(80);
|
SetWidthPercent(80);
|
||||||
@ -1364,8 +1351,8 @@ cRecMenuRecordingSearchResults::cRecMenuRecordingSearchResults(std::string searc
|
|||||||
cRecMenuItem *buttons = new cRecMenuItemButtonYesNo(tr("Adapt Search"), tr("Close"), rmsRecordingSearch, rmsClose, false);
|
cRecMenuItem *buttons = new cRecMenuItemButtonYesNo(tr("Adapt Search"), tr("Close"), rmsRecordingSearch, rmsClose, false);
|
||||||
SetFooter(buttons);
|
SetFooter(buttons);
|
||||||
if (searchResults && (numResults > 0)) {
|
if (searchResults && (numResults > 0)) {
|
||||||
for (int i=0; i<numResults; i++) {
|
for (int i = 0; i < numResults; i++) {
|
||||||
if (!AddMenuItemInitial(new cRecMenuItemRecording(searchResults[i], (i==0)?true:false)))
|
if (!AddMenuItemInitial(new cRecMenuItemRecording(searchResults[i], (i == 0) ? true : false)))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1436,7 +1423,7 @@ void cRecMenuTimeline::GetTimersForDay(void) {
|
|||||||
// const cTimers* timers = Timers;
|
// const cTimers* timers = Timers;
|
||||||
for (const cTimer *t = Timers->First(); t; t = Timers->Next(t)) {
|
for (const cTimer *t = Timers->First(); t; t = Timers->Next(t)) {
|
||||||
#else
|
#else
|
||||||
for (cTimer *t = Timers.First(); t; t = Timers.Next(t)) {
|
for (const cTimer *t = Timers.First(); t; t = Timers.Next(t)) {
|
||||||
#endif
|
#endif
|
||||||
if (((t->StartTime() > timeStart) && (t->StartTime() <= timeStop)) || ((t->StopTime() > timeStart) && (t->StopTime() <= timeStop))) {
|
if (((t->StartTime() > timeStart) && (t->StartTime() <= timeStop)) || ((t->StopTime() > timeStart) && (t->StopTime() <= timeStop))) {
|
||||||
timersToday.push_back(t);
|
timersToday.push_back(t);
|
||||||
@ -1511,11 +1498,7 @@ void cRecMenuTimeline::ClearMenu(void) {
|
|||||||
header->UnsetCurrentTimer();
|
header->UnsetCurrentTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cTimer *cRecMenuTimeline::GetTimer(void) {
|
const cTimer *cRecMenuTimeline::GetTimer(void) {
|
||||||
#else
|
|
||||||
cTimer *cRecMenuTimeline::GetTimer(void) {
|
|
||||||
#endif
|
|
||||||
if (cRecMenuItemTimelineTimer *activeItem = dynamic_cast<cRecMenuItemTimelineTimer*>(GetActiveMenuItem()))
|
if (cRecMenuItemTimelineTimer *activeItem = dynamic_cast<cRecMenuItemTimelineTimer*>(GetActiveMenuItem()))
|
||||||
return activeItem->GetTimerValue();
|
return activeItem->GetTimerValue();
|
||||||
return NULL;
|
return NULL;
|
||||||
|
34
recmenus.h
34
recmenus.h
@ -115,11 +115,7 @@ public:
|
|||||||
// --- cRecMenuEditTimer ---------------------------------------------------------
|
// --- cRecMenuEditTimer ---------------------------------------------------------
|
||||||
class cRecMenuEditTimer: public cRecMenu {
|
class cRecMenuEditTimer: public cRecMenu {
|
||||||
private:
|
private:
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cTimer *originalTimer;
|
const cTimer *originalTimer;
|
||||||
#else
|
|
||||||
cTimer *originalTimer;
|
|
||||||
#endif
|
|
||||||
bool timerActive;
|
bool timerActive;
|
||||||
time_t day;
|
time_t day;
|
||||||
int start;
|
int start;
|
||||||
@ -128,13 +124,8 @@ private:
|
|||||||
int lifetime;
|
int lifetime;
|
||||||
char folder[TEXTINPUTLENGTH];
|
char folder[TEXTINPUTLENGTH];
|
||||||
public:
|
public:
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
cRecMenuEditTimer(const cTimer *timer, eRecMenuState nextState);
|
cRecMenuEditTimer(const cTimer *timer, eRecMenuState nextState);
|
||||||
const cTimer *GetOriginalTimer(void);
|
const cTimer *GetOriginalTimer(void);
|
||||||
#else
|
|
||||||
cRecMenuEditTimer(cTimer *timer, eRecMenuState nextState);
|
|
||||||
cTimer *GetOriginalTimer(void);
|
|
||||||
#endif
|
|
||||||
virtual ~cRecMenuEditTimer(void) {};
|
virtual ~cRecMenuEditTimer(void) {};
|
||||||
cTimer GetTimer(void);
|
cTimer GetTimer(void);
|
||||||
};
|
};
|
||||||
@ -157,11 +148,7 @@ class cRecMenuSeriesTimer: public cRecMenu {
|
|||||||
int lifetime;
|
int lifetime;
|
||||||
void CalculateTimes(const cEvent *event);
|
void CalculateTimes(const cEvent *event);
|
||||||
public:
|
public:
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
cRecMenuSeriesTimer(const cChannel *initialChannel, const cEvent *event, std::string folder);
|
cRecMenuSeriesTimer(const cChannel *initialChannel, const cEvent *event, std::string folder);
|
||||||
#else
|
|
||||||
cRecMenuSeriesTimer(cChannel *initialChannel, const cEvent *event, std::string folder);
|
|
||||||
#endif
|
|
||||||
virtual ~cRecMenuSeriesTimer(void) {};
|
virtual ~cRecMenuSeriesTimer(void) {};
|
||||||
cTimer *GetTimer(void);
|
cTimer *GetTimer(void);
|
||||||
};
|
};
|
||||||
@ -425,18 +412,10 @@ public:
|
|||||||
class cRecMenuRecordingSearchResults: public cRecMenu {
|
class cRecMenuRecordingSearchResults: public cRecMenu {
|
||||||
private:
|
private:
|
||||||
std::string searchString;
|
std::string searchString;
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cRecording **searchResults;
|
const cRecording **searchResults;
|
||||||
#else
|
|
||||||
cRecording **searchResults;
|
|
||||||
#endif
|
|
||||||
int numResults;
|
int numResults;
|
||||||
public:
|
public:
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
cRecMenuRecordingSearchResults(std::string searchString, const cRecording **searchResults, int numResults);
|
cRecMenuRecordingSearchResults(std::string searchString, const cRecording **searchResults, int numResults);
|
||||||
#else
|
|
||||||
cRecMenuRecordingSearchResults(std::string searchString, cRecording **searchResults, int numResults);
|
|
||||||
#endif
|
|
||||||
cRecMenuItem *GetMenuItem(int number);
|
cRecMenuItem *GetMenuItem(int number);
|
||||||
int GetTotalNumMenuItems(void);
|
int GetTotalNumMenuItems(void);
|
||||||
virtual ~cRecMenuRecordingSearchResults(void) {
|
virtual ~cRecMenuRecordingSearchResults(void) {
|
||||||
@ -459,11 +438,7 @@ public:
|
|||||||
// --- cRecMenuTimeline ---------------------------------------------------------
|
// --- cRecMenuTimeline ---------------------------------------------------------
|
||||||
class cRecMenuTimeline: public cRecMenu {
|
class cRecMenuTimeline: public cRecMenu {
|
||||||
private:
|
private:
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
std::vector<const cTimer*> timersToday;
|
std::vector<const cTimer*> timersToday;
|
||||||
#else
|
|
||||||
std::vector<cTimer*> timersToday;
|
|
||||||
#endif
|
|
||||||
int numTimersToday;
|
int numTimersToday;
|
||||||
time_t today;
|
time_t today;
|
||||||
time_t timeStart;
|
time_t timeStart;
|
||||||
@ -479,16 +454,11 @@ private:
|
|||||||
void ClearMenu(void);
|
void ClearMenu(void);
|
||||||
public:
|
public:
|
||||||
cRecMenuTimeline(cTVGuideTimerConflicts *timerConflicts);
|
cRecMenuTimeline(cTVGuideTimerConflicts *timerConflicts);
|
||||||
|
virtual ~cRecMenuTimeline(void) {};
|
||||||
cRecMenuItem *GetMenuItem(int number);
|
cRecMenuItem *GetMenuItem(int number);
|
||||||
int GetTotalNumMenuItems(void);
|
int GetTotalNumMenuItems(void);
|
||||||
virtual ~cRecMenuTimeline(void) {
|
|
||||||
};
|
|
||||||
eRecMenuState ProcessKey(eKeys Key);
|
eRecMenuState ProcessKey(eKeys Key);
|
||||||
#if VDRVERSNUM >= 20301
|
|
||||||
const cTimer *GetTimer(void);
|
const cTimer *GetTimer(void);
|
||||||
#else
|
|
||||||
cTimer *GetTimer(void);
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************************
|
/******************************************************************************************
|
||||||
@ -511,4 +481,4 @@ public:
|
|||||||
virtual ~cRecMenuFavorites(void);
|
virtual ~cRecMenuFavorites(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__TVGUIDE_RECMENUS_H
|
#endif //__TVGUIDE_RECMENUS_H
|
||||||
|
Loading…
Reference in New Issue
Block a user