From fc4d514801ef5a8b61dbb190d2022d12317b9e15 Mon Sep 17 00:00:00 2001 From: Taejeong Lee Date: Wed, 10 Oct 2012 13:47:02 +0900 Subject: [PATCH] [Installer] Clean up Flash Parser. * "flash" element is not defined on WRT core spec, so clean up that in source. [Issue#] N/A [Problem] Clean up Flash Parser [Cause] N/A [Solution] N/A Change-Id: I8ea6672a36969ba85403a3b297715697ea39f822 --- src/configuration_parser/widget_parser.cpp | 54 ------------------------------ src/configuration_parser/widget_parser.h | 1 - 2 files changed, 55 deletions(-) mode change 100755 => 100644 src/configuration_parser/widget_parser.h diff --git a/src/configuration_parser/widget_parser.cpp b/src/configuration_parser/widget_parser.cpp index 0875ad2..1fe1150 100755 --- a/src/configuration_parser/widget_parser.cpp +++ b/src/configuration_parser/widget_parser.cpp @@ -943,54 +943,6 @@ class PreferenceParser : public ElementParser ConfigParserData& m_data; }; -class FlashParser : public ElementParser -{ - public: - virtual ActionFunc GetElementParser(const DPL::String& /*ns*/, - const DPL::String& /*name*/) - { - return &IgnoringParser::Create; - } - - virtual void Accept(const XmlAttribute& attribute) - { - if (attribute.name == L"needed") { - if (attribute.value == L"true") { - m_flashNeeded = true; - } else { - m_flashNeeded = false; - } - } - } - - virtual void Accept(const Element& /*element*/) - { - //if empty flash element will be passed, we say true - m_data.flashNeeded = true; - } - - virtual void Accept(const Text& /*text*/) - { - ThrowMsg(Exception::ParseError, "flash element must be empty"); - } - - virtual void Verify() - { - m_data.flashNeeded = m_flashNeeded; - } - - FlashParser(ConfigParserData& data) : - ElementParser(), - m_flashNeeded(false), - m_data(data) - { - } - - private: - bool m_flashNeeded; - ConfigParserData& m_data; -}; - class LinkParser : public ElementParser { public: @@ -1412,7 +1364,6 @@ WidgetParser::WidgetParser(ConfigParserData& data) : DPL::MakeDelegate(this, &WidgetParser::OnFeatureElement); m_map[L"preference"] = DPL::MakeDelegate(this, &WidgetParser::OnPreferenceElement); - m_map[L"flash"] = DPL::MakeDelegate(this, &WidgetParser::OnFlashElement); m_map[L"link"] = DPL::MakeDelegate(this, &WidgetParser::OnLinkElement); m_map[L"setting"] = DPL::MakeDelegate(this, &WidgetParser::OnSettingElement); @@ -1467,11 +1418,6 @@ ElementParserPtr WidgetParser::OnPreferenceElement() return ElementParserPtr(new PreferenceParser(m_data)); } -ElementParserPtr WidgetParser::OnFlashElement() -{ - return ElementParserPtr(new FlashParser(m_data)); -} - ElementParserPtr WidgetParser::OnLinkElement() { return ElementParserPtr(new LinkParser(m_data)); diff --git a/src/configuration_parser/widget_parser.h b/src/configuration_parser/widget_parser.h old mode 100755 new mode 100644 index 6ea2ffb..159e583 --- a/src/configuration_parser/widget_parser.h +++ b/src/configuration_parser/widget_parser.h @@ -73,7 +73,6 @@ class WidgetParser : public ElementParser ElementParserPtr OnFeatureElement(); ElementParserPtr OnPreferenceElement(); ElementParserPtr OnAccessElement(); - ElementParserPtr OnFlashElement(); ElementParserPtr OnLinkElement(); ElementParserPtr OnSettingElement(); ElementParserPtr OnServiceElement(); -- 2.7.4