From cf2331736693e1072eac2f7b7177bbcea06b5526 Mon Sep 17 00:00:00 2001 From: "jungmin76.park" Date: Fri, 7 Dec 2012 11:16:02 +0900 Subject: change livebox provider id internally (appid -> appid.name) Change-Id: I3d19ecf466fe86dd7cf5cb17e34cd065f950292e --- src/Context/InstallationContext.cpp | 13 +++++++++++++ src/Context/InstallationContext.h | 4 ++++ src/XmlHandler/ManifestGenerator.cpp | 2 +- src/XmlHandler/ManifestHandler.cpp | 6 ++++++ 4 files changed, 24 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Context/InstallationContext.cpp b/src/Context/InstallationContext.cpp index c3d30a6..74fc46d 100755 --- a/src/Context/InstallationContext.cpp +++ b/src/Context/InstallationContext.cpp @@ -578,6 +578,19 @@ LiveboxInfo::GetIcon(void) const return __icon; } +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) { diff --git a/src/Context/InstallationContext.h b/src/Context/InstallationContext.h index 1a62672..430f610 100755 --- a/src/Context/InstallationContext.h +++ b/src/Context/InstallationContext.h @@ -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; diff --git a/src/XmlHandler/ManifestGenerator.cpp b/src/XmlHandler/ManifestGenerator.cpp index 65a5c4d..8975555 100755 --- a/src/XmlHandler/ManifestGenerator.cpp +++ b/src/XmlHandler/ManifestGenerator.cpp @@ -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"); diff --git a/src/XmlHandler/ManifestHandler.cpp b/src/XmlHandler/ManifestHandler.cpp index 0e2fb54..02e8bc9 100755 --- a/src/XmlHandler/ManifestHandler.cpp +++ b/src/XmlHandler/ManifestHandler.cpp @@ -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, "", updatePeriod, pPopupEnabled); return true; -- cgit v1.2.3