From 185b044529d686c934717b9e7e271aa2468aef19 Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Sun, 15 Apr 2007 18:45:45 +0000 Subject: - changes for search timer edit - new functions to get blacklists and channel groups --- epgsearch/services.h | 126 ++++++++++++++++++++++++--------------------------- 1 file changed, 59 insertions(+), 67 deletions(-) (limited to 'epgsearch') diff --git a/epgsearch/services.h b/epgsearch/services.h index 902adee..a85a8cd 100644 --- a/epgsearch/services.h +++ b/epgsearch/services.h @@ -4,61 +4,54 @@ #include #include #include +#include // Data structure for service "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) - int channelNr; // channel number to search in (0=any) - bool useTitle; // search in title - bool useSubTitle; // search in subtitle - bool useDescription; // search in description + char* query; // search term + int mode; // search mode (0=phrase, 1=and, 2=or, 3=regular expression) + int channelNr; // channel number to search in (0=any) + bool useTitle; // search in title + bool useSubTitle; // search in subtitle + bool useDescription; // search in description // 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" 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 - const cEvent* event; // pointer to the event corresponding to this timer (may be NULL) + cTimer* timer; // pointer to the timer to edit + 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) // out - cOsdMenu* pTimerMenu; // pointer to the menu of results + cOsdMenu* pTimerMenu; // pointer to the menu of results }; // Data structure for service "Epgsearch-updatesearchtimers-v1.0" struct Epgsearch_updatesearchtimers_v1_0 { // in - bool showMessage; // inform via osd when finished? + bool showMessage; // inform via osd when finished? }; // Data structure for service "Epgsearch-osdmessage-v1.0" struct Epgsearch_osdmessage_v1_0 { // in - char* message; // the message to display - eMessageType type; + char* message; // the message to display + eMessageType type; }; -// Data structure for service "Epgsearch-searchmenu-v1.0" -struct Epgsearch_searchmenu_v1_0 +// Data structure for service "EpgsearchMenu-v1.0" +struct EpgSearchMenu_v1_0 { // in // out - cOsdMenu* pSearchMenu; // pointer to the search menu -}; - -// Data structure for service "Epgsearch-conflictmenu-v1.0" -struct Epgsearch_conflictmenu_v1_0 -{ -// in -// out - cOsdMenu* pConflictMenu; // pointer to the conflict menu + cOsdMenu* Menu; // pointer to the menu }; // Data structure for service "Epgsearch-lastconflictinfo-v1.0" @@ -66,74 +59,73 @@ struct Epgsearch_lastconflictinfo_v1_0 { // in // out - time_t nextConflict; // next conflict date, 0 if none - int relevantConflicts; // number of relevant conflicts - int totalConflicts; // total number of conflicts + time_t nextConflict; // next conflict date, 0 if none + int relevantConflicts; // number of relevant conflicts + int totalConflicts; // total number of conflicts }; // Data structure for service "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) - int channelNr; // channel number to search in (0=any) - bool useTitle; // search in title - bool useSubTitle; // search in subtitle - bool useDescription; // search in description + char* query; // search term + int mode; // search mode (0=phrase, 1=and, 2=or, 3=regular expression) + int channelNr; // channel number to search in (0=any) + bool useTitle; // search in title + bool useSubTitle; // search in subtitle + bool useDescription; // search in description // out - class cServiceSearchResult : public cListObject - { - public: - const cEvent* event; - cServiceSearchResult(const cEvent* Event) : event(Event) {} - }; + class cServiceSearchResult : public cListObject + { + public: + const cEvent* event; + cServiceSearchResult(const cEvent* Event) : event(Event) {} + }; - cList* pResultList; // pointer to the results + cList* pResultList; // pointer to the results }; // Data structure for service "Epgsearch-switchtimer-v1.0" struct Epgsearch_switchtimer_v1_0 { // in - const cEvent* event; - int mode; // mode (0=query existance, 1=add/modify, 2=delete) + const cEvent* event; + int mode; // mode (0=query existance, 1=add/modify, 2=delete) // in/out - int switchMinsBefore; - int announceOnly; + int switchMinsBefore; + int announceOnly; // out - bool success; // result -}; - -// Data structure for service "Epgsearch-quicksearch-v1.0" -struct Epgsearch_quicksearch_v1_0 -{ -// in -// out - cOsdMenu* pSearchMenu; // pointer to the search menu + bool success; // result }; // Data structures for service "Epgsearch-services-v1.0" class cServiceHandler { - public: - virtual std::list 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; - // adds a new search timer and returns its ID (-1 on error) - virtual bool ModSearchTimer(const std::string&) = 0; - // edits an existing search timer and returns success - virtual bool DelSearchTimer(int) = 0; - // deletes search timer with given ID and returns success - virtual std::list QuerySearchTimer(int) = 0; - // returns the search result of the searchtimer with given ID in the same format as used in SVDRP command 'QRYS' (->MANUAL) - virtual ~cServiceHandler() {} + public: + virtual std::list 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; + // adds a new search timer and returns its ID (-1 on error) + virtual bool ModSearchTimer(const std::string&) = 0; + // edits an existing search timer and returns success + virtual bool DelSearchTimer(int) = 0; + // deletes search timer with given ID and returns success + virtual std::list QuerySearchTimer(int) = 0; + // returns the search result of the searchtimer with given ID in the same format as used in SVDRP command 'QRYS' (->MANUAL) + virtual std::list ExtEPGInfoList() = 0; + // returns a list of extended EPG categories in the same format as used in epgsearchcats.conf + virtual std::list ChanGrpList() = 0; + // returns a list of channel groups maintained by epgsearch + virtual std::list BlackList() = 0; + // returns a list of blacklists in the same format as used in epgsearchblacklists.conf + virtual ~cServiceHandler() {} }; struct Epgsearch_services_v1_0 { // in/out - std::auto_ptr handler; + std::auto_ptr handler; }; + #endif -- cgit v1.2.3