vdr-plugin-tvguide/recmanager.h

79 lines
3.1 KiB
C
Raw Normal View History

2013-07-09 00:17:42 +02:00
#ifndef __TVGUIDE_RECMMANAGER_H
#define __TVGUIDE_RECMMANAGER_H
2013-12-07 15:51:50 +01:00
#include <string>
#include <vector>
#include <vdr/plugin.h>
#include "services/epgsearch.h"
2013-12-07 15:51:50 +01:00
#include "detailview.h"
#include "recmenu.h"
#include "searchtimer.h"
#include "switchtimer.h"
#include "timerconflict.h"
2013-07-09 00:17:42 +02:00
struct TVGuideEPGSearchTemplate {
public:
std::string name;
std::string templValue;
};
// --- cRecManager -------------------------------------------------------------
class cRecManager {
private:
cPlugin *epgSearchPlugin;
bool epgSearchAvailable;
public:
cRecManager(void);
2013-07-09 00:17:42 +02:00
void SetEPGSearchPlugin(void);
bool EpgSearchAvailable(void) {return epgSearchAvailable;};
2013-07-20 13:46:26 +02:00
bool RefreshRemoteTimers(void);
bool CheckEventForTimer(const cEvent *event);
2018-03-08 13:02:38 +01:00
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
const cTimer *GetTimerForEvent(const cEvent *event);
#else
2013-07-20 13:46:26 +02:00
cTimer *GetTimerForEvent(const cEvent *event);
2018-03-08 13:02:38 +01:00
#endif
cTimer *createTimer(const cEvent *event, std::string path = "");
2013-07-20 13:46:26 +02:00
cTimer *createLocalTimer(const cEvent *event, std::string path);
cTimer *createRemoteTimer(const cEvent *event, std::string path);
void SetTimerPath(cTimer *timer, const cEvent *event, std::string path);
2018-03-08 13:02:38 +01:00
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
void DeleteTimer(const cTimer *timer);
#else
void DeleteTimer(cTimer *timer);
2018-03-08 13:02:38 +01:00
#endif
2013-07-09 00:17:42 +02:00
void DeleteTimer(int timerID);
2013-07-20 13:46:26 +02:00
void DeleteTimer(const cEvent *event);
void DeleteLocalTimer(const cEvent *event);
void DeleteRemoteTimer(const cEvent *event);
2018-03-08 13:02:38 +01:00
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
void SaveTimer(const cTimer *timer, cTimer newTimerSettings);
#else
void SaveTimer(cTimer *timer, cTimer newTimerSettings);
2018-03-08 13:02:38 +01:00
#endif
2013-07-09 00:17:42 +02:00
bool IsRecorded(const cEvent *event);
cTVGuideTimerConflicts *CheckTimerConflict(void);
void CreateSeriesTimer(cTimer *seriesTimer);
2013-07-09 00:17:42 +02:00
const cEvent **PerformSearchTimerSearch(std::string epgSearchString, int &numResults);
const cEvent **PerformSearch(Epgsearch_searchresults_v1_0 data, int &numResults);
void ReadEPGSearchTemplates(std::vector<TVGuideEPGSearchTemplate> *epgTemplates);
void GetSearchTimers(std::vector<cTVGuideSearchTimer> *timers);
2013-07-09 00:17:42 +02:00
int CreateSearchTimer(std::string epgSearchString);
bool SaveSearchTimer(cTVGuideSearchTimer *searchTimer);
void DeleteSearchTimer(cTVGuideSearchTimer *searchTimer, bool delTimers);
2013-07-09 00:17:42 +02:00
void UpdateSearchTimers(void);
bool CreateSwitchTimer(const cEvent *event, cSwitchTimer switchTimer);
2013-07-09 00:17:42 +02:00
void DeleteSwitchTimer(const cEvent *event);
2018-03-08 13:02:38 +01:00
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
const cRecording **SearchForRecordings(std::string searchString, int &numResults);
#else
cRecording **SearchForRecordings(std::string searchString, int &numResults);
2018-03-08 13:02:38 +01:00
#endif
const cEvent **LoadReruns(const cEvent *event, int &numResults);
void GetFavorites(std::vector<cTVGuideSearchTimer> *favorites);
const cEvent **WhatsOnNow(bool nowOrNext, int &numResults);
const cEvent **UserDefinedTime(int userTime, int &numResults);
2013-07-09 00:17:42 +02:00
virtual ~cRecManager (void);
};
#endif //__TVGUIDE_RECMMANAGER_H