change livebox provider id internally (appid -> appid.name)
authorjungmin76.park <jungmin76.park@samsung.com>
Fri, 7 Dec 2012 02:16:02 +0000 (11:16 +0900)
committerjungmin76.park <jungmin76.park@samsung.com>
Fri, 7 Dec 2012 02:30:13 +0000 (11:30 +0900)
Change-Id: I3d19ecf466fe86dd7cf5cb17e34cd065f950292e

src/Context/InstallationContext.cpp
src/Context/InstallationContext.h
src/XmlHandler/ManifestGenerator.cpp
src/XmlHandler/ManifestHandler.cpp

index c3d30a6..74fc46d 100755 (executable)
@@ -579,6 +579,19 @@ LiveboxInfo::GetIcon(void) const
 }
 
 result
+LiveboxInfo::SetName(const String& name)
+{
+       __name = name;
+       return E_SUCCESS;
+}
+
+const String&
+LiveboxInfo::GetName(void) const
+{
+       return __name;
+}
+
+result
 LiveboxInfo::AddName(const String& language, const String& name)
 {
        result r = E_SUCCESS;
index 1a62672..430f610 100755 (executable)
@@ -200,6 +200,9 @@ public:
        result SetIcon(const Osp::Base::String& icon);
        const Osp::Base::String& GetIcon(void) const;
 
+       result SetName(const Osp::Base::String& name);
+       const Osp::Base::String& GetName(void) const;
+
        result AddName(const Osp::Base::String& language, const Osp::Base::String& name);
        Osp::Base::Collection::HashMap* GetNameList(void) const;
 
@@ -213,6 +216,7 @@ private:
        long long __updatePeriod;
        Osp::Base::String __popupEnabled;
        Osp::Base::String __icon;
+       Osp::Base::String __name;
 
        Osp::Base::Collection::HashMap* __pNameList;
        Osp::Base::Collection::ArrayList* __pSizeList;
index 65a5c4d..8975555 100755 (executable)
@@ -394,7 +394,7 @@ ManifestGenerator::WriteLiveboxes(_PackageAppInfoImpl* pAppInfoImpl) const
 
                __pWriter->StartElement("livebox");
 
-               __pWriter->WriteAttribute("appid", pAppInfoImpl->GetPackageName());
+               __pWriter->WriteAttribute("appid", pAppInfoImpl->GetPackageName() + "." + pLiveboxInfo->GetName() );
                __pWriter->WriteAttribute("period", period);
                __pWriter->WriteAttribute("pinup", "false");
                __pWriter->WriteAttribute("primary", "true");
index 0e2fb54..02e8bc9 100755 (executable)
@@ -438,6 +438,7 @@ ManifestHandler::OnLiveBoxElement(void)
        XmlAttribute *pAttr = null;
        char *pUpdatePeriod = null;
        char *pPopupEnabled = null;
+       char *pName = null;
 
        __pLiveboxInfo = new LiveboxInfo;
        TryReturn(__pLiveboxInfo, false, "[osp-installer] __pLiveboxInfo is null");
@@ -456,6 +457,11 @@ ManifestHandler::OnLiveBoxElement(void)
 
        __pLiveboxInfo->SetPopupEnabled(pPopupEnabled);
 
+       pName = pAttr->Find("Name");
+       TryReturn(pName, false, "[osp-installer] pName is null");
+
+       __pLiveboxInfo->SetName(pName);
+
        AppLogTag(OSP_INSTALLER, "<Livebox UpdatePeriod=\"%lld\" pPopupEnabled=\"%s\">", updatePeriod, pPopupEnabled);
 
        return true;