summaryrefslogtreecommitdiff
path: root/services.h
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2015-02-12 18:50:58 +0100
committerlouis <louis.braun@gmx.de>2015-02-12 18:50:58 +0100
commit4d7700aecedf475038d57e10f45ab2dd4bcf806f (patch)
tree2fefc56fe77c8f4137187515a5f2b57d78425fea /services.h
parent00ac852820a09f676157a7b487acf51f4fe95ff4 (diff)
downloadvdr-plugin-skindesigner-4d7700aecedf475038d57e10f45ab2dd4bcf806f.tar.gz
vdr-plugin-skindesigner-4d7700aecedf475038d57e10f45ab2dd4bcf806f.tar.bz2
plugin interface
Diffstat (limited to 'services.h')
-rw-r--r--services.h82
1 files changed, 47 insertions, 35 deletions
diff --git a/services.h b/services.h
index 203e715..ea2372b 100644
--- a/services.h
+++ b/services.h
@@ -13,55 +13,67 @@ using namespace std;
// Data structure for service "RegisterPlugin"
class RegisterPlugin {
public:
- RegisterPlugin(void) {
- name = "";
- };
- void SetMenu(int key, string templateName) {
- menus.insert(pair<int, string>(key, templateName));
- }
+ RegisterPlugin(void) {
+ name = "";
+ };
+ void SetMenu(int key, string templateName) {
+ menus.insert(pair<int, string>(key, templateName));
+ }
+ void SetView(int key, string templateName) {
+ views.insert(pair<int, string>(key, templateName));
+ }
+ void SetViewElement(int view, int viewElement, string name) {
+ map< int, map<int, string> >::iterator hit = viewElements.find(view);
+ if (hit == viewElements.end()) {
+ map<int, string> vE;
+ vE.insert(pair<int, string >(viewElement, name));
+ viewElements.insert(pair<int, map < int, string > >(view, vE));
+ } else {
+ (hit->second).insert(pair<int, string >(viewElement, name));
+ }
+ }
+ void SetViewGrid(int view, int viewGrid, string name) {
+ map< int, map<int, string> >::iterator hit = viewGrids.find(view);
+ if (hit == viewGrids.end()) {
+ map<int, string> vG;
+ vG.insert(pair<int, string >(viewGrid, name));
+ viewGrids.insert(pair<int, map < int, string > >(view, vG));
+ } else {
+ (hit->second).insert(pair<int, string >(viewGrid, name));
+ }
+ }
// in
- string name; //name of plugin
- map< int, string > menus; //menus as key -> templatename hashmap
+ string name; //name of plugin
+ map< int, string > menus; //menus as key -> templatename hashmap
+ map< int, string> views; //standalone views as key -> templatename hashmap
+ map< int, map <int, string> > viewElements; //viewelements as key -> (viewelement, viewelementname) hashmap
+ map< int, map <int, string> > viewGrids; //viewgrids as key -> (viewgrid, viewgridname) hashmap
//out
};
// Data structure for service "GetDisplayMenu"
class GetDisplayMenu {
public:
- GetDisplayMenu(void) {
- displayMenu = NULL;
- };
+ GetDisplayMenu(void) {
+ displayMenu = NULL;
+ };
// in
//out
- cSDDisplayMenu *displayMenu;
+ cSDDisplayMenu *displayMenu;
};
-// Data structure for service "RegisterStandalonePlugin"
-/*
-class RegisterStandalonePlugin {
-public:
- RegisterStandalonePlugin(void) {
- name = "";
- rootView = "";
- };
- void SetMenu(int key, string templateName) {
- menus.insert(pair<int, string>(key, templateName));
- }
-// in
- string name; //name of plugin
- string rootView; //name of plugin
- map< int, string > menus; //menus as key -> templatename hashmap
-//out
-};
-*/
// Data structure for service "GetDisplayPlugin"
class GetDisplayPlugin {
public:
- GetDisplayPlugin(void) {
- displayPlugin = NULL;
- };
+ GetDisplayPlugin(void) {
+ pluginName = "";
+ viewID = -1;
+ displayPlugin = NULL;
+ };
// in
+ string pluginName;
+ int viewID;
//out
- cDisplayPlugin *displayPlugin;
+ cSkinDisplayPlugin *displayPlugin;
};
-#endif //__SKINDESIGNERSERVICES_H \ No newline at end of file
+#endif //__SKINDESIGNERSERVICES_H