summaryrefslogtreecommitdiff
path: root/src/XmlHandler/ManifestGenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/XmlHandler/ManifestGenerator.cpp')
-rwxr-xr-xsrc/XmlHandler/ManifestGenerator.cpp37
1 files changed, 13 insertions, 24 deletions
diff --git a/src/XmlHandler/ManifestGenerator.cpp b/src/XmlHandler/ManifestGenerator.cpp
index c2d8ac9..82783df 100755
--- a/src/XmlHandler/ManifestGenerator.cpp
+++ b/src/XmlHandler/ManifestGenerator.cpp
@@ -54,6 +54,7 @@ ManifestGenerator::Construct(InstallationContext* pContext)
{
__pContext = pContext;
__pPackageInfoImpl = pContext->GetPackageInfoImpl();
+ TryReturn(__pPackageInfoImpl, false, "[osp-installer] __pPackageInfoImpl is null.");
__pWriter = new (std::nothrow) XmlWriter;
TryReturn(__pWriter, false, "[osp-installer] __pWriter is null.");
@@ -68,9 +69,6 @@ ManifestGenerator::Write()
String xmlPath;
String package;
String location;
- _PackageInfoImpl *pPackageInfoImpl = null;
- pPackageInfoImpl = __pContext->GetPackageInfoImpl();
- TryReturn(pPackageInfoImpl, false, "[osp-installer] pPackageInfoImpl is null.");
//if (preload == true)
//{
@@ -91,23 +89,23 @@ ManifestGenerator::Write()
__pWriter->WriteAttribute("xmlns", "http://tizen.org/ns/packages");
__pWriter->WriteAttribute("package", package);
__pWriter->WriteAttribute("type", "tpk");
- __pWriter->WriteAttribute("version", pPackageInfoImpl->GetAppVersion());
+ __pWriter->WriteAttribute("version", __pPackageInfoImpl->GetVersion());
__pWriter->WriteAttribute("install-location", location);
__pWriter->StartElement("label");
- __pWriter->WriteString(pPackageInfoImpl->GetAppName());
+ __pWriter->WriteString(__pPackageInfoImpl->GetDisplayName());
__pWriter->EndElement();
__pWriter->StartElement("author");
__pWriter->EndElement();
__pWriter->StartElement("description");
- __pWriter->WriteString(pPackageInfoImpl->GetAppDescription());
+ __pWriter->WriteString(__pPackageInfoImpl->GetDescription());
__pWriter->EndElement();
_PackageAppInfoImpl* pAppInfoImpl = null;
ArrayList* pAppList = null;
- pAppList = pPackageInfoImpl->GetAppInfoList();
+ pAppList = __pPackageInfoImpl->GetAppInfoList();
int appCount = pAppList->GetCount();
AppLogTag(OSP_INSTALLER, "Write(): appCount=%d", appCount);
@@ -238,7 +236,6 @@ ManifestGenerator::WriteLiveboxes(_PackageAppInfoImpl* pAppInfoImpl) const
TryReturn(__pWriter, false, "[osp-installer] __pWriter is null.");
ArrayList* pLiveboxDataList = __pContext->GetLiveboxDataList();
- _PackageInfoImpl* pPackageInfoImpl = __pContext->GetPackageInfoImpl();
String label("label");
if (pLiveboxDataList == null)
@@ -283,7 +280,7 @@ ManifestGenerator::WriteLiveboxes(_PackageAppInfoImpl* pAppInfoImpl) const
if (menuIcon.IsEmpty() == false)
{
String menuIconPath;
- menuIconPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, menuIcon.GetPointer());
+ menuIconPath.Format(1024, L"%ls%ls/%ls", __pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, menuIcon.GetPointer());
__pWriter->StartElement("icon");
__pWriter->WriteString(menuIconPath);
@@ -468,14 +465,11 @@ ManifestGenerator::FindCategory(int index, const String& category) const
bool
ManifestGenerator::WriteApp(int index, Tizen::App::Package::_PackageAppInfoImpl* pAppInfoImpl)
{
- _PackageInfoImpl *pPackageInfoImpl = null;
- pPackageInfoImpl = __pContext->GetPackageInfoImpl();
-
IMap* pNameList = pAppInfoImpl->GetNameList();
String label("label");
String type("c++app");
String binaryPath;
- binaryPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_BIN, pAppInfoImpl->GetName().GetPointer());
+ binaryPath.Format(1024, L"%ls%ls/%ls", __pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_BIN, pAppInfoImpl->GetName().GetPointer());
if (pAppInfoImpl->GetDefault() == L"True")
{
@@ -484,7 +478,7 @@ ManifestGenerator::WriteApp(int index, Tizen::App::Package::_PackageAppInfoImpl*
if (pAppInfoImpl->GetMainmenuIcon().IsEmpty() == false)
{
String iconPath;
- iconPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, pAppInfoImpl->GetMainmenuIcon().GetPointer());
+ iconPath.Format(1024, L"%ls%ls/%ls", __pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, pAppInfoImpl->GetMainmenuIcon().GetPointer());
__pWriter->StartElement("icon");
__pWriter->WriteString(iconPath);
@@ -618,7 +612,7 @@ ManifestGenerator::WriteApp(int index, Tizen::App::Package::_PackageAppInfoImpl*
if (pAppInfoImpl->GetMainmenuIcon().IsEmpty() == false)
{
String iconPath;
- iconPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, pAppInfoImpl->GetMainmenuIcon().GetPointer());
+ iconPath.Format(1024, L"%ls%ls/%ls", __pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, pAppInfoImpl->GetMainmenuIcon().GetPointer());
__pWriter->StartElement("icon");
__pWriter->WriteString(iconPath);
@@ -657,15 +651,12 @@ ManifestGenerator::WriteApp(int index, Tizen::App::Package::_PackageAppInfoImpl*
bool
ManifestGenerator::WriteSubModeApp(int index)
{
- _PackageInfoImpl *pPackageInfoImpl = null;
- pPackageInfoImpl = __pContext->GetPackageInfoImpl();
-
// SUB_MODE_APPCONTROL_NAME -> AppName
String subBinaryPath;
- subBinaryPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_BIN, SUB_MODE_APPCONTROL_NAME);
+ subBinaryPath.Format(1024, L"%ls%ls/%ls", __pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_BIN, SUB_MODE_APPCONTROL_NAME);
String binaryPath;
- binaryPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_BIN, __pContext->__subModeAppName.GetPointer());
+ binaryPath.Format(1024, L"%ls%ls/%ls", __pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_BIN, __pContext->__subModeAppName.GetPointer());
if (File::IsFileExist(subBinaryPath) == true)
{
@@ -783,8 +774,6 @@ ManifestGenerator::WriteAppControl(int index)
bool
ManifestGenerator::WriteAccounts(int index)
{
- _PackageInfoImpl *pPackageInfoImpl = __pContext->GetPackageInfoImpl();
-
IListT<AppData*>* pAppDataList = __pContext->__pAppDataList;
TryReturn(pAppDataList, false, "[osp-installer] pAppDataList is null");
@@ -818,7 +807,7 @@ ManifestGenerator::WriteAccounts(int index)
if (accountIcon.IsEmpty() == false)
{
String accountIconPath;
- accountIconPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, accountIcon.GetPointer());
+ accountIconPath.Format(1024, L"%ls%ls/%ls", __pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, accountIcon.GetPointer());
__pWriter->StartElement("account-icon");
__pWriter->WriteString(accountIconPath);
@@ -829,7 +818,7 @@ ManifestGenerator::WriteAccounts(int index)
if (accountSmallIcon.IsEmpty() == false)
{
String accountSmallIconPath;
- accountSmallIconPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, accountSmallIcon.GetPointer());
+ accountSmallIconPath.Format(1024, L"%ls%ls/%ls", __pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, accountSmallIcon.GetPointer());
__pWriter->StartElement("account-small-icon");
__pWriter->WriteString(accountSmallIcon);