Update "services/epgsearch.h"

This commit is contained in:
kamel5 2019-03-23 15:55:42 +01:00
parent 3a940d061c
commit d5ecea55a6

View File

@ -31,8 +31,7 @@ The project's page is at http://winni.vdr-developer.org/epgsearch
#include <vdr/osdbase.h>
// Data structure for service "Epgsearch-search-v1.0"
struct Epgsearch_search_v1_0
{
struct Epgsearch_search_v1_0 {
// in
char* query; // search term
int mode; // search mode (0=phrase, 1=and, 2=or, 3=regular expression)
@ -45,8 +44,7 @@ struct Epgsearch_search_v1_0
};
// Data structure for service "Epgsearch-exttimeredit-v1.0"
struct Epgsearch_exttimeredit_v1_0
{
struct Epgsearch_exttimeredit_v1_0 {
// in
cTimer* timer; // pointer to the timer to edit
bool bNew; // flag that indicates, if this is a new timer or an existing one
@ -56,38 +54,33 @@ struct Epgsearch_exttimeredit_v1_0
};
// Data structure for service "Epgsearch-enablesearchtimers-v1.0"
struct Epgsearch_enablesearchtimers_v1_0
{
struct Epgsearch_enablesearchtimers_v1_0 {
// in
bool enable; // enable search timer thread?
};
// Data structure for service "Epgsearch-updatesearchtimers-v1.0"
struct Epgsearch_updatesearchtimers_v1_0
{
struct Epgsearch_updatesearchtimers_v1_0 {
// in
bool showMessage; // inform via osd when finished?
};
// Data structure for service "Epgsearch-osdmessage-v1.0"
struct Epgsearch_osdmessage_v1_0
{
struct Epgsearch_osdmessage_v1_0 {
// in
char* message; // the message to display
eMessageType type;
};
// Data structure for service "EpgsearchMenu-v1.0"
struct EpgSearchMenu_v1_0
{
struct EpgSearchMenu_v1_0 {
// in
// out
cOsdMenu* Menu; // pointer to the menu
};
// Data structure for service "Epgsearch-lastconflictinfo-v1.0"
struct Epgsearch_lastconflictinfo_v1_0
{
struct Epgsearch_lastconflictinfo_v1_0 {
// in
// out
time_t nextConflict; // next conflict date, 0 if none
@ -96,8 +89,7 @@ struct Epgsearch_lastconflictinfo_v1_0
};
// Data structure for service "Epgsearch-searchresults-v1.0"
struct Epgsearch_searchresults_v1_0
{
struct Epgsearch_searchresults_v1_0 {
// in
char* query; // search term
int mode; // search mode (0=phrase, 1=and, 2=or, 3=regular expression)
@ -118,8 +110,7 @@ struct Epgsearch_searchresults_v1_0
};
// Data structure for service "Epgsearch-switchtimer-v1.0"
struct Epgsearch_switchtimer_v1_0
{
struct Epgsearch_switchtimer_v1_0 {
// in
const cEvent* event;
int mode; // mode (0=query existence, 1=add/modify, 2=delete)
@ -133,7 +124,7 @@ struct Epgsearch_switchtimer_v1_0
// Data structures for service "Epgsearch-services-v1.0"
class cServiceHandler
{
public:
public:
virtual std::list<std::string> SearchTimerList() = 0;
// returns a list of search timer entries in the same format as used in epgsearch.conf
virtual int AddSearchTimer(const std::string&) = 0;
@ -161,42 +152,39 @@ class cServiceHandler
virtual bool WriteSetupValue(const std::string& entry, const std::string& value) = 0;
};
struct Epgsearch_services_v1_0
{
struct Epgsearch_services_v1_0 {
// in/out
std::auto_ptr<cServiceHandler> handler;
std::unique_ptr<cServiceHandler> handler;
};
// Data structures for service "Epgsearch-services-v1.1"
class cServiceHandler_v1_1 : public cServiceHandler
{
public:
public:
// Get timer conflicts
virtual std::list<std::string> TimerConflictList(bool relOnly=false) = 0;
virtual std::list<std::string> TimerConflictList(bool relOnly = false) = 0;
// Check if a conflict check is advised
virtual bool IsConflictCheckAdvised() = 0;
};
struct Epgsearch_services_v1_1
{
struct Epgsearch_services_v1_1 {
// in/out
std::auto_ptr<cServiceHandler_v1_1> handler;
std::unique_ptr<cServiceHandler_v1_1> handler;
};
// Data structures for service "Epgsearch-services-v1.2"
class cServiceHandler_v1_2 : public cServiceHandler_v1_1
{
public:
public:
// List of all recording directories used in recordings, timers (and optionally search timers or in epgsearchdirs.conf)
virtual std::set<std::string> ShortDirectoryList() = 0;
// Evaluate an expression against an event
virtual std::string Evaluate(const std::string& expr, const cEvent* event) = 0;
};
struct Epgsearch_services_v1_2
{
struct Epgsearch_services_v1_2 {
// in/out
std::auto_ptr<cServiceHandler_v1_2> handler;
std::unique_ptr<cServiceHandler_v1_2> handler;
};
#endif