From 484b744d47a901e2537edcab5f4b10bbc5e9b22e Mon Sep 17 00:00:00 2001 From: horchi Date: Wed, 15 Mar 2017 20:05:03 +0100 Subject: added extra data to plugin interface --- service.h | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'service.h') diff --git a/service.h b/service.h index 8e40f75..122986f 100644 --- a/service.h +++ b/service.h @@ -12,23 +12,24 @@ #include #include +#include //*************************************************************************** -// Timer - Skin Interface +// Event - Skin Interface //*************************************************************************** class cEpgEvent_Interface_V1 : public cEvent { public: - cEpgEvent_Interface_V1(tEventID EventID) - : cEvent(EventID) { imageCount = 0; } + cEpgEvent_Interface_V1(tEventID EventID) : cEvent(EventID) {} - int getImageCount() const { return imageCount; } + const char* getValue(const char* name) { return epg2vdrData[name].c_str(); } + const std::map* getValues() const { return &epg2vdrData; } protected: - int imageCount; + std::map epg2vdrData; }; //*************************************************************************** @@ -75,7 +76,7 @@ class cEpgTimer_Interface_V1 : public cTimer }; //*************************************************************************** -// Timer - Service Interface +// Service Interface //*************************************************************************** struct cEpgTimer_Service_V1 @@ -88,6 +89,10 @@ struct cEpgTimer_Service_V1 #ifdef EPG2VDR +//*************************************************************************** +// Internal +//*************************************************************************** + //*************************************************************************** // Class cEpgEvent //*************************************************************************** @@ -100,7 +105,9 @@ class cEpgEvent : public cEpgEvent_Interface_V1 virtual ~cEpgEvent() {} bool Read(FILE *f); - void setImageCount(int count) { imageCount = count; } + + void setValue(const char* name, const char* value) { epg2vdrData[name] = value; } + void setValue(const char* name, long value) { epg2vdrData[name] = std::to_string(value); } }; //*************************************************************************** -- cgit v1.2.3