mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Update "services/epgsearch.h"
This commit is contained in:
parent
3a940d061c
commit
d5ecea55a6
@ -31,172 +31,160 @@ The project's page is at http://winni.vdr-developer.org/epgsearch
|
|||||||
#include <vdr/osdbase.h>
|
#include <vdr/osdbase.h>
|
||||||
|
|
||||||
// Data structure for service "Epgsearch-search-v1.0"
|
// Data structure for service "Epgsearch-search-v1.0"
|
||||||
struct Epgsearch_search_v1_0
|
struct Epgsearch_search_v1_0 {
|
||||||
{
|
|
||||||
// in
|
// in
|
||||||
char* query; // search term
|
char* query; // search term
|
||||||
int mode; // search mode (0=phrase, 1=and, 2=or, 3=regular expression)
|
int mode; // search mode (0=phrase, 1=and, 2=or, 3=regular expression)
|
||||||
int channelNr; // channel number to search in (0=any)
|
int channelNr; // channel number to search in (0=any)
|
||||||
bool useTitle; // search in title
|
bool useTitle; // search in title
|
||||||
bool useSubTitle; // search in subtitle
|
bool useSubTitle; // search in subtitle
|
||||||
bool useDescription; // search in description
|
bool useDescription; // search in description
|
||||||
// out
|
// out
|
||||||
cOsdMenu* pResultMenu; // pointer to the menu of results
|
cOsdMenu* pResultMenu; // pointer to the menu of results
|
||||||
};
|
};
|
||||||
|
|
||||||
// Data structure for service "Epgsearch-exttimeredit-v1.0"
|
// Data structure for service "Epgsearch-exttimeredit-v1.0"
|
||||||
struct Epgsearch_exttimeredit_v1_0
|
struct Epgsearch_exttimeredit_v1_0 {
|
||||||
{
|
|
||||||
// in
|
// in
|
||||||
cTimer* timer; // pointer to the timer to edit
|
cTimer* timer; // pointer to the timer to edit
|
||||||
bool bNew; // flag that indicates, if this is a new timer or an existing one
|
bool bNew; // flag that indicates, if this is a new timer or an existing one
|
||||||
const cEvent* event; // pointer to the event corresponding to this timer (may be NULL)
|
const cEvent* event; // pointer to the event corresponding to this timer (may be NULL)
|
||||||
// out
|
// out
|
||||||
cOsdMenu* pTimerMenu; // pointer to the menu of results
|
cOsdMenu* pTimerMenu; // pointer to the menu of results
|
||||||
};
|
};
|
||||||
|
|
||||||
// Data structure for service "Epgsearch-enablesearchtimers-v1.0"
|
// Data structure for service "Epgsearch-enablesearchtimers-v1.0"
|
||||||
struct Epgsearch_enablesearchtimers_v1_0
|
struct Epgsearch_enablesearchtimers_v1_0 {
|
||||||
{
|
|
||||||
// in
|
// in
|
||||||
bool enable; // enable search timer thread?
|
bool enable; // enable search timer thread?
|
||||||
};
|
};
|
||||||
|
|
||||||
// Data structure for service "Epgsearch-updatesearchtimers-v1.0"
|
// Data structure for service "Epgsearch-updatesearchtimers-v1.0"
|
||||||
struct Epgsearch_updatesearchtimers_v1_0
|
struct Epgsearch_updatesearchtimers_v1_0 {
|
||||||
{
|
|
||||||
// in
|
// in
|
||||||
bool showMessage; // inform via osd when finished?
|
bool showMessage; // inform via osd when finished?
|
||||||
};
|
};
|
||||||
|
|
||||||
// Data structure for service "Epgsearch-osdmessage-v1.0"
|
// Data structure for service "Epgsearch-osdmessage-v1.0"
|
||||||
struct Epgsearch_osdmessage_v1_0
|
struct Epgsearch_osdmessage_v1_0 {
|
||||||
{
|
|
||||||
// in
|
// in
|
||||||
char* message; // the message to display
|
char* message; // the message to display
|
||||||
eMessageType type;
|
eMessageType type;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Data structure for service "EpgsearchMenu-v1.0"
|
// Data structure for service "EpgsearchMenu-v1.0"
|
||||||
struct EpgSearchMenu_v1_0
|
struct EpgSearchMenu_v1_0 {
|
||||||
{
|
|
||||||
// in
|
// in
|
||||||
// out
|
// out
|
||||||
cOsdMenu* Menu; // pointer to the menu
|
cOsdMenu* Menu; // pointer to the menu
|
||||||
};
|
};
|
||||||
|
|
||||||
// Data structure for service "Epgsearch-lastconflictinfo-v1.0"
|
// Data structure for service "Epgsearch-lastconflictinfo-v1.0"
|
||||||
struct Epgsearch_lastconflictinfo_v1_0
|
struct Epgsearch_lastconflictinfo_v1_0 {
|
||||||
{
|
|
||||||
// in
|
// in
|
||||||
// out
|
// out
|
||||||
time_t nextConflict; // next conflict date, 0 if none
|
time_t nextConflict; // next conflict date, 0 if none
|
||||||
int relevantConflicts; // number of relevant conflicts
|
int relevantConflicts; // number of relevant conflicts
|
||||||
int totalConflicts; // total number of conflicts
|
int totalConflicts; // total number of conflicts
|
||||||
};
|
};
|
||||||
|
|
||||||
// Data structure for service "Epgsearch-searchresults-v1.0"
|
// Data structure for service "Epgsearch-searchresults-v1.0"
|
||||||
struct Epgsearch_searchresults_v1_0
|
struct Epgsearch_searchresults_v1_0 {
|
||||||
{
|
|
||||||
// in
|
// in
|
||||||
char* query; // search term
|
char* query; // search term
|
||||||
int mode; // search mode (0=phrase, 1=and, 2=or, 3=regular expression)
|
int mode; // search mode (0=phrase, 1=and, 2=or, 3=regular expression)
|
||||||
int channelNr; // channel number to search in (0=any)
|
int channelNr; // channel number to search in (0=any)
|
||||||
bool useTitle; // search in title
|
bool useTitle; // search in title
|
||||||
bool useSubTitle; // search in subtitle
|
bool useSubTitle; // search in subtitle
|
||||||
bool useDescription; // search in description
|
bool useDescription; // search in description
|
||||||
// out
|
// out
|
||||||
|
|
||||||
class cServiceSearchResult : public cListObject
|
class cServiceSearchResult : public cListObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
const cEvent* event;
|
const cEvent* event;
|
||||||
cServiceSearchResult(const cEvent* Event) : event(Event) {}
|
cServiceSearchResult(const cEvent* Event) : event(Event) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
cList<cServiceSearchResult>* pResultList; // pointer to the results
|
cList<cServiceSearchResult>* pResultList; // pointer to the results
|
||||||
};
|
};
|
||||||
|
|
||||||
// Data structure for service "Epgsearch-switchtimer-v1.0"
|
// Data structure for service "Epgsearch-switchtimer-v1.0"
|
||||||
struct Epgsearch_switchtimer_v1_0
|
struct Epgsearch_switchtimer_v1_0 {
|
||||||
{
|
|
||||||
// in
|
// in
|
||||||
const cEvent* event;
|
const cEvent* event;
|
||||||
int mode; // mode (0=query existence, 1=add/modify, 2=delete)
|
int mode; // mode (0=query existence, 1=add/modify, 2=delete)
|
||||||
// in/out
|
// in/out
|
||||||
int switchMinsBefore;
|
int switchMinsBefore;
|
||||||
int announceOnly;
|
int announceOnly;
|
||||||
// out
|
// out
|
||||||
bool success; // result
|
bool success; // result
|
||||||
};
|
};
|
||||||
|
|
||||||
// Data structures for service "Epgsearch-services-v1.0"
|
// Data structures for service "Epgsearch-services-v1.0"
|
||||||
class cServiceHandler
|
class cServiceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual std::list<std::string> SearchTimerList() = 0;
|
virtual std::list<std::string> SearchTimerList() = 0;
|
||||||
// returns a list of search timer entries in the same format as used in epgsearch.conf
|
// returns a list of search timer entries in the same format as used in epgsearch.conf
|
||||||
virtual int AddSearchTimer(const std::string&) = 0;
|
virtual int AddSearchTimer(const std::string&) = 0;
|
||||||
// adds a new search timer and returns its ID (-1 on error)
|
// adds a new search timer and returns its ID (-1 on error)
|
||||||
virtual bool ModSearchTimer(const std::string&) = 0;
|
virtual bool ModSearchTimer(const std::string&) = 0;
|
||||||
// edits an existing search timer and returns success
|
// edits an existing search timer and returns success
|
||||||
virtual bool DelSearchTimer(int) = 0;
|
virtual bool DelSearchTimer(int) = 0;
|
||||||
// deletes search timer with given ID and returns success
|
// deletes search timer with given ID and returns success
|
||||||
virtual std::list<std::string> QuerySearchTimer(int) = 0;
|
virtual std::list<std::string> QuerySearchTimer(int) = 0;
|
||||||
// returns the search result of the searchtimer with given ID in the same format as used in SVDRP command 'QRYS' (->MANUAL)
|
// returns the search result of the searchtimer with given ID in the same format as used in SVDRP command 'QRYS' (->MANUAL)
|
||||||
virtual std::list<std::string> QuerySearch(std::string) = 0;
|
virtual std::list<std::string> QuerySearch(std::string) = 0;
|
||||||
// returns the search result of the searchtimer with given settings in the same format as used in SVDRP command 'QRYS' (->MANUAL)
|
// returns the search result of the searchtimer with given settings in the same format as used in SVDRP command 'QRYS' (->MANUAL)
|
||||||
virtual std::list<std::string> ExtEPGInfoList() = 0;
|
virtual std::list<std::string> ExtEPGInfoList() = 0;
|
||||||
// returns a list of extended EPG categories in the same format as used in epgsearchcats.conf
|
// returns a list of extended EPG categories in the same format as used in epgsearchcats.conf
|
||||||
virtual std::list<std::string> ChanGrpList() = 0;
|
virtual std::list<std::string> ChanGrpList() = 0;
|
||||||
// returns a list of channel groups maintained by epgsearch
|
// returns a list of channel groups maintained by epgsearch
|
||||||
virtual std::list<std::string> BlackList() = 0;
|
virtual std::list<std::string> BlackList() = 0;
|
||||||
// returns a list of blacklists in the same format as used in epgsearchblacklists.conf
|
// returns a list of blacklists in the same format as used in epgsearchblacklists.conf
|
||||||
virtual std::set<std::string> DirectoryList() = 0;
|
virtual std::set<std::string> DirectoryList() = 0;
|
||||||
// List of all recording directories used in recordings, timers, search timers or in epgsearchdirs.conf
|
// List of all recording directories used in recordings, timers, search timers or in epgsearchdirs.conf
|
||||||
virtual ~cServiceHandler() {}
|
virtual ~cServiceHandler() {}
|
||||||
// Read a setup value
|
// Read a setup value
|
||||||
virtual std::string ReadSetupValue(const std::string& entry) = 0;
|
virtual std::string ReadSetupValue(const std::string& entry) = 0;
|
||||||
// Write a setup value
|
// Write a setup value
|
||||||
virtual bool WriteSetupValue(const std::string& entry, const std::string& value) = 0;
|
virtual bool WriteSetupValue(const std::string& entry, const std::string& value) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Epgsearch_services_v1_0
|
struct Epgsearch_services_v1_0 {
|
||||||
{
|
|
||||||
// in/out
|
// in/out
|
||||||
std::auto_ptr<cServiceHandler> handler;
|
std::unique_ptr<cServiceHandler> handler;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Data structures for service "Epgsearch-services-v1.1"
|
// Data structures for service "Epgsearch-services-v1.1"
|
||||||
class cServiceHandler_v1_1 : public cServiceHandler
|
class cServiceHandler_v1_1 : public cServiceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Get timer conflicts
|
// 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
|
// Check if a conflict check is advised
|
||||||
virtual bool IsConflictCheckAdvised() = 0;
|
virtual bool IsConflictCheckAdvised() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Epgsearch_services_v1_1
|
struct Epgsearch_services_v1_1 {
|
||||||
{
|
|
||||||
// in/out
|
// in/out
|
||||||
std::auto_ptr<cServiceHandler_v1_1> handler;
|
std::unique_ptr<cServiceHandler_v1_1> handler;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Data structures for service "Epgsearch-services-v1.2"
|
// Data structures for service "Epgsearch-services-v1.2"
|
||||||
class cServiceHandler_v1_2 : public cServiceHandler_v1_1
|
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)
|
// List of all recording directories used in recordings, timers (and optionally search timers or in epgsearchdirs.conf)
|
||||||
virtual std::set<std::string> ShortDirectoryList() = 0;
|
virtual std::set<std::string> ShortDirectoryList() = 0;
|
||||||
// Evaluate an expression against an event
|
// Evaluate an expression against an event
|
||||||
virtual std::string Evaluate(const std::string& expr, const cEvent* event) = 0;
|
virtual std::string Evaluate(const std::string& expr, const cEvent* event) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Epgsearch_services_v1_2
|
struct Epgsearch_services_v1_2 {
|
||||||
{
|
|
||||||
// in/out
|
// in/out
|
||||||
std::auto_ptr<cServiceHandler_v1_2> handler;
|
std::unique_ptr<cServiceHandler_v1_2> handler;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user