[Installer] Clean up Flash Parser.
authorTaejeong Lee <taejeong.lee@samsung.com>
Wed, 10 Oct 2012 04:47:02 +0000 (13:47 +0900)
committerTaejeong Lee <taejeong.lee@samsung.com>
Tue, 27 Nov 2012 07:00:49 +0000 (16:00 +0900)
 * "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
src/configuration_parser/widget_parser.h [changed mode: 0755->0644]

index 0875ad2..1fe1150 100755 (executable)
@@ -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));
old mode 100755 (executable)
new mode 100644 (file)
index 6ea2ffb..159e583
@@ -73,7 +73,6 @@ class WidgetParser : public ElementParser
     ElementParserPtr OnFeatureElement();
     ElementParserPtr OnPreferenceElement();
     ElementParserPtr OnAccessElement();
-    ElementParserPtr OnFlashElement();
     ElementParserPtr OnLinkElement();
     ElementParserPtr OnSettingElement();
     ElementParserPtr OnServiceElement();