summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsvntobi <svntobi@cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f>2007-08-19 14:47:57 +0000
committersvntobi <svntobi@cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f>2007-08-19 14:47:57 +0000
commit2d9582980adaa3108a3be4e75569afb3c4bbe9e9 (patch)
tree9c1a3b3599c3b1391bd80913d7ea911fb848b085
parent9ceabe93656984d2a6bb63bcd7e80379f2623ff6 (diff)
downloadvdr-plugin-menuorg-2d9582980adaa3108a3be4e75569afb3c4bbe9e9.tar.gz
vdr-plugin-menuorg-2d9582980adaa3108a3be4e75569afb3c4bbe9e9.tar.bz2
renamed XmlMenu to MenuConfiguration
git-svn-id: file:///home/tobias/sandbox/vdr/--/vdr-pkg/vdr-pkg/submenu/trunk@5825 cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f
-rw-r--r--sources.mk2
-rw-r--r--src/mainmenuitemsprovider.h1
-rw-r--r--src/menuconfiguration.cpp (renamed from src/xmlmenu.cpp)18
-rw-r--r--src/menuconfiguration.h (renamed from src/xmlmenu.h)8
-rw-r--r--src/menuorg.cpp5
5 files changed, 17 insertions, 17 deletions
diff --git a/sources.mk b/sources.mk
index 3490745..ec9d291 100644
--- a/sources.mk
+++ b/sources.mk
@@ -1,6 +1,7 @@
SRCS = \
src/custommainmenuitem.cpp \
src/mainmenuitemsprovider.cpp \
+ src/menuconfiguration.cpp \
src/menunode.cpp \
src/menuorg.cpp \
src/plugincreator.cpp \
@@ -8,5 +9,4 @@ SRCS = \
src/pluginmenuitem.cpp \
src/submenuitem.cpp \
src/systemmenuitem.cpp \
- src/xmlmenu.cpp \
src/i18n.cpp
diff --git a/src/mainmenuitemsprovider.h b/src/mainmenuitemsprovider.h
index 013f76e..951f600 100644
--- a/src/mainmenuitemsprovider.h
+++ b/src/mainmenuitemsprovider.h
@@ -25,7 +25,6 @@
#include <vdr/menuorgpatch.h>
#include "menunode.h"
-#include "xmlmenu.h"
using namespace MenuOrgPatch;
diff --git a/src/xmlmenu.cpp b/src/menuconfiguration.cpp
index b050dbd..a25c56c 100644
--- a/src/xmlmenu.cpp
+++ b/src/menuconfiguration.cpp
@@ -20,7 +20,7 @@
*
*/
-#include "xmlmenu.h"
+#include "menuconfiguration.h"
#include <libxml++/libxml++.h>
#include <exception>
#include <vdr/plugin.h>
@@ -31,7 +31,7 @@
using namespace xmlpp;
using namespace std;
-const string XmlMenu::_dtd =
+const string MenuConfiguration::_dtd =
"<!ELEMENT menus ((menu | system | plugin)+)>\n"
"<!ELEMENT menu ((menu | system | plugin)+)>\n"
"<!ATTLIST menu name CDATA #REQUIRED>\n"
@@ -40,7 +40,7 @@ const string XmlMenu::_dtd =
"<!ELEMENT plugin EMPTY>\n"
"<!ATTLIST plugin name CDATA #REQUIRED>\n";
-MenuNode* XmlMenu::LoadXmlMenu(string menuFileName, string schemaFileName)
+MenuNode* MenuConfiguration::LoadMenu(string menuFileName, string schemaFileName)
{
MenuNode* menuRoot = new MenuNode();
@@ -72,7 +72,7 @@ MenuNode* XmlMenu::LoadXmlMenu(string menuFileName, string schemaFileName)
return menuRoot;
}
-void XmlMenu::ParseElement(const Element* element, MenuNode* menuNode)
+void MenuConfiguration::ParseElement(const Element* element, MenuNode* menuNode)
{
Node::NodeList children = element->get_children();
for (Node::NodeList::iterator i = children.begin(); i != children.end(); i++)
@@ -106,17 +106,17 @@ void XmlMenu::ParseElement(const Element* element, MenuNode* menuNode)
}
}
-MenuNode* XmlMenu::AddSubMenuItem(string name, MenuNode* menu)
+MenuNode* MenuConfiguration::AddSubMenuItem(string name, MenuNode* menu)
{
return menu->AddChild(new SubMenuItem(name));
}
-void XmlMenu::AddSystemMenuItem(string name, MenuNode* menu)
+void MenuConfiguration::AddSystemMenuItem(string name, MenuNode* menu)
{
menu->AddChild(new SystemMenuItem(name, MenuTextToVdrState(name)));
}
-void XmlMenu::AddPluginMenuItem(string pluginName, MenuNode* menu)
+void MenuConfiguration::AddPluginMenuItem(string pluginName, MenuNode* menu)
{
const char* pluginMainMenuEntry;
int pluginIndex;
@@ -127,7 +127,7 @@ void XmlMenu::AddPluginMenuItem(string pluginName, MenuNode* menu)
}
}
-eOSState XmlMenu::MenuTextToVdrState(string menuText)
+eOSState MenuConfiguration::MenuTextToVdrState(string menuText)
{
if (menuText == "Schedule")
{
@@ -157,7 +157,7 @@ eOSState XmlMenu::MenuTextToVdrState(string menuText)
return osContinue;
}
-bool XmlMenu::FindPluginByName(string name, const char** mainMenuEntry, int& pluginIndex)
+bool MenuConfiguration::FindPluginByName(string name, const char** mainMenuEntry, int& pluginIndex)
{
int i = 0;
diff --git a/src/xmlmenu.h b/src/menuconfiguration.h
index 4bf8160..65ac1d3 100644
--- a/src/xmlmenu.h
+++ b/src/menuconfiguration.h
@@ -20,8 +20,8 @@
*
*/
-#ifndef ___XMLMENU_H
-#define ___XMLMENU_H
+#ifndef ___MENUCONFIGURARION_H
+#define ___MENUCONFIGURATION_H
#include <string>
#include <vdr/osdbase.h>
@@ -29,13 +29,13 @@
namespace xmlpp { class Element; }
-class XmlMenu
+class MenuConfiguration
{
private:
static const std::string _dtd;
public:
- MenuNode* LoadXmlMenu(std::string menuFileName, std::string schemaFileName);
+ MenuNode* LoadMenu(std::string menuFileName, std::string schemaFileName);
private:
void ParseElement(const xmlpp::Element* a_node, MenuNode* menuNode);
diff --git a/src/menuorg.cpp b/src/menuorg.cpp
index 1ef6738..ce15527 100644
--- a/src/menuorg.cpp
+++ b/src/menuorg.cpp
@@ -30,6 +30,7 @@
#include <getopt.h>
#include "version.h"
#include "menuorg.h"
+#include "menuconfiguration.h"
#include "i18n.h"
using namespace std;
@@ -107,7 +108,7 @@ bool MenuOrgPlugin::ProcessArgs(int argc, char *argv[])
bool MenuOrgPlugin::Initialize(void)
{
- XmlMenu xmlMenu;
+ MenuConfiguration menuConfiguration;
if(configFile.empty())
configFile = (string) ConfigDirectory() + "/menuorg.xml";
@@ -115,7 +116,7 @@ bool MenuOrgPlugin::Initialize(void)
if(schemaFile.empty())
schemaFile = (string) ConfigDirectory() + "/menuorg.dtd";
- MenuNode* menu = xmlMenu.LoadXmlMenu(configFile, schemaFile);
+ MenuNode* menu = menuConfiguration.LoadMenu(configFile, schemaFile);
if (menu)
{
_subMenuProvider = new MainMenuItemsProvider(menu);