diff options
| author | louis <louis.braun@gmx.de> | 2015-02-12 18:50:58 +0100 |
|---|---|---|
| committer | louis <louis.braun@gmx.de> | 2015-02-12 18:50:58 +0100 |
| commit | 4d7700aecedf475038d57e10f45ab2dd4bcf806f (patch) | |
| tree | 2fefc56fe77c8f4137187515a5f2b57d78425fea /libtemplate/template.c | |
| parent | 00ac852820a09f676157a7b487acf51f4fe95ff4 (diff) | |
| download | vdr-plugin-skindesigner-4d7700aecedf475038d57e10f45ab2dd4bcf806f.tar.gz vdr-plugin-skindesigner-4d7700aecedf475038d57e10f45ab2dd4bcf806f.tar.bz2 | |
plugin interface
Diffstat (limited to 'libtemplate/template.c')
| -rw-r--r-- | libtemplate/template.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/libtemplate/template.c b/libtemplate/template.c index ef7d677..01a7b28 100644 --- a/libtemplate/template.c +++ b/libtemplate/template.c @@ -4,11 +4,11 @@ // --- cTemplate ------------------------------------------------------------- -cTemplate::cTemplate(eViewType viewType) { +cTemplate::cTemplate(eViewType viewType, string pluginName, int viewID) { globals = NULL; rootView = NULL; this->viewType = viewType; - CreateView(); + CreateView(pluginName, viewID); } cTemplate::~cTemplate() { @@ -21,8 +21,8 @@ cTemplate::~cTemplate() { /******************************************************************* * Public Functions *******************************************************************/ -bool cTemplate::ReadFromXML(void) { - std::string xmlFile; +bool cTemplate::ReadFromXML(string xmlfile) { + string xmlFile; switch (viewType) { case vtDisplayChannel: xmlFile = "displaychannel.xml"; @@ -42,6 +42,9 @@ bool cTemplate::ReadFromXML(void) { case vtDisplayAudioTracks: xmlFile = "displayaudiotracks.xml"; break; + case vtDisplayPlugin: + xmlFile = xmlfile; + break; default: return false; } @@ -56,7 +59,7 @@ bool cTemplate::ReadFromXML(void) { //read additional plugin templates bool ok = true; if (viewType == vtDisplayMenu) { - config.InitPluginIterator(); + config.InitPluginMenuIterator(); map <int,string> *plugTemplates = NULL; string plugName; while ( plugTemplates = config.GetPluginTemplates(plugName) ) { @@ -119,7 +122,7 @@ void cTemplate::Debug(void) { * Private Functions *******************************************************************/ -void cTemplate::CreateView(void) { +void cTemplate::CreateView(string pluginName, int viewID) { switch (viewType) { case vtDisplayChannel: rootView = new cTemplateViewChannel(); @@ -138,7 +141,10 @@ void cTemplate::CreateView(void) { break; case vtDisplayMessage: rootView = new cTemplateViewMessage(); - break; + break; + case vtDisplayPlugin: + rootView = new cTemplateViewPlugin(pluginName, viewID); + break; default: esyslog("skindesigner: unknown view %d", viewType); } |
