summaryrefslogtreecommitdiff
path: root/service.h
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2017-03-15 20:05:03 +0100
committerhorchi <vdr@jwendel.de>2017-03-15 20:05:03 +0100
commit484b744d47a901e2537edcab5f4b10bbc5e9b22e (patch)
tree5032215691c36d9a8f6da184fb0d1969a62b8c48 /service.h
parent3345d4c5afa59a3a7f536fec61fb314bc00640c6 (diff)
downloadvdr-plugin-epg2vdr-484b744d47a901e2537edcab5f4b10bbc5e9b22e.tar.gz
vdr-plugin-epg2vdr-484b744d47a901e2537edcab5f4b10bbc5e9b22e.tar.bz2
added extra data to plugin interface
Diffstat (limited to 'service.h')
-rw-r--r--service.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/service.h b/service.h
index 8e40f75..122986f 100644
--- a/service.h
+++ b/service.h
@@ -12,23 +12,24 @@
#include <vdr/epg.h>
#include <list>
+#include <map>
//***************************************************************************
-// 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<std::string,std::string>* getValues() const { return &epg2vdrData; }
protected:
- int imageCount;
+ std::map<std::string,std::string> epg2vdrData;
};
//***************************************************************************
@@ -75,7 +76,7 @@ class cEpgTimer_Interface_V1 : public cTimer
};
//***************************************************************************
-// Timer - Service Interface
+// Service Interface
//***************************************************************************
struct cEpgTimer_Service_V1
@@ -89,6 +90,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); }
};
//***************************************************************************