livebox configuration valuables has been modified
authorlke01.lee <lke01.lee@samsung.com>
Wed, 26 Dec 2012 01:36:21 +0000 (10:36 +0900)
committerlke01.lee <lke01.lee@samsung.com>
Thu, 27 Dec 2012 01:22:08 +0000 (10:22 +0900)
[Issue#] N/A
[Problem]
[Cause] N/A
[Solution] livebox configuration valuables have been changed
and unused files have been removed.
[Verification] This path depends on wrt-common http://slp-info.sec.samsung.net/gerrit/#/c/129652/

Change-Id: I8c744ee4cb1b6083e51434954b0847145a3b068b

src/CMakeLists.txt
src/configuration_parser/widget_parser.cpp
src/jobs/widget_install/job_widget_install.cpp
src/jobs/widget_install/manifest.cpp
src/jobs/widget_install/manifest.h
src/jobs/widget_install/task_manifest_file.cpp

index b22683d..fe1d5d6 100644 (file)
@@ -99,6 +99,14 @@ SET(INSTALLER_SOURCES
     ${INSTALLER_SRC_DIR}/pkg-manager/pkgmgr_signal.cpp
     )
 
+IF(LB_SUPPORT)
+    SET(INSTALLER_SOURCES
+        ${INSTALLER_SOURCES}
+        )
+    MESSAGE(STATUS "adding definition -DLB_SUPPORT")
+    ADD_DEFINITIONS("-DLB_SUPPORT")
+ENDIF(LB_SUPPORT)
+
 MESSAGE(STATUS "add -DSEP_INSTALLER")
 ADD_DEFINITIONS("-DSEP_INSTALLER")
 
index 5ec1f8f..c64171b 100755 (executable)
@@ -1468,9 +1468,9 @@ class CategoryParser : public ElementParser
 
 class LiveboxParser : public ElementParser
 {
-  public:
+    public:
 
-    struct LabelParser : public ElementParser
+    struct BoxLabelParser : public ElementParser
     {
         virtual ActionFunc GetElementParser(const DPL::String& /*ns*/,
                 const DPL::String& /*name*/)
@@ -1482,40 +1482,40 @@ class LiveboxParser : public ElementParser
         {
         }
 
-       virtual void Accept(const Element& element)
-       {
-               if (element.ns ==
-                   ConfigurationNamespace::TizenWebAppNamespaceName)
-               {
-                   m_properNamespace = true;
-               }
-       }
+        virtual void Accept(const Element& element)
+        {
+            if (element.ns ==
+                    ConfigurationNamespace::TizenWebAppNamespaceName)
+            {
+                m_properNamespace = true;
+            }
+        }
 
-       virtual void Accept(const Text& text)
-       {
-           if(m_properNamespace)
-            m_label = text.value;
-       }
+        virtual void Accept(const Text& text)
+        {
+            if(m_properNamespace)
+                m_label = text.value;
+        }
 
         virtual void Verify()
         {
-               m_data.m_label = m_label;
+            m_data.m_label = m_label;
         }
 
-        LabelParser(ConfigParserData::LiveboxInfo& data) :
+        BoxLabelParser(ConfigParserData::LiveboxInfo& data) :
             ElementParser(),
-            m_properNamespace(false),
+            m_properNamespace(false),
             m_data(data)
         {
         }
 
-      private:
+        private:
         DPL::String m_label;
+        bool m_properNamespace;
         ConfigParserData::LiveboxInfo& m_data;
-        bool m_properNamespace;
     };
 
-    struct IconParser : public ElementParser
+    struct BoxIconParser : public ElementParser
     {
         virtual ActionFunc GetElementParser(const DPL::String& /*ns*/,
                 const DPL::String& /*name*/)
@@ -1525,20 +1525,20 @@ class LiveboxParser : public ElementParser
 
         virtual void Accept(const XmlAttribute& attribute)
         {
-        if(m_properNamespace) {
-            if (attribute.name == L"src") {
-                m_icon = attribute.value;
+            if(m_properNamespace) {
+                if (attribute.name == L"src") {
+                    m_icon = attribute.value;
+                }
             }
-               }
         }
 
         virtual void Accept(const Element& element)
         {
-               if (element.ns ==
-                   ConfigurationNamespace::TizenWebAppNamespaceName)
-               {
-                   m_properNamespace = true;
-               }
+            if (element.ns ==
+                    ConfigurationNamespace::TizenWebAppNamespaceName)
+            {
+                m_properNamespace = true;
+            }
         }
 
         virtual void Accept(const Text& /*text*/)
@@ -1547,159 +1547,159 @@ class LiveboxParser : public ElementParser
 
         virtual void Verify()
         {
-               m_data.m_icon = m_icon;
+            m_data.m_icon = m_icon;
         }
 
-        explicit IconParser(ConfigParserData::LiveboxInfo& data) :
-               ElementParser(),
-               m_properNamespace(false),
-               m_data(data)
+        explicit BoxIconParser(ConfigParserData::LiveboxInfo& data) :
+            ElementParser(),
+            m_properNamespace(false),
+            m_data(data)
         {
         }
 
-      private:
+        private:
         DPL::String m_icon;
+        bool m_properNamespace;
         ConfigParserData::LiveboxInfo& m_data;
-       bool m_properNamespace;
     };
 
-    struct BoxParser : public ElementParser
-    {
-           struct PdParser : public ElementParser
-           {
-               virtual ActionFunc GetElementParser(const DPL::String& /*ns*/,
-                       const DPL::String& name)
-               {
-                   return &IgnoringParser::Create;
-               }
-
-               virtual void Accept(const XmlAttribute& attribute)
-               {
-               if(m_properNamespace) {
-                   if (attribute.name == L"src") {
-                       m_src = attribute.value;
-                   } else if (attribute.name == L"width") {
-                       m_width = attribute.value;
-                   } else if (attribute.name == L"height") {
-                       m_height = attribute.value;
-                   }
-                       }
-               }
-
-               virtual void Accept(const Element& element)
-               {
-                       if (element.ns ==
-                           ConfigurationNamespace::TizenWebAppNamespaceName)
-                       {
-                           m_properNamespace = true;
-                       }
-               }
-
-               virtual void Accept(const Text& /*text*/)
-               {
-               }
-
-               virtual void Verify()
-               {
-                       m_data.m_pdSrc = m_src;
-                       m_data.m_pdWidth = m_width;
-                       m_data.m_pdHeight = m_height;
-               }
-
-               explicit PdParser(ConfigParserData::LiveboxInfo::Box& data) :
-                   ElementParser(),
-                       m_properNamespace(false),
-                   m_data(data)
-               {
-               }
-
-             private:
-               DPL::String m_src;
-               DPL::String m_width;
-               DPL::String m_height;
-
-                bool m_properNamespace;
-               ConfigParserData::LiveboxInfo::Box& m_data;
-           };
-
-           struct SizeParser : public ElementParser
-           {
-               virtual ActionFunc GetElementParser(const DPL::String& /*ns*/,
-                       const DPL::String& /*name*/)
-               {
-                   return &IgnoringParser::Create;
-               }
-
-               virtual void Accept(const XmlAttribute& attribute)
-               {
-                       if(m_properNamespace) {
-                   if (attribute.name == L"preview") {
-                       m_preview = attribute.value;
-                   }
-                               }
-               }
-
-               virtual void Accept(const Element& element)
-               {
-                       if (element.ns ==
-                           ConfigurationNamespace::TizenWebAppNamespaceName)
-                       {
-                           m_properNamespace = true;
-                       }
-               }
-
-               virtual void Accept(const Text& text)
-               {
-                       if(m_properNamespace)
-                        m_size = text.value;
-               }
-
-               virtual void Verify()
-               {
-                    std::pair<DPL::String, DPL::String> boxSize;
-                     boxSize.first = m_size;
-                     boxSize.second = m_preview;
-                     m_data.m_boxSize.push_back(boxSize);
-               }
-
-               explicit SizeParser(ConfigParserData::LiveboxInfo::Box& data) :
-                   ElementParser(),
-                   m_data(data)
-               {
-               }
-
-             private:
-               DPL::String m_size;
-               DPL::String m_preview;
-                bool m_properNamespace;
-               ConfigParserData::LiveboxInfo::Box& m_data;
-           };
+    struct BoxContentParser : public ElementParser
+    {
+        struct BoxSizeParser : public ElementParser
+        {
+            virtual ActionFunc GetElementParser(const DPL::String& /*ns*/,
+                    const DPL::String& /*name*/)
+            {
+                return &IgnoringParser::Create;
+            }
+
+            virtual void Accept(const XmlAttribute& attribute)
+            {
+                if(m_properNamespace) {
+                    if (attribute.name == L"preview") {
+                        m_preview = attribute.value;
+                    }
+                }
+            }
+
+            virtual void Accept(const Element& element)
+            {
+                if (element.ns ==
+                        ConfigurationNamespace::TizenWebAppNamespaceName)
+                {
+                    m_properNamespace = true;
+                }
+            }
+
+            virtual void Accept(const Text& text)
+            {
+                if(m_properNamespace)
+                    m_size = text.value;
+            }
+
+            virtual void Verify()
+            {
+                std::pair<DPL::String, DPL::String> boxSize;
+                boxSize.first = m_size;
+                boxSize.second = m_preview;
+                m_data.m_boxSize.push_back(boxSize);
+            }
+
+            explicit BoxSizeParser(ConfigParserData::LiveboxInfo::BoxContentInfo& data) :
+                ElementParser(),
+                m_data(data)
+            {
+            }
+
+            private:
+            DPL::String m_size;
+            DPL::String m_preview;
+            bool m_properNamespace;
+            ConfigParserData::LiveboxInfo::BoxContentInfo& m_data;
+        };
+
+        struct PdParser : public ElementParser
+        {
+            virtual ActionFunc GetElementParser(const DPL::String& /*ns*/,
+                    const DPL::String& name)
+            {
+                return &IgnoringParser::Create;
+            }
+
+            virtual void Accept(const XmlAttribute& attribute)
+            {
+                if(m_properNamespace) {
+                    if (attribute.name == L"src") {
+                        m_src = attribute.value;
+                    } else if (attribute.name == L"width") {
+                        m_width = attribute.value;
+                    } else if (attribute.name == L"height") {
+                        m_height = attribute.value;
+                    }
+                }
+            }
+
+            virtual void Accept(const Element& element)
+            {
+                if (element.ns ==
+                        ConfigurationNamespace::TizenWebAppNamespaceName)
+                {
+                    m_properNamespace = true;
+                }
+            }
+
+            virtual void Accept(const Text& /*text*/)
+            {
+            }
+
+            virtual void Verify()
+            {
+                m_data.m_pdSrc = m_src;
+                m_data.m_pdWidth = m_width;
+                m_data.m_pdHeight = m_height;
+            }
+
+            explicit PdParser(ConfigParserData::LiveboxInfo::BoxContentInfo& data) :
+                ElementParser(),
+                m_properNamespace(false),
+                m_data(data)
+            {
+            }
+
+            private:
+            DPL::String m_src;
+            DPL::String m_width;
+            DPL::String m_height;
+
+            bool m_properNamespace;
+            ConfigParserData::LiveboxInfo::BoxContentInfo& m_data;
+        };
 
         virtual ActionFunc GetElementParser(const DPL::String& /*ns*/,
                 const DPL::String& name)
         {
-               if (name == L"boxsize") {
-                   return DPL::MakeDelegate(this, &LiveboxParser::BoxParser::OnSizeElement);
-               } else if (name == L"pd") {
-                   return DPL::MakeDelegate(this, &LiveboxParser::BoxParser::OnPdElement);
-               }
-       }
+            if (name == L"box-size") {
+                return DPL::MakeDelegate(this, &LiveboxParser::BoxContentParser::OnBoxSizeElement);
+            } else if (name == L"pd") {
+                return DPL::MakeDelegate(this, &LiveboxParser::BoxContentParser::OnPdElement);
+            }
+        }
 
         virtual void Accept(const XmlAttribute& attribute)
         {
-               if (m_properNamespace) {
-               if (attribute.name == L"src")
-                   m_box.m_boxSrc = attribute.value;
-               }
+            if (m_properNamespace) {
+                if (attribute.name == L"src")
+                    m_box.m_boxSrc = attribute.value;
+            }
         }
 
         virtual void Accept(const Element& element)
         {
-               if (element.ns ==
-                   ConfigurationNamespace::TizenWebAppNamespaceName)
-               {
-                   m_properNamespace = true;
-               }
+            if (element.ns ==
+                    ConfigurationNamespace::TizenWebAppNamespaceName)
+            {
+                m_properNamespace = true;
+            }
         }
 
         virtual void Accept(const Text& /*text*/)
@@ -1708,43 +1708,42 @@ class LiveboxParser : public ElementParser
 
         virtual void Verify()
         {
-          m_data.m_boxInfo = m_box;
+            m_data.m_boxInfo = m_box;
         }
 
-        explicit BoxParser(ConfigParserData::LiveboxInfo& data) :
+        explicit BoxContentParser(ConfigParserData::LiveboxInfo& data) :
             ElementParser(),
-            m_properNamespace(false),
+            m_properNamespace(false),
             m_data(data)
         {
         }
 
-        ElementParserPtr OnPdElement()
+        ElementParserPtr OnBoxSizeElement()
         {
-            return ElementParserPtr(new PdParser(m_box));
+            return ElementParserPtr(new BoxSizeParser(m_box));
         }
 
-        ElementParserPtr OnSizeElement()
+        ElementParserPtr OnPdElement()
         {
-            return ElementParserPtr(new SizeParser(m_box));
+            return ElementParserPtr(new PdParser(m_box));
         }
 
-      private:
-        DPL::String m_src;
+        private:
+        DPL::String m_src;
+        bool m_properNamespace;
         ConfigParserData::LiveboxInfo& m_data;
-        bool m_properNamespace;
-        ConfigParserData::LiveboxInfo::Box m_box;
-
+        ConfigParserData::LiveboxInfo::BoxContentInfo m_box;
     };
 
     virtual ActionFunc GetElementParser(const DPL::String& /*ns*/,
-                                        const DPL::String& name)
-    {
-        if (name == L"label") {
-            return DPL::MakeDelegate(this, &LiveboxParser::OnLabelElement);
-        } else if (name == L"icon") {
-            return DPL::MakeDelegate(this, &LiveboxParser::OnIconElement);
-        }  else if (name == L"box") {
-            return DPL::MakeDelegate(this, &LiveboxParser::OnBoxElement);
+            const DPL::String& name)
+    {
+        if (name == L"box-label") {
+            return DPL::MakeDelegate(this, &LiveboxParser::OnBoxLabelElement);
+        } else if (name == L"box-icon") {
+            return DPL::MakeDelegate(this, &LiveboxParser::OnBoxIconElement);
+        }  else if (name == L"box-content") {
+            return DPL::MakeDelegate(this, &LiveboxParser::OnBoxContentElement);
         } else {
             return &IgnoringParser::Create;
         }
@@ -1753,29 +1752,22 @@ class LiveboxParser : public ElementParser
     virtual void Accept(const XmlAttribute& attribute)
     {
         if (m_properNamespace) {
-       if (attribute.name == L"appid") {
-            m_appId = attribute.value;
-        } else if (attribute.name == L"auto_launch") {
-            m_autoLaunch = attribute.value;
-        } else if (attribute.name == L"period") {
-            m_period = attribute.value;
-        } else if (attribute.name == L"network") {
-            m_network = attribute.value;
-            LogDebug("@@@ "<<m_network);
-        } else if (attribute.name == L"nodisplay") {
-            m_nodisplay = attribute.value;
-        } else if (attribute.name == L"primary") {
-            m_primary = attribute.value;
-        } else if (attribute.name == L"timeout") {
-            m_timeout = attribute.value;
-        }
-               }
+            if (attribute.name == L"id") {
+                m_liveboxId = attribute.value;
+            } else if (attribute.name == L"primary") {
+                m_primary = attribute.value;
+            } else if (attribute.name == L"auto-launch") {
+                m_autoLaunch = attribute.value;
+            } else if (attribute.name == L"update-period") {
+                m_updatePeriod = attribute.value;
+            }
+        }
     }
 
     virtual void Accept(const Element& element)
     {
         if (element.ns ==
-            ConfigurationNamespace::TizenWebAppNamespaceName)
+                ConfigurationNamespace::TizenWebAppNamespaceName)
         {
             m_properNamespace = true;
         }
@@ -1787,15 +1779,12 @@ class LiveboxParser : public ElementParser
 
     virtual void Verify()
     {
-        m_livebox.m_appId = m_appId;
-        m_livebox.m_autoLaunch = m_autoLaunch;
-        m_livebox.m_period = m_period;
-        m_livebox.m_network = m_network;
-        m_livebox.m_nodisplay = m_nodisplay;
+        m_livebox.m_liveboxId = m_liveboxId;
         m_livebox.m_primary = m_primary;
-        m_livebox.m_timeout = m_timeout;
+        m_livebox.m_autoLaunch = m_autoLaunch;
+        m_livebox.m_updatePeriod = m_updatePeriod;
 
-        m_data.m_livebox.push_back(m_livebox);
+        m_data.m_livebox.push_back(m_livebox);
     }
 
     explicit LiveboxParser(ConfigParserData& data) :
@@ -1806,30 +1795,28 @@ class LiveboxParser : public ElementParser
         m_livebox = ConfigParserData::LiveboxInfo();
     }
 
-    ElementParserPtr OnLabelElement()
+    ElementParserPtr OnBoxLabelElement()
     {
-        return ElementParserPtr(new LabelParser(m_livebox));
+        return ElementParserPtr(new BoxLabelParser(m_livebox));
     }
 
-    ElementParserPtr OnIconElement()
+    ElementParserPtr OnBoxIconElement()
     {
-        return ElementParserPtr(new IconParser(m_livebox));
+        return ElementParserPtr(new BoxIconParser(m_livebox));
     }
-    ElementParserPtr OnBoxElement()
+
+    ElementParserPtr OnBoxContentElement()
     {
-        return ElementParserPtr(new BoxParser(m_livebox));
+        return ElementParserPtr(new BoxContentParser(m_livebox));
     }
 
   private:
     ConfigParserData& m_data;
     ConfigParserData::LiveboxInfo m_livebox;
-    DPL::String m_appId;
-    DPL::String m_autoLaunch;
-    DPL::String m_period;
-    DPL::String m_network;
-    DPL::String m_nodisplay;
+    DPL::String m_liveboxId;
     DPL::String m_primary;
-    DPL::String m_timeout;
+    DPL::String m_autoLaunch;
+    DPL::String m_updatePeriod;
     bool m_properNamespace;
 
 };
index 6216ffc..ad57eb7 100644 (file)
@@ -70,6 +70,7 @@
 #include <widget_install/task_certificates.h>
 #include <widget_install/task_unzip.h>
 #include <widget_install/task_commons.h>
+
 #include <widget_install/task_plugins_copy.h>
 
 #include <widget_install/widget_install_errors.h>
index 8e6bf4b..12bdc92 100755 (executable)
@@ -306,28 +306,24 @@ void AppControl::serialize(xmlTextWriterPtr writer)
 void LiveBox::serialize(xmlTextWriterPtr writer)
 {
     startElement(writer, "livebox");
-    if(!this->appid.empty()) {
-        writeAttribute(writer, "appid", this->appid);
-    }
-    if(!this->auto_launch.empty()) {
-        writeAttribute(writer, "auto_launch", this->auto_launch);
-    }
-    if(!this->network.empty()) {
-        writeAttribute(writer, "network", this->network);
-    }
-    writeAttribute(writer, "abi", "html");
-    if(!this->period.empty()) {
-        writeAttribute(writer, "period", this->period);
-    }
-    if(!this->nodisplay.empty()) {
-        writeAttribute(writer, "nodisplay", this->nodisplay);
+    if(!this->liveboxId.empty()) {
+        writeAttribute(writer, "appid", this->liveboxId);
     }
     if(!this->primary.empty()) {
         writeAttribute(writer, "primary", this->primary);
     }
-    if(!this->timeout.empty()) {
-        writeAttribute(writer, "timeout", this->timeout);
+    if(!this->autoLaunch.empty()) {
+        writeAttribute(writer, "auto_launch", this->autoLaunch);
     }
+
+    if(!this->updatePeriod.empty()) {
+        writeAttribute(writer, "period", this->updatePeriod);
+    }
+
+    writeAttribute(writer, "abi", "html");
+    writeAttribute(writer, "network", "true");
+    writeAttribute(writer, "nodisplay", "false");
+
     if(!this->label.empty()) {
         startElement(writer, "label");
         writeText(writer, this->label);
index 0418a84..ac469d2 100755 (executable)
@@ -242,13 +242,10 @@ class LiveBox
 {
 public:
     LiveBox() { }
-    void setAppid(const NcnameType &x) { this->appid = x; }
-    void setAutoLaunch(const NcnameType &x) { this->auto_launch = x; }
-    void setPeriod(const NcnameType &x) { this->period = x; }
-    void setNetwork(const NcnameType &x) { this->network = x; }
-    void setNodisplay(const NcnameType &x) { this->nodisplay = x; }
+    void setLiveboxId(const NcnameType &x) { this->liveboxId = x; }
     void setPrimary(const NcnameType &x) { this->primary = x; }
-    void setTimeout(const NcnameType &x) { this->timeout = x; }
+    void setAutoLaunch(const NcnameType &x) { this->autoLaunch = x; }
+    void setUpdatePeriod(const NcnameType &x) { this->updatePeriod = x; }
     void setLabel(const NcnameType &x) { this->label = x; }
     void setIcon(const NcnameType &x) { this->icon = x; }
     void setBox(const BoxInfoType &x) { this->box = x; }
@@ -256,12 +253,10 @@ public:
     void serialize(xmlTextWriterPtr writer);
 
 private:
-    NcnameType appid;
-    NcnameType auto_launch;
-    NcnameType period;
-    NcnameType network;
-    NcnameType nodisplay;
+    NcnameType liveboxId;
     NcnameType primary;
+    NcnameType autoLaunch;
+    NcnameType updatePeriod;
     NcnameType timeout;
     NcnameType label;
     NcnameType icon;
index 8e2965f..306024e 100755 (executable)
@@ -814,40 +814,38 @@ void TaskManifestFile::stepAbortParseManifest()
 
 void TaskManifestFile::setLiveBoxInfo(Manifest& manifest)
 {
-
     FOREACH(it, m_context.widgetConfig.configInfo.m_livebox) {
-
         LogInfo("setLiveBoxInfo");
         LiveBoxInfo liveBox;
-        DPL::String pkgname;
-        DPL::Optional<WrtDB::ConfigParserData::LiveboxInfo>    ConfigInfo = *it;
-
-        if(!!m_context.widgetConfig.pkgname)
-        {
-            pkgname =
-                *m_context.widgetConfig.pkgname+DPL::String(L".")
-                +ConfigInfo->m_appId;
-            liveBox.setAppid(pkgname);
-        }
-
-        if(ConfigInfo->m_autoLaunch !=L"") {
-            liveBox.setAutoLaunch(ConfigInfo->m_autoLaunch);
+        DPL::Optional<WrtDB::ConfigParserData::LiveboxInfo> ConfigInfo = *it;
+        DPL::String pkgname = *m_context.widgetConfig.pkgname;
+        size_t found;
+
+        if(ConfigInfo->m_liveboxId != L"") {
+            found = ConfigInfo->m_liveboxId.find_first_of(L".");
+            if(found != std::string::npos) {
+                if(0 == ConfigInfo->m_liveboxId.compare(0, found, pkgname))
+                    liveBox.setLiveboxId(ConfigInfo->m_liveboxId);
+                else {
+                    DPL::String liveboxId =
+                        pkgname+DPL::String(L".")+ConfigInfo->m_liveboxId;
+                    liveBox.setLiveboxId(liveboxId);
+                }
+            } else {
+                DPL::String liveboxId =
+                    pkgname+DPL::String(L".")+ConfigInfo->m_liveboxId;
+                liveBox.setLiveboxId(liveboxId);
+            }
         }
 
-        if(ConfigInfo->m_period !=L"")
-            liveBox.setPeriod(ConfigInfo->m_period);
-
-        if(ConfigInfo->m_network !=L"")
-            liveBox.setNetwork(ConfigInfo->m_network);
-
-        if(ConfigInfo->m_nodisplay !=L"")
-            liveBox.setNodisplay(ConfigInfo->m_nodisplay);
-
         if(ConfigInfo->m_primary !=L"")
             liveBox.setPrimary(ConfigInfo->m_primary);
 
-        if(ConfigInfo->m_timeout !=L"")
-            liveBox.setTimeout(ConfigInfo->m_timeout);
+        if(ConfigInfo->m_autoLaunch !=L"")
+            liveBox.setAutoLaunch(ConfigInfo->m_autoLaunch);
+
+        if(ConfigInfo->m_updatePeriod !=L"")
+            liveBox.setUpdatePeriod(ConfigInfo->m_updatePeriod);
 
         if(ConfigInfo->m_label !=L"")
             liveBox.setLabel(ConfigInfo->m_label);
@@ -866,8 +864,8 @@ void TaskManifestFile::setLiveBoxInfo(Manifest& manifest)
         } else {
             BoxInfoType box;
             if (!ConfigInfo->m_boxInfo.m_boxSrc.empty()) {
-                if((std::string::npos != ConfigInfo->m_boxInfo.m_boxSrc.find(L"http"))
-                       || (std::string::npos != ConfigInfo->m_boxInfo.m_boxSrc.find(L"https")))
+                if((0 == ConfigInfo->m_boxInfo.m_boxSrc.compare(0, 4, L"http"))
+                        || (0 == ConfigInfo->m_boxInfo.m_boxSrc.compare(0, 5, L"https")))
                     box.boxSrc = ConfigInfo->m_boxInfo.m_boxSrc;
                 else
                     box.boxSrc = defaultLocale + ConfigInfo->m_boxInfo.m_boxSrc;