diff options
author | Duyoung Jang <duyoung.jang@samsung.com> | 2012-12-12 11:23:16 +0900 |
---|---|---|
committer | Duyoung Jang <duyoung.jang@samsung.com> | 2012-12-12 11:23:16 +0900 |
commit | cae7a2e73be1c6ba46c8f832254e225906657746 (patch) | |
tree | 3257e36847d1177c475d68fda6ba0fe0e01a17ec | |
parent | 0a02a0f2fac710a6d6c5a0b3d492449a71c02632 (diff) | |
download | installer-cae7a2e73be1c6ba46c8f832254e225906657746.tar.gz installer-cae7a2e73be1c6ba46c8f832254e225906657746.tar.bz2 installer-cae7a2e73be1c6ba46c8f832254e225906657746.zip |
Apply Tizen::App::Package namespace
Change-Id: Ib06a0a4f44fa7d09050d6457d1ea640ba9a5b3ff
Signed-off-by: Duyoung Jang <duyoung.jang@samsung.com>
-rwxr-xr-x | inc/InstallerDefs.h | 2 | ||||
-rw-r--r-- | plugin/osp-installer-plugin.cpp | 45 | ||||
-rw-r--r-- | src/Context/InstallationContext.cpp | 4 | ||||
-rw-r--r-- | src/Context/InstallationContext.h | 6 | ||||
-rw-r--r-- | src/Installer/DirectoryInstaller.cpp | 4 | ||||
-rw-r--r-- | src/Installer/Installer.cpp | 6 | ||||
-rw-r--r-- | src/Manager/ConfigurationManager.cpp | 5 | ||||
-rw-r--r-- | src/Manager/ConfigurationManager.h | 2 | ||||
-rw-r--r-- | src/Manager/InstallerManager.cpp | 4 | ||||
-rw-r--r-- | src/Manager/PermissionManager.cpp | 8 | ||||
-rw-r--r-- | src/Step/ManifestXmlStep.cpp | 4 | ||||
-rw-r--r-- | src/Step/SignatureStep.cpp | 4 | ||||
-rw-r--r-- | src/Step/UninstallStep.cpp | 8 | ||||
-rw-r--r-- | src/Step/UnpackStep.cpp | 4 | ||||
-rw-r--r-- | src/XmlHandler/ManifestGenerator.cpp | 3 | ||||
-rw-r--r-- | src/XmlHandler/ManifestGenerator.h | 10 | ||||
-rw-r--r-- | src/XmlHandler/ManifestHandler.cpp | 4 | ||||
-rw-r--r-- | src/XmlHandler/ManifestHandler.h | 20 |
18 files changed, 66 insertions, 77 deletions
diff --git a/inc/InstallerDefs.h b/inc/InstallerDefs.h index a7c3638..db8252e 100755 --- a/inc/InstallerDefs.h +++ b/inc/InstallerDefs.h @@ -21,7 +21,7 @@ #ifndef _INSTALLER_DEFS_H_ #define _INSTALLER_DEFS_H_ -#define OSP_INSTALLER_VERSION "osp-installer version = [2012/12/05]_RC[1]" +#define OSP_INSTALLER_VERSION "osp-installer version = [2012/12/12]_RC[1]" #define DIR_BIN L"/bin" #define DIR_INFO L"/info" diff --git a/plugin/osp-installer-plugin.cpp b/plugin/osp-installer-plugin.cpp index 9f5388d..14e7130 100644 --- a/plugin/osp-installer-plugin.cpp +++ b/plugin/osp-installer-plugin.cpp @@ -26,17 +26,16 @@ #include <package-manager-plugin.h> #include <FBaseString.h> -#include <FAppPackageInfo.h> #include <FIoDirectory.h> -#include <FApp_PackageInfoImpl.h> -#include <FApp_PackageManagerImpl.h> +#include <FAppPkg_PackageInfoImpl.h> +#include <FAppPkg_PackageManagerImpl.h> #include <FBase_StringConverter.h> #include "InstallerDefs.h" using namespace Tizen::Base; using namespace Tizen::Io; -using namespace Tizen::App; +using namespace Tizen::App::Package; #ifdef __cplusplus extern "C" @@ -58,10 +57,8 @@ static int pkg_plugin_pkg_is_installed(const char *pkg_name) { int err = PKG_SUCCESS; String packageName(pkg_name); - String appId; - _PackageManagerImpl *pManager = null; - PackageInfo pkgInfo; - result r = E_SUCCESS; + String packageId; + bool installed = true; AppLogTag(OSP_INSTALLER, "[libtpk] pkg_plugin_pkg_is_installed() is called"); AppLogTag(OSP_INSTALLER, "[libtpk] pkg_name=[%s]", pkg_name); @@ -71,19 +68,17 @@ static int pkg_plugin_pkg_is_installed(const char *pkg_name) if (packageName.Contains(PACKAGE_NAME_PREFIX_ORG) == true) { String prefixPackage(PACKAGE_NAME_PREFIX_ORG); - packageName.SubString(prefixPackage.GetLength(), APPID_LENGTH, appId); + packageName.SubString(prefixPackage.GetLength(), APPID_LENGTH, packageId); } else { - packageName.SubString(0, APPID_LENGTH, appId); + packageName.SubString(0, APPID_LENGTH, packageId); } - pManager = _PackageManagerImpl::GetInstance(); - TryCatch(pManager, err = PKG_ERROR, "[osp-installer][libtpk] pManager is null"); - - r = pManager->GetPackageInfo(appId, pkgInfo); - TryCatch(!IsFailed(r), err = PKG_ERROR, "[osp-installer][libtpk] GetPackageInfo is failed"); + installed = _PackageManagerImpl::GetInstance()->IsPackageInstalled(packageId); + TryCatch(installed == true, err = PKG_ERROR, "[osp-installer][libtpk] IsPackageInstalled() is failed"); + AppLogTag(OSP_INSTALLER, "[libtpk] IsPackageInstalled=[%d]", installed); err = PKG_SUCCESS; CATCH: @@ -105,9 +100,7 @@ static int pkg_plugin_get_pkg_detail_info(const char *pkg_name, String packageName(pkg_name); String appId; char* pVersion = null; - _PackageManagerImpl *pManager = null; - PackageInfo pkgInfo; - _PackageInfoImpl* pPkgInfoImpl = null; + _PackageInfoImpl pkgInfoImpl; result r = E_SUCCESS; AppLogTag(OSP_INSTALLER, "[libtpk] pkg_plugin_get_pkg_detail_info() is called"); @@ -127,27 +120,21 @@ static int pkg_plugin_get_pkg_detail_info(const char *pkg_name, packageName.SubString(0, APPID_LENGTH, appId); } - pManager = _PackageManagerImpl::GetInstance(); - TryCatch(pManager, err = PKG_ERROR, "[osp-installer][libtpk] pManager is null"); - - r = pManager->GetPackageInfo(appId, pkgInfo); - TryCatch(!IsFailed(r), err = PKG_ERROR, "[osp-installer][libtpk] GetPackageInfo is failed"); + r = pkgInfoImpl.Construct(appId); + TryCatch(!IsFailed(r), err = PKG_ERROR, "[osp-installer][libtpk] pkgInfoImpl.Construct is failed"); strncpy(pkg_detail_info->pkg_type, "tpk", PKG_TYPE_STRING_LEN_MAX); strncpy(pkg_detail_info->pkg_name, pkg_name, PKG_NAME_STRING_LEN_MAX-1); - pVersion = _StringConverter::CopyToCharArrayN(pkgInfo.GetAppVersion()); + pVersion = _StringConverter::CopyToCharArrayN(pkgInfoImpl.GetVersion()); TryCatch(pVersion, err = PKG_ERROR, "[osp-installer][libtpk] pVersion is null"); strncpy(pkg_detail_info->version, pVersion, PKG_VERSION_STRING_LEN_MAX-1); delete [] pVersion; pVersion = null; - pPkgInfoImpl = _PackageInfoImpl::GetInstance(&pkgInfo); - TryCatch(pPkgInfoImpl, err = PKG_ERROR, "[osp-installer][libtpk] pPkgInfoImpl is null"); - - pkg_detail_info->installed_size = pkg_get_installed_size(pPkgInfoImpl->GetAppRootPath()); - pkg_detail_info->data_size = pkg_get_data_size(pPkgInfoImpl->GetAppRootPath()); + pkg_detail_info->installed_size = pkg_get_installed_size(pkgInfoImpl.GetAppRootPath()); + pkg_detail_info->data_size = pkg_get_data_size(pkgInfoImpl.GetAppRootPath()); pkg_detail_info->app_size = pkg_detail_info->installed_size - pkg_detail_info->data_size; err = PKG_SUCCESS; diff --git a/src/Context/InstallationContext.cpp b/src/Context/InstallationContext.cpp index 38d3f0a..95f7c19 100644 --- a/src/Context/InstallationContext.cpp +++ b/src/Context/InstallationContext.cpp @@ -29,13 +29,13 @@ #include "UninstallStep.h" #include "UnpackStep.h" -#include <FApp_PackageInfoImpl.h> +#include <FAppPkg_PackageInfoImpl.h> using namespace Tizen::Base; using namespace Tizen::Base::Collection; using namespace Tizen::Io; using namespace Tizen::Security::Cert; -using namespace Tizen::App; +using namespace Tizen::App::Package; InstallationContext::InstallationContext(void) :__pStep(null) diff --git a/src/Context/InstallationContext.h b/src/Context/InstallationContext.h index 648db20..effd419 100644 --- a/src/Context/InstallationContext.h +++ b/src/Context/InstallationContext.h @@ -25,7 +25,7 @@ #include <app2ext_interface.h> -#include <FAppPackageInfo.h> +#include <FAppPkg_PackageInfoImpl.h> #include <FSecCertX509CertificatePath.h> #include "InstallerDefs.h" @@ -139,7 +139,7 @@ public: app2ext_handle* GetApp2ExtHandle(void) const; void SetApp2ExtHandle(app2ext_handle* pHandle); - Tizen::App::_PackageInfoImpl* GetPackageInfoImpl(void) const; + Tizen::App::Package::_PackageInfoImpl* GetPackageInfoImpl(void) const; private: InstallationContext(const InstallationContext& value); @@ -180,7 +180,7 @@ private: int __packageNameType; app2ext_handle* __pApp2ExtHandle; - Tizen::App::_PackageInfoImpl* __pPackageInfoImpl; + Tizen::App::Package::_PackageInfoImpl* __pPackageInfoImpl; }; // InstallationContext diff --git a/src/Installer/DirectoryInstaller.cpp b/src/Installer/DirectoryInstaller.cpp index 0184b87..d58b668 100644 --- a/src/Installer/DirectoryInstaller.cpp +++ b/src/Installer/DirectoryInstaller.cpp @@ -22,12 +22,12 @@ #include <FIoFile.h> #include <FIoDirectory.h> #include <FIo_FileImpl.h> -#include <FApp_PackageInfoImpl.h> +#include <FAppPkg_PackageInfoImpl.h> #include "DirectoryInstaller.h" #include "InstallerUtil.h" -using namespace Tizen::App; +using namespace Tizen::App::Package; using namespace Tizen::Base; using namespace Tizen::Io; diff --git a/src/Installer/Installer.cpp b/src/Installer/Installer.cpp index 74a25b1..acd1150 100644 --- a/src/Installer/Installer.cpp +++ b/src/Installer/Installer.cpp @@ -24,8 +24,8 @@ #include <FIoFile.h> #include <FIoDirectory.h> -#include <FApp_PackageInfoImpl.h> -#include <FApp_PackageManagerImpl.h> +#include <FAppPkg_PackageInfoImpl.h> +#include <FAppPkg_PackageManagerImpl.h> #include "Installer.h" #include "PermissionManager.h" @@ -34,7 +34,7 @@ using namespace Tizen::Base; using namespace Tizen::Base::Collection; -using namespace Tizen::App; +using namespace Tizen::App::Package; using namespace Tizen::Io; Installer::Installer(void) diff --git a/src/Manager/ConfigurationManager.cpp b/src/Manager/ConfigurationManager.cpp index 9b88a1b..d4b482b 100644 --- a/src/Manager/ConfigurationManager.cpp +++ b/src/Manager/ConfigurationManager.cpp @@ -32,8 +32,8 @@ #include <FIoDirectory.h> #include <FSecCertX509CertificatePath.h> #include <FApp_Aul.h> -#include <FApp_PackageInfoImpl.h> -#include <FApp_PackageManagerImpl.h> +#include <FAppPkg_PackageInfoImpl.h> +#include <FAppPkg_PackageManagerImpl.h> #include <FBase_StringConverter.h> #include "ConfigurationManager.h" @@ -45,6 +45,7 @@ using namespace Tizen::Base::Collection; using namespace Tizen::Base::Utility; using namespace Tizen::Security::Cert; using namespace Tizen::App; +using namespace Tizen::App::Package; using namespace Tizen::Io; ConfigurationManager::ConfigurationManager(void) diff --git a/src/Manager/ConfigurationManager.h b/src/Manager/ConfigurationManager.h index da6ed44..71314f5 100644 --- a/src/Manager/ConfigurationManager.h +++ b/src/Manager/ConfigurationManager.h @@ -23,7 +23,7 @@ #ifndef _CONFIGURATION_MANAGER_H_ #define _CONFIGURATION_MANAGER_H_ -#include <FApp_AppInfoImpl.h> +#include <FAppPkg_PackageAppInfoImpl.h> #include "InstallationContext.h" diff --git a/src/Manager/InstallerManager.cpp b/src/Manager/InstallerManager.cpp index 7a14a11..723fbac 100644 --- a/src/Manager/InstallerManager.cpp +++ b/src/Manager/InstallerManager.cpp @@ -24,7 +24,7 @@ #include <FIoFile.h> #include <FIoDirectory.h> #include <FBase_StringConverter.h> -#include <FApp_PackageInfoImpl.h> +#include <FAppPkg_PackageInfoImpl.h> #include "InstallerManager.h" #include "GuestInstaller.h" @@ -37,7 +37,7 @@ using namespace Tizen::Base; using namespace Tizen::Base::Utility; using namespace Tizen::Base::Collection; using namespace Tizen::Io; -using namespace Tizen::App; +using namespace Tizen::App::Package; const int BUFSIZE = 512; InstallerManager* InstallerManager::__pInstallerManager = null; diff --git a/src/Manager/PermissionManager.cpp b/src/Manager/PermissionManager.cpp index 206b4fe..c021719 100644 --- a/src/Manager/PermissionManager.cpp +++ b/src/Manager/PermissionManager.cpp @@ -28,9 +28,9 @@ #include <FIoDirectory.h> #include <FBase_StringConverter.h> #include <FIo_FileImpl.h> -#include <FApp_PackageManagerImpl.h> -#include <FApp_PackageInfoImpl.h> -#include <FApp_AppInfoImpl.h> +#include <FAppPkg_PackageManagerImpl.h> +#include <FAppPkg_PackageInfoImpl.h> +#include <FAppPkg_PackageAppInfoImpl.h> #include "PermissionManager.h" #include "InstallerUtil.h" @@ -39,7 +39,7 @@ using namespace Tizen::Base; using namespace Tizen::Base::Collection; using namespace Tizen::Base::Utility; using namespace Tizen::Io; -using namespace Tizen::App; +using namespace Tizen::App::Package; PermissionManager::PermissionManager(void) { diff --git a/src/Step/ManifestXmlStep.cpp b/src/Step/ManifestXmlStep.cpp index e5f11b7..b7a82ca 100644 --- a/src/Step/ManifestXmlStep.cpp +++ b/src/Step/ManifestXmlStep.cpp @@ -24,14 +24,14 @@ #include <FIoFile.h> #include <FBase_StringConverter.h> -#include <FApp_PackageInfoImpl.h> +#include <FAppPkg_PackageInfoImpl.h> #include "InstallationContext.h" #include "ManifestHandler.h" #include "ManifestXmlStep.h" using namespace Tizen::Base; -using namespace Tizen::App; +using namespace Tizen::App::Package; using namespace Tizen::Io; ManifestXmlStep::ManifestXmlStep(void) diff --git a/src/Step/SignatureStep.cpp b/src/Step/SignatureStep.cpp index da69dfe..33aa68a 100644 --- a/src/Step/SignatureStep.cpp +++ b/src/Step/SignatureStep.cpp @@ -20,7 +20,7 @@ */ #include <FIoFile.h> -#include <FApp_PackageInfoImpl.h> +#include <FAppPkg_PackageInfoImpl.h> #include <FBase_StringConverter.h> #include "InstallationContext.h" @@ -28,7 +28,7 @@ #include "SignatureHandler.h" #include "SignatureStep.h" -using namespace Tizen::App; +using namespace Tizen::App::Package; using namespace Tizen::Base; using namespace Tizen::Base::Collection; using namespace Tizen::Io; diff --git a/src/Step/UninstallStep.cpp b/src/Step/UninstallStep.cpp index cef930b..17c7fd2 100644 --- a/src/Step/UninstallStep.cpp +++ b/src/Step/UninstallStep.cpp @@ -24,9 +24,9 @@ #include <FIoDirectory.h> #include <FIo_FileImpl.h> #include <FBase_StringConverter.h> -#include <FApp_PackageManagerImpl.h> -#include <FApp_PackageInfoImpl.h> -#include <FApp_AppInfoImpl.h> +#include <FAppPkg_PackageManagerImpl.h> +#include <FAppPkg_PackageInfoImpl.h> +#include <FAppPkg_PackageAppInfoImpl.h> #include "InstallationContext.h" #include "UninstallStep.h" @@ -34,7 +34,7 @@ using namespace Tizen::Base; using namespace Tizen::Base::Collection; -using namespace Tizen::App; +using namespace Tizen::App::Package; using namespace Tizen::Io; UninstallStep::UninstallStep(void) diff --git a/src/Step/UnpackStep.cpp b/src/Step/UnpackStep.cpp index c4d065c..b42e1a0 100644 --- a/src/Step/UnpackStep.cpp +++ b/src/Step/UnpackStep.cpp @@ -25,7 +25,7 @@ #include <FIoDirectory.h> #include <FBaseResult.h> #include <FBaseUtilFileUnzipper.h> -#include <FApp_PackageInfoImpl.h> +#include <FAppPkg_PackageInfoImpl.h> #include <FBase_StringConverter.h> #include "InstallationContext.h" @@ -35,7 +35,7 @@ using namespace Tizen::Base; using namespace Tizen::Base::Collection; using namespace Tizen::Base::Utility; -using namespace Tizen::App; +using namespace Tizen::App::Package; using namespace Tizen::Io; UnpackStep::UnpackStep(void) diff --git a/src/XmlHandler/ManifestGenerator.cpp b/src/XmlHandler/ManifestGenerator.cpp index 0c8a22a..f14945f 100644 --- a/src/XmlHandler/ManifestGenerator.cpp +++ b/src/XmlHandler/ManifestGenerator.cpp @@ -21,7 +21,7 @@ #include <FLclLocale.h> #include <FApp_Aul.h> -#include <FApp_PackageInfoImpl.h> +#include <FAppPkg_PackageInfoImpl.h> #include "ManifestGenerator.h" #include "InstallerUtil.h" @@ -29,6 +29,7 @@ using namespace Tizen::Base; using namespace Tizen::Base::Collection; using namespace Tizen::App; +using namespace Tizen::App::Package; using namespace Tizen::Locales; ManifestGenerator::ManifestGenerator(void) diff --git a/src/XmlHandler/ManifestGenerator.h b/src/XmlHandler/ManifestGenerator.h index dfeb9ea..ce65b5c 100644 --- a/src/XmlHandler/ManifestGenerator.h +++ b/src/XmlHandler/ManifestGenerator.h @@ -23,8 +23,8 @@ #ifndef _MANIFEST_GENERATOR_H_ #define _MANIFEST_GENERATOR_H_ -#include <FAppPackageInfo.h> -#include <FApp_AppInfoImpl.h> +#include <FAppPkg_PackageInfoImpl.h> +#include <FAppPkg_PackageAppInfoImpl.h> #include "InstallationContext.h" #include "XmlWriter.h" @@ -52,13 +52,13 @@ private: bool FindFeatureValue(Tizen::Base::Collection::ArrayList* pFeatureList, const Tizen::Base::String& feature, const Tizen::Base::String& value) const; bool WriteLanguageValue(Tizen::Base::Collection::IMap* pList, const Tizen::Base::String& label) const; - bool WriteLiveboxes(Tizen::App::_PackageAppInfoImpl* pAppInfoImpl) const; - bool WriteAppControl(Tizen::App::_PackageAppInfoImpl* pAppInfoImpl) const; + bool WriteLiveboxes(Tizen::App::Package::_PackageAppInfoImpl* pAppInfoImpl) const; + bool WriteAppControl(Tizen::App::Package::_PackageAppInfoImpl* pAppInfoImpl) const; Tizen::Base::String GetGlFrameValue(Tizen::Base::Collection::ArrayList* pFeatureList) const; private: InstallationContext* __pContext; - Tizen::App::_PackageInfoImpl* __pPackageInfoImpl; + Tizen::App::Package::_PackageInfoImpl* __pPackageInfoImpl; XmlWriter* __pWriter; }; // ManifestGenerator diff --git a/src/XmlHandler/ManifestHandler.cpp b/src/XmlHandler/ManifestHandler.cpp index b77c8d7..4b63d98 100644 --- a/src/XmlHandler/ManifestHandler.cpp +++ b/src/XmlHandler/ManifestHandler.cpp @@ -21,7 +21,7 @@ #include <FIoFile.h> #include <FSys_SystemInfoImpl.h> -#include <FApp_PackageInfoImpl.h> +#include <FAppPkg_PackageInfoImpl.h> #include <FBase_StringConverter.h> #include "ManifestHandler.h" @@ -32,7 +32,7 @@ using namespace Tizen::Base; using namespace Tizen::Base::Collection; using namespace Tizen::Base::Utility; -using namespace Tizen::App; +using namespace Tizen::App::Package; using namespace Tizen::Io; using namespace Tizen::System; diff --git a/src/XmlHandler/ManifestHandler.h b/src/XmlHandler/ManifestHandler.h index 62595f6..4c46b74 100644 --- a/src/XmlHandler/ManifestHandler.h +++ b/src/XmlHandler/ManifestHandler.h @@ -23,7 +23,7 @@ #ifndef _MANIFEST_HANDLER_H_ #define _MANIFEST_HANDLER_H_ -#include <FAppPackageInfo.h> +#include <FAppPkg_PackageInfoImpl.h> #include <FBaseString.h> #include "XmlHandler.h" @@ -98,15 +98,15 @@ private: Tizen::Base::Collection::ArrayList* __pPrivilegeList; Tizen::Base::Collection::ArrayList* __pLiveBoxList; Tizen::Base::Collection::ArrayList* __pContentInfoList; - Tizen::App::_PackageInfoImpl* __pPackageInfoImpl; - Tizen::App::_PackageAppInfoImpl* __pPackageAppInfoImpl; - Tizen::App::_AppControlInfoImpl* __pAppControlInfoImpl; - Tizen::App::_AppControlCapabilityInfoImpl* __pAppControlCapabilityInfoImpl; - Tizen::App::_AppControlResolutionInfoImpl* __pAppControlResolutionInfoImpl; - Tizen::App::_DataControlInfoImpl* __pDataControlInfoImpl; - Tizen::App::_DataControlTypeImpl* __pDataControlTypeImpl; - Tizen::App::_LaunchConditionInfoImpl* __pLaunchConditionImpl; - Tizen::App::_NotificationInfoImpl* __pNotificationImpl; + Tizen::App::Package::_PackageInfoImpl* __pPackageInfoImpl; + Tizen::App::Package::_PackageAppInfoImpl* __pPackageAppInfoImpl; + Tizen::App::Package::_AppControlInfoImpl* __pAppControlInfoImpl; + Tizen::App::Package::_AppControlCapabilityInfoImpl* __pAppControlCapabilityInfoImpl; + Tizen::App::Package::_AppControlResolutionInfoImpl* __pAppControlResolutionInfoImpl; + Tizen::App::Package::_DataControlInfoImpl* __pDataControlInfoImpl; + Tizen::App::Package::_DataControlTypeImpl* __pDataControlTypeImpl; + Tizen::App::Package::_LaunchConditionInfoImpl* __pLaunchConditionImpl; + Tizen::App::Package::_NotificationInfoImpl* __pNotificationImpl; LiveboxInfo* __pLiveboxInfo; ContentInfo* __pContentInfo; char* __pDefaultIconType; |