diff options
author | Andreas Brugger <brougs78@gmx.net> | 2006-11-19 16:58:14 +0100 |
---|---|---|
committer | Thomas Günther <tom@toms-cafe.de> | 2009-06-03 03:35:58 +0200 |
commit | 74a5cc8e14900d48386e33cb576f154a6dd7e557 (patch) | |
tree | c7a90ba2fc5952558f6d4f528f94f8057f0d3ecd /common.h | |
parent | 8d32cf88bbe5b69a2710029cdaa896470a0fe20c (diff) | |
download | vdr-plugin-text2skin-74a5cc8e14900d48386e33cb576f154a6dd7e557.tar.gz vdr-plugin-text2skin-74a5cc8e14900d48386e33cb576f154a6dd7e557.tar.bz2 |
2006-11-19: Version 1.1-cvs_ext-0.9 (vdr-text2skin-1.1-cvs_ext-0.9.diff)
- added a test-feature to search for reruns of a program and add the
information to the extended epg-info (trigger DEVELOPMENT_FEATURES).
This uses a service-interface of the epgsearch-plugin
"Epgsearch-searchresults-v1.0"
- the timer-conflicts are now checked with epgsearch (service-interface
"Epgsearch-lastconflictinfo-v1.0", as it works more reliable and is
supported by the plugin author
- the extended epg-info and the recording-info are extended by AUX-Infos
(configurable)
there is also an option to strip known tags
- the tab-widths are scaled for taking into account that different TT-Fonts
have a different width than the default font from VDR
- added tokens for signal-info:
FrontendSTR, FrontendSNR, FrontendHasLock, FrontendHasSignal
- changed token TimerConflict to TimerConflicts
- added token PresentEventID for EPG-images
- added tokens for recordings:
RecordingFilename, RecordingPriority, RecordingLifetime
- removed Text2skin.diff from the rotor-plugin
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 45 |
1 files changed, 45 insertions, 0 deletions
@@ -9,6 +9,7 @@ #include <string> #include <vdr/osd.h> #include <vdr/config.h> +#include <vdr/epg.h> #if defined(DEBUG) || defined(BENCH) # ifdef DEBUG @@ -24,6 +25,9 @@ # define Ddiff(t,x) #endif +#define DStartBench(x) uint64 bench_##x = time_ms() +#define DShowBench(t,x) fprintf(stderr, "%s took %llu ms\n", t, time_ms() - bench_##x) + #if VDRVERSNUM >= 10318 # define time_ms() cTimeMs::Now() # define Apid1() Apid(0) @@ -47,11 +51,17 @@ const std::string &SkinPath(void); const char *ChannelNumber(const cChannel *Channel, int Number); const char *ChannelName(const cChannel *Channel, int Number); const char *ChannelShortName(const cChannel *Channel, int Number); +const char *EventType(uint Number); //const char *ChannelBouquet(const cChannel *Channel, int Number); bool StoppedTimer(const char *Name); const cRecording *GetRecordingByName(const char *Name); const cRecording *GetRecordingByFileName(const char *FileName); +int GetFrontendSTR(void); // Signal strength [%] +int GetFrontendSNR(void); // Signal to Noise ratio [%] +bool GetFrontendHasLock(void); +bool GetFrontendHasSignal(void); +std::string AddExtInfoToDescription(const char *Title, const char *ShortText, const char *Description, const char *Aux = NULL, bool StripAux = false); int GetRecordingSize(const char *FileName); // [MB] int GetRecordingLength(const char *FileName); // [min] int GetRecordingCuttedLength(const char *FileName); // [min] @@ -63,5 +73,40 @@ bool ParseVar(const char *Text, const char *Name, std::string &Value); bool ParseVar(const char *Text, const char *Name, tColor *Value); void SkipQuotes(std::string &Value); +std::string FitToWidth(std::string &Line, uint Width); +std::string FitToWidth(std::stringstream &Line, uint Width); +std::string StripXmlTag(std::string &Line, const char *Tag); + +// 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 +// out + + class cServiceSearchResult : public cListObject + { + public: + const cEvent* event; + cServiceSearchResult(const cEvent* Event) : event(Event) {} + }; + + cList<cServiceSearchResult>* pResultList; // pointer to the results +}; + +// Data structure for service "Epgsearch-lastconflictinfo-v1.0" +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 +}; #endif // VDR_TEXT2SKIN_COMMON_H |