#ifndef _INSTALLER_DEFS_H_
#define _INSTALLER_DEFS_H_
-#define OSP_INSTALLER_VERSION "osp-installer version = 20130118.1"
+#define OSP_INSTALLER_VERSION "osp-installer version = 20130121.1"
#define DIR_BIN L"/bin"
#define DIR_INFO L"/info"
#define OSP_INSTALLER "osp-installer"
-#ifdef AppLogTag
-#undef AppLogTag
-#define AppLogTag(tag, ...) AppLogTagInternal(tag, " | ", 0, __VA_ARGS__); \
- fprintf(stderr, " | ");fprintf(stderr, __VA_ARGS__);fprintf(stderr, "\n");
+#ifdef AppLog
+#undef AppLog
+#define AppLog(...) AppLogTagInternal(OSP_INSTALLER, " | ", 0, __VA_ARGS__); \
+ fprintf(stderr, " | "); \
+ fprintf(stderr, __VA_ARGS__);fprintf(stderr, "\n");
#endif
#ifdef TryCatch
if (!(condition)) { \
AppLogExceptionTag(OSP_INSTALLER, __VA_ARGS__); \
expr; \
- fprintf(stderr, " | ");fprintf(stderr, __VA_ARGS__);fprintf(stderr, "\n"); \
+ fprintf(stderr, " | "); \
+ fprintf(stderr, "%s(%d)\n", (const char *)__PRETTY_FUNCTION__, __LINE__); \
+ fprintf(stderr, " |--> "); \
+ fprintf(stderr, __VA_ARGS__);fprintf(stderr, "\n"); \
goto CATCH; \
} \
else {;}
#define TryReturn(condition, returnValue, ...) \
if (!(condition)) { \
AppLogExceptionTag(OSP_INSTALLER, __VA_ARGS__); \
- fprintf(stderr, " | ");fprintf(stderr, __VA_ARGS__);fprintf(stderr, "\n"); \
+ fprintf(stderr, " | "); \
+ fprintf(stderr, "%s(%d)\n", (const char *)__PRETTY_FUNCTION__, __LINE__); \
+ fprintf(stderr, " |--> "); \
+ fprintf(stderr, __VA_ARGS__);fprintf(stderr, "\n"); \
return returnValue; \
} \
else {;}
INSTALLER_MODE_RECURSIVE_DIRECTORY_INSTALL = 3,
};
-enum
-{
- INSTALLER_PREFIX_TYPE_NONE,
- INSTALLER_PREFIX_TYPE_ORG,
-
-};
-
enum CategoryType
{
CATEGORY_TYPE_NONE,
};
+enum InstallationStorage
+{
+ INSTALLATION_STORAGE_INTERNAL,
+ INSTALLATION_STORAGE_EXTERNAL,
+
+};
+
#endif // _INSTALLER_DEFS_H_
static void pkg_plugin_unload(void)
{
- AppLogTag(OSP_INSTALLER, "[libtpk] pkg_plugin_unload() is called");
+ AppLog("[libtpk] pkg_plugin_unload() is called");
}
static int pkg_plugin_pkg_is_installed(const char *pkg_name)
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);
+ AppLog("[libtpk] pkg_plugin_pkg_is_installed() is called");
+ AppLog("[libtpk] pkg_name=[%s]", pkg_name);
TryCatch(pkg_name, err = PKG_ERROR, "[osp-installer][libtpk] pkg_name is null");
installed = _PackageManagerImpl::GetInstance()->IsPackageInstalled(packageId);
TryCatch(installed == true, err = PKG_ERROR, "[osp-installer][libtpk] IsPackageInstalled() is failed");
- AppLogTag(OSP_INSTALLER, "[libtpk] IsPackageInstalled=[%d]", installed);
+ AppLog("[libtpk] IsPackageInstalled=[%d]", installed);
err = PKG_SUCCESS;
CATCH:
static int pkg_plugin_get_installed_pkg_list(const char *category,
const char *option, package_manager_pkg_info_t **list, int *count)
{
- AppLogTag(OSP_INSTALLER, "[libtpk] pkg_plugin_get_installed_pkg_list() is called");
+ AppLog("[libtpk] pkg_plugin_get_installed_pkg_list() is called");
return PKG_ERROR;
}
_PackageInfoImpl pkgInfoImpl;
result r = E_SUCCESS;
- AppLogTag(OSP_INSTALLER, "[libtpk] pkg_plugin_get_pkg_detail_info() is called");
- AppLogTag(OSP_INSTALLER, "[libtpk] pkg_name=[%s]", pkg_name);
+ AppLog("[libtpk] pkg_plugin_get_pkg_detail_info() is called");
+ AppLog("[libtpk] pkg_name=[%s]", pkg_name);
TryCatch(pkg_name, err = PKG_ERROR, "[osp-installer][libtpk] pkg_name is null");
static int pkg_plugin_get_pkg_detail_info_from_package(const char *pkg_path,
package_manager_pkg_detail_info_t *pkg_detail_info)
{
- AppLogTag(OSP_INSTALLER, "[libtpk] pkg_plugin_get_pkg_detail_info_from_package() is called");
+ AppLog("[libtpk] pkg_plugin_get_pkg_detail_info_from_package() is called");
return PKG_ERROR;
}
if (S_ISLNK(fileinfo.st_mode))
{
- AppLogTag(OSP_INSTALLER, "[libtpk] SYMLINK=%s", fileName);
+ AppLog("[libtpk] SYMLINK=%s", fileName);
total += BLOCK_SIZE;
continue;
}
ret = pkg_get_directory_size(fileName);
ret += fileinfo.st_size;
total += ret;
- AppLogTag(OSP_INSTALLER, "[libtpk] DIR=%s, size=%d[%dK],", fileName, (int)ret, (int)(ret/1024));
+ AppLog("[libtpk] DIR=%s, size=%d[%dK],", fileName, (int)ret, (int)(ret/1024));
}
else
{
if (q)
{
- AppLogTag(OSP_INSTALLER, "[libtpk] File=%s, size=%d[%dK]", fileName, (q * BLOCK_SIZE), (q * BLOCK_SIZE)/1024);
+ AppLog("[libtpk] File=%s, size=%d[%dK]", fileName, (q * BLOCK_SIZE), (q * BLOCK_SIZE)/1024);
}
}
}
using namespace Tizen::App::Package;
InstallationContext::InstallationContext(void)
-:__pAppDataList(null)
-,__isSubMode(false)
-,__isOspCompat(false)
-,__pStep(null)
+:__pStep(null)
,__pDrmLicense(null)
,__error(INSTALLER_ERROR_NONE)
,__step(INSTALLER_STEP_NONE)
,__state(INSTALLER_STATE_RUNNING)
,__stepChanged(true)
,__continue(true)
-,__preloaded(false)
-,__hybridService(false)
-,__verificationMode(false)
+,__pPackageData(null)
+,__pAppDataList(null)
+,__isSubMode(false)
+,__isOspCompat(false)
+,__isPreloaded(false)
+,__isHybridService(false)
+,__isVerificationMode(false)
,__operation(INSTALLER_OPERATION_INSTALL)
,__storage(INSTALLATION_STORAGE_INTERNAL)
+,__rootCertType(ROOT_CERTIFICATE_NONE)
+,__pApp2ExtHandle(null)
,__pPrivilegeList(null)
,__pLiveboxDataList(null)
,__pContentDataList(null)
,__pAuthorCertPath(null)
,__pDistributorCertPath(null)
-,__rootCertType(ROOT_CERTIFICATE_NONE)
-,__packageNameType(INSTALLER_PREFIX_TYPE_NONE)
-,__pApp2ExtHandle(null)
,__pPackageInfoImpl(null)
{
}
__pLiveboxDataList = null;
}
+ if (__pPackageData)
+ {
+ delete __pPackageData;
+ __pPackageData = null;
+ }
+
if (__pAppDataList)
{
__pAppDataList->RemoveAll();
InstallationContext::Construct(void)
{
__pPackageInfoImpl = new (std::nothrow) _PackageInfoImpl();
- TryReturn(__pPackageInfoImpl, INSTALLER_ERROR_OUT_OF_MEMORY, "[osp-installer] __pPackageInfoImpl is null.");
+ TryReturn(__pPackageInfoImpl, INSTALLER_ERROR_OUT_OF_MEMORY, "__pPackageInfoImpl is null.");
+
+ __pPackageData = new (std::nothrow) PackageData;
+ TryReturn(__pPackageData, INSTALLER_ERROR_OUT_OF_MEMORY, "__pPackageData is null");
__pAppDataList = new (std::nothrow) ArrayListT<AppData*>;
- TryReturn(__pAppDataList, INSTALLER_ERROR_OUT_OF_MEMORY, "[osp-installer] __pAppDataList is null");
+ TryReturn(__pAppDataList, INSTALLER_ERROR_OUT_OF_MEMORY, "__pAppDataList is null");
return INSTALLER_ERROR_NONE;
}
case INSTALLER_STEP_CHECK_SYSTEM:
__pStep = new (std::nothrow) SystemCheckStep();
- TryReturn(__pStep, false, "[osp-installer] SystemCheckStep is failed.");
+ TryReturn(__pStep, false, "SystemCheckStep is failed.");
break;
case INSTALLER_STEP_CHECK_PACKAGE:
__pStep = new (std::nothrow) PackageCheckStep();
- TryReturn(__pStep, false, "[osp-installer] PackageCheckStep is failed.");
+ TryReturn(__pStep, false, "PackageCheckStep is failed.");
break;
case INSTALLER_STEP_UNPACK:
__pStep = new (std::nothrow) UnpackStep();
- TryReturn(__pStep, false, "[osp-installer] UnpackStep is failed.");
+ TryReturn(__pStep, false, "UnpackStep is failed.");
break;
case INSTALLER_STEP_PARSE_MANIFEST:
__pStep = new (std::nothrow) ManifestXmlStep();
- TryReturn(__pStep, false, "[osp-installer] ManifestXmlStep is failed.");
+ TryReturn(__pStep, false, "ManifestXmlStep is failed.");
break;
case INSTALLER_STEP_PARSE_SIGNATURE:
__pStep = new (std::nothrow) SignatureStep();
- TryReturn(__pStep, false, "[osp-installer] SignatureStep is failed.");
+ TryReturn(__pStep, false, "SignatureStep is failed.");
break;
case INSTALLER_STEP_UNINSTALL:
__pStep = new (std::nothrow) UninstallStep();
- TryReturn(__pStep, false, "[osp-installer] UninstallStep is failed.");
+ TryReturn(__pStep, false, "UninstallStep is failed.");
break;
case INSTALLER_STEP_LICENSE:
__pStep = new (std::nothrow) LicenseStep();
- TryReturn(__pStep, false, "[osp-installer] LicenseStep is failed.");
+ TryReturn(__pStep, false, "LicenseStep is failed.");
break;
case INSTALLER_STEP_DRM:
__pStep = new (std::nothrow) DrmStep();
- TryReturn(__pStep, false, "[osp-installer] DrmStep is failed.");
+ TryReturn(__pStep, false, "DrmStep is failed.");
break;
case INSTALLER_STEP_END:
InstallationContext::Run(void)
{
InstallerError error = INSTALLER_ERROR_NONE;
- AppLogTag(OSP_INSTALLER, "InstallationContext::Run()");
+ AppLog("InstallationContext::Run()");
return error;
}
}
void
-InstallationContext::SetInputPath(const Tizen::Base::String& path)
-{
- __inputPath = path;
-}
-
-const String&
-InstallationContext::GetInputPath(void) const
-{
- return __inputPath;
-}
-
-void
InstallationContext::SetInstallerOperation(InstallerOperation op)
{
__operation = op;
__continue = cont;
}
-bool
-InstallationContext::IsPreloaded(void)
-{
- return __preloaded;
-}
-
-void
-InstallationContext::SetPreloaded(bool preloaded)
-{
- __preloaded = preloaded;
-}
-
-bool
-InstallationContext::IsHybridService(void)
-{
- return __hybridService;
-}
-
-void
-InstallationContext::SetHybridService(bool hybridService)
-{
- __hybridService = hybridService;
-}
-
-bool
-InstallationContext::IsVerificationMode(void)
-{
- return __verificationMode;
-}
-
-void
-InstallationContext::SetVerificationMode(bool verificationMode)
-{
- __verificationMode = verificationMode;
-}
-
-const String&
-InstallationContext::GetPackagePath(void) const
-{
- return __packagePath;
-}
-
-void
-InstallationContext::SetPackagePath(const String& packagePath)
-{
- __packagePath = packagePath;
-}
-
-const String&
-InstallationContext::GetLicensePath(void) const
-{
- return __licensePath;
-}
-
-void
-InstallationContext::SetLicensePath(const String& licensePath)
-{
- __licensePath = licensePath;
-}
-
-const String&
-InstallationContext::GetTemporaryDir(void) const
-{
- return __temporaryDir;
-}
-
-void
-InstallationContext::SetTemporaryDir(const String& temporaryDir)
-{
- __temporaryDir = temporaryDir;
-}
-
-const String&
-InstallationContext::GetInstallDir(void) const
-{
- return __installDir;
-}
-
-void
-InstallationContext::SetInstallDir(const String& installDir)
-{
- __installDir = installDir;
-}
-
-const String&
-InstallationContext::GetWorkingDir(void) const
-{
- return __workingDir;
-}
-
-void
-InstallationContext::SetWorkingDir(const String& workingDir)
-{
- __workingDir = workingDir;
-}
-
-void
-InstallationContext::SetInstallationStorage(InstallationStorage storage)
-{
- __storage = storage;
-}
-
-InstallationContext::InstallationStorage
-InstallationContext::GetInstallationStorage(void) const
-{
- return __storage;
-}
-
const PackageId&
InstallationContext::GetId(void) const
{
__packageId = packageId;
}
-const String&
-InstallationContext::GetAppVersion(void) const
-{
- return __appVersion;
-}
-
-void
-InstallationContext::SetAppVersion(const String& appVersion)
-{
- __appVersion = appVersion;
-}
-
-String
-InstallationContext::GetManifestXmlPath(void)
-{
- String path;
-
- path = GetInstallDir() + PACKAGE_XML_FILE;
-
- return path;
-}
-
String
InstallationContext::GetSignatureXmlPath(void)
{
String path;
- path = GetInstallDir() + SIGNATURE1_XML_FILE;
+ path = __installDir + SIGNATURE1_XML_FILE;
return path;
}
{
String path;
- path = GetInstallDir() + AUTHOR_SIGNATURE_XML_FILE;
+ path = __installDir + AUTHOR_SIGNATURE_XML_FILE;
return path;
}
__pDistributorCertPath = pDistributorCertPath;
}
-RootCertificateType
-InstallationContext::GetRootCertType(void) const
-{
- return __rootCertType;
-}
-
-void
-InstallationContext::SetRootCertType(RootCertificateType certType)
-{
- __rootCertType = certType;
-}
-
-int
-InstallationContext::GetPackageNameType(void) const
-{
- return __packageNameType;
-}
-
-void
-InstallationContext::SetPackageNameType(int type)
-{
- __packageNameType = type;
-}
-
-app2ext_handle*
-InstallationContext::GetApp2ExtHandle(void) const
-{
- return __pApp2ExtHandle;
-}
-
-void
-InstallationContext::SetApp2ExtHandle(app2ext_handle* pHandle)
-{
- __pApp2ExtHandle = pHandle;
-}
-
_PackageInfoImpl*
InstallationContext::GetPackageInfoImpl(void) const
{
#ifndef _INSTALLATION_CONTEXT_H_
#define _INSTALLATION_CONTEXT_H_
-#include <app2ext_interface.h>
-
+// #include <app2ext_interface.h>
#include <FAppTypes.h>
#include <FAppPkg_PackageInfoImpl.h>
#include <FSecCertX509CertificatePath.h>
class InstallationContext
{
public:
- enum InstallationStorage
- {
- INSTALLATION_STORAGE_INTERNAL,
- INSTALLATION_STORAGE_EXTERNAL,
- };
-
InstallationContext(void);
virtual ~InstallationContext(void);
+
InstallerError Construct(void);
bool ChangeStep(InstallationStep step);
IInstallationStep* GetStep(void);
- void SetInputPath(const Tizen::Base::String& path);
- const Tizen::Base::String& GetInputPath(void) const;
-
void SetInstallerOperation(InstallerOperation op);
InstallerOperation GetInstallerOperation(void) const;
- void SetInstallationStorage(InstallationStorage storage);
- InstallationStorage GetInstallationStorage(void) const;
-
bool IsContinue(void);
void SetContinue(bool cont);
- bool IsPreloaded(void);
- void SetPreloaded(bool preloaded);
-
- bool IsHybridService(void);
- void SetHybridService(bool hybridService);
-
- bool IsVerificationMode(void);
- void SetVerificationMode(bool verificationMode);
-
- const Tizen::Base::String& GetPackagePath(void) const;
- void SetPackagePath(const Tizen::Base::String& packagePath);
-
- const Tizen::Base::String& GetLicensePath(void) const;
- void SetLicensePath(const Tizen::Base::String& licensePath);
-
- const Tizen::Base::String& GetTemporaryDir(void) const;
- void SetTemporaryDir(const Tizen::Base::String& temporaryDir);
-
- const Tizen::Base::String& GetInstallDir(void) const;
- void SetInstallDir(const Tizen::Base::String& installDir);
-
- const Tizen::Base::String& GetWorkingDir(void) const;
- void SetWorkingDir(const Tizen::Base::String& workingDir);
+ Tizen::Base::String GetSignatureXmlPath(void);
+ Tizen::Base::String GetAuthorSignatureXmlPath(void);
const Tizen::App::PackageId& GetId(void) const;
void SetId(const Tizen::App::PackageId& packageId);
- const Tizen::Base::String& GetAppVersion(void) const;
- void SetAppVersion(const Tizen::Base::String& appVersion);
-
- Tizen::Base::String GetManifestXmlPath(void);
- Tizen::Base::String GetSignatureXmlPath(void);
- Tizen::Base::String GetAuthorSignatureXmlPath(void);
-
const Tizen::Base::Collection::ArrayList* GetPrivilegeList(void) const;
void SetPrivilegeList(Tizen::Base::Collection::ArrayList* privilegeList);
Tizen::Security::Cert::X509CertificatePath* GetDistributorCertPath(void) const;
void SetDistributorCertPath(Tizen::Security::Cert::X509CertificatePath* pDistributorCertPath);
- RootCertificateType GetRootCertType(void) const;
- void SetRootCertType(RootCertificateType certType);
-
- int GetPackageNameType(void) const;
- void SetPackageNameType(int type);
-
- app2ext_handle* GetApp2ExtHandle(void) const;
- void SetApp2ExtHandle(app2ext_handle* pHandle);
-
Tizen::App::Package::_PackageInfoImpl* GetPackageInfoImpl(void) const;
- PackageData __packageData;
- Tizen::Base::Collection::IListT<AppData *>* __pAppDataList;
-
- bool __isSubMode;
- Tizen::Base::String __subModeAppName;
-
- bool __isOspCompat;
-
private:
InstallationContext(const InstallationContext& value);
InstallationContext& operator =(const InstallationContext& source);
InstallationState __state;
bool __stepChanged;
bool __continue;
- bool __preloaded;
- bool __hybridService;
- bool __verificationMode;
- Tizen::Base::String __inputPath;
+public:
+ PackageData* __pPackageData;
+ Tizen::Base::Collection::IListT<AppData *>* __pAppDataList;
+
+ bool __isSubMode;
+ bool __isOspCompat;
+
+ bool __isPreloaded;
+ bool __isHybridService;
+ bool __isVerificationMode;
+
InstallerOperation __operation;
InstallationStorage __storage;
+ RootCertificateType __rootCertType;
+ int __packageNameType;
+ void* __pApp2ExtHandle;
+
+ Tizen::Base::Collection::ArrayList* __pPrivilegeList;
+ Tizen::Base::Collection::ArrayList* __pLiveboxDataList;
+ Tizen::Base::Collection::ArrayList* __pContentDataList;
+ Tizen::Security::Cert::X509CertificatePath* __pAuthorCertPath;
+ Tizen::Security::Cert::X509CertificatePath* __pDistributorCertPath;
+ Tizen::App::Package::_PackageInfoImpl* __pPackageInfoImpl;
+ Tizen::Base::String __subModeAppName;
+ Tizen::Base::String __coreXmlPath;
+ Tizen::Base::String __inputPath;
Tizen::Base::String __packagePath;
Tizen::Base::String __licensePath;
Tizen::Base::String __temporaryDir;
Tizen::Base::String __appVersion;
Tizen::Base::String __appRootPath;
- Tizen::Base::Collection::ArrayList* __pPrivilegeList;
- Tizen::Base::Collection::ArrayList* __pLiveboxDataList;
- Tizen::Base::Collection::ArrayList* __pContentDataList;
- Tizen::Security::Cert::X509CertificatePath* __pAuthorCertPath;
- Tizen::Security::Cert::X509CertificatePath* __pDistributorCertPath;
- RootCertificateType __rootCertType;
-
- int __packageNameType;
- app2ext_handle* __pApp2ExtHandle;
-
- Tizen::App::Package::_PackageInfoImpl* __pPackageInfoImpl;
-
}; // InstallationContext
#endif // _INSTALLATION_CONTEXT_H_
:__pNameList(null)
{
__pNameList = new (std::nothrow) HashMap;
- TryReturn(__pNameList, , "[osp-installer] __pNameList is null.");
+ TryReturn(__pNameList, , "__pNameList is null.");
__pNameList->Construct();
}
,__pSizeList(null)
{
__pNameList = new (std::nothrow) HashMap;
- TryReturn(__pNameList, , "[osp-installer] __pNameList is null.");
+ TryReturn(__pNameList, , "__pNameList is null.");
__pNameList->Construct();
__pSizeList = new (std::nothrow) ArrayList;
- TryReturn(__pSizeList, , "[osp-installer] __pSizeList is null.");
+ TryReturn(__pSizeList, , "__pSizeList is null.");
__pSizeList->Construct();
}
:__pNameList(null)
{
__pNameList = new (std::nothrow) HashMap;
- TryReturn(__pNameList, , "[osp-installer] __pNameList is null.");
+ TryReturn(__pNameList, , "__pNameList is null.");
__pNameList->Construct();
}
InstallerError
DirectoryInstaller::OnInit(void)
{
- AppLogTag(OSP_INSTALLER, "DirectoryInstaller::OnInit()");
-
InstallationContext* pContext = GetContext();
- String installPath = pContext->GetInstallDir();
+ String installPath = pContext->__installDir;
String newInstallPath;
InstallerUtil::CreateSymlinkForAppDirectory(installPath, newInstallPath);
- pContext->SetInstallDir(newInstallPath);
+ pContext->__installDir = newInstallPath;
_PackageInfoImpl *pPackageInfoImpl = null;
pPackageInfoImpl = pContext->GetPackageInfoImpl();
// remove in /info/*.info files
RemoveInfoFiles();
- AppLogTag(OSP_INSTALLER, "installation path = [%ls]", newInstallPath.GetPointer());
+ AppLog("installation path = [%ls]", newInstallPath.GetPointer());
return Installer::OnInit();
}
InstallerError
DirectoryInstaller::OnRegister(void)
{
- AppLogTag(OSP_INSTALLER, "DirectoryInstaller::OnRegister()");
+ AppLog("DirectoryInstaller::OnRegister()");
return Installer::OnRegister();
}
InstallerError
DirectoryInstaller::OnEnd(void)
{
- AppLogTag(OSP_INSTALLER, "DirectoryInstaller::OnEnd()");
+ AppLog("DirectoryInstaller::OnEnd()");
return Installer::OnEnd();
}
InstallerError
DirectoryInstaller::OnError(void)
{
- AppLogTag(OSP_INSTALLER, "DirectoryInstaller::OnError()");
+ AppLog("DirectoryInstaller::OnError()");
return Installer::OnError();
}
InstallerError
DirectoryInstaller::OnRollback(void)
{
- AppLogTag(OSP_INSTALLER, "DirectoryInstaller::OnRollback()");
+ AppLog("DirectoryInstaller::OnRollback()");
return Installer::OnRollback();
}
InstallerError
DirectoryInstaller::OnUserCancel(void)
{
- AppLogTag(OSP_INSTALLER, "DirectoryInstaller::OnUserCancel()");
+ AppLog("DirectoryInstaller::OnUserCancel()");
return Installer::OnUserCancel();
}
InstallationContext* pContext = null;
pContext = GetContext();
- TryCatch(pContext, res = false, "[osp-installer] pContext is null");
+ TryCatch(pContext, res = false, "pContext is null");
pPackageInfoImpl = pContext->GetPackageInfoImpl();
- TryCatch(pPackageInfoImpl, res = false, "[osp-installer] pPackageInfoImpl is null");
+ TryCatch(pPackageInfoImpl, res = false, "pPackageInfoImpl is null");
path = pPackageInfoImpl->GetAppRootPath() + DIR_INFO;
pDir = new (std::nothrow) Directory; // Allocate %Directory instance
- TryCatch(pDir, res = false, "[osp-installer] pDir is null");
+ TryCatch(pDir, res = false, "pDir is null");
r = pDir->Construct(path);
- TryCatch(!IsFailed(r), res = false, "[osp-installer] pDir->Construct() failed, path = [%ls]", path.GetPointer());
+ TryCatch(!IsFailed(r), res = false, "pDir->Construct() failed, path = [%ls]", path.GetPointer());
pDirEnum = pDir->ReadN();
- TryCatch(pDirEnum, res = false, "[osp-installer] pDirEnum is null");
+ TryCatch(pDirEnum, res = false, "pDirEnum is null");
while (pDirEnum->MoveNext() == E_SUCCESS)
{
// check *.info file
if (_FileImpl::GetFileExtension(entryDir) == FILE_EXT_INFO)
{
- AppLogTag(OSP_INSTALLER, "Request to delete info file = [%ls]\n", entryDir.GetPointer());
+ AppLog("Request to delete info file = [%ls]\n", entryDir.GetPointer());
InstallerUtil::Remove(entryDir);
}
}
InstallationStep
GuestInstaller::GetNext(InstallationStep step)
{
- AppLogTag(OSP_INSTALLER, "GuestInstaller::GetNext()");
return PackageInstaller::GetNext(step);
}
InstallerError
GuestInstaller::OnInit(void)
{
- AppLogTag(OSP_INSTALLER, "GuestInstaller::OnInit()");
return PackageInstaller::OnInit();
}
InstallerError
GuestInstaller::OnRegister(void)
{
- AppLogTag(OSP_INSTALLER, "GuestInstaller::OnRegister()");
return PackageInstaller::OnRegister();
}
InstallerError
GuestInstaller::OnEnd(void)
{
- AppLogTag(OSP_INSTALLER, "GuestInstaller::OnEnd()");
return PackageInstaller::OnEnd();
}
InstallerError
GuestInstaller::OnError(void)
{
- AppLogTag(OSP_INSTALLER, "GuestInstaller::OnError()");
+ AppLog("GuestInstaller::OnError()");
return PackageInstaller::OnError();
}
InstallerError
GuestInstaller::OnRollback(void)
{
- AppLogTag(OSP_INSTALLER, "GuestInstaller::OnRollback()");
+ AppLog("GuestInstaller::OnRollback()");
return PackageInstaller::OnRollback();
}
InstallerError
GuestInstaller::OnUserCancel(void)
{
- AppLogTag(OSP_INSTALLER, "GuestInstaller::OnUserCancel()");
+ AppLog("GuestInstaller::OnUserCancel()");
return PackageInstaller::OnUserCancel();
}
InstallationStep
IDEInstaller::GetNext(InstallationStep step)
{
- AppLogTag(OSP_INSTALLER, "IDEInstaller::GetNext()");
return DirectoryInstaller::GetNext(step);
}
InstallerError
IDEInstaller::OnInit(void)
{
- AppLogTag(OSP_INSTALLER, "IDEInstaller::OnInit()");
return DirectoryInstaller::OnInit();
}
InstallerError
IDEInstaller::OnRegister(void)
{
- AppLogTag(OSP_INSTALLER, "IDEInstaller::OnRegister()");
return DirectoryInstaller::OnRegister();
}
InstallerError
IDEInstaller::OnEnd(void)
{
- AppLogTag(OSP_INSTALLER, "IDEInstaller::OnEnd()");
return DirectoryInstaller::OnEnd();
}
InstallerError
IDEInstaller::OnError(void)
{
- AppLogTag(OSP_INSTALLER, "IDEInstaller::OnError()");
+ AppLog("IDEInstaller::OnError()");
return DirectoryInstaller::OnError();
}
InstallerError
IDEInstaller::OnUserCancel(void)
{
- AppLogTag(OSP_INSTALLER, "IDEInstaller::OnUserCancel()");
+ AppLog("IDEInstaller::OnUserCancel()");
return DirectoryInstaller::OnUserCancel();
}
InstallerError
IDEInstaller::OnRollback(void)
{
- AppLogTag(OSP_INSTALLER, "IDEInstaller::OnRollback()");
+ AppLog("IDEInstaller::OnRollback()");
return DirectoryInstaller::OnRollback();
}
InstallerError
Installer::OnInit(void)
{
- AppLogTag(OSP_INSTALLER, "Installer::OnInit()");
+ AppLog("Installer::OnInit()");
return INSTALLER_ERROR_NONE;
}
InstallerError
Installer::OnRegister(void)
{
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "Installer::OnRegister() - START");
+ AppLog("------------------------------------------");
+ AppLog("Installer::OnRegister() - START");
InstallationContext* pContext = GetContext();
- TryReturn(pContext, INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] pContext is null");
+ TryReturn(pContext, INSTALLER_ERROR_INTERNAL_STATE, "pContext is null");
InstallerOperation operation = pContext->GetInstallerOperation();
_PackageManagerImpl *pManagerImpl = null;
pManagerImpl = pManagerImpl->GetInstance();
- TryReturn(pManagerImpl, INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] pManagerImpl is null");
+ TryReturn(pManagerImpl, INSTALLER_ERROR_INTERNAL_STATE, "pManagerImpl is null");
if (operation == INSTALLER_OPERATION_INSTALL)
{
{
pManagerImpl->UnregisterPackageInfo(pContext->GetId());
}
- AppLogTag(OSP_INSTALLER, "Installer::OnRegister() - END");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("Installer::OnRegister() - END");
+ AppLog("------------------------------------------");
return INSTALLER_ERROR_NONE;
}
InstallerError
Installer::OnEnd(void)
{
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "Installer::OnEnd() - START");
+ AppLog("------------------------------------------");
+ AppLog("Installer::OnEnd() - START");
InstallationContext* pContext = GetContext();
- TryReturn(pContext, INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] pContext is null");
+ TryReturn(pContext, INSTALLER_ERROR_INTERNAL_STATE, "pContext is null");
InstallerOperation operation = pContext->GetInstallerOperation();
ConfigurationManager configurationManager;
configurationManager.PostUninstall(pContext);
}
- AppLogTag(OSP_INSTALLER, "Installer::OnEnd() - END");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("Installer::OnEnd() - END");
+ AppLog("------------------------------------------");
return INSTALLER_ERROR_NONE;
}
InstallerError
Installer::OnError(void)
{
- AppLogTag(OSP_INSTALLER, "Installer::OnError()");
+ AppLog("Installer::OnError()");
InstallerOperation operation = __pContext->GetInstallerOperation();
ConfigurationManager configurationManager;
InstallerError
Installer::OnRollback(void)
{
- AppLogTag(OSP_INSTALLER, "Installer::OnRollback()");
+ AppLog("Installer::OnRollback()");
return INSTALLER_ERROR_NONE;
}
InstallerError
Installer::OnUserCancel(void)
{
- AppLogTag(OSP_INSTALLER, "Installer::OnUserCancel()");
+ AppLog("Installer::OnUserCancel()");
return INSTALLER_ERROR_NONE;
}
InstallerError
PackageInstaller::OnInit(void)
{
- AppLogTag(OSP_INSTALLER, "PackageInstaller::OnInit()");
return Installer::OnInit();
}
InstallerError
PackageInstaller::OnRegister(void)
{
- AppLogTag(OSP_INSTALLER, "PackageInstaller::OnRegister()");
return Installer::OnRegister();
}
InstallerError
PackageInstaller::OnEnd(void)
{
- AppLogTag(OSP_INSTALLER, "PackageInstaller::OnEnd()");
-
return Installer::OnEnd();
}
InstallerError
PackageInstaller::OnError(void)
{
- AppLogTag(OSP_INSTALLER, "PackageInstaller::OnError()");
+ AppLog("PackageInstaller::OnError()");
return Installer::OnError();
}
InstallerError
PackageInstaller::OnRollback(void)
{
- AppLogTag(OSP_INSTALLER, "PackageInstaller::OnRollback()");
+ AppLog("PackageInstaller::OnRollback()");
return Installer::OnRollback();
}
InstallerError
PackageInstaller::OnUserCancel(void)
{
- AppLogTag(OSP_INSTALLER, "PackageInstaller::OnUserCancel()");
+ AppLog("PackageInstaller::OnUserCancel()");
return Installer::OnUserCancel();
}
InstallationStep
PreloadedInstaller::GetNext(InstallationStep step)
{
- AppLogTag(OSP_INSTALLER, "PreloadedInstaller::GetNext()");
return DirectoryInstaller::GetNext(step);
}
InstallerError
PreloadedInstaller::OnInit(void)
{
- AppLogTag(OSP_INSTALLER, "PreloadedInstaller::OnInit()");
-
InstallationContext* pContext = GetContext();
- String path = pContext->GetInputPath();
+ String path = pContext->__inputPath;
String appId;
String prefix(PATH_USR_APPS);
destPath = destRootPath + DIR_SETTING;
InstallerUtil::CreateSymlink(srcPath, destPath);
- pContext->SetInstallDir(destRootPath);
+ pContext->__installDir = destRootPath;
return DirectoryInstaller::OnInit();
}
InstallerError
PreloadedInstaller::OnRegister(void)
{
- AppLogTag(OSP_INSTALLER, "PreloadedInstaller::OnRegister()");
return DirectoryInstaller::OnRegister();
}
InstallerError
PreloadedInstaller::OnEnd(void)
{
- AppLogTag(OSP_INSTALLER, "PreloadedInstaller::OnEnd()");
return DirectoryInstaller::OnEnd();
}
InstallerError
PreloadedInstaller::OnError(void)
{
- AppLogTag(OSP_INSTALLER, "PreloadedInstaller::OnError()");
+ AppLog("PreloadedInstaller::OnError()");
return DirectoryInstaller::OnError();
}
InstallerError
PreloadedInstaller::OnRollback(void)
{
- AppLogTag(OSP_INSTALLER, "PreloadedInstaller::OnRollback()");
+ AppLog("PreloadedInstaller::OnRollback()");
return DirectoryInstaller::OnRollback();
}
InstallerError
PreloadedInstaller::OnUserCancel(void)
{
- AppLogTag(OSP_INSTALLER, "PreloadedInstaller::OnUserCancel()");
+ AppLog("PreloadedInstaller::OnUserCancel()");
return DirectoryInstaller::OnUserCancel();
}
InstallationStep
RestorationInstaller::GetNext(InstallationStep step)
{
- AppLogTag(OSP_INSTALLER, "RestorationInstaller::GetNext()");
return DirectoryInstaller::GetNext(step);
}
InstallerError
RestorationInstaller::OnInit(void)
{
- AppLogTag(OSP_INSTALLER, "RestorationInstaller::OnInit()");
return DirectoryInstaller::OnInit();
}
InstallerError
RestorationInstaller::OnRegister(void)
{
- AppLogTag(OSP_INSTALLER, "RestorationInstaller::OnRegister()");
return DirectoryInstaller::OnRegister();
}
InstallerError
RestorationInstaller::OnEnd(void)
{
- AppLogTag(OSP_INSTALLER, "RestorationInstaller::OnEnd()");
return DirectoryInstaller::OnEnd();
}
InstallerError
RestorationInstaller::OnError(void)
{
- AppLogTag(OSP_INSTALLER, "RestorationInstaller::OnError()");
+ AppLog("RestorationInstaller::OnError()");
return DirectoryInstaller::OnError();
}
InstallerError
RestorationInstaller::OnRollback(void)
{
- AppLogTag(OSP_INSTALLER, "RestorationInstaller::OnRollback()");
+ AppLog("RestorationInstaller::OnRollback()");
return DirectoryInstaller::OnRollback();
}
InstallerError
RestorationInstaller::OnUserCancel(void)
{
- AppLogTag(OSP_INSTALLER, "RestorationInstaller::OnUserCancel()");
+ AppLog("RestorationInstaller::OnUserCancel()");
return DirectoryInstaller::OnUserCancel();
}
#include <pkgmgr_parser.h>
#include <pkgmgr_installer.h>
+#include <app2ext_interface.h>
#include <FBaseUtilStringUtil.h>
#include <FIoFile.h>
bool
ConfigurationManager::CreateFile(InstallationContext* pContext)
{
- bool res = false;
- // const char* pBinaryPath = null;
- String xmlPath;
- char* pXmlPath = null;
int err = 0;
- bool hybridService = pContext->IsHybridService();
- ArrayList* pContentDataList = null;
_PackageInfoImpl *pPackageInfoImpl = null;
pPackageInfoImpl = pContext->GetPackageInfoImpl();
- TryReturn(pPackageInfoImpl, false, "[osp-installer] pPackageInfoImpl is null.");
+ TryReturn(pPackageInfoImpl, false, "pPackageInfoImpl is null.");
String rootPath;
rootPath = pPackageInfoImpl->GetAppRootPath();
if (pContext->__isOspCompat == true)
{
- AppLogTag(OSP_INSTALLER, "[OspCompat] is detected");
+ AppLog("[OspCompat] is detected");
String compatInfoFile;
compatInfoFile.Format(1024, L"%ls%ls", rootPath.GetPointer(), COMPAT_INFO_FILE);
String webServicePrivilege(TIZEN_PRIVILEGE_WEB_SERVICE);
if (FindPrivilege(pContext, webServicePrivilege) == true)
{
- AppLogTag(OSP_INSTALLER, "WEB_SERVICE privilege is detected. rootPath=[%ls]", rootPath.GetPointer());
+ AppLog("WEB_SERVICE privilege is detected. rootPath=[%ls]", rootPath.GetPointer());
String webServiceInfoFile;
webServiceInfoFile.Format(1024, L"%ls%ls", rootPath.GetPointer(), WEBSERVICE_INFO_FILE);
}
IListT<AppData*>* pAppDataList = pContext->__pAppDataList;
- TryReturn(pAppDataList, false, "[osp-installer] pAppDataList is null");
+ TryReturn(pAppDataList, false, "pAppDataList is null");
// legacy
_PackageAppInfoImpl* pAppInfoImpl = null;
{
AppData* pAppData = null;
pAppDataList->GetAt(i, pAppData);
- TryReturn(pAppData, false, "[osp-installer] pAppData is null");
+ TryReturn(pAppData, false, "pAppData is null");
pAppInfoImpl = dynamic_cast<_PackageAppInfoImpl*>(pAppList->GetAt(i));
if (pAppInfoImpl)
{
- String appName;
- appName = pAppInfoImpl->GetName();
-
- String appType;
- appType = pAppInfoImpl->GetType();
-
- String packageName;
- packageName = pAppInfoImpl->GetPackageName();
+ String appName = pAppInfoImpl->GetName();
+ String appType = pAppInfoImpl->GetType();
+ String appId = pAppData->__appId;
String binaryPath;
binaryPath.Format(1024, L"%ls%ls/%ls", rootPath.GetPointer(), DIR_BIN, appName.GetPointer());
{
//err = symlink(UIAPP_LOADER_PATH, pBinaryPath);
- AppLogTag(OSP_INSTALLER, "copy ui app loader");
+ AppLog("copy ui app loader");
InstallerUtil::Copy(UIAPP_LOADER_PATH, binaryPath);
ArrayList* pFeatureList = pAppInfoImpl->GetAppFeatureList();
- TryCatch(pFeatureList, res = false, "[osp-installer] pFeatureList is null");
+ TryReturn(pFeatureList, false, "pFeatureList is null");
String coordinateSystem;
String baseScreenSize;
if (category == L"ime")
{
- CreateImeSymlink(binaryPath, packageName);
+ CreateImeSymlink(binaryPath, appId);
}
String typeInfo;
}
else if (appType == L"ServiceApp")
{
- if (pContext->IsPreloaded() == true || pAppData->__isSystemService == true)
+ if (pContext->__isPreloaded == true || pAppData->__isSystemService == true)
{
- AppLogTag(OSP_INSTALLER, "copy system service loader");
+ AppLog("copy system service loader");
InstallerUtil::Copy(SYSTEMSERIVCE_LOADER_PATH, binaryPath);
}
else
{
- AppLogTag(OSP_INSTALLER, "copy service app loader");
+ AppLog("copy service app loader");
InstallerUtil::Copy(SERVICEAPP_LOADER_PATH, binaryPath);
}
}
}
}
- pContentDataList = pContext->GetContentDataList();
+ ArrayList* pContentDataList = pContext->GetContentDataList();
if (pContentDataList)
{
int contentCount = pContentDataList->GetCount();
}
}
- //if (pContext->IsPreloaded() == true)
- //{
- // xmlPath.Format(1024, DIR_RO_PACKAGE_SYSTEM_MANIFEST, pContext->GetId().GetPointer());
- //}
- //else
- //{
- xmlPath.Format(1024, DIR_RW_PACKAGE_SYSTEM_MANIFEST, pContext->GetId().GetPointer());
- //}
+ if (pContext->__isPreloaded == true)
+ {
+ pContext->__coreXmlPath.Format(1024, DIR_RO_PACKAGE_SYSTEM_MANIFEST, pContext->GetId().GetPointer());
+ }
+ else
+ {
+ pContext->__coreXmlPath.Format(1024, DIR_RW_PACKAGE_SYSTEM_MANIFEST, pContext->GetId().GetPointer());
+ }
- pXmlPath = _StringConverter::CopyToCharArrayN(xmlPath);
- TryCatch(pXmlPath != null, res = false, "[osp-installer] pXmlPath is null");
+ std::unique_ptr<char[]> pXmlPath(_StringConverter::CopyToCharArrayN(pContext->__coreXmlPath));
+ TryReturn(pXmlPath != null, false, "pXmlPath is null");
- if (hybridService == true)
+ if (pContext->__isHybridService == true)
{
- String webXmlPath = pXmlPath;
+ String webXmlPath = pXmlPath.get();
webXmlPath += L".wgt";
- InstallerUtil::Copy(pXmlPath, webXmlPath);
+ InstallerUtil::Copy(pXmlPath.get(), webXmlPath);
- pkgmgr_parser_parse_manifest_for_uninstallation(pXmlPath, null);
- CreateSystemXmlFile(pContext);
+ AppLog("pkgmgr_parser_parse_manifest_for_uninstallation() - START");
+ pkgmgr_parser_parse_manifest_for_uninstallation(pXmlPath.get(), null);
+ AppLog("pkgmgr_parser_parse_manifest_for_uninstallation() - END");
+ CreateCoreXmlFile(pContext);
- String serviceXmlPath = pXmlPath;
+ String serviceXmlPath = pXmlPath.get();
serviceXmlPath += L".tpk";
- InstallerUtil::Copy(pXmlPath, serviceXmlPath);
- InstallerUtil::Remove(pXmlPath);
+ InstallerUtil::Copy(pXmlPath.get(), serviceXmlPath);
+ InstallerUtil::Remove(pXmlPath.get());
- MergeToSystemXmlFile(pXmlPath, webXmlPath, serviceXmlPath);
+ MergeToSystemXmlFile(pXmlPath.get(), webXmlPath, serviceXmlPath);
InstallerUtil::Remove(webXmlPath);
InstallerUtil::Remove(serviceXmlPath);
}
else
{
- pkgmgr_parser_parse_manifest_for_uninstallation(pXmlPath, null);
- CreateSystemXmlFile(pContext);
+ AppLog("pkgmgr_parser_parse_manifest_for_uninstallation() - START");
+ pkgmgr_parser_parse_manifest_for_uninstallation(pXmlPath.get(), null);
+ AppLog("pkgmgr_parser_parse_manifest_for_uninstallation() - END");
+ CreateCoreXmlFile(pContext);
}
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "sync() - START");
+ AppLog("------------------------------------------");
+ AppLog("sync() - START");
sync();
- AppLogTag(OSP_INSTALLER, "sync() - END");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("sync() - END");
+ AppLog("------------------------------------------");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "pkgmgr_parser_parse_manifest_for_installation() - START");
- err = pkgmgr_parser_parse_manifest_for_installation(pXmlPath, null);
+ AppLog("------------------------------------------");
+ AppLog("pkgmgr_parser_parse_manifest_for_installation() - START");
+ err = pkgmgr_parser_parse_manifest_for_installation(pXmlPath.get(), null);
if (err != 0)
{
- AppLogTag(OSP_INSTALLER, "pkgmgr_parser_parse_manifest_for_installation() is failed. error = [%d][%s]", err, pXmlPath);
+ AppLog("pkgmgr_parser_parse_manifest_for_installation() is failed. error = [%d][%s]", err, pXmlPath.get());
}
- AppLogTag(OSP_INSTALLER, "pkgmgr_parser_parse_manifest_for_installation() - END");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
-
- res = true;
+ AppLog("pkgmgr_parser_parse_manifest_for_installation() - END");
+ AppLog("------------------------------------------");
-CATCH:
- delete[] pXmlPath;
-
- return res;
+ return true;
}
bool
ConfigurationManager::RemoveFile(InstallationContext* pContext)
{
- String xmlPath;
- char* pXmlPath = null;
- _PackageInfoImpl *pPackageInfoImpl = null;
- _PackageAppInfoImpl* pAppInfoImpl = null;
- ArrayList* pAppList = null;
-
- //if (pContext->IsPreloaded() == true)
- //{
- // xmlPath.Format(1024, DIR_RO_PACKAGE_SYSTEM_MANIFEST, pContext->GetId().GetPointer());
- //}
- //else
- //{
- xmlPath.Format(1024, DIR_RW_PACKAGE_SYSTEM_MANIFEST, pContext->GetId().GetPointer());
- //}
-
- pXmlPath = _StringConverter::CopyToCharArrayN(xmlPath);
- TryCatch(pXmlPath != null, , "[osp-installer] pXmlPath is null");
-
- if (pContext->IsHybridService() == true)
+ if (pContext->__isPreloaded == true)
{
- AppLogTag(OSP_INSTALLER, "Uninstallation for HybridService - skip");
-
+ pContext->__coreXmlPath.Format(1024, DIR_RO_PACKAGE_SYSTEM_MANIFEST, pContext->GetId().GetPointer());
}
else
{
- AppLogTag(OSP_INSTALLER, "pkgmgr_parser_parse_manifest_for_uninstallation() START");
- if (pkgmgr_parser_parse_manifest_for_uninstallation(pXmlPath, null) != 0)
- {
- AppLogTag(OSP_INSTALLER, "pkgmgr_parser_parse_manifest_for_uninstallation() is failed.[%s]", pXmlPath);
- }
- AppLogTag(OSP_INSTALLER, "pkgmgr_parser_parse_manifest_for_uninstallation() END");
-
- InstallerUtil::Remove(xmlPath);
+ pContext->__coreXmlPath.Format(1024, DIR_RW_PACKAGE_SYSTEM_MANIFEST, pContext->GetId().GetPointer());
}
- pPackageInfoImpl = pContext->GetPackageInfoImpl();
- TryCatch(pPackageInfoImpl, , "[osp-installer] pPackageInfoImpl is null.");
+ std::unique_ptr<char[]> pXmlPath(_StringConverter::CopyToCharArrayN(pContext->__coreXmlPath));
+ TryReturn(pXmlPath != null, false, "pXmlPath is null");
- pAppList = pPackageInfoImpl->GetAppInfoList();
+ if (pContext->__isHybridService == true)
+ {
+ AppLog("Uninstallation for HybridService - skip");
- for (int i = 0 ; i < pAppList->GetCount(); i++)
+ }
+ else
{
- pAppInfoImpl = dynamic_cast<_PackageAppInfoImpl*>(pAppList->GetAt(i));
- if (pAppInfoImpl)
+ AppLog("pkgmgr_parser_parse_manifest_for_uninstallation() START");
+ if (pkgmgr_parser_parse_manifest_for_uninstallation(pXmlPath.get(), null) != 0)
{
- String packageName = pAppInfoImpl->GetPackageName();
- String destPath;
- char dest[772] = {0};
-
- destPath.Format(1024, L"%ls/%ls", SLP_APP_PATH, packageName.GetPointer());
- sprintf(dest, "%ls", destPath.GetPointer());
- unlink(dest);
+ AppLog("pkgmgr_parser_parse_manifest_for_uninstallation() is failed.[%s]", pXmlPath.get());
}
+ AppLog("pkgmgr_parser_parse_manifest_for_uninstallation() END");
+
+ InstallerUtil::Remove(pXmlPath.get());
}
-CATCH:
- delete[] pXmlPath;
+// _PackageInfoImpl* pPackageInfoImpl = pContext->GetPackageInfoImpl();
+// TryReturn(pPackageInfoImpl, false, "[osp-installer] pPackageInfoImpl is null.");
+//
+// ArrayList* pAppList = pPackageInfoImpl->GetAppInfoList();
+// for (int i = 0 ; i < pAppList->GetCount(); i++)
+// {
+// _PackageAppInfoImpl* pAppInfoImpl = dynamic_cast<_PackageAppInfoImpl*>(pAppList->GetAt(i));
+// if (pAppInfoImpl)
+// {
+// String packageName = pAppInfoImpl->GetPackageName();
+// String destPath;
+// char dest[772] = {0};
+//
+// destPath.Format(1024, L"%ls/%ls", SLP_APP_PATH, packageName.GetPointer());
+// sprintf(dest, "%ls", destPath.GetPointer());
+// unlink(dest);
+// }
+// }
return true;
}
bool
ConfigurationManager::RegisterCertInfo(InstallationContext* pContext) const
{
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "RegisterCertInfo - START");
+ AppLog("------------------------------------------");
+ AppLog("RegisterCertInfo - START");
int res = 0;
bool result = true;
X509CertificatePath* pDistributorCertPath = pContext->GetDistributorCertPath();
char* pAppId = _StringConverter::CopyToCharArrayN(appId);
- TryCatch(pAppId, result = false, "[osp-installer] pAppId is null");
+ TryCatch(pAppId, result = false, "pAppId is null");
res = pkgmgr_installer_create_certinfo_set_handle(&handle);
- TryCatch(res == 0, result = false, "[osp-installer] pkgmgr_installer_create_certinfo_set_handle() failed.[%d]", res);
+ TryCatch(res == 0, result = false, "pkgmgr_installer_create_certinfo_set_handle() failed.[%d]", res);
if (pAuthorCertPath)
{
- AppLogTag(OSP_INSTALLER, "[AuthorCert]");
+ AppLog("[AuthorCert]");
result = SetCertHashValue(handle, pAuthorCertPath, PM_SET_AUTHOR_SIGNER_CERT);
- TryCatch(result == true, , "[osp-installer] RegisterCertHashValue() failed. [pAuthorCertPath]");
+ TryCatch(result == true, , "RegisterCertHashValue() failed. [pAuthorCertPath]");
}
if (pDistributorCertPath)
{
- AppLogTag(OSP_INSTALLER, "[DistributorCert]");
+ AppLog("[DistributorCert]");
result = SetCertHashValue(handle, pDistributorCertPath, PM_SET_DISTRIBUTOR_SIGNER_CERT);
- TryCatch(result == true, , "[osp-installer] RegisterCertHashValue() failed. [pDistributorCertPath]");
+ TryCatch(result == true, , "RegisterCertHashValue() failed. [pDistributorCertPath]");
}
res = pkgmgr_installer_save_certinfo(pAppId, handle);
- TryCatch(res == 0, result = false, "[osp-installer] pkgmgr_installer_save_certinfo(%s) failed.[%d]", pAppId, res);
+ TryCatch(res == 0, result = false, "pkgmgr_installer_save_certinfo(%s) failed.[%d]", pAppId, res);
- AppLogTag(OSP_INSTALLER, "RegisterCertInfo - END");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("RegisterCertInfo - END");
+ AppLog("------------------------------------------");
CATCH:
if (handle)
bool
ConfigurationManager::SetCertHashValue(void* pHandle, X509CertificatePath* pCertPath, int certType) const
{
- TryReturn(pCertPath, false, "[osp-installer] pCertPath is null.");
+ TryReturn(pCertPath, false, "pCertPath is null.");
int res = 0;
bool result = true;
for (int i = 0; i < pCertPath->GetLength(); i++)
{
pCert = pCertPath->GetCertificateN(i);
- TryCatch(pCert, result = false, "[osp-installer] pCert is null.[%i]", i);
+ TryCatch(pCert, result = false, "pCert is null.[%i]", i);
pCertValue = GetCertValueN(pCert);
- TryCatch(pCertValue, result = false, "[osp-installer] pCertValue is null.[%i]", i);
+ TryCatch(pCertValue, result = false, "pCertValue is null.[%i]", i);
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "CertValue(%d), certType[%d]", i, certType);
- AppLogTag(OSP_INSTALLER, "[%s]", pCertValue);
+ AppLog("------------------------------------------");
+ AppLog("CertValue(%d), certType[%d]", i, certType);
+ AppLog("[%s]", pCertValue);
res = pkgmgr_installer_set_cert_value(pHandle, (pkgmgr_instcert_type)certType, pCertValue);
- TryCatch(res == 0, result = false, "[osp-installer] pkgmgr_installer_set_cert_value(%d) failed.[%d]", i, res);
+ TryCatch(res == 0, result = false, "pkgmgr_installer_set_cert_value(%d) failed.[%d]", i, res);
delete pCert;
pCert = null;
char* pEncodedValue = null;
pEncodedData = pCert->GetEncodedDataN();
- TryCatch(pEncodedData, , "[osp-installer] pEncodedData is null.");
+ TryCatch(pEncodedData, , "pEncodedData is null.");
r = StringUtil::EncodeToBase64String(*pEncodedData, base64Value);
- TryCatch(!IsFailed(r), , "[osp-installer] StringUtil::EncodeToBase64String is failed.");
+ TryCatch(!IsFailed(r), , "StringUtil::EncodeToBase64String is failed.");
pEncodedValue = _StringConverter::CopyToCharArrayN(base64Value);
- TryCatch(pEncodedValue, , "[osp-installer] pEncodedValue is null");
+ TryCatch(pEncodedValue, , "pEncodedValue is null");
CATCH:
delete pEncodedData;
bool
ConfigurationManager::UnregisterCertInfo(InstallationContext* pContext) const
{
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "UnregisterCertInfo - START");
+ AppLog("------------------------------------------");
+ AppLog("UnregisterCertInfo - START");
int res = 0;
bool result = true;
String appId = pContext->GetId();
char* pAppId = _StringConverter::CopyToCharArrayN(appId);
- TryCatch(pAppId, result = false, "[osp-installer] pAppId is null");
+ TryCatch(pAppId, result = false, "pAppId is null");
res = pkgmgr_installer_delete_certinfo(pAppId);
- TryCatch(res == 0, result = false, "[osp-installer] pkgmgr_installer_delete_certinfo(%s) failed.[%d]", pAppId, res);
+ TryCatch(res == 0, result = false, "pkgmgr_installer_delete_certinfo(%s) failed.[%d]", pAppId, res);
- AppLogTag(OSP_INSTALLER, "UnregisterCertInfo - END");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("UnregisterCertInfo - END");
+ AppLog("------------------------------------------");
CATCH:
delete[] pAppId;
bool
ConfigurationManager::PostInstall(InstallationContext* pContext, bool error) const
{
- app2ext_handle* pHandle = pContext->GetApp2ExtHandle();
+ app2ext_handle* pHandle = (app2ext_handle*)pContext->__pApp2ExtHandle;
if (pHandle)
{
String appId = pContext->GetId();
std::unique_ptr<char[]> pAppId(_StringConverter::CopyToCharArrayN(appId));
- TryReturn(pAppId, false, "[osp-installer] pAppId is null");
+ TryReturn(pAppId, false, "pAppId is null");
if (error == true)
{
pHandle->interface.post_install(pAppId.get(), APP2EXT_STATUS_FAILED);
- AppLogTag(OSP_INSTALLER, "[app2sd] post_install(%s, APP2EXT_STATUS_FAILED)", pAppId.get());
+ AppLog("[app2sd] post_install(%s, APP2EXT_STATUS_FAILED)", pAppId.get());
}
else
{
pHandle->interface.post_install(pAppId.get(), APP2EXT_STATUS_SUCCESS);
- AppLogTag(OSP_INSTALLER, "[app2sd] post_install(%s, APP2EXT_STATUS_SUCCESS)", pAppId.get());
+ AppLog("[app2sd] post_install(%s, APP2EXT_STATUS_SUCCESS)", pAppId.get());
}
app2ext_deinit(pHandle);
bool
ConfigurationManager::PostUninstall(InstallationContext* pContext) const
{
- app2ext_handle* pHandle = pContext->GetApp2ExtHandle();
+ app2ext_handle* pHandle = (app2ext_handle*)pContext->__pApp2ExtHandle;
if (pHandle)
{
String appId = pContext->GetId();
std::unique_ptr<char[]> pAppId(_StringConverter::CopyToCharArrayN(appId));
- TryReturn(pAppId, false, "[osp-installer] pAppId is null");
+ TryReturn(pAppId, false, "pAppId is null");
pHandle->interface.post_uninstall(pAppId.get());
- AppLogTag(OSP_INSTALLER, "[app2sd] post_uninstall(%s)", pAppId.get());
+ AppLog("[app2sd] post_uninstall(%s)", pAppId.get());
app2ext_deinit(pHandle);
}
}
bool
-ConfigurationManager::CreateSystemXmlFile(InstallationContext* pContext)
+ConfigurationManager::CreateCoreXmlFile(InstallationContext* pContext)
{
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "CreateSystemXmlFile() - START");
+ AppLog("------------------------------------------");
+ AppLog("CreateCoreXmlFile() - START");
bool ret = false;
ManifestGenerator manifestGenerator;
if (ret == false)
{
- AppLogTag(OSP_INSTALLER, "manifestGenerator.Write() is failed.");
+ AppLog("manifestGenerator.Write() is failed.");
}
- AppLogTag(OSP_INSTALLER, "CreateSystemXmlFile() - END");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("CreateCoreXmlFile() - END");
+ AppLog("------------------------------------------");
return ret;
}
//bool
//ConfigurationManager::CreateHybridServiceDesktopFile(InstallationContext* pContext)
//{
-// AppLogTag(OSP_INSTALLER, "HybridServiceDesktopFile - START");
+// AppLog("HybridServiceDesktopFile - START");
//
// bool ret = true;
// _PackageInfoImpl *pPackageInfoImpl = pContext->GetPackageInfoImpl();
// iconPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_ICONS, pAppInfoImpl->GetMainmenuIcon().GetPointer());
//
// String version;
-// version.Format(1024, L"%ls", pPackageInfoImpl->GetAppVersion().GetPointer());
+// version.Format(1024, L"%ls", pPackageInfoImpl->GetVersion().GetPointer());
//
// String desktop;
// desktop.Format(1024, L"[Desktop Entry]\n"
//
// if (File::IsFileExist(desktopPath) == true)
// {
-// AppLogTag(OSP_INSTALLER, "removing desktop filePath=[%ls]", desktopPath.GetPointer());
+// AppLog("removing desktop filePath=[%ls]", desktopPath.GetPointer());
// InstallerUtil::Remove(desktopPath);
// }
//
// }
// }
//
-// AppLogTag(OSP_INSTALLER, "HybridServiceDesktopFile - END");
+// AppLog("HybridServiceDesktopFile - END");
//
// return ret;
//}
FileAttributes webXmlAttr;
r = File::GetAttributes(webXmlPath, webXmlAttr);
- TryReturn(!IsFailed(r), false, "[osp-installer] File::GetAttributes() failed, webXmlPath=%ls", webXmlPath.GetPointer());
+ TryReturn(!IsFailed(r), false, "File::GetAttributes() failed, webXmlPath=%ls", webXmlPath.GetPointer());
FileAttributes serviceAttr;
r = File::GetAttributes(serviceXmlPath, serviceAttr);
- TryReturn(!IsFailed(r), false, "[osp-installer] File::GetAttributes() failed, serviceXmlPath=%ls", serviceXmlPath.GetPointer());
+ TryReturn(!IsFailed(r), false, "File::GetAttributes() failed, serviceXmlPath=%ls", serviceXmlPath.GetPointer());
long long webXmlFileSize = webXmlAttr.GetFileSize();
long long serviceXmlFileSize = serviceAttr.GetFileSize();
File webXml;
r = webXml.Construct(webXmlPath, L"r");
- TryReturn(!IsFailed(r), false, "[osp-installer] webXmlPath.Construct is failed");
+ TryReturn(!IsFailed(r), false, "webXmlPath.Construct is failed");
std::unique_ptr<char[]> pMergedBuf(new (std::nothrow) char[mergedSize + 1]);
- TryReturn(pMergedBuf, false, "[osp-installer] pMergedBuf is null");
+ TryReturn(pMergedBuf, false, "pMergedBuf is null");
memset(pMergedBuf.get(), 0, mergedSize + 1);
int readBytes = webXml.Read(pMergedBuf.get(), webXmlFileSize);
- TryReturn(readBytes >= 0, false, "[osp-installer] webXml.Read is failed");
+ TryReturn(readBytes >= 0, false, "webXml.Read is failed");
File serviceXml;
r = serviceXml.Construct(serviceXmlPath, L"r");
- TryReturn(!IsFailed(r), false, "[osp-installer] serviceXmlPath.Construct is failed");
+ TryReturn(!IsFailed(r), false, "serviceXmlPath.Construct is failed");
std::unique_ptr<char[]> pServiceBuf(new (std::nothrow) char[serviceXmlFileSize + 1]);
- TryReturn(pServiceBuf, false, "[osp-installer] pServiceBuf is null");
+ TryReturn(pServiceBuf, false, "pServiceBuf is null");
memset(pServiceBuf.get(), 0, serviceXmlFileSize + 1);
readBytes = serviceXml.Read(pServiceBuf.get(), serviceXmlFileSize);
- TryReturn(readBytes >= 0, false, "[osp-installer] serviceXml.Read is failed");
+ TryReturn(readBytes >= 0, false, "serviceXml.Read is failed");
char* pManifestTag = strcasestr(pMergedBuf.get(), "</manifest>");
- TryReturn(pManifestTag, false, "[osp-installer] pManifestTag is null");
+ TryReturn(pManifestTag, false, "pManifestTag is null");
char* pAppTagStart = strcasestr(pServiceBuf.get(), "<ui-application");
- TryReturn(pAppTagStart, false, "[osp-installer] pAppTagStart is null");
+ TryReturn(pAppTagStart, false, "pAppTagStart is null");
char* pAppTagEnd = strcasestr(pServiceBuf.get(), "</ui-application>");
- TryReturn(pAppTagEnd, false, "[osp-installer] pAppTagEnd is null");
+ TryReturn(pAppTagEnd, false, "pAppTagEnd is null");
int serviceAppLen = pAppTagEnd - pAppTagStart + strlen("</ui-application>");
File systemXml;
r = systemXml.Construct(systemXmlPath, L"w");
- TryReturn(!IsFailed(r), false, "[osp-installer] systemXmlPath.Construct is failed");
+ TryReturn(!IsFailed(r), false, "systemXmlPath.Construct is failed");
systemXml.Write(pMergedBuf.get(), fileSize);
- AppLogTag(OSP_INSTALLER, "pMergedBuf.get()=0x%0x, length=%d", (unsigned int)pMergedBuf.get(), fileSize);
+ AppLog("pMergedBuf.get()=0x%0x, length=%d", (unsigned int)pMergedBuf.get(), fileSize);
InstallerUtil::DumpLogData(pMergedBuf.get(), fileSize);
return true;
File file;
r = file.Construct(filePath, "w");
- TryReturn(!IsFailed(r), false, "[osp-installer] file.Construct() failed, filePath=[%ls]", filePath.GetPointer());
+ TryReturn(!IsFailed(r), false, "file.Construct() failed, filePath=[%ls]", filePath.GetPointer());
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "CreateInfoFile(), filePath = [%ls]", filePath.GetPointer());
+ AppLog("------------------------------------------");
+ AppLog("CreateInfoFile(), filePath = [%ls]", filePath.GetPointer());
if (pContext)
{
r = file.Write(*pContext);
- TryReturn(!IsFailed(r), false, "[osp-installer] file.Write() failed, filePath=[%ls]", filePath.GetPointer());
- AppLogTag(OSP_INSTALLER, "string = [%ls]", pContext->GetPointer());
+ TryReturn(!IsFailed(r), false, "file.Write() failed, filePath=[%ls]", filePath.GetPointer());
+ AppLog("string = [%ls]", pContext->GetPointer());
}
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
return true;
}
bool
-ConfigurationManager::CreateImeSymlink(const String& binaryPath, const String& packageName)
+ConfigurationManager::CreateImeSymlink(const String& binaryPath, const String& appId)
{
bool res = true;
int err = 0;
exePath.Format(1024, L"%ls.exe", binaryPath.GetPointer());
String symlinkPath;
- symlinkPath.Format(1024, L"%s/%ls.so", IME_PATH, packageName.GetPointer());
+ symlinkPath.Format(1024, L"%s/%ls.so", IME_PATH, appId.GetPointer());
pExePath = _StringConverter::CopyToCharArrayN(exePath);
- TryCatch(pExePath, res = false, "[osp-installer] pExePath is null");
+ TryCatch(pExePath, res = false, "pExePath is null");
pSymlinkPath = _StringConverter::CopyToCharArrayN(symlinkPath);
- TryCatch(pSymlinkPath, res = false, "[osp-installer] pSymlinkPath is null");
+ TryCatch(pSymlinkPath, res = false, "pSymlinkPath is null");
err = symlink(pExePath, pSymlinkPath);
- AppLogTag(OSP_INSTALLER, "[%s] -> [%s]", pSymlinkPath, pExePath);
+ AppLog("[%s] -> [%s]", pSymlinkPath, pExePath);
CATCH:
delete[] pExePath;
bool
ConfigurationManager::FindPrivilege(InstallationContext* pContext, const String& privilege) const
{
- TryReturn(pContext, false, "[osp-installer] pContext is null.");
+ TryReturn(pContext, false, "pContext is null.");
bool ret = false;
const ArrayList* pPrivilegeList = pContext->GetPrivilegeList();
{
if (pPrivilegeList->Contains(privilege) == true)
{
- AppLogTag(OSP_INSTALLER, "Privilege = [%ls]", privilege.GetPointer());
+ AppLog("Privilege = [%ls]", privilege.GetPointer());
ret = true;
}
}
bool PostUninstall(InstallationContext* pContext) const;
private:
- bool CreateSystemXmlFile(InstallationContext* pContext);
+ bool CreateCoreXmlFile(InstallationContext* pContext);
// bool CreateHybridServiceDesktopFile(InstallationContext* pContext);
bool MergeToSystemXmlFile(const Tizen::Base::String& systemXmlPath, const Tizen::Base::String& webXmlPath,const Tizen::Base::String& serviceXmlPath);
if (__pInstallerManager == null)
{
__pInstallerManager = new InstallerManager();
- TryReturn(__pInstallerManager, null, "[osp-installer] __pInstallerManager is null");
+ TryReturn(__pInstallerManager, null, "__pInstallerManager is null");
}
return __pInstallerManager;
InstallerError error = INSTALLER_ERROR_NONE;
InstallerType installerType = INSTALLER_TYPE_INSTALLER;
result r = E_SUCCESS;
+ String newPath = path;
__pContext = new InstallationContext();
- TryReturn(__pContext, INSTALLER_ERROR_OUT_OF_MEMORY, "[osp-installer] __pContext is null.");
+ TryReturn(__pContext, INSTALLER_ERROR_OUT_OF_MEMORY, "__pContext is null.");
error = __pContext->Construct();
- TryReturn(error == INSTALLER_ERROR_NONE, INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] __pContext->Construct() failed.");
+ TryReturn(error == INSTALLER_ERROR_NONE, INSTALLER_ERROR_INTERNAL_STATE, "__pContext->Construct() failed.");
// 1. operation
if (operation == INSTALLER_OPERATION_INSTALL)
{
FileAttributes attr;
- r = File::GetAttributes(path, attr);
- TryReturn(!IsFailed(r), INSTALLER_ERROR_PACKAGE_NOT_FOUND, "[osp-installer] File::GetAttributes() failed");
+ r = File::GetAttributes(newPath, attr);
+ TryReturn(!IsFailed(r), INSTALLER_ERROR_PACKAGE_NOT_FOUND, "File::GetAttributes() failed");
if (attr.IsDirectory())
{
installerType = INSTALLER_TYPE_DIRECTORY;
- if (path.StartsWith(PATH_USR_APPS, 0) == true)
+
+ if (newPath.EndsWith("/") == true)
+ {
+ int length = newPath.GetLength();
+ newPath.Remove(length - 1, 1);
+ AppLog("newPath=[%ls]", newPath.GetPointer());
+ }
+
+ if (newPath.StartsWith(PATH_USR_APPS, 0) == true)
{
installerType = INSTALLER_TYPE_PRELOADED;
- __pContext->SetPreloaded(true);
+ __pContext->__isPreloaded = true;
}
- __pContext->SetInputPath(path);
- __pContext->SetInstallDir(path);
+ __pContext->__inputPath = newPath;
+ __pContext->__installDir = newPath;
}
else
{
installerType = INSTALLER_TYPE_PACKAGE;
- __pContext->SetPackagePath(path);
- }
-
- // org.tizen.*
- if (path.Contains(PACKAGE_NAME_PREFIX_ORG) == true)
- {
- __pContext->SetPackageNameType(INSTALLER_PREFIX_TYPE_ORG);
+ __pContext->__packagePath = newPath;
}
}
else if (operation == INSTALLER_OPERATION_UNINSTALL)
{
installerType = INSTALLER_TYPE_INSTALLER;
- AppLogTag(OSP_INSTALLER, "operation is INSTALLER_OPERATION_UNINSTALL");
+ AppLog("operation is INSTALLER_OPERATION_UNINSTALL");
__pContext->SetCurrentInstallationStep(INSTALLER_STEP_INIT_UNINSTALL);
- __pContext->SetId(path);
+ __pContext->SetId(newPath);
}
__pContext->SetInstallerOperation(operation);
- // 2. requesterType
- if (requesterType == REQUESTER_TYPE_PRELOADED)
- {
- __pContext->SetPreloaded(true);
- }
-
// 3. hybridService
if (hybridService == true)
{
- AppLogTag(OSP_INSTALLER, "Request to install HybridService app!");
- __pContext->SetHybridService(true);
+ AppLog("Request to install HybridService app!");
+ __pContext->__isHybridService = true;
}
__pInstaller = CreateInstaller(installerType);
- TryReturn(__pInstaller, INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] __pInstaller is null.");
+ TryReturn(__pInstaller, INSTALLER_ERROR_INTERNAL_STATE, "__pInstaller is null.");
error = __pInstaller->Construct(__pContext);
- TryReturn(error == INSTALLER_ERROR_NONE, INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] __pInstaller->Construct() failed");
+ TryReturn(error == INSTALLER_ERROR_NONE, INSTALLER_ERROR_INTERNAL_STATE, "__pInstaller->Construct() failed");
return error;
}
switch (installerType)
{
case INSTALLER_TYPE_INSTALLER:
- AppLogTag(OSP_INSTALLER, "InstallerType = [Installer]");
+ AppLog("InstallerType = [Installer]");
pInstaller = new (std::nothrow) Installer();
break;
case INSTALLER_TYPE_PACKAGE:
- AppLogTag(OSP_INSTALLER, "InstallerType = [PackageInstaller]");
+ AppLog("InstallerType = [PackageInstaller]");
pInstaller = new (std::nothrow) PackageInstaller();
break;
case INSTALLER_TYPE_DIRECTORY:
- AppLogTag(OSP_INSTALLER, "InstallerType = [DirectoryInstaller]");
+ AppLog("InstallerType = [DirectoryInstaller]");
pInstaller = new (std::nothrow) DirectoryInstaller();
break;
case INSTALLER_TYPE_GUEST:
- AppLogTag(OSP_INSTALLER, "InstallerType = [GuestInstaller]");
+ AppLog("InstallerType = [GuestInstaller]");
pInstaller = new (std::nothrow) GuestInstaller();
break;
case INSTALLER_TYPE_PRELOADED:
- AppLogTag(OSP_INSTALLER, "InstallerType = [PreloadedInstaller]");
+ AppLog("InstallerType = [PreloadedInstaller]");
pInstaller = new (std::nothrow) PreloadedInstaller();
break;
case INSTALLER_TYPE_IDE:
- AppLogTag(OSP_INSTALLER, "InstallerType = [IDEInstaller]");
+ AppLog("InstallerType = [IDEInstaller]");
pInstaller = new (std::nothrow) IDEInstaller();
break;
case INSTALLER_TYPE_RESTORATION:
- AppLogTag(OSP_INSTALLER, "InstallerType = [RestorationInstaller]");
+ AppLog("InstallerType = [RestorationInstaller]");
pInstaller = new (std::nothrow) RestorationInstaller();
break;
if (currentStep == INSTALLER_STEP_INIT)
{
error = Init();
- TryReturn(error == INSTALLER_ERROR_NONE, error, "[osp-installer] error is occurred.");
+ TryReturn(error == INSTALLER_ERROR_NONE, error, "error is occurred.");
}
else if (currentStep == INSTALLER_STEP_END)
{
error = Register();
- TryReturn(error == INSTALLER_ERROR_NONE, error, "[osp-installer] error is occurred.");
+ TryReturn(error == INSTALLER_ERROR_NONE, error, "error is occurred.");
error = End();
- TryReturn(error == INSTALLER_ERROR_NONE, error, "[osp-installer] error is occurred.");
+ TryReturn(error == INSTALLER_ERROR_NONE, error, "error is occurred.");
}
if (__pContext->IsContinue() == false)
Tizen::System::SystemTime::GetTicks(__startTick);
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "InstallerManager::Request");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, " # operation = [%s]", (operation == INSTALLER_OPERATION_INSTALL)?"Installation":"Uninstallation");
- AppLogTag(OSP_INSTALLER, " # path = [%ls]", path.GetPointer());
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog("InstallerManager::Request");
+ AppLog("------------------------------------------");
+ AppLog(" # operation = [%s]", (operation == INSTALLER_OPERATION_INSTALL)?"Installation":"Uninstallation");
+ AppLog(" # path = [%ls]", path.GetPointer());
+ AppLog("------------------------------------------");
SetInstallerOperation(operation);
pInstallManager = InstallerManager::GetInstance();
- TryCatch(pInstallManager, errorType = INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] pInstallManager is null.");
+ TryCatch(pInstallManager, errorType = INSTALLER_ERROR_INTERNAL_STATE, "pInstallManager is null.");
errorType = pInstallManager->Construct(path, operation, requesterType, hybridService);
- TryCatch(errorType == INSTALLER_ERROR_NONE, , "[osp-installer] pInstallManager->Construct() failed.");
+ TryCatch(errorType == INSTALLER_ERROR_NONE, , "pInstallManager->Construct() failed.");
errorType = pInstallManager->Activate();
- TryCatch(errorType == INSTALLER_ERROR_NONE, , "[osp-installer] pInstallManager->Activate() failed.");
+ TryCatch(errorType == INSTALLER_ERROR_NONE, , "pInstallManager->Activate() failed.");
pContext = pInstallManager->GetContext();
- TryCatch(pContext, errorType = INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] pContext is null.");
+ TryCatch(pContext, errorType = INSTALLER_ERROR_INTERNAL_STATE, "pContext is null.");
packageId = pContext->GetId();
SetId(packageId);
int failureCount = 0;
pDir = new (std::nothrow) Directory; // Allocate %Directory instance
- TryCatch(pDir, res = false, "[osp-installer] pDir is null");
+ TryCatch(pDir, res = false, "pDir is null");
r = pDir->Construct(path);
- TryCatch(!IsFailed(r), res = false, "[osp-installer] pDir->Construct() failed, path = [%ls]", path.GetPointer());
+ TryCatch(!IsFailed(r), res = false, "pDir->Construct() failed, path = [%ls]", path.GetPointer());
pDirEnum = pDir->ReadN();
- TryCatch(pDirEnum, res = false, "[osp-installer] pDirEnum is null");
+ TryCatch(pDirEnum, res = false, "pDirEnum is null");
while (pDirEnum->MoveNext() == E_SUCCESS)
{
{
if (entryName.Contains(PACKAGE_NAME_PREFIX_ORG) == false)
{
- AppLogTag(OSP_INSTALLER, " - Not osp = [%ls]: prefix mismatch", entryDir.GetPointer());
+ AppLog(" - Not osp = [%ls]: prefix mismatch", entryDir.GetPointer());
continue;
}
}
else
{
- AppLogTag(OSP_INSTALLER, " - Not osp = [%ls]: length(%d) mismatch", entryDir.GetPointer(), entryLength);
+ AppLog(" - Not osp = [%ls]: length(%d) mismatch", entryDir.GetPointer(), entryLength);
continue;
}
r = File::GetAttributes(xmlFile, attr);
if (IsFailed(r))
{
- AppLogTag(OSP_INSTALLER, " - Not osp = [%ls]: No manifest.xml", entryDir.GetPointer());
+ AppLog(" - Not osp = [%ls]: No manifest.xml", entryDir.GetPointer());
continue;
}
totalCount++;
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, " # Directory = [%ls]", entryDir.GetPointer());
+ AppLog("------------------------------------------");
+ AppLog(" # Directory = [%ls]", entryDir.GetPointer());
errorType = Request(entryDir, INSTALLER_OPERATION_INSTALL, REQUESTER_TYPE_PRELOADED);
if (errorType == 0)
PrintResult();
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
}
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "recursive directory installation");
- AppLogTag(OSP_INSTALLER, " # totalCount = [%d]", totalCount);
- AppLogTag(OSP_INSTALLER, " # successCount = [%d]", successCount);
- AppLogTag(OSP_INSTALLER, " # failureCount = [%d]", failureCount);
+ AppLog("------------------------------------------");
+ AppLog("recursive directory installation");
+ AppLog(" # totalCount = [%d]", totalCount);
+ AppLog(" # successCount = [%d]", successCount);
+ AppLog(" # failureCount = [%d]", failureCount);
CATCH:
delete pDirEnum;
bool output = false;
bool hybridService = false;
- AppLogTag(OSP_INSTALLER, " # argc = [%d]", argc);
+ AppLog(" # argc = [%d]", argc);
for (int i = 0; i < argc; i++)
{
- AppLogTag(OSP_INSTALLER, " # argv[%d] = [%s]", i, argv[i]);
+ AppLog(" # argv[%d] = [%s]", i, argv[i]);
}
ParseCommandArg(argc, argv, &mode, buf, &output);
if (output == true)
{
- AppLogTag(OSP_INSTALLER, "HybridService is detected in ParseCommandArg()");
+ AppLog("HybridService is detected in ParseCommandArg()");
hybridService = true;
}
{
case INSTALLER_MODE_INSTALL:
{
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, " # Directory = [%s]", buf);
+ AppLog("------------------------------------------");
+ AppLog(" # Directory = [%s]", buf);
errorType = Request(buf, INSTALLER_OPERATION_INSTALL, REQUESTER_TYPE_NORMAL, hybridService);
if (errorType != 0)
case INSTALLER_MODE_UNINSTALL:
{
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, " # Directory = [%s]", buf);
+ AppLog("------------------------------------------");
+ AppLog(" # Directory = [%s]", buf);
errorType = Request(buf, INSTALLER_OPERATION_UNINSTALL, REQUESTER_TYPE_NORMAL, hybridService);
PrintResult();
case INSTALLER_MODE_RECURSIVE_DIRECTORY_INSTALL:
{
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
errorType = RequestRecursiveDirectory(buf, errorType);
}
default:
{
- AppLogTag(OSP_INSTALLER, "__install_package_by_cmd, Invalid mode");
+ AppLog("__install_package_by_cmd, Invalid mode");
}
break;
}
- AppLogTag(OSP_INSTALLER, "==========================================");
+ AppLog("==========================================");
if (output == true)
{
- AppLogTag(OSP_INSTALLER, "stdout is updated by errorType");
+ AppLog("stdout is updated by errorType");
fprintf(stdout, "%d", errorType);
}
if (mode == NULL)
{
- AppLogTag(OSP_INSTALLER, "mode is null");
+ AppLog("mode is null");
exit(-1);
}
break;
}
- AppLogTag(OSP_INSTALLER, "__osp_installer_parse_options: i");
+ AppLog("__osp_installer_parse_options: i");
*mode = INSTALLER_MODE_INSTALL;
if (optarg[0] == 'v')
{
- AppLogTag(OSP_INSTALLER, "__osp_installer_parse_options: v");
+ AppLog("__osp_installer_parse_options: v");
*output = true;
strncpy(buf, argv[optind++], BUFSIZE);
- AppLogTag(OSP_INSTALLER, "__osp_installer_parse_options: buf = [%s]", buf);
+ AppLog("__osp_installer_parse_options: buf = [%s]", buf);
}
else
{
strncpy(buf, optarg, BUFSIZE);
- AppLogTag(OSP_INSTALLER, "__osp_installer_parse_options: optarg = [%s]", optarg);
+ AppLog("__osp_installer_parse_options: optarg = [%s]", optarg);
}
break;
break;
}
- AppLogTag(OSP_INSTALLER, "__osp_installer_parse_options: u");
+ AppLog("__osp_installer_parse_options: u");
*mode = INSTALLER_MODE_UNINSTALL;
if (optarg[0] == 'v')
{
- AppLogTag(OSP_INSTALLER, "__osp_installer_parse_options: v");
+ AppLog("__osp_installer_parse_options: v");
*output = true;
strncpy(buf, argv[optind++], BUFSIZE);
- AppLogTag(OSP_INSTALLER, "__osp_installer_parse_options: buf = [%s]", buf);
+ AppLog("__osp_installer_parse_options: buf = [%s]", buf);
}
else
{
strncpy(buf, optarg, BUFSIZE);
- AppLogTag(OSP_INSTALLER, "__osp_installer_parse_options: optarg = [%s]", optarg);
+ AppLog("__osp_installer_parse_options: optarg = [%s]", optarg);
}
break;
break;
}
- AppLogTag(OSP_INSTALLER, "__osp_installer_parse_options: r");
+ AppLog("__osp_installer_parse_options: r");
*mode = INSTALLER_MODE_RECURSIVE_DIRECTORY_INSTALL;
strncpy(buf, optarg, BUFSIZE);
- AppLogTag(OSP_INSTALLER, "__osp_installer_parse_options: optarg = [%s]", optarg);
+ AppLog("__osp_installer_parse_options: optarg = [%s]", optarg);
break;
case 'v':
- AppLogTag(OSP_INSTALLER, "__osp_installer_parse_options: v");
+ AppLog("__osp_installer_parse_options: v");
*output = true;
- AppLogTag(OSP_INSTALLER, "__osp_installer_parse_options: optarg = [%s]", optarg);
+ AppLog("__osp_installer_parse_options: optarg = [%s]", optarg);
break;
default:
- AppLogTag(OSP_INSTALLER, "Invalid option");
+ AppLog("Invalid option");
exit(-1);
break;
}
if (mode == 0)
{
- AppLogTag(OSP_INSTALLER, "Invalid mode");
+ AppLog("Invalid mode");
exit(-1);
}
bool
InstallerManager::RemoveGarbage(const String& filePath)
{
- AppLogTag(OSP_INSTALLER, "RemoveGarbage Directory = [%ls]", filePath.GetPointer());
+ AppLog("RemoveGarbage Directory = [%ls]", filePath.GetPointer());
String realPath;
if (InstallerUtil::IsSymlink(filePath) == true)
char readBuf[512] = {0};
r = File::GetAttributes(L"/opt/apps/cmtamb4mtv/data/configuration", attr);
- TryCatch(!IsFailed(r), errorType = INSTALLER_ERROR_PACKAGE_NOT_FOUND, "[osp-installer] file not found");
+ TryCatch(!IsFailed(r), errorType = INSTALLER_ERROR_PACKAGE_NOT_FOUND, "file not found");
r = file.Construct(L"/opt/apps/cmtamb4mtv/data/configuration", L"r");
- TryCatch(!IsFailed(r), errorType = INSTALLER_ERROR_PACKAGE_NOT_FOUND, "[osp-installer] file.Construct failed");
+ TryCatch(!IsFailed(r), errorType = INSTALLER_ERROR_PACKAGE_NOT_FOUND, "file.Construct failed");
if (file.Read(readBuf, sizeof(readBuf)-1) > 1)
{
pPackageInfoImpl->Construct(appId);
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "PackageInfo");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "# id = [%S]", pPackageInfoImpl->GetId().GetPointer());
- AppLogTag(OSP_INSTALLER, "# version = [%S]", pPackageInfoImpl->GetAppVersion().GetPointer());
- AppLogTag(OSP_INSTALLER, "# name = [%S]", pPackageInfoImpl->GetAppName().GetPointer());
- AppLogTag(OSP_INSTALLER, "# vendor = [%S]", pPackageInfoImpl->GetAppVendor().GetPointer());
- AppLogTag(OSP_INSTALLER, "# description = [%S]", pPackageInfoImpl->GetAppDescription().GetPointer());
- AppLogTag(OSP_INSTALLER, "# mimeType = [%S]", pPackageInfoImpl->GetAppMimeType().GetPointer());
- AppLogTag(OSP_INSTALLER, "# api version = [%S]", pPackageInfoImpl->GetAppApiVersion().GetPointer());
- AppLogTag(OSP_INSTALLER, "# uri = [%S]", pPackageInfoImpl->GetAppUrl().GetPointer());
- AppLogTag(OSP_INSTALLER, "# cid = [%S]", pPackageInfoImpl->GetAppCid().GetPointer());
- AppLogTag(OSP_INSTALLER, "# installationDate = [%S]", pPackageInfoImpl->GetAppInstallationTime().ToString().GetPointer());
- AppLogTag(OSP_INSTALLER, "# rootpath = [%S]", pPackageInfoImpl->GetAppRootPath().GetPointer());
- AppLogTag(OSP_INSTALLER, "# storageType = [%d]", pPackageInfoImpl->GetAppStorageType());
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog("PackageInfo");
+ AppLog("------------------------------------------");
+ AppLog("# id = [%S]", pPackageInfoImpl->GetId().GetPointer());
+ AppLog("# version = [%S]", pPackageInfoImpl->GetAppVersion().GetPointer());
+ AppLog("# name = [%S]", pPackageInfoImpl->GetAppName().GetPointer());
+ AppLog("# vendor = [%S]", pPackageInfoImpl->GetAppVendor().GetPointer());
+ AppLog("# description = [%S]", pPackageInfoImpl->GetAppDescription().GetPointer());
+ AppLog("# mimeType = [%S]", pPackageInfoImpl->GetAppMimeType().GetPointer());
+ AppLog("# api version = [%S]", pPackageInfoImpl->GetAppApiVersion().GetPointer());
+ AppLog("# uri = [%S]", pPackageInfoImpl->GetAppUrl().GetPointer());
+ AppLog("# cid = [%S]", pPackageInfoImpl->GetAppCid().GetPointer());
+ AppLog("# installationDate = [%S]", pPackageInfoImpl->GetAppInstallationTime().ToString().GetPointer());
+ AppLog("# rootpath = [%S]", pPackageInfoImpl->GetAppRootPath().GetPointer());
+ AppLog("# storageType = [%d]", pPackageInfoImpl->GetAppStorageType());
+ AppLog("------------------------------------------");
pAppList = pPackageInfoImpl->GetAppInfoListN();
if (pAppList == null)
{
_PackageAppInfoImpl* pAppInfoImpl = dynamic_cast<_PackageAppInfoImpl*>(pAppList->GetAt(i));
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "AppInfo(%d/%d)", i+1, totalCount);
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "# default = [%S]", pAppInfoImpl->GetDefault().GetPointer());
- AppLogTag(OSP_INSTALLER, "# appname = [%S]", pAppInfoImpl->GetName().GetPointer());
- AppLogTag(OSP_INSTALLER, "# packagename = [%S]", pAppInfoImpl->GetPackageName().GetPointer());
- AppLogTag(OSP_INSTALLER, "# mainmenu icon = [%S]", pAppInfoImpl->GetMainmenuIcon().GetPointer());
- AppLogTag(OSP_INSTALLER, "# setting icon = [%S]", pAppInfoImpl->GetSettingIcon().GetPointer());
- AppLogTag(OSP_INSTALLER, "# quickpanel icon = [%S]", pAppInfoImpl->GetQuickpanelIcon().GetPointer());
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog("AppInfo(%d/%d)", i+1, totalCount);
+ AppLog("------------------------------------------");
+ AppLog("# default = [%S]", pAppInfoImpl->GetDefault().GetPointer());
+ AppLog("# appname = [%S]", pAppInfoImpl->GetName().GetPointer());
+ AppLog("# packagename = [%S]", pAppInfoImpl->GetPackageName().GetPointer());
+ AppLog("# mainmenu icon = [%S]", pAppInfoImpl->GetMainmenuIcon().GetPointer());
+ AppLog("# setting icon = [%S]", pAppInfoImpl->GetSettingIcon().GetPointer());
+ AppLog("# quickpanel icon = [%S]", pAppInfoImpl->GetQuickpanelIcon().GetPointer());
+ AppLog("------------------------------------------");
}
pAppList->RemoveAll();
Tizen::System::SystemTime::GetTicks(__endTick);
- AppLogTag(OSP_INSTALLER, "==========================================");
- AppLogTag(OSP_INSTALLER, "%s Result", (operation == INSTALLER_OPERATION_INSTALL)?"Installation":"Uninstallation");
- AppLogTag(OSP_INSTALLER, " # %s", OSP_INSTALLER_VERSION);
- AppLogTag(OSP_INSTALLER, " # PackageId = [%ls]", packageId.IsEmpty() ? L"Unknown" : packageId.GetPointer());
- AppLogTag(OSP_INSTALLER, " # Result = [%s]", (errorType == 0)?"Success":"Failure");
- AppLogTag(OSP_INSTALLER, " # Time = [%d]ms (start=%d, end=%d)", (int)(__endTick-__startTick), (int)__startTick, (int)__endTick);
+ AppLog("==========================================");
+ AppLog("%s Result", (operation == INSTALLER_OPERATION_INSTALL)?"Installation":"Uninstallation");
+ AppLog(" # %s", OSP_INSTALLER_VERSION);
+ AppLog(" # PackageId = [%ls]", packageId.IsEmpty() ? L"Unknown" : packageId.GetPointer());
+ AppLog(" # Result = [%s]", (errorType == 0)?"Success":"Failure");
+ AppLog(" # Time = [%d]ms", (int)(__endTick-__startTick));
PrintError(errorType);
}
break;
}
- AppLogTag(OSP_INSTALLER, " # Error = %s(%d)", pError, errorType);
+ AppLog(" # Error = %s(%d)", pError, errorType);
}
const PackageId&
if (File::IsFileExist(destPath) == false)
{
r = Directory::Create(destPath, false);
- TryReturn(!IsFailed(r), INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] Directory::Create() failed");
+ TryReturn(!IsFailed(r), INSTALLER_ERROR_INTERNAL_STATE, "Directory::Create() failed");
}
InstallerUtil::ChangeDirectoryPermission(destPath, PERM_BASE, false);
if (File::IsFileExist(destPath) == false)
{
r = Directory::Create(destPath, false);
- TryReturn(!IsFailed(r), INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] Directory::Create() failed");
+ TryReturn(!IsFailed(r), INSTALLER_ERROR_INTERNAL_STATE, "Directory::Create() failed");
}
InstallerUtil::ChangeDirectoryPermission(destPath, PERM_BASE, true);
String appId = pContext->GetId();
String apiVersion = pPackageInfoImpl->GetAppApiVersion();
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "[Tizen::Io] # path = [%ls]", appRootPath.GetPointer());
- AppLogTag(OSP_INSTALLER, "[Tizen::Io] # appId = [%ls]", appId.GetPointer());
- AppLogTag(OSP_INSTALLER, "[Tizen::Io] # apiVersion = [%ls]", apiVersion.GetPointer());
+ AppLog("------------------------------------------");
+ AppLog("[Tizen::Io] # path = [%ls]", appRootPath.GetPointer());
+ AppLog("[Tizen::Io] # appId = [%ls]", appId.GetPointer());
+ AppLog("[Tizen::Io] # apiVersion = [%ls]", apiVersion.GetPointer());
if (pContext->__isOspCompat == true)
{
- AppLogTag(OSP_INSTALLER, "[Tizen::Io] OSP 2.0 application");
+ AppLog("[Tizen::Io] OSP 2.0 application");
if (_FileImpl::PrepareDataCaging(appRootPath, appId) == false)
{
- AppLogTag(OSP_INSTALLER, "[Tizen::Io] _FileImpl::PrepareDataCaging() failed");
+ AppLog("[Tizen::Io] _FileImpl::PrepareDataCaging() failed");
return false;
}
}
else
{
- AppLogTag(OSP_INSTALLER, "[Tizen::Io] apiVersion is equal to or greater than Tizen 2.0");
+ AppLog("[Tizen::Io] apiVersion is equal to or greater than Tizen 2.0");
if (_FileImpl::CreateOspApplicationDirectories(appRootPath, appId) == false)
{
- AppLogTag(OSP_INSTALLER, "[Tizen::Io] _FileImpl::CreateOspApplicationDirectories() failed");
+ AppLog("[Tizen::Io] _FileImpl::CreateOspApplicationDirectories() failed");
return false;
}
}
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
// Create AppId.ExecutableName directory
// This will be removed.
ArrayList* pAppList = null;
pPackageInfoImpl = pContext->GetPackageInfoImpl();
- TryReturn(pPackageInfoImpl, false, "[osp-installer] pPackageInfoImpl is null.");
+ TryReturn(pPackageInfoImpl, false, "pPackageInfoImpl is null.");
String appRootPath;
appRootPath = pPackageInfoImpl->GetAppRootPath();
ArrayList* pAppList = null;
pPackageInfoImpl = pContext->GetPackageInfoImpl();
- TryReturn(pPackageInfoImpl, false, "[osp-installer] pPackageInfoImpl is null.");
+ TryReturn(pPackageInfoImpl, false, "pPackageInfoImpl is null.");
pAppList = pPackageInfoImpl->GetAppInfoList();
- TryReturn(pAppList, false, "[osp-installer] pAppList is null.");
+ TryReturn(pAppList, false, "pAppList is null.");
for (int i = 0 ; i < pAppList->GetCount(); i++)
{
bool
SignatureManager::SetSignature()
{
- TryReturn(__pContext, false, "[osp-installer] __pContext is null.");
+ TryReturn(__pContext, false, "__pContext is null.");
bool ret = true;
char* pSignaturePath = _StringConverter::CopyToCharArrayN(__pContext->GetSignatureXmlPath());
char* pAuthorSignaturePath = _StringConverter::CopyToCharArrayN(__pContext->GetAuthorSignatureXmlPath());
__pDistributorSignature = new (std::nothrow) SignatureHandler;
- TryCatch(__pDistributorSignature, ret = false, "[osp-installer] __pDistributorSignature is null");
+ TryCatch(__pDistributorSignature, ret = false, "__pDistributorSignature is null");
ret = __pDistributorSignature->Construct(__pContext);
- TryCatch(ret == true, ret = false, "[osp-installer] __pDistributorSignature->Construct is failed.");
+ TryCatch(ret == true, ret = false, "__pDistributorSignature->Construct is failed.");
ret = __pDistributorSignature->Parse(pSignaturePath);
- TryCatch(ret == true, ret = false, "[osp-installer] __pDistributorSignature->Parse is failed.");
+ TryCatch(ret == true, ret = false, "__pDistributorSignature->Parse is failed.");
__pAuthorSignature = new (std::nothrow) SignatureHandler;
- TryCatch(__pAuthorSignature, ret = false, "[osp-installer] __pAuthorSignature is null");
+ TryCatch(__pAuthorSignature, ret = false, "__pAuthorSignature is null");
ret = __pAuthorSignature->Construct(__pContext);
- TryCatch(ret == true, ret = false, "[osp-installer] __pAuthorSignature->Construct is failed.");
+ TryCatch(ret == true, ret = false, "__pAuthorSignature->Construct is failed.");
ret = __pAuthorSignature->Parse(pAuthorSignaturePath);
- TryCatch(ret == true, ret = false, "[osp-installer] __pAuthorSignature->Parse is failed.");
+ TryCatch(ret == true, ret = false, "__pAuthorSignature->Parse is failed.");
CATCH:
delete[] pSignaturePath;
bool
SignatureManager::AddCert()
{
- TryReturn(__pAuthorSignature, false, "[osp-installer] __pAuthorSignature is null.");
- TryReturn(__pDistributorSignature, false, "[osp-installer] __pDistributorSignature is null.");
+ TryReturn(__pAuthorSignature, false, "__pAuthorSignature is null.");
+ TryReturn(__pDistributorSignature, false, "__pDistributorSignature is null.");
bool ret = true;
IList* pAuthorCertChain = __pAuthorSignature->GetAuthorCertChain();
if (pAuthorCertChain)
{
- AppLogTag(OSP_INSTALLER, "AddCertificate - AuthorCertChain");
+ AppLog("AddCertificate - AuthorCertChain");
__pAuthorCertPath = new (std::nothrow) X509CertificatePath();
- TryCatch(__pAuthorCertPath, ret = false, "[osp-installer] __pAuthorCertPath is null.");
+ TryCatch(__pAuthorCertPath, ret = false, "__pAuthorCertPath is null.");
ret = AddCertificate(__pAuthorCertPath, pAuthorCertChain);
- TryCatch(ret == true, ret = false, "[osp-installer] AddCertificate(AuthorCert) is failed.");
+ TryCatch(ret == true, ret = false, "AddCertificate(AuthorCert) is failed.");
ret = AddAuthorRootCert(__pAuthorCertPath);
- TryCatch(ret == true, ret = false, "[osp-installer] AddAuthorRootCert(AuthorCertPath) is failed.");
+ TryCatch(ret == true, ret = false, "AddAuthorRootCert(AuthorCertPath) is failed.");
}
if (pDistributorCertChain)
{
- AppLogTag(OSP_INSTALLER, "AddCertificate - DistributorCert");
+ AppLog("AddCertificate - DistributorCert");
__pDistributorCertPath = new (std::nothrow) X509CertificatePath();
- TryCatch(__pDistributorCertPath, ret = false, "[osp-installer] __pDistributorCertPath is null.");
+ TryCatch(__pDistributorCertPath, ret = false, "__pDistributorCertPath is null.");
ret = AddCertificate(__pDistributorCertPath, pDistributorCertChain);
- TryCatch(ret == true, ret = false, "[osp-installer] AddCertificate(DistributorCert) is failed.");
+ TryCatch(ret == true, ret = false, "AddCertificate(DistributorCert) is failed.");
ret = AddDistributorRootCert(__pDistributorCertPath);
- TryCatch(ret == true, ret = false, "[osp-installer] AddDistributorRootCert(DistributorCert) is failed.");
+ TryCatch(ret == true, ret = false, "AddDistributorRootCert(DistributorCert) is failed.");
}
CATCH:
bool
SignatureManager::VerifyChain()
{
- TryReturn(__pAuthorCertPath, false, "[osp-installer] __pAuthorCertPath is null.");
- TryReturn(__pDistributorCertPath, false, "[osp-installer] __pDistributorCertPath is null.");
+ TryReturn(__pAuthorCertPath, false, "__pAuthorCertPath is null.");
+ TryReturn(__pDistributorCertPath, false, "__pDistributorCertPath is null.");
bool ret = true;
- AppLogTag(OSP_INSTALLER, "AuthorCert Validate - START");
+ AppLog("AuthorCert Validate - START");
ret = Validate(__pAuthorCertPath);
- AppLogTag(OSP_INSTALLER, "AuthorCert Validate - END");
- TryCatch(ret == true, ret = false, "[osp-installer] Validate(AuthorCert) is failed.");
+ AppLog("AuthorCert Validate - END");
+ TryCatch(ret == true, ret = false, "Validate(AuthorCert) is failed.");
__pContext->SetAuthorCertPath(__pAuthorCertPath);
__pAuthorCertPath = null;
- AppLogTag(OSP_INSTALLER, "DistributorCert Validate - START");
+ AppLog("DistributorCert Validate - START");
ret = Validate(__pDistributorCertPath);
- AppLogTag(OSP_INSTALLER, "DistributorCert Validate - END");
- TryCatch(ret == true, ret = false, "[osp-installer] Validate(DistributorCert) is failed.");
+ AppLog("DistributorCert Validate - END");
+ TryCatch(ret == true, ret = false, "Validate(DistributorCert) is failed.");
__pContext->SetDistributorCertPath(__pDistributorCertPath);
__pDistributorCertPath = null;
bool
SignatureManager::Validate(X509CertificatePath* pCertPath)
{
- TryReturn(pCertPath, false, "[osp-installer] pCertPath is null.");
+ TryReturn(pCertPath, false, "pCertPath is null.");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "# signature.xml");
+ AppLog("------------------------------------------");
+ AppLog("# signature.xml");
ValidationResult valResult = VALIDATION_SUCCESS;
valResult = pCertPath->Validate();
if (valResult != VALIDATION_SUCCESS)
{
- AppLogTag(OSP_INSTALLER, "Validate() fail! - ValidationResult = [%d]", valResult);
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("Validate() fail! - ValidationResult = [%d]", valResult);
+ AppLog("------------------------------------------");
return false;
}
else
int depth = pCertPath->GetLength();
if (depth == 0)
{
- AppLogTag(OSP_INSTALLER, "depth = 0");
+ AppLog("depth = 0");
return false;
}
- AppLogTag(OSP_INSTALLER, "Validate() success!");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("Validate() success!");
+ AppLog("------------------------------------------");
}
return true;
bool
SignatureManager::AddCertificate(X509CertificatePath* pCertPath, IList* pCertChain)
{
- TryReturn(pCertChain, false, "[osp-installer] pCertChain is null.");
+ TryReturn(pCertChain, false, "pCertChain is null.");
bool ret = true;
result r = E_SUCCESS;
if (pByteBuffer)
{
- AppLogTag(OSP_INSTALLER, "[cert][%d]", i);
+ AppLog("[cert][%d]", i);
pCertificate = new (std::nothrow) X509Certificate;
- TryCatch(pCertificate, ret = false, "[osp-installer] pCertificate is null.");
+ TryCatch(pCertificate, ret = false, "pCertificate is null.");
r = pCertificate->Construct(*pByteBuffer);
- TryCatch(!IsFailed(r), ret = false, "[osp-installer] pCertificate->Construct() is failed.");
+ TryCatch(!IsFailed(r), ret = false, "pCertificate->Construct() is failed.");
r = pCertPath->AddCertificate(*pCertificate);
- TryCatch(!IsFailed(r), ret = false, "[osp-installer] AddCertificate is failed.");
+ TryCatch(!IsFailed(r), ret = false, "AddCertificate is failed.");
delete pCertificate;
pCertificate = null;
bool
SignatureManager::AddDistributorRootCert(X509CertificatePath* pCertPath)
{
- TryReturn(pCertPath, false, "[osp-installer] pCertPath is null.");
+ TryReturn(pCertPath, false, "pCertPath is null.");
result r = E_SUCCESS;
bool ret = true;
String issuer;
pIntermediateCA = pCertPath->GetCertificateN(1);
- TryCatch(pIntermediateCA, ret = false, "[osp-installer] pIntermediateCA is null.");
+ TryCatch(pIntermediateCA, ret = false, "pIntermediateCA is null.");
issuer = pIntermediateCA->GetIssuer();
byteBuffer.Construct(length);
r = byteBuffer.SetArray((byte*)pRootCert, 0, length);
- TryCatch(!IsFailed(r), ret = false, "[osp-installer] SetArray() is failed.");
+ TryCatch(!IsFailed(r), ret = false, "SetArray() is failed.");
byteBuffer.Flip();
r = rootCert.Construct(byteBuffer);
- TryCatch(!IsFailed(r), ret = false, "[osp-installer] rootCert.Construct() is failed.");
+ TryCatch(!IsFailed(r), ret = false, "rootCert.Construct() is failed.");
String subject = rootCert.GetSubject();
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "Issuer = [%ls]", issuer.GetPointer());
- AppLogTag(OSP_INSTALLER, "Subject = [%ls]", subject.GetPointer());
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog("Issuer = [%ls]", issuer.GetPointer());
+ AppLog("Subject = [%ls]", subject.GetPointer());
+ AppLog("------------------------------------------");
if (subject == issuer)
{
- AppLogTag(OSP_INSTALLER, "subject, issuer is matched.");
+ AppLog("subject, issuer is matched.");
r = pCertPath->AddCertificate(rootCert);
- TryCatch(!IsFailed(r), ret = false, "[osp-installer] AddCertificate(DistributorRootCert) is failed.");
+ TryCatch(!IsFailed(r), ret = false, "AddCertificate(DistributorRootCert) is failed.");
- AppLogTag(OSP_INSTALLER, "AddCertificate() RootCert = [%d]", certType);
- __pContext->SetRootCertType((RootCertificateType)certType);
+ AppLog("AddCertificate() RootCert = [%d]", certType);
+ __pContext->__rootCertType = (RootCertificateType)certType;
ret = true;
}
else
{
- AppLogTag(OSP_INSTALLER, "subject, issuer is not matched.");
+ AppLog("subject, issuer is not matched.");
ret = false;
}
}
bool
SignatureManager::AddAuthorRootCert(X509CertificatePath* pCertPath)
{
- TryReturn(pCertPath, false, "[osp-installer] pCertPath is null.");
+ TryReturn(pCertPath, false, "pCertPath is null.");
result r = E_SUCCESS;
bool ret = true;
byteBuffer.Construct(length);
r = byteBuffer.SetArray((byte*)pAuthorRootCert, 0, length);
- TryCatch(!IsFailed(r), ret = false, "[osp-installer] SetArray() is failed.");
+ TryCatch(!IsFailed(r), ret = false, "SetArray() is failed.");
byteBuffer.Flip();
r = rootCert.Construct(byteBuffer);
- TryCatch(!IsFailed(r), ret = false, "[osp-installer] rootCert.Construct() is failed.");
+ TryCatch(!IsFailed(r), ret = false, "rootCert.Construct() is failed.");
r = pCertPath->AddCertificate(rootCert);
- TryCatch(!IsFailed(r), ret = false, "[osp-installer] AddCertificate(AuthorRootCert) is failed.");
+ TryCatch(!IsFailed(r), ret = false, "AddCertificate(AuthorRootCert) is failed.");
CATCH:
return ret;
DrmStep::Run(InstallationContext* pContext)
{
InstallerError error = INSTALLER_ERROR_NONE;
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, " DrmStep - START");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog(" DrmStep - START");
+ AppLog("------------------------------------------");
__pContext = pContext;
switch (__state)
{
case STATE_DRM_CHECKING:
- AppLogTag(OSP_INSTALLER, "[STATE_DRM_CHECKING]");
+ AppLog("[STATE_DRM_CHECKING]");
error = OnDrmChecking();
break;
case STATE_DRM_PURCHASE_REQUEST:
- AppLogTag(OSP_INSTALLER, "[STATE_DRM_PURCHASE_REQUEST]");
+ AppLog("[STATE_DRM_PURCHASE_REQUEST]");
error = OnPurchaseRequest();
break;
case STATE_DRM_LICENSE_REQUEST:
- AppLogTag(OSP_INSTALLER, "[STATE_DRM_LICENSE_REQUEST]");
+ AppLog("[STATE_DRM_LICENSE_REQUEST]");
error = OnLicenseRequest();
break;
case STATE_DRM_LICENSE_RESPONSE:
- AppLogTag(OSP_INSTALLER, "[STATE_DRM_LICENSE_RESPONSE]");
+ AppLog("[STATE_DRM_LICENSE_RESPONSE]");
error = OnLicenseResponse();
break;
case STATE_DRM_DECRYPT:
- AppLogTag(OSP_INSTALLER, "[STATE_DRM_DECRYPT]");
+ AppLog("[STATE_DRM_DECRYPT]");
error = OnDecryptPackage();
break;
case STATE_DONE:
- AppLogTag(OSP_INSTALLER, "[STATE_DONE]");
+ AppLog("[STATE_DONE]");
error = OnStateDone();
break;
if (__state > STATE_DONE)
{
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, " DrmStep - END");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog(" DrmStep - END");
+ AppLog("------------------------------------------");
break;
}
}
LicenseStep::Run(InstallationContext* pContext)
{
InstallerError error = INSTALLER_ERROR_NONE;
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, " LicenseStep - START");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog(" LicenseStep - START");
+ AppLog("------------------------------------------");
__pContext = pContext;
switch (__state)
{
case STATE_LICENSE_VERIFICATION:
- AppLogTag(OSP_INSTALLER, "[STATE_LICENSE_VERIFICATION]");
+ AppLog("[STATE_LICENSE_VERIFICATION]");
error = OnStateLicenseVerification();
break;
case STATE_DONE:
- AppLogTag(OSP_INSTALLER, "[STATE_DONE]");
+ AppLog("[STATE_DONE]");
error = OnStateDone();
break;
if (__state > STATE_DONE)
{
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, " LicenseStep - END");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog(" LicenseStep - END");
+ AppLog("------------------------------------------");
break;
}
}
ManifestXmlStep::Run(InstallationContext* pContext)
{
InstallerError error = INSTALLER_ERROR_NONE;
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, " ManifestXmlStep - START");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog(" ManifestXmlStep - START");
+ AppLog("------------------------------------------");
__pContext = pContext;
switch (__state)
{
case STATE_MANIFEST_XML:
- AppLogTag(OSP_INSTALLER, "[STATE_MANIFEST]");
+ AppLog("[STATE_MANIFEST]");
error = OnStateManifestXml();
break;
case STATE_DONE:
- AppLogTag(OSP_INSTALLER, "[STATE_DONE]");
+ AppLog("[STATE_DONE]");
error = OnStateDone();
break;
if (__state > STATE_DONE)
{
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, " ManifestXmlStep - END");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog(" ManifestXmlStep - END");
+ AppLog("------------------------------------------");
break;
}
String manifestXmlPath;
result r = E_SUCCESS;
- manifestXmlPath = __pContext->GetManifestXmlPath();
+ manifestXmlPath = __pContext->__installDir + PACKAGE_XML_FILE;
FileAttributes attr;
r = File::GetAttributes(manifestXmlPath, attr);
- TryReturn(!IsFailed(r), INSTALLER_ERROR_MANIFEST_NOT_FOUND, "[osp-installer] File::GetAttributes() failed");
+ TryReturn(!IsFailed(r), INSTALLER_ERROR_MANIFEST_NOT_FOUND, "File::GetAttributes() failed");
std::unique_ptr<char[]> pFilepath(_StringConverter::CopyToCharArrayN(manifestXmlPath));
- TryReturn(pFilepath, INSTALLER_ERROR_OUT_OF_MEMORY, "[osp-installer] pFilepath is null");
+ TryReturn(pFilepath, INSTALLER_ERROR_OUT_OF_MEMORY, "pFilepath is null");
- AppLogTag(OSP_INSTALLER, "manifest file=[%ls]", manifestXmlPath.GetPointer());
+ AppLog("manifest file=[%ls]", manifestXmlPath.GetPointer());
ManifestHandler manifestHandler;
manifestHandler.Construct(__pContext);
ret = manifestHandler.Parse(pFilepath.get());
- TryReturn(ret == true, INSTALLER_ERROR_MANIFEST_INVALID, "[osp-installer] manifestHandler.Parse() failed");
+ TryReturn(ret == true, INSTALLER_ERROR_MANIFEST_INVALID, "manifestHandler.Parse() failed");
pPackageInfoImpl = __pContext->GetPackageInfoImpl();
- TryReturn(pPackageInfoImpl, error = INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] pPackageInfoImpl is null");
+ TryReturn(pPackageInfoImpl, error = INSTALLER_ERROR_INTERNAL_STATE, "pPackageInfoImpl is null");
__pContext->SetId(pPackageInfoImpl->GetId());
GoNextState();
PackageCheckStep::Run(InstallationContext* pContext)
{
InstallerError error = INSTALLER_ERROR_NONE;
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, " PackageCheckStep - START");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog(" PackageCheckStep - START");
+ AppLog("------------------------------------------");
__pContext = pContext;
switch (__state)
{
case STATE_PACKAGE_CHECK:
- AppLogTag(OSP_INSTALLER, "[STATE_PACKAGE_CHECK]");
+ AppLog("[STATE_PACKAGE_CHECK]");
error = OnStatePackageCheck();
break;
case STATE_DONE:
- AppLogTag(OSP_INSTALLER, "[STATE_DONE]");
+ AppLog("[STATE_DONE]");
error = OnStateDone();
break;
if (__state > STATE_DONE)
{
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, " PackageCheckStep - END");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog(" PackageCheckStep - END");
+ AppLog("------------------------------------------");
break;
}
}
InstallerError error = INSTALLER_ERROR_NONE;
String tempDir;
- if (__pContext->GetInstallationStorage() == InstallationContext::INSTALLATION_STORAGE_INTERNAL)
+ if (__pContext->__storage == INSTALLATION_STORAGE_INTERNAL)
{
tempDir = DIR_OSP_APPLICATIONS_TEMP;
}
tempDir = DIR_MEMORYCARD_OSP_APPLICATIONS_TEMP;
}
- __pContext->SetTemporaryDir(tempDir);
- __pContext->SetInstallDir(tempDir);
+ __pContext->__installDir = tempDir;
if (File::IsFileExist(DIR_OSP_APPLICATIONS_TEMP) == false)
{
result r = E_SUCCESS;
r = Directory::Create(DIR_OSP_APPLICATIONS_TEMP, false);
- TryReturn(!IsFailed(r), INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] Directory::Create() failed");
+ TryReturn(!IsFailed(r), INSTALLER_ERROR_INTERNAL_STATE, "Directory::Create() failed");
}
- String packagePath = __pContext->GetPackagePath();
+ String packagePath = __pContext->__packagePath;
if (InstallerUtil::IsDrmFile(packagePath) == true)
{
bool res = false;
res = InstallerUtil::DecryptPackage(packagePath);
- TryReturn(res == true, INSTALLER_ERROR_DRM, "[osp-installer] InstallerUtil::DecryptPackage() failed");
+ TryReturn(res == true, INSTALLER_ERROR_DRM, "InstallerUtil::DecryptPackage() failed");
}
FileUnzipper unzipper;
unzipper.Construct(packagePath);
- AppLogTag(OSP_INSTALLER, "UnzipTo(manifest.xml) - START");
+ AppLog("UnzipTo(manifest.xml) - START");
unzipper.UnzipTo(tempDir, L"info/manifest.xml");
unzipper.UnzipTo(tempDir, L"signature1.xml");
unzipper.UnzipTo(tempDir, L"author-signature.xml");
- AppLogTag(OSP_INSTALLER, "UnzipTo(manifest.xml) - END");
+ AppLog("UnzipTo(manifest.xml) - END");
if ((File::IsFileExist(__pContext->GetSignatureXmlPath()) == true) &&
(File::IsFileExist(__pContext->GetAuthorSignatureXmlPath()) == true))
{
- AppLogTag(OSP_INSTALLER, "[VerifySignature] VerificationMode ON");
- __pContext->SetVerificationMode(true);
+ AppLog("[VerifySignature] VerificationMode ON");
+ __pContext->__isVerificationMode = true;
}
GoNextState();
SignatureStep::Run(InstallationContext* pContext)
{
InstallerError error = INSTALLER_ERROR_NONE;
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, " SignatureStep - START");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog(" SignatureStep - START");
+ AppLog("------------------------------------------");
__pContext = pContext;
- if (__pContext->IsVerificationMode() == false)
+ if (__pContext->__isVerificationMode == false)
{
- AppLogTag(OSP_INSTALLER, "no signature file[%ls]", __pContext->GetSignatureXmlPath().GetPointer());
+ AppLog("no signature file[%ls]", __pContext->GetSignatureXmlPath().GetPointer());
return INSTALLER_ERROR_NONE;
}
switch (__state)
{
case STATE_SIGNER_CERT:
- AppLogTag(OSP_INSTALLER, "[STATE_SIGNER_CERT]");
+ AppLog("[STATE_SIGNER_CERT]");
error = OnStateSignerCert();
break;
case STATE_CERT_CHAIN:
- AppLogTag(OSP_INSTALLER, "[STATE_CERT_CHAIN]");
+ AppLog("[STATE_CERT_CHAIN]");
error = OnStateCertChain();
break;
case STATE_ROOT_CERT:
- AppLogTag(OSP_INSTALLER, "[STATE_ROOT_CERT]");
+ AppLog("[STATE_ROOT_CERT]");
error = OnStateRootCert();
break;
case STATE_DONE:
- AppLogTag(OSP_INSTALLER, "[STATE_DONE]");
+ AppLog("[STATE_DONE]");
error = OnStateDone();
break;
if (__state > STATE_DONE)
{
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, " SignatureStep - END");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog(" SignatureStep - END");
+ AppLog("------------------------------------------");
break;
}
}
bool ret = true;
__pSignatureManager = new (std::nothrow) SignatureManager();
- TryCatch(__pSignatureManager, error = INSTALLER_ERROR_OUT_OF_MEMORY, "[osp-installer] __pSignatureManager is null.");
+ TryCatch(__pSignatureManager, error = INSTALLER_ERROR_OUT_OF_MEMORY, "__pSignatureManager is null.");
ret = __pSignatureManager->Construct(__pContext);
- TryCatch(ret == true, error = INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] Construct() failed");
+ TryCatch(ret == true, error = INSTALLER_ERROR_INTERNAL_STATE, "Construct() failed");
ret = __pSignatureManager->SetSignature();
- TryCatch(ret == true, error = INSTALLER_ERROR_SIGNATURE_INVALID, "[osp-installer] SetSignature() failed");
+ TryCatch(ret == true, error = INSTALLER_ERROR_SIGNATURE_INVALID, "SetSignature() failed");
CATCH:
GoNextState();
bool ret = true;
ret = __pSignatureManager->AddCert();
- TryCatch(ret == true, error = INSTALLER_ERROR_CERTIFICATE_CHAIN_VERIFICATION_FAILED, "[osp-installer] AddCert(DEVELOPER_ROOT_CERTIFICATE) failed");
+ TryCatch(ret == true, error = INSTALLER_ERROR_CERTIFICATE_CHAIN_VERIFICATION_FAILED, "AddCert(DEVELOPER_ROOT_CERTIFICATE) failed");
ret = __pSignatureManager->VerifyChain();
- TryCatch(ret == true, error = INSTALLER_ERROR_CERTIFICATE_CHAIN_VERIFICATION_FAILED, "[osp-installer] VerifyChain() failed");
+ TryCatch(ret == true, error = INSTALLER_ERROR_CERTIFICATE_CHAIN_VERIFICATION_FAILED, "VerifyChain() failed");
CATCH:
GoNextState();
String hmacPrivileges;
const ArrayList* pPrivilegeList = __pContext->GetPrivilegeList();
- RootCertificateType certType = __pContext->GetRootCertType();
+ RootCertificateType certType = __pContext->__rootCertType;
_PackageInfoImpl* pPackageInfoImpl = __pContext->GetPackageInfoImpl();
String appId = pPackageInfoImpl->GetId();
int apiVisibility = GetApiVisibility(certType);
- AppLogTag(OSP_INSTALLER, "AppId = [%ls], CertType = [%d], ApiVisibility = [%d]", appId.GetPointer(), certType, apiVisibility);
+ AppLog("AppId = [%ls], CertType = [%d], ApiVisibility = [%d]", appId.GetPointer(), certType, apiVisibility);
r = PrivilegeHandler::GenerateCipherPrivilege(appId, *pPrivilegeList, apiVisibility, privileges, hmacPrivileges);
- TryCatch(!IsFailed(r), error = INSTALLER_ERROR_PRIVILEGE_INVALID, "[osp-installer] privMgr.GeneratePrivilegeString() failed");
+ TryCatch(!IsFailed(r), error = INSTALLER_ERROR_PRIVILEGE_INVALID, "privMgr.GeneratePrivilegeString() failed");
pPackageInfoImpl->SetPrivilegesValue(privileges, hmacPrivileges);
pPackageInfoImpl->SetCertType(apiVisibility);
{
InstallerError error = INSTALLER_ERROR_NONE;
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, " SystemCheckStep - START");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog(" SystemCheckStep - START");
+ AppLog("------------------------------------------");
__pContext = pContext;
switch (__state)
{
case STATE_SYSTEM_CHECK:
- AppLogTag(OSP_INSTALLER, "[STATE_SYSTEM_CHECK]");
error = OnStateSystemCheck();
break;
case STATE_AGENT_CHECK:
- AppLogTag(OSP_INSTALLER, "[STATE_AGENT_CHECK]");
error = OnStateAgentCheck();
break;
case STATE_AGENT_TIMER:
- AppLogTag(OSP_INSTALLER, "[STATE_AGENT_TIMER]");
error = OnStateAgentTimer();
break;
case STATE_DONE:
- AppLogTag(OSP_INSTALLER, "[STATE_DONE]");
error = OnStateDone();
break;
if (__state > STATE_DONE)
{
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, " SystemCheckStep - END");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog(" SystemCheckStep - END");
+ AppLog("------------------------------------------");
break;
}
}
InstallerError error = INSTALLER_ERROR_NONE;
// Check preferred storage
- __pContext->SetInstallationStorage(InstallationContext::INSTALLATION_STORAGE_INTERNAL);
+ __pContext->__storage = INSTALLATION_STORAGE_INTERNAL;
GoNextState();
return error;
#include <unique_ptr.h>
+#include <app2ext_interface.h>
+
#include <FIoDirectory.h>
#include <FIo_FileImpl.h>
#include <FBase_StringConverter.h>
UninstallStep::Run(InstallationContext* pContext)
{
InstallerError error = INSTALLER_ERROR_NONE;
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, " UninstallStep - START");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog(" UninstallStep - START");
+ AppLog("------------------------------------------");
__pContext = pContext;
switch (__state)
{
case STATE_GET_PACKAGEINFO:
- AppLogTag(OSP_INSTALLER, "[STATE_GET_PACKAGEINFO]");
+ AppLog("[STATE_GET_PACKAGEINFO]");
error = OnStateGetPackageInfo();
break;
case STATE_CHECK_APP_RUNNING:
- AppLogTag(OSP_INSTALLER, "[STATE_CHECK_APP_RUNNING]");
+ AppLog("[STATE_CHECK_APP_RUNNING]");
error = OnStateCheckAppRunning();
break;
case STATE_TERMINATE_APP:
- AppLogTag(OSP_INSTALLER, "[STATE_TERMINATE_APP]");
+ AppLog("[STATE_TERMINATE_APP]");
error = OnStateTerminateApp();
break;
case STATE_START_TIMER:
- AppLogTag(OSP_INSTALLER, "[STATE_START_TIMER]");
+ AppLog("[STATE_START_TIMER]");
error = OnStateStartTimer();
break;
case STATE_DELETE_DIR:
- AppLogTag(OSP_INSTALLER, "[STATE_DELETE_DIR]");
+ AppLog("[STATE_DELETE_DIR]");
error = OnStateRemoveDir();
break;
case STATE_DONE:
- AppLogTag(OSP_INSTALLER, "[STATE_DONE]");
+ AppLog("[STATE_DONE]");
error = OnStateDone();
break;
if (__state > STATE_DONE)
{
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, " UninstallStep - END");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog(" UninstallStep - END");
+ AppLog("------------------------------------------");
break;
}
}
String appId = __pContext->GetId();
_PackageInfoImpl* pPackageInfoImpl = __pContext->GetPackageInfoImpl();
- TryReturn(pPackageInfoImpl, INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] pPackageInfoImpl is null");
+ TryReturn(pPackageInfoImpl, INSTALLER_ERROR_INTERNAL_STATE, "pPackageInfoImpl is null");
- AppLogTag(OSP_INSTALLER, "appId = %S", appId.GetPointer());
+ AppLog("appId = %ls", appId.GetPointer());
pPackageInfoImpl->Construct(appId);
- if (__pContext->IsHybridService() == true)
+ String rootPath = pPackageInfoImpl->GetAppRootPath();
+ if (rootPath.StartsWith(PATH_USR_APPS, 0) == true)
+ {
+ __pContext->__isPreloaded = true;
+ }
+
+ if (__pContext->__isHybridService == true)
{
- AppLogTag(OSP_INSTALLER, "Uninstallation for HybridService");
+ AppLog("Uninstallation for HybridService");
__state = STATE_DELETE_DIR;
return error;
}
app2ext_handle* pHandle = null;
std::unique_ptr<char[]> pAppId(_StringConverter::CopyToCharArrayN(appId));
- TryReturn(pAppId, INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] pAppId is null");
+ TryReturn(pAppId, INSTALLER_ERROR_INTERNAL_STATE, "pAppId is null");
pHandle = app2ext_init(APP2EXT_SD_CARD);
- TryReturn(pHandle, INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] app2ext_init() failed");
+ TryReturn(pHandle, INSTALLER_ERROR_INTERNAL_STATE, "app2ext_init() failed");
res = pHandle->interface.pre_uninstall(pAppId.get());
- TryReturn(res == 0, INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] pHandle->interface.pre_uninstall() failed [%d]", res);
+ TryReturn(res == 0, INSTALLER_ERROR_INTERNAL_STATE, "pHandle->interface.pre_uninstall() failed [%d]", res);
- __pContext->SetApp2ExtHandle(pHandle);
+ __pContext->__pApp2ExtHandle = (void*)pHandle;
- AppLogTag(OSP_INSTALLER, "[app2sd] pre_uninstall(%s)", pAppId.get());
+ AppLog("[app2sd] pre_uninstall(%s)", pAppId.get());
}
ArrayList* pList = pPackageInfoImpl->GetAppInfoListN();
- TryReturn(pList, INSTALLER_ERROR_DATABASE, "[osp-installer] pList is null.");
+ TryReturn(pList, INSTALLER_ERROR_DATABASE, "pList is null.");
for (int i = 0; i < pList->GetCount(); i++)
{
InstallerError error = INSTALLER_ERROR_NONE;
_PackageInfoImpl* pPackageInfoImpl = __pContext->GetPackageInfoImpl();
- TryReturn(pPackageInfoImpl, INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] pPackageInfoImpl is null");
+ TryReturn(pPackageInfoImpl, INSTALLER_ERROR_INTERNAL_STATE, "pPackageInfoImpl is null");
String rootPath;
rootPath = pPackageInfoImpl->GetAppRootPath();
- AppLogTag(OSP_INSTALLER, "rootPath[%ls]", rootPath.GetPointer());
+ AppLog("rootPath[%ls]", rootPath.GetPointer());
String compatPath(rootPath);
compatPath.Append(L"/info/compat.info");
{
if (_FileImpl::FinalizeDataCaging(rootPath) == false)
{
- AppLogTag(OSP_INSTALLER, "[Tizen::Io] Failed to unmount directories for 2.0 application, appRootPath: %ls",
+ AppLog("[Tizen::Io] Failed to unmount directories for 2.0 application, appRootPath: %ls",
rootPath.GetPointer());
return INSTALLER_ERROR_UNMOUNT_FAILED;
}
}
else if (r != E_SUCCESS)
{
- AppLogTag(OSP_INSTALLER, "[Tizen::Io] Failed to access %ls", compatPath.GetPointer());
+ AppLog("[Tizen::Io] Failed to access %ls", compatPath.GetPointer());
return INSTALLER_ERROR_UNMOUNT_FAILED;
}
- AppLogTag(OSP_INSTALLER, "Directory::Remove - START");
+ AppLog("Directory::Remove - START");
- if (__pContext->IsHybridService() == true)
+ if (__pContext->__isHybridService == true)
{
- AppLogTag(OSP_INSTALLER, "Uninstallation for HybridService - skip Remove");
+ AppLog("Uninstallation for HybridService - skip Remove");
}
else
}
}
}
- AppLogTag(OSP_INSTALLER, "Directory::Remove - END");
+ AppLog("Directory::Remove - END");
GoNextState();
return error;
#include <unique_ptr.h>
+#include <app2ext_interface.h>
+
#include <FIoFile.h>
#include <FIoDirectory.h>
#include <FBaseResult.h>
UnpackStep::Run(InstallationContext* pContext)
{
InstallerError error = INSTALLER_ERROR_NONE;
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, " UnpackStep - START");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog(" UnpackStep - START");
+ AppLog("------------------------------------------");
__pContext = pContext;
switch (__state)
{
case STATE_UNZIP:
- AppLogTag(OSP_INSTALLER, "[STATE_UNZIP]");
+ AppLog("[STATE_UNZIP]");
error = OnUnzip();
break;
case STATE_VERSION_CHECK:
- AppLogTag(OSP_INSTALLER, "[STATE_VERSION_CHECK]");
+ AppLog("[STATE_VERSION_CHECK]");
error = OnStateVersionCheck();
break;
case STATE_FILE_MOVE:
- AppLogTag(OSP_INSTALLER, "[STATE_FILE_MOVE]");
+ AppLog("[STATE_FILE_MOVE]");
error = OnStateFileMove();
break;
case STATE_CREATE_DIR:
- AppLogTag(OSP_INSTALLER, "[STATE_CREATE_DIR]");
+ AppLog("[STATE_CREATE_DIR]");
error = OnCreateDir();
break;
case STATE_DONE:
- AppLogTag(OSP_INSTALLER, "[STATE_DONE]");
+ AppLog("[STATE_DONE]");
error = OnStateDone();
break;
if (__state > STATE_DONE)
{
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, " UnpackStep - END");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog(" UnpackStep - END");
+ AppLog("------------------------------------------");
break;
}
}
String installPath;
installPath = PATH_OPT_USR_APPS;
installPath += "/";
-
- if (__pContext->GetPackageNameType() == INSTALLER_PREFIX_TYPE_ORG)
- {
- installPath += PACKAGE_NAME_PREFIX_ORG;
- }
-
installPath += __pContext->GetId();
result r = E_SUCCESS;
FileUnzipper unzipper;
- r = unzipper.Construct(__pContext->GetPackagePath());
- TryReturn(!IsFailed(r), INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] unzipper.Construct() failed");
+ r = unzipper.Construct(__pContext->__packagePath);
+ TryReturn(!IsFailed(r), INSTALLER_ERROR_INTERNAL_STATE, "unzipper.Construct() failed");
- if (__pContext->GetInstallationStorage() == InstallationContext::INSTALLATION_STORAGE_EXTERNAL)
+ if (__pContext->__storage == INSTALLATION_STORAGE_EXTERNAL)
{
int res = 0;
String appId = __pContext->GetId();
std::unique_ptr<char[]> pAppId(_StringConverter::CopyToCharArrayN(appId));
- TryReturn(pAppId, INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] pAppId is null");
+ TryReturn(pAppId, INSTALLER_ERROR_INTERNAL_STATE, "pAppId is null");
GetUncompressedInfo(unzipper);
- TryReturn((__pDirectoryList && (__uncompressedSize > 0)), INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] GetUncompressedInfo() failed");
+ TryReturn((__pDirectoryList && (__uncompressedSize > 0)), INSTALLER_ERROR_INTERNAL_STATE, "GetUncompressedInfo() failed");
pHandle = app2ext_init(APP2EXT_SD_CARD);
- TryReturn(pHandle, INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] app2ext_init() failed");
+ TryReturn(pHandle, INSTALLER_ERROR_INTERNAL_STATE, "app2ext_init() failed");
- __pContext->SetApp2ExtHandle(pHandle);
+ __pContext->__pApp2ExtHandle = (void*)pHandle;
res = pHandle->interface.pre_install(pAppId.get(), __pDirectoryList, __uncompressedSize);
- TryReturn(res == 0, INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] pHandle->interface.pre_install() failed [%d]", res);
+ TryReturn(res == 0, INSTALLER_ERROR_INTERNAL_STATE, "pHandle->interface.pre_install() failed [%d]", res);
- AppLogTag(OSP_INSTALLER, "[app2sd] pre_install(%s)", pAppId.get());
+ AppLog("[app2sd] pre_install(%s)", pAppId.get());
}
if (File::IsFileExist(installPath) == false)
{
r = Directory::Create(installPath, false);
- TryReturn(!IsFailed(r), INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] Directory::Create() failed, installPath=%ls", installPath.GetPointer());
+ TryReturn(!IsFailed(r), INSTALLER_ERROR_INTERNAL_STATE, "Directory::Create() failed, installPath=%ls", installPath.GetPointer());
}
InstallerUtil::CreateSymlinkForAppDirectory(installPath, newInstallPath);
- __pContext->SetInstallDir(newInstallPath);
+ __pContext->__installDir = newInstallPath;
pPackageInfoImpl = __pContext->GetPackageInfoImpl();
pPackageInfoImpl->SetAppRootPath(newInstallPath);
- AppLogTag(OSP_INSTALLER, "UnzipTo - START");
+ AppLog("UnzipTo - START");
unzipper.UnzipTo(newInstallPath);
- AppLogTag(OSP_INSTALLER, "UnzipTo - END");
+ AppLog("UnzipTo - END");
// GoNextState();
__state = STATE_DONE;
while((r = entryName.IndexOf(L'/', startIndex, indexOf)) == E_SUCCESS)
{
String* pCurDirectory = new (std::nothrow) String;
- TryReturn(pCurDirectory, false, "[osp-installer] pCurDirectory is null.");
+ TryReturn(pCurDirectory, false, "pCurDirectory is null.");
entryName.SubString(0, indexOf, *pCurDirectory);
AddDirectory(*pCurDirectory);
}
- AppLogTag(OSP_INSTALLER, "Folder[%ls], Size[%d]", pCurDirectory->GetPointer(), BLOCK_SIZE);
+ AppLog("Folder[%ls], Size[%d]", pCurDirectory->GetPointer(), BLOCK_SIZE);
totalSize += BLOCK_SIZE;
directoryList.Add(*pCurDirectory);
}
totalSize += uncompressedSize;
- AppLogTag(OSP_INSTALLER, " -File[%ls], UncompressedSize[%d]", entryName.GetPointer(), (int)uncompressedSize);
+ AppLog(" -File[%ls], UncompressedSize[%d]", entryName.GetPointer(), (int)uncompressedSize);
}
}
directoryList.RemoveAll(true);
__uncompressedSize = (int)(totalSize / (1024 * 1024)) + 1;
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "TotalSize = [%d]B", (int)totalSize);
- AppLogTag(OSP_INSTALLER, "TotalSize = [%d]MB", __uncompressedSize);
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog("TotalSize = [%d]B", (int)totalSize);
+ AppLog("TotalSize = [%d]MB", __uncompressedSize);
+ AppLog("------------------------------------------");
return true;
app2ext_dir_details* pDirDetails = null;
pDirDetails = (app2ext_dir_details*) calloc(1, sizeof(app2ext_dir_details));
- TryReturn(pDirDetails, false, "[osp-installer] pDirDetails is null");
+ TryReturn(pDirDetails, false, "pDirDetails is null");
length = rootDirectory.GetLength();
pDirDetails->name = (char*) calloc(1, (sizeof(char) * length) + 1);
pDirDetails->type = APP2EXT_DIR_RW;
}
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "# Root Directory = [%s], Type = [%d]", pDirDetails->name, pDirDetails->type);
+ AppLog("------------------------------------------");
+ AppLog("# Root Directory = [%s], Type = [%d]", pDirDetails->name, pDirDetails->type);
__pDirectoryList = g_list_append(__pDirectoryList, pDirDetails);
result r = E_SUCCESS;
struct stat fileinfo;
- AppLogTag(OSP_INSTALLER, "+ Remove(): path=[%ls]", filePath.GetPointer());
-
std::unique_ptr<char[]> pFilePath(_StringConverter::CopyToCharArrayN(filePath));
- TryReturn(pFilePath, false, "[osp-installer] pFilePath is null");
+ TryReturn(pFilePath, false, "pFilePath is null");
err = lstat(pFilePath.get(), &fileinfo);
if (err < 0)
{
- AppLogTag(OSP_INSTALLER, "Remove(): lstat(%s): %s[errno:%d]: skip", pFilePath.get(), strerror(errno), errno);
+ AppLog("Remove(): [%s] - %s[errno(%d)]: skip", pFilePath.get(), strerror(errno), errno);
return true;
}
if (S_ISLNK(fileinfo.st_mode))
{
- AppLogTag(OSP_INSTALLER, "Remove(): symlink, path=[%s]", pFilePath.get());
+ AppLog("Remove(): symlink, path=[%s]", pFilePath.get());
err = unlink(pFilePath.get());
- TryReturn(err >= 0, false, "[osp-installer] unlink() failed(%s), filepath=[%s]", strerror(errno), pFilePath.get());
+ TryReturn(err >= 0, false, "unlink() failed(%s), filepath=[%s]", strerror(errno), pFilePath.get());
}
else if (S_ISDIR(fileinfo.st_mode))
{
- AppLogTag(OSP_INSTALLER, "Remove(): directory, path=[%ls]", filePath.GetPointer());
+ AppLog("Remove(): directory, path=[%ls]", filePath.GetPointer());
r = Directory::Remove(filePath, true);
- TryReturn(!IsFailed(r), false, "[osp-installer] Directory::Remove() failed, filePath=%ls", filePath.GetPointer());
+ TryReturn(!IsFailed(r), false, "Directory::Remove() failed, filePath=%ls", filePath.GetPointer());
}
else
{
- AppLogTag(OSP_INSTALLER, "Remove(): file, path=[%ls]", filePath.GetPointer());
+ AppLog("Remove(): file, path=[%ls]", filePath.GetPointer());
r = File::Remove(filePath);
- TryReturn(!IsFailed(r), false, "[osp-installer] File::Remove() failed, filePath=%ls", filePath.GetPointer());
+ TryReturn(!IsFailed(r), false, "File::Remove() failed, filePath=%ls", filePath.GetPointer());
}
return true;
int readBytes = 0;
result r = E_SUCCESS;
- // AppLogTag(OSP_INSTALLER, "+ Copy(): src=[%ls], dest=[%ls]", srcFilePath.GetPointer(), destFilePath.GetPointer());
+ // AppLog("+ Copy(): src=[%ls], dest=[%ls]", srcFilePath.GetPointer(), destFilePath.GetPointer());
File srcFile;
File destFile;
std::unique_ptr<char[]> pBuf(new (std::nothrow) char[bufSize]);
- TryReturn(pBuf, false, "[osp-installer] pBuf is null");
+ TryReturn(pBuf, false, "pBuf is null");
r = srcFile.Construct(srcFilePath, L"r");
- TryReturn(!IsFailed(r), false, "[osp-installer] srcFile.Construct is failed");
+ TryReturn(!IsFailed(r), false, "srcFile.Construct is failed");
r = destFile.Construct(destFilePath, L"w");
- TryReturn(!IsFailed(r), false, "[osp-installer] destFile.Construct is failed");
+ TryReturn(!IsFailed(r), false, "destFile.Construct is failed");
do
{
if (readBytes > 0)
{
r = destFile.Write(pBuf.get(), readBytes);
- TryReturn(!IsFailed(r), false, "[osp-installer] destFile.Write is failed");
+ TryReturn(!IsFailed(r), false, "destFile.Write is failed");
}
}
while (readBytes > 0);
InstallerUtil::CopyDirectory(const String& srcFilePath, const String& destFilePath)
{
result r = E_SUCCESS;
+ bool res = false;
- AppLogTag(OSP_INSTALLER, "+ CopyDirectory(): src=[%ls], dest=[%ls]", srcFilePath.GetPointer(), destFilePath.GetPointer());
+ res = File::IsFileExist(srcFilePath);
+ if (res == false)
+ {
+ AppLog("CopyDirectory(): src=[%ls]: skip", srcFilePath.GetPointer());
+ return true;
+ }
std::unique_ptr<Directory> pDir(new (std::nothrow) Directory);
- TryReturn(pDir, false, "[osp-installer] pDir is null.");
+ TryReturn(pDir, false, "pDir is null.");
r = pDir->Construct(srcFilePath);
- TryReturn(!IsFailed(r), false, "[osp-installer] pDir->Construct() failed, srcFilePath=[%ls].", srcFilePath.GetPointer());
+ TryReturn(!IsFailed(r), false, "pDir->Construct() failed, srcFilePath=[%ls].", srcFilePath.GetPointer());
std::unique_ptr<DirEnumerator> pDirEnum(pDir->ReadN());
- TryReturn(pDirEnum, false, "[osp-installer] pDirEnum is null.");
+ TryReturn(pDirEnum, false, "pDirEnum is null.");
while (pDirEnum->MoveNext() == E_SUCCESS)
{
}
}
+ AppLog("CopyDirectory(): src=[%ls], dest=[%ls]", srcFilePath.GetPointer(), destFilePath.GetPointer());
return true;
}
struct stat fileinfo;
std::unique_ptr<char[]> pFilePath(_StringConverter::CopyToCharArrayN(filePath));
- TryReturn(pFilePath, false, "[osp-installer] pFilePath is null");
+ TryReturn(pFilePath, false, "pFilePath is null");
err = lstat(pFilePath.get(), &fileinfo);
- TryReturn(err >= 0, false, "[osp-installer] lstat() failed(%s), filepath=[%s]", strerror(errno), pFilePath.get());
+ TryReturn(err >= 0, false, "lstat() failed(%s), filepath=[%s]", strerror(errno), pFilePath.get());
if (S_ISLNK(fileinfo.st_mode))
{
{
char* pRealPath = null;
- AppLogTag(OSP_INSTALLER, "+ GetRealPath(): path=[%ls], realPath=[%ls]", filePath.GetPointer(), realPath.GetPointer());
+ AppLog("GetRealPath(): path=[%ls], realPath=[%ls]", filePath.GetPointer(), realPath.GetPointer());
std::unique_ptr<char[]> pFilePath(_StringConverter::CopyToCharArrayN(filePath));
- TryReturn(pFilePath, false, "[osp-installer] pFilePath is null");
+ TryReturn(pFilePath, false, "pFilePath is null");
char tmpPath[PATH_MAX] = {0};
pRealPath = realpath(pFilePath.get(), tmpPath);
- TryReturn(pRealPath, false, "[osp-installer] pRealPath is null");
+ TryReturn(pRealPath, false, "pRealPath is null");
realPath = tmpPath;
int err = -1;
bool res = false;
- AppLogTag(OSP_INSTALLER, "+ CreateSymlink(): oldPath=[%ls], newPath=[%ls]", oldPath.GetPointer(), newPath.GetPointer());
-
res = File::IsFileExist(oldPath);
- TryReturn(res == true, false, "[osp-installer] file not found, oldPath=[%ls]", oldPath.GetPointer());
+ if (res == false)
+ {
+ AppLog("CreateSymlink(): oldPath=[%ls] not found", oldPath.GetPointer());
+ return true;
+ }
std::unique_ptr<char[]> pOldPath(_StringConverter::CopyToCharArrayN(oldPath));
- TryReturn(pOldPath, false, "[osp-installer] pOldPath is null");
+ TryReturn(pOldPath, false, "pOldPath is null");
std::unique_ptr<char[]> pNewPath(_StringConverter::CopyToCharArrayN(newPath));
- TryReturn(pNewPath, false, "[osp-installer] pNewPath is null");
+ TryReturn(pNewPath, false, "pNewPath is null");
err = symlink(pOldPath.get(), pNewPath.get());
- TryReturn(err == 0, false, "[osp-installer] symlink() is failed(%s), oldpath=[%s], newpath=[%s]", strerror(errno), pOldPath.get(), pNewPath.get());
+ TryReturn(err == 0, false, "symlink() is failed(%s), oldpath=[%s], newpath=[%s]", strerror(errno), pOldPath.get(), pNewPath.get());
- AppLogTag(OSP_INSTALLER, "CreateSymlink(): [%ls] -> [%ls]", newPath.GetPointer(), oldPath.GetPointer());
+ AppLog("CreateSymlink(): [%ls] -> [%ls]", newPath.GetPointer(), oldPath.GetPointer());
return true;
}
int err = -1;
std::unique_ptr<char[]> pFilePath(_StringConverter::CopyToCharArrayN(filePath));
- TryReturn(pFilePath, false, "[osp-installer] pFilePath is null");
+ TryReturn(pFilePath, false, "pFilePath is null");
err = chmod(pFilePath.get(), mode);
- TryReturn(err == 0, false, "[osp-installer] chmod() is failed(%s), filepath=[%s], mode=[%o]", strerror(errno), pFilePath.get(), mode);
+ TryReturn(err == 0, false, "chmod() is failed(%s), filepath=[%s], mode=[%o]", strerror(errno), pFilePath.get(), mode);
return true;
}
int err = -1;
std::unique_ptr<char[]> pFilePath(_StringConverter::CopyToCharArrayN(filePath));
- TryReturn(pFilePath, false, "[osp-installer] pFilePath is null");
+ TryReturn(pFilePath, false, "pFilePath is null");
err = chown(pFilePath.get(), APP_OWNER_ID, APP_GROUP_ID);
- TryReturn(err == 0, false, "[osp-installer] chown() is failed(%s), filepath=[%s]", strerror(errno), pFilePath.get());
+ TryReturn(err == 0, false, "chown() is failed(%s), filepath=[%s]", strerror(errno), pFilePath.get());
return true;
}
result r = E_SUCCESS;
bool res = false;
- AppLogTag(OSP_INSTALLER, "+ ChangeDirectoryPermission(): path=[%ls], mode=[%04o], appOwner=[%s]",
- filePath.GetPointer(), mode, appOwner?"true":"false");
-
res = File::IsFileExist(filePath);
if (res == false)
{
- AppLogTag(OSP_INSTALLER, "ChangeDirectoryPermission(): path=[%ls]: skip", filePath.GetPointer());
+ AppLog("ChangeDirectoryPermission(): path=[%ls]: skip", filePath.GetPointer());
return true;
}
std::unique_ptr<Directory> pDir(new (std::nothrow) Directory);
- TryReturn(pDir, false, "[osp-installer] pDir is null.");
+ TryReturn(pDir, false, "pDir is null.");
r = pDir->Construct(filePath);
- TryReturn(!IsFailed(r), false, "[osp-installer] pDir->Construct() failed, filePath=[%ls]", filePath.GetPointer());
+ TryReturn(!IsFailed(r), false, "pDir->Construct() failed, filePath=[%ls]", filePath.GetPointer());
std::unique_ptr<DirEnumerator> pDirEnum(pDir->ReadN());
- TryReturn(pDirEnum, false, "[osp-installer] pDirEnum is null.");
+ TryReturn(pDirEnum, false, "pDirEnum is null.");
while (pDirEnum->MoveNext() == E_SUCCESS)
{
}
}
+ AppLog("ChangeDirectoryPermission(): path=[%ls], mode=[%04o], appOwner=[%s]",
+ filePath.GetPointer(), mode, appOwner?"true":"false");
+
return true;
}
bool
InstallerUtil::IsDrmFile(const Tizen::Base::String& path)
{
- bool res = true;
- char* pFilePath = null;
- result r = E_SUCCESS;
- int isDrm = 0;
+ bool res = true;
+ char* pFilePath = null;
+ result r = E_SUCCESS;
+ int isDrm = 0;
- pFilePath = _StringConverter::CopyToCharArrayN(path);
- TryCatch(pFilePath, r = GetLastResult(), "[osp-installer] pFilePath is null");
+ pFilePath = _StringConverter::CopyToCharArrayN(path);
+ TryCatch(pFilePath, r = GetLastResult(), "pFilePath is null");
- isDrm = drm_oem_intel_isDrmFile(pFilePath);
- if(isDrm == 1)
- {
- AppLogTag(OSP_INSTALLER, "IsDrmFile() called, packagePath=%ls is drm file", path.GetPointer());
- }
- else
- {
- res = false;
- AppLogTag(OSP_INSTALLER, "IsDrmFile() called, packagePath=%ls isn't drm file", path.GetPointer());
- }
+ isDrm = drm_oem_intel_isDrmFile(pFilePath);
+ if(isDrm == 1)
+ {
+ AppLog("IsDrmFile() called, packagePath=[%ls] is a drm file", path.GetPointer());
+ }
+ else
+ {
+ res = false;
+ }
- CATCH:
- delete [] pFilePath;
- return res;
+CATCH:
+ delete [] pFilePath;
+ return res;
}
bool
int result = 0;
pFilePath = _StringConverter::CopyToCharArrayN(packagePath);
- TryCatch(pFilePath, r = GetLastResult(), "[osp-installer] pFilePath is null");
+ TryCatch(pFilePath, r = GetLastResult(), "pFilePath is null");
result = drm_oem_intel_decrypt_package(pFilePath, pFilePath);
if(result == 1)
{
- AppLogTag(OSP_INSTALLER, "DecryptPackage() called, packagePath=%ls, decrpyt success", packagePath.GetPointer());
+ AppLog("DecryptPackage() called, packagePath=%ls, decrpyt success", packagePath.GetPointer());
}
else
{
- AppLogTag(OSP_INSTALLER, "DecryptPackage() called, packagePath=%ls, decrypt failed", packagePath.GetPointer());
+ AppLog("DecryptPackage() called, packagePath=%ls, decrypt failed", packagePath.GetPointer());
res = false;
}
{
String appId;
- AppLogTag(OSP_INSTALLER, "+ CreateSymlinkForAppDirectory(): path=[%ls]", inPath.GetPointer());
-
int length = inPath.GetLength();
inPath.SubString(length - APPID_LENGTH, APPID_LENGTH, appId);
}
outPath = newPath;
- AppLogTag(OSP_INSTALLER, "CreateSymlinkForAppDirectory(): output path=[%ls]", outPath.GetPointer());
+ AppLog("CreateSymlinkForAppDirectory(): output path=[%ls]", outPath.GetPointer());
return true;
}
InstallerUtil::DumpLog(const char* pBuf)
{
char temp[4096] = {0};
- TryReturn(pBuf, false, "[osp-installer] pBuf is null");
+ TryReturn(pBuf, false, "pBuf is null");
int bufLen = strlen(pBuf);
strncpy(temp, pBuf, sizeof(temp));
if (temp[i] == '\n')
{
temp[i] = 0;
- AppLogTag(OSP_INSTALLER, "%s", pStart);
+ AppLog("%s", pStart);
pStart = temp + i + 1;
}
}
// if (dataLen > 16*20)
// dataLen = 16*20;
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
while (i < (int)dataLen)
{
idx = 0;
idx2 = 0;
- AppLogTag(OSP_INSTALLER, "%s\n", buf_out);
+ AppLog("%s\n", buf_out);
}
i++;
memcpy(buf_out+idx2, buf, idx);
buf_out[idx2+idx] = '\0';
- AppLogTag(OSP_INSTALLER, "%s\n", buf_out);
+ AppLog("%s\n", buf_out);
}
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
return TRUE;
}
}
else
{
- AppLogTag(OSP_INSTALLER, "LogChangeHexToStr: Error! [Hex Val: %d]\n", hex);
+ AppLog("LogChangeHexToStr: Error! [Hex Val: %d]\n", hex);
}
return ch;
{
__pContext = pContext;
__pPackageInfoImpl = pContext->GetPackageInfoImpl();
- TryReturn(__pPackageInfoImpl, false, "[osp-installer] __pPackageInfoImpl is null.");
+ TryReturn(__pPackageInfoImpl, false, "__pPackageInfoImpl is null.");
__pWriter = new (std::nothrow) XmlWriter;
- TryReturn(__pWriter, false, "[osp-installer] __pWriter is null.");
+ TryReturn(__pWriter, false, "__pWriter is null.");
return true;
}
bool
ManifestGenerator::Write()
{
- //bool preload = false; //__pContext->IsPreloaded();
- String xmlPath;
- String package;
String location;
- //if (preload == true)
- //{
- // xmlPath.Format(1024, DIR_RO_PACKAGE_SYSTEM_MANIFEST, __pContext->GetId().GetPointer());
- // location = L"internal-only";
- //}
- //else
- //{
- xmlPath.Format(1024, DIR_RW_PACKAGE_SYSTEM_MANIFEST, __pContext->GetId().GetPointer());
- location = L"auto";
- //}
-
- package = __pContext->GetId();
+ if (__pContext->__isPreloaded == true)
+ {
+ location = L"internal-only";
+ }
+ else
+ {
+ location = L"auto";
+ }
- __pWriter->Construct(xmlPath);
+ __pWriter->Construct(__pContext->__coreXmlPath);
__pWriter->StartElement("manifest");
__pWriter->WriteAttribute("xmlns", "http://tizen.org/ns/packages");
- __pWriter->WriteAttribute("package", package);
+ __pWriter->WriteAttribute("package", __pContext->GetId());
__pWriter->WriteAttribute("type", "tpk");
__pWriter->WriteAttribute("version", __pPackageInfoImpl->GetVersion());
__pWriter->WriteAttribute("install-location", location);
__pWriter->WriteString(__pPackageInfoImpl->GetDescription());
__pWriter->EndElement();
- _PackageAppInfoImpl* pAppInfoImpl = null;
- ArrayList* pAppList = null;
- pAppList = __pPackageInfoImpl->GetAppInfoList();
+ ArrayList* pAppList = __pPackageInfoImpl->GetAppInfoList();
int appCount = pAppList->GetCount();
- AppLogTag(OSP_INSTALLER, "Write(): appCount=%d", appCount);
+ AppLog("Write(): appCount=%d", appCount);
for (int i = 0 ; i < appCount; i++)
{
- pAppInfoImpl = dynamic_cast<_PackageAppInfoImpl*>(pAppList->GetAt(i));
+ _PackageAppInfoImpl* pAppInfoImpl = dynamic_cast<_PackageAppInfoImpl*>(pAppList->GetAt(i));
if (pAppInfoImpl)
{
WriteApp(i, pAppInfoImpl);
if (__pContext->__isSubMode == true)
{
- AppLogTag(OSP_INSTALLER, "Write(): __pContext->__isSubMode is detected");
+ AppLog("Write(): __pContext->__isSubMode is detected");
WriteSubModeApp(appCount);
}
bool
ManifestGenerator::FindFeatureValue(ArrayList* pFeatureList, const String& feature, const String& value) const
{
- TryReturn(pFeatureList, false, "[osp-installer] pFeatureList is null.");
+ TryReturn(pFeatureList, false, "pFeatureList is null.");
_AppFeatureInfoImpl* pFeature = null;
{
if ((pFeature->GetName() == feature) && (pFeature->GetValue() == value))
{
- AppLogTag(OSP_INSTALLER, "Find - feature=[%ls], value=[%ls]", feature.GetPointer(), value.GetPointer());
+ AppLog("Find - feature=[%ls], value=[%ls]", feature.GetPointer(), value.GetPointer());
return true;
}
}
bool
ManifestGenerator::WriteLanguageValue(IMap* pList, const String& element) const
{
- TryReturn(pList, false, "[osp-installer] pNameList is null.");
+ TryReturn(pList, false, "pNameList is null.");
IMapEnumerator* pMapEnum = pList->GetMapEnumeratorN();
while (pMapEnum->MoveNext() == E_SUCCESS)
bool
ManifestGenerator::WriteLiveboxes(_PackageAppInfoImpl* pAppInfoImpl) const
{
- TryReturn(__pContext, false, "[osp-installer] __pContext is null.");
- TryReturn(__pWriter, false, "[osp-installer] __pWriter is null.");
+ TryReturn(__pContext, false, "__pContext is null.");
+ TryReturn(__pWriter, false, "__pWriter is null.");
ArrayList* pLiveboxDataList = __pContext->GetLiveboxDataList();
String label("label");
LiveboxData* pLiveboxData = dynamic_cast<LiveboxData*>(pLiveboxDataList->GetAt(j));
if (pLiveboxData == null)
{
- AppLogTag(OSP_INSTALLER, "pLiveboxData is null [%d]", j);
+ AppLog("pLiveboxData is null [%d]", j);
continue;
}
String* pSize = dynamic_cast<String*>(pSizeList->GetAt(k));
if (pSize == null)
{
- AppLogTag(OSP_INSTALLER, "pSize is null [%d]", k);
+ AppLog("pSize is null [%d]", k);
continue;
}
bool
ManifestGenerator::WriteAppControl(_PackageAppInfoImpl* pAppInfoImpl) const
{
- TryReturn(pAppInfoImpl, false, "[osp-installer] pAppInfoImpl is null.");
+ TryReturn(pAppInfoImpl, false, "pAppInfoImpl is null.");
ArrayList* pAppControlImplList = pAppInfoImpl->GetAppControlList();
- TryReturn(pAppControlImplList, false, "[osp-installer] pAppControlImplList is null.");
+ TryReturn(pAppControlImplList, false, "pAppControlImplList is null.");
_AppControlInfoImpl* pAppControl = dynamic_cast<_AppControlInfoImpl*>(pAppControlImplList->GetAt(0));
- TryReturn(pAppControl, false, "[osp-installer] pAppControl is null.");
+ TryReturn(pAppControl, false, "pAppControl is null.");
ArrayList* pCapabilityList = pAppControl->GetCapabilityList();
- TryReturn(pCapabilityList, false, "[osp-installer] pCapabilityList is null.");
+ TryReturn(pCapabilityList, false, "pCapabilityList is null.");
int capaCount = pCapabilityList->GetCount();
for (int capaIndex = 0 ; capaIndex < capaCount; capaIndex++)
ManifestGenerator::WriteCategory(int index) const
{
IListT<AppData*>* pAppDataList = __pContext->__pAppDataList;
- TryReturn(pAppDataList, true, "[osp-installer] pAppDataList is null");
+ TryReturn(pAppDataList, true, "pAppDataList is null");
AppData* pAppData = null;
pAppDataList->GetAt(index, pAppData);
- TryReturn(pAppData, true, "[osp-installer] pAppData is null");
+ TryReturn(pAppData, true, "pAppData is null");
IListT<String*>* pCategoryList = pAppData->__pCategoryList;
- TryReturn(pCategoryList, true, "[osp-installer] pCategoryList is null");
+ TryReturn(pCategoryList, true, "pCategoryList is null");
for (int i = 0; i < pCategoryList->GetCount(); i++)
{
String *pStr = null;
pCategoryList->GetAt(i, pStr);
- TryReturn(pStr, false, "[osp-installer] pStr is null");
+ TryReturn(pStr, false, "pStr is null");
- AppLogTag(OSP_INSTALLER, "WriteCategory(): Category String=[%ls]", pStr->GetPointer());
+ AppLog("WriteCategory(): Category String=[%ls]", pStr->GetPointer());
__pWriter->StartElement("category");
__pWriter->WriteAttribute("name", *pStr);
result r = E_SUCCESS;
IListT<AppData*>* pAppDataList = __pContext->__pAppDataList;
- TryReturn(pAppDataList, false, "[osp-installer] pAppDataList is null");
+ TryReturn(pAppDataList, false, "pAppDataList is null");
AppData* pAppData = null;
r = pAppDataList->GetAt(index, pAppData);
- TryReturn(pAppData, false, "[osp-installer] pAppData is null");
+ TryReturn(pAppData, false, "pAppData is null");
IListT<String*>* pCategoryList = pAppData->__pCategoryList;
- TryReturn(pCategoryList, false, "[osp-installer] pCategoryList is null");
+ TryReturn(pCategoryList, false, "pCategoryList is null");
for (int i = 0; i < pCategoryList->GetCount(); i++)
{
String *pStr = null;
pCategoryList->GetAt(i, pStr);
- TryReturn(pStr, false, "[osp-installer] pStr is null");
+ TryReturn(pStr, false, "pStr is null");
if (*pStr == category)
{
- AppLogTag(OSP_INSTALLER, "FindCategory(): Category is found=[%ls]", pStr->GetPointer());
+ AppLog("FindCategory(): Category is found=[%ls]", pStr->GetPointer());
return true;
}
pCategory = TIZEN_CATEGORY_IME;
if (FindCategory(index, pCategory) == true)
{
- AppLogTag(OSP_INSTALLER, "Write(): [%s] is detected. taskmanage=false, nodisplay=true", pCategory);
+ AppLog("Write(): [%s] is detected. taskmanage=false, nodisplay=true", pCategory);
taskmanage = L"false";
nodisplay = L"true";
}
pCategory = TIZEN_CATEGORY_HOMESCREEN;
if (FindCategory(index, pCategory) == true)
{
- AppLogTag(OSP_INSTALLER, "Write(): [%s] is detected. taskmanage=false", pCategory);
+ AppLog("Write(): [%s] is detected. taskmanage=false", pCategory);
taskmanage = L"false";
}
pCategory = TIZEN_CATEGORY_LOCKSCREEN;
if (FindCategory(index, pCategory) == true)
{
- AppLogTag(OSP_INSTALLER, "Write(): [%s] is detected. taskmanage=false", pCategory);
+ AppLog("Write(): [%s] is detected. taskmanage=false", pCategory);
taskmanage = L"false";
}
pCategory = TIZEN_CATEGORY_MENUSCREEN;
if (FindCategory(index, pCategory) == true)
{
- AppLogTag(OSP_INSTALLER, "Write(): [%s] is detected. taskmanage=false", pCategory);
+ AppLog("Write(): [%s] is detected. taskmanage=false", pCategory);
taskmanage = L"false";
}
}
}
else
{
- AppLogTag(OSP_INSTALLER, "Type is invalid! [%ls]", pAppInfoImpl->GetType().GetPointer());
+ AppLog("Type is invalid! [%ls]", pAppInfoImpl->GetType().GetPointer());
return false;
}
#endif
}
IListT<AppData*>* pAppDataList = __pContext->__pAppDataList;
- TryReturn(pAppDataList, false, "[osp-installer] pAppDataList is null");
+ TryReturn(pAppDataList, false, "pAppDataList is null");
AppData* pAppData = null;
pAppDataList->GetAt(index, pAppData);
- TryReturn(pAppData, false, "[osp-installer] pAppData is null");
+ TryReturn(pAppData, false, "pAppData is null");
if (pAppData->__legacyAppControls == true)
{
- AppLogTag(OSP_INSTALLER, "Write(): AppControls spec is legacy");
+ AppLog("Write(): AppControls spec is legacy");
WriteAppControl(pAppInfoImpl);
}
else
InstallerUtil::CreateSymlink(binaryExecPath, subBinaryExecPath);
IListT<AppData*>* pAppDataList = __pContext->__pAppDataList;
- TryReturn(pAppDataList, false, "[osp-installer] pAppDataList is null");
+ TryReturn(pAppDataList, false, "pAppDataList is null");
- AppLogTag(OSP_INSTALLER, "WriteSubModeApp(): appCount=%d", pAppDataList->GetCount());
+ AppLog("WriteSubModeApp(): appCount=%d", pAppDataList->GetCount());
AppData* pAppData = null;
pAppDataList->GetAt(index, pAppData);
- TryReturn(pAppData, false, "[osp-installer] pAppData is null");
+ TryReturn(pAppData, false, "pAppData is null");
PackageId packageId = __pContext->GetId();
AppId appId = packageId + L"." + SUB_MODE_APPCONTROL_NAME;
ManifestGenerator::WriteAppControl(int index)
{
IListT<AppData*>* pAppDataList = __pContext->__pAppDataList;
- TryReturn(pAppDataList, false, "[osp-installer] pAppDataList is null");
+ TryReturn(pAppDataList, false, "pAppDataList is null");
AppData* pAppData = null;
pAppDataList->GetAt(index, pAppData);
- TryReturn(pAppData, false, "[osp-installer] pAppData is null");
+ TryReturn(pAppData, false, "pAppData is null");
IListT<AppControlData*>* pAppControlDataList = pAppData->__pAppControlDataList;
- TryReturn(pAppControlDataList, false, "[osp-installer] pAppControlDataList is null");
+ TryReturn(pAppControlDataList, false, "pAppControlDataList is null");
for (int i = 0; i < pAppControlDataList->GetCount(); i++)
{
AppControlData* pAppControlData = null;
pAppControlDataList->GetAt(i, pAppControlData);
- TryReturn(pAppControlData, false, "[osp-installer] pAppControlData is null");
+ TryReturn(pAppControlData, false, "pAppControlData is null");
IListT<String*>* pOperationList = pAppControlData->__pOperationList;
- TryReturn(pOperationList, false, "[osp-installer] pOperationList is null");
+ TryReturn(pOperationList, false, "pOperationList is null");
for (int sub = 0; sub < pOperationList->GetCount(); sub++)
{
String* pOperation = null;
pOperationList->GetAt(sub, pOperation);
- TryReturn(pOperation, false, "[osp-installer] pOperation is null");
+ TryReturn(pOperation, false, "pOperation is null");
__pWriter->StartElement("operation");
__pWriter->WriteAttribute("name", *pOperation);
}
IListT<String*>* pMimeTypeList = pAppControlData->__pMimeTypeList;
- TryReturn(pMimeTypeList, false, "[osp-installer] pMimeTypeList is null");
+ TryReturn(pMimeTypeList, false, "pMimeTypeList is null");
for (int sub = 0; sub < pMimeTypeList->GetCount(); sub++)
{
String* pMimeType = null;
pMimeTypeList->GetAt(sub, pMimeType);
- TryReturn(pMimeType, false, "[osp-installer] pMimeType is null");
+ TryReturn(pMimeType, false, "pMimeType is null");
if (pMimeType->IsEmpty() == true) continue;
}
IListT<String*>* pUriList = pAppControlData->__pUriList;
- TryReturn(pUriList, false, "[osp-installer] pUriList is null");
+ TryReturn(pUriList, false, "pUriList is null");
for (int sub = 0; sub < pUriList->GetCount(); sub++)
{
String* pUri = null;
pUriList->GetAt(sub, pUri);
- TryReturn(pUri, false, "[osp-installer] pUri is null");
+ TryReturn(pUri, false, "pUri is null");
if (pUri->IsEmpty() == true) continue;
ManifestGenerator::WriteAccounts(int index)
{
IListT<AppData*>* pAppDataList = __pContext->__pAppDataList;
- TryReturn(pAppDataList, false, "[osp-installer] pAppDataList is null");
+ TryReturn(pAppDataList, false, "pAppDataList is null");
AppData* pAppData = null;
pAppDataList->GetAt(index, pAppData);
- TryReturn(pAppData, false, "[osp-installer] pAppData is null");
+ TryReturn(pAppData, false, "pAppData is null");
IListT<AccountData*>* pAccountDataList = pAppData->__pAccountDataList;
- TryReturn(pAccountDataList, false, "[osp-installer] pAccountDataList is null");
+ TryReturn(pAccountDataList, false, "pAccountDataList is null");
int accountCount = pAccountDataList->GetCount();
if (accountCount == 0)
AccountData* pAccountData = null;
pAccountDataList->GetAt(i, pAccountData);
- TryReturn(pAccountData, false, "[osp-installer] pAccountData is null");
+ TryReturn(pAccountData, false, "pAccountData is null");
String multipleAccountsSupport = pAccountData->__multipleAccountsSupport;
multipleAccountsSupport.ToLowerCase();
bool
ManifestHandler::OnStartElement(const char *pName)
{
- TryReturn(pName, true, "[osp-installer] pName is null.");
+ TryReturn(pName, true, "pName is null.");
bool status = true;
if (__isParserMode == true)
{
- TryReturn(__pParser, false, "[osp-installer] __pParser is null");
+ TryReturn(__pParser, false, "__pParser is null");
return __pParser->OnStartElement(pName);
}
if (strcasecmp(pName, "Manifest") == 0)
{
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "manifest.xml");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "<%s>", pName);
+ AppLog("------------------------------------------");
+ AppLog("manifest.xml");
+ AppLog("------------------------------------------");
+ AppLog("<%s>", pName);
}
else if (strcasecmp(pName, "Apps") == 0)
{
- AppLogTag(OSP_INSTALLER, "<%s>", pName);
+ AppLog("<%s>", pName);
}
else if (strcasecmp(pName, "UiApp") == 0)
{
bool
ManifestHandler::OnEndElement(const char *pName)
{
- TryReturn(pName, true, "[osp-installer] pName is null.");
+ TryReturn(pName, true, "pName is null.");
bool status = true;
if (__isParserMode == true)
{
- TryReturn(__pParser, false, "[osp-installer] __pParser is null");
+ TryReturn(__pParser, false, "__pParser is null");
__pParser->OnEndElement(pName);
if (strcasecmp(pName, "Liveboxes") == 0)
}
else if (strcasecmp(pName, "UiScalability") == 0)
{
- AppLogTag(OSP_INSTALLER, "</%s>", pName);
+ AppLog("</%s>", pName);
}
else if (strcasecmp(pName, "Icons") == 0)
{
if (__isParserMode == true)
{
- TryReturn(__pParser, false, "[osp-installer] __pParser is null");
+ TryReturn(__pParser, false, "__pParser is null");
return __pParser->OnCharacters(pCharacters);
}
char *pName = GetElementName();
- TryReturn(pName, false, "[osp-installer] pName is null.");
+ TryReturn(pName, false, "pName is null.");
if (strcasecmp(pName, "Id") == 0)
{
ManifestHandler::OnPrivilegesStartElement(void)
{
__pPrivilegeList = new (std::nothrow) ArrayList;
- TryReturn(__pPrivilegeList, false, "[osp-installer] __pPrivilegeList is null");
+ TryReturn(__pPrivilegeList, false, "__pPrivilegeList is null");
- AppLogTag(OSP_INSTALLER, "<Privileges>");
+ AppLog("<Privileges>");
return true;
}
ManifestHandler::OnUiAppStartElement(void)
{
__pPackageAppInfoImpl = new (std::nothrow) _PackageAppInfoImpl;
- TryReturn(__pPackageAppInfoImpl, false, "[osp-installer] __pPackageAppInfoImpl is null");
+ TryReturn(__pPackageAppInfoImpl, false, "__pPackageAppInfoImpl is null");
__pAppData = new (std::nothrow) AppData;
- TryReturn(__pAppData, false, "[osp-installer] __pAppData is null");
+ TryReturn(__pAppData, false, "__pAppData is null");
- AppLogTag(OSP_INSTALLER, "<UiApp>");
+ AppLog("<UiApp>");
XmlAttribute *pAttr = GetAttribute();
- TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+ TryReturn(pAttr, true, "pAttr is null");
ParseAppAttribute(pAttr, true);
ManifestHandler::OnServiceAppStartElement(void)
{
__pPackageAppInfoImpl = new (std::nothrow) _PackageAppInfoImpl;
- TryReturn(__pPackageAppInfoImpl, false, "[osp-installer] __pPackageAppInfoImpl is null");
+ TryReturn(__pPackageAppInfoImpl, false, "__pPackageAppInfoImpl is null");
__pAppData = new (std::nothrow) AppData;
- TryReturn(__pAppData, false, "[osp-installer] __pAppData is null");
+ TryReturn(__pAppData, false, "__pAppData is null");
- AppLogTag(OSP_INSTALLER, "<ServiceApp>");
+ AppLog("<ServiceApp>");
XmlAttribute *pAttr = GetAttribute();
TryReturn(pAttr, true, "pAttr is null");
int width = 0;
String defaultIconType;
- AppLogTag(OSP_INSTALLER, "<Icons>");
+ AppLog("<Icons>");
r = _SystemInfoImpl::GetSysInfo(L"ScreenWidth", width);
if (IsFailed(r))
}
}
- AppLogTag(OSP_INSTALLER, "ScreenWidth = [%d]", width);
+ AppLog("ScreenWidth = [%d]", width);
__pDefaultIconType = _StringConverter::CopyToCharArrayN(defaultIconType);
- TryReturn(__pDefaultIconType, false, "[osp-installer] __pDefaultIconType is null.");
+ TryReturn(__pDefaultIconType, false, "__pDefaultIconType is null.");
- AppLogTag(OSP_INSTALLER, "DefaultIconType = [%s]", __pDefaultIconType);
+ AppLog("DefaultIconType = [%s]", __pDefaultIconType);
return true;
}
char *pBaseScreenSize = null;
char *pLogicalCoordinate = null;
- AppLogTag(OSP_INSTALLER, "<UiScalability>");
+ AppLog("<UiScalability>");
pAttr = GetAttribute();
- TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+ TryReturn(pAttr, true, "pAttr is null");
pCoordinateSystem = pAttr->Find("CoordinateSystem");
if (pCoordinateSystem)
{
_AppFeatureInfoImpl* pAppFeatureInfo = new (std::nothrow) _AppFeatureInfoImpl;
- TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
+ TryReturn(pAppFeatureInfo, false, "pAppFeatureInfo is null");
pAppFeatureInfo->SetName("CoordinateSystem");
pAppFeatureInfo->SetValue(pCoordinateSystem);
__pPackageAppInfoImpl->AddAppFeature(*pAppFeatureInfo);
- AppLogTag(OSP_INSTALLER, "<CoordinateSystem=%s>", pCoordinateSystem);
+ AppLog("<CoordinateSystem=%s>", pCoordinateSystem);
}
pBaseScreenSize = pAttr->Find("BaseScreenSize");
if (pBaseScreenSize)
{
_AppFeatureInfoImpl* pAppFeatureInfo = new (std::nothrow) _AppFeatureInfoImpl;
- TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
+ TryReturn(pAppFeatureInfo, false, "pAppFeatureInfo is null");
pAppFeatureInfo->SetName("BaseScreenSize");
pAppFeatureInfo->SetValue(pBaseScreenSize);
__pPackageAppInfoImpl->AddAppFeature(*pAppFeatureInfo);
- AppLogTag(OSP_INSTALLER, "<BaseScreenSize=%s>", pBaseScreenSize);
+ AppLog("<BaseScreenSize=%s>", pBaseScreenSize);
}
pLogicalCoordinate = pAttr->Find("LogicalCoordinate");
if (pLogicalCoordinate)
{
_AppFeatureInfoImpl* pAppFeatureInfo = new (std::nothrow) _AppFeatureInfoImpl;
- TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
+ TryReturn(pAppFeatureInfo, false, "pAppFeatureInfo is null");
pAppFeatureInfo->SetName("LogicalCoordinate");
pAppFeatureInfo->SetValue(pLogicalCoordinate);
__pPackageAppInfoImpl->AddAppFeature(*pAppFeatureInfo);
- AppLogTag(OSP_INSTALLER, "<LogicalCoordinate=%s>", pLogicalCoordinate);
+ AppLog("<LogicalCoordinate=%s>", pLogicalCoordinate);
}
return true;
char *pSystemTheme = null;
char *pUserDefinedTheme = null;
- AppLogTag(OSP_INSTALLER, "<UiTheme>");
+ AppLog("<UiTheme>");
pAttr = GetAttribute();
- TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+ TryReturn(pAttr, true, "pAttr is null");
pSystemTheme = pAttr->Find("SystemTheme");
if (pSystemTheme)
{
_AppFeatureInfoImpl* pAppFeatureInfo = new (std::nothrow) _AppFeatureInfoImpl;
- TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
+ TryReturn(pAppFeatureInfo, false, "pAppFeatureInfo is null");
pAppFeatureInfo->SetName("SystemTheme");
pAppFeatureInfo->SetValue(pSystemTheme);
__pPackageAppInfoImpl->AddAppFeature(*pAppFeatureInfo);
- AppLogTag(OSP_INSTALLER, "<SystemTheme=%s>", pSystemTheme);
+ AppLog("<SystemTheme=%s>", pSystemTheme);
}
pUserDefinedTheme = pAttr->Find("UserDefinedTheme");
if (pUserDefinedTheme)
{
_AppFeatureInfoImpl* pAppFeatureInfo = new (std::nothrow) _AppFeatureInfoImpl;
- TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
+ TryReturn(pAppFeatureInfo, false, "pAppFeatureInfo is null");
pAppFeatureInfo->SetName("UserDefinedTheme");
pAppFeatureInfo->SetValue(pUserDefinedTheme);
__pPackageAppInfoImpl->AddAppFeature(*pAppFeatureInfo);
- AppLogTag(OSP_INSTALLER, "<UserDefinedTheme=%s>", pUserDefinedTheme);
+ AppLog("<UserDefinedTheme=%s>", pUserDefinedTheme);
}
return true;
char *pProviderId = null;
pAttr = GetAttribute();
- TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+ TryReturn(pAttr, true, "pAttr is null");
pProviderId = pAttr->Find("ProviderId");
- TryReturn(pProviderId, true, "[osp-installer] pProviderId is null");
+ TryReturn(pProviderId, true, "pProviderId is null");
__pDataControlInfoImpl = new (std::nothrow) _DataControlInfoImpl;
- TryReturn(__pDataControlInfoImpl, false, "[osp-installer] __pDataControlInfoImpl is null");
+ TryReturn(__pDataControlInfoImpl, false, "__pDataControlInfoImpl is null");
__pDataControlInfoImpl->SetProviderId(pProviderId);
- AppLogTag(OSP_INSTALLER, "<DataControl ProviderId=\"%s\">", pProviderId);
+ AppLog("<DataControl ProviderId=\"%s\">", pProviderId);
return true;
}
ManifestHandler::OnContentsStartElement(void)
{
__pContentDataList = new (std::nothrow) ArrayList;
- TryReturn(__pContentDataList, false, "[osp-installer] __pContentDataList is null");
+ TryReturn(__pContentDataList, false, "__pContentDataList is null");
- AppLogTag(OSP_INSTALLER, "<Contents>");
+ AppLog("<Contents>");
return true;
}
bool
ManifestHandler::OnContentStartElement(void)
{
- TryReturn(__pContentData == null, false, "[osp-installer] __pContentData is not null");
+ TryReturn(__pContentData == null, false, "__pContentData is not null");
XmlAttribute *pAttr = null;
char *pDefault = null;
__pContentData = new (std::nothrow) ContentData;
- TryReturn(__pContentData, false, "[osp-installer] __pContentData is null");
+ TryReturn(__pContentData, false, "__pContentData is null");
pAttr = GetAttribute();
- TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+ TryReturn(pAttr, true, "pAttr is null");
char* pId = pAttr->Find("Id");
if (pId)
}
}
- AppLogTag(OSP_INSTALLER, "<Content Id=\"%s\" EntryName=\"%s\">", pId, pEntryName);
+ AppLog("<Content Id=\"%s\" EntryName=\"%s\">", pId, pEntryName);
return true;
}
ManifestHandler::OnLiveboxesStartElement(const char *pName)
{
__pParser = new (std::nothrow) ManifestLiveboxesParser;
- TryReturn(__pParser, false, "[osp-installer] __pParser is null");
+ TryReturn(__pParser, false, "__pParser is null");
__isParserMode = true;
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
__pParser->Construct(this);
return __pParser->OnStartElement(pName);
ManifestHandler::OnAccountsStartElement(const char *pName)
{
__pParser = new (std::nothrow) ManifestAccountsParser;
- TryReturn(__pParser, false, "[osp-installer] __pParser is null");
+ TryReturn(__pParser, false, "__pParser is null");
__isParserMode = true;
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
__pParser->Construct(this);
return __pParser->OnStartElement(pName);
ManifestHandler::OnAppControlsStartElement(const char *pName)
{
__pParser = new (std::nothrow) ManifestAppControlsParser;
- TryReturn(__pParser, false, "[osp-installer] __pParser is null");
+ TryReturn(__pParser, false, "__pParser is null");
__isParserMode = true;
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
__pParser->Construct(this);
return __pParser->OnStartElement(pName);
bool
ManifestHandler::OnPrivilegesEndElement(void)
{
- if (__pContext->IsVerificationMode() == false)
+ if (__pContext->__isVerificationMode == false)
{
- AppLogTag(OSP_INSTALLER, "no signature file[%ls]", __pContext->GetSignatureXmlPath().GetPointer());
+ AppLog("no signature file[%ls]", __pContext->GetSignatureXmlPath().GetPointer());
result r = E_SUCCESS;
String privileges;
String hmacPrivileges;
String appId = __pPackageInfoImpl->GetId();
r = PrivilegeHandler::GenerateCipherPrivilege(appId, *__pPrivilegeList, privileges, hmacPrivileges);
- TryReturn(!IsFailed(r), false, "[osp-installer] privMgr.GeneratePrivilegeString() failed");
+ TryReturn(!IsFailed(r), false, "privMgr.GeneratePrivilegeString() failed");
__pPackageInfoImpl->SetPrivilegesValue(privileges, hmacPrivileges);
}
__pContext->SetPrivilegeList(__pPrivilegeList);
- AppLogTag(OSP_INSTALLER, "</Privileges>");
+ AppLog("</Privileges>");
return true;
}
__pContext->__pAppDataList->Add(__pAppData);
__pAppData = null;
- AppLogTag(OSP_INSTALLER, "</UiApp>");
+ AppLog("</UiApp>");
return true;
}
__pContext->__pAppDataList->Add(__pAppData);
__pAppData = null;
- AppLogTag(OSP_INSTALLER, "</ServiceApp>");
+ AppLog("</ServiceApp>");
return true;
}
if (__pContext->__isSubMode == true)
{
__pAppData = new (std::nothrow) AppData;
- TryReturn(__pAppData, false, "[osp-installer] __pAppData is null");
+ TryReturn(__pAppData, false, "__pAppData is null");
__pAppData->__pAppControlDataList = __pSubModeAppControlDataList;
__pSubModeAppControlDataList = null;
__pContext->__pAppDataList->Add(__pAppData);
}
- AppLogTag(OSP_INSTALLER, "</Apps>");
+ AppLog("</Apps>");
return true;
}
bool
ManifestHandler::OnIconsEndElement(void)
{
- AppLogTag(OSP_INSTALLER, "</Icons>");
+ AppLog("</Icons>");
return true;
}
{
__pPackageAppInfoImpl->AddDataControl(__pDataControlInfoImpl);
__pDataControlInfoImpl = null;
- AppLogTag(OSP_INSTALLER, "</DataControl>");
+ AppLog("</DataControl>");
return true;
}
{
__pDataControlInfoImpl->AddControlType(__pDataControlTypeImpl);
__pDataControlTypeImpl = null;
- AppLogTag(OSP_INSTALLER, "</DataControlType>");
+ AppLog("</DataControlType>");
return true;
}
{
__pPackageAppInfoImpl->AddLaunchCondition(*__pLaunchConditionImpl);
__pLaunchConditionImpl = null;
- AppLogTag(OSP_INSTALLER, "</Condition>");
+ AppLog("</Condition>");
return true;
}
{
__pPackageAppInfoImpl->AddNotification(*__pNotificationImpl);
__pNotificationImpl = null;
- AppLogTag(OSP_INSTALLER, "</Notification>");
+ AppLog("</Notification>");
return true;
}
{
__pContext->SetContentDataList(__pContentDataList);
__pContentDataList = null;
- AppLogTag(OSP_INSTALLER, "</Contents>");
+ AppLog("</Contents>");
return true;
}
{
__pContentDataList->Add(*__pContentData);
__pContentData = null;
- AppLogTag(OSP_INSTALLER, "</Content>");
+ AppLog("</Content>");
return true;
}
{
delete __pParser;
__isParserMode = false;
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
return true;
}
{
delete __pParser;
__isParserMode = false;
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
return true;
}
{
delete __pParser;
__isParserMode = false;
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
return true;
}
ManifestHandler::OnManifestEndElement(void)
{
TryReturn(__isDefaultAppDetected, false, "[osp-installer][Error] Main tag is not detected...");
- AppLogTag(OSP_INSTALLER, "</Manifest>");
+ AppLog("</Manifest>");
return true;
}
bool
ManifestHandler::OnIdValue(const char *pCharacters)
{
- AppLogTag(OSP_INSTALLER, "<Id>%s</Id>", pCharacters);
+ AppLog("<Id>%s</Id>", pCharacters);
__pPackageInfoImpl->SetId(pCharacters);
return true;
bool
ManifestHandler::OnVersionValue(const char *pCharacters)
{
- AppLogTag(OSP_INSTALLER, "<Version>%s</Version>", pCharacters);
+ AppLog("<Version>%s</Version>", pCharacters);
__pPackageInfoImpl->SetVersion(pCharacters);
return true;
bool
ManifestHandler::OnTypeValue(const char *pCharacters)
{
- AppLogTag(OSP_INSTALLER, "<Type>%s</Type>", pCharacters);
+ AppLog("<Type>%s</Type>", pCharacters);
//__pPackageInfoImpl->SetAppType(pCharacters);
if (strcasecmp(pCharacters, "Contents") == 0)
// char *pAttrValue = 0;
//
// pAttr = GetAttribute();
-// TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+// TryReturn(pAttr, true, "pAttr is null");
//
// pAttrValue = pAttr->Find("Locale");
-// TryReturn(pAttrValue, true, "[osp-installer] pAttrValue is null");
+// TryReturn(pAttrValue, true, "pAttrValue is null");
//
// if (strcasecmp(pAttrValue, "eng-GB") == 0 || strcasecmp(pAttrValue, "eng-US") == 0)
// {
// __pPackageInfoImpl->SetAppVendor(pCharacters);
// }
- AppLogTag(OSP_INSTALLER, "<Author>%s</Author>", pCharacters);
+ AppLog("<Author>%s</Author>", pCharacters);
__pPackageInfoImpl->SetAuthor(pCharacters);
return true;
ManifestHandler::OnUrlValue(const char *pCharacters)
{
__pPackageInfoImpl->SetUrl(pCharacters);
- AppLogTag(OSP_INSTALLER, "<Url>%s</Url>", pCharacters);
+ AppLog("<Url>%s</Url>", pCharacters);
return true;
}
ManifestHandler::OnApiVersionValue(const char *pCharacters)
{
__pPackageInfoImpl->SetAppApiVersion(pCharacters);
- AppLogTag(OSP_INSTALLER, "<ApiVersion>%s</ApiVersion>", pCharacters);
+ AppLog("<ApiVersion>%s</ApiVersion>", pCharacters);
XmlAttribute *pAttr = GetAttribute();
if (pAttr)
char* pOspCompat = pAttr->Find("OspCompat");
if (pOspCompat)
{
- AppLogTag(OSP_INSTALLER, " - OspCompat=%s", pOspCompat);
+ AppLog(" - OspCompat=%s", pOspCompat);
__pContext->__isOspCompat = true;
}
}
ManifestHandler::OnPrivilegeValue(const char *pCharacters)
{
__pPrivilegeList->Add(*new (std::nothrow) String(pCharacters));
- AppLogTag(OSP_INSTALLER, "<Privilege>%s</Privilege>", pCharacters);
+ AppLog("<Privilege>%s</Privilege>", pCharacters);
return true;
}
char *pTypeValue = 0;
pAttr = GetAttribute();
- TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+ TryReturn(pAttr, true, "pAttr is null");
pAttrValue1 = pAttr->Find("Section");
- TryReturn(pAttrValue1, true, "[osp-installer] pAttrValue1 is null");
+ TryReturn(pAttrValue1, true, "pAttrValue1 is null");
pTypeValue = pAttr->Find("Type");
- TryReturn(pTypeValue, true, "[osp-installer] pTypeValue is null");
+ TryReturn(pTypeValue, true, "pTypeValue is null");
char icon[1024] = {0,};
}
else
{
- AppLogTag(OSP_INSTALLER, "Invalid Type [%s]", __pDefaultIconType);
+ AppLog("Invalid Type [%s]", __pDefaultIconType);
return false;
}
if (FindElement("Content") == true)
{
- TryReturn(__pContentData, false, "[osp-installer] __pContentData is null");
+ TryReturn(__pContentData, false, "__pContentData is null");
__pContentData->SetIcon(icon);
}
else
}
}
- AppLogTag(OSP_INSTALLER, "<Icon Section=\"%s\" Type=\"%s\">%s</Icon>", pAttrValue1, pTypeValue, pCharacters);
+ AppLog("<Icon Section=\"%s\" Type=\"%s\">%s</Icon>", pAttrValue1, pTypeValue, pCharacters);
return true;
}
char* pAttrValue = 0;
pAttr = GetAttribute();
- TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+ TryReturn(pAttr, true, "pAttr is null");
pAttrValue = pAttr->Find("Locale");
- TryReturn(pAttrValue, true, "[osp-installer] pAttrValue is null");
+ TryReturn(pAttrValue, true, "pAttrValue is null");
if (FindElement("Content") == true)
{
- TryReturn(__pContentData, false, "[osp-installer] __pContentData is null");
+ TryReturn(__pContentData, false, "__pContentData is null");
String* pValue = new (std::nothrow) String;
StringUtil::Utf8ToString(pCharacters, *pValue);
}
}
- AppLogTag(OSP_INSTALLER, "<DisplayName Locale=\"%s\">%s</DisplayName>", pAttrValue, pCharacters);
+ AppLog("<DisplayName Locale=\"%s\">%s</DisplayName>", pAttrValue, pCharacters);
return true;
}
char *pAttrValue = 0;
pAttr = GetAttribute();
- TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+ TryReturn(pAttr, true, "pAttr is null");
pAttrValue = pAttr->Find("Locale");
- TryReturn(pAttrValue, true, "[osp-installer] pAttrValue is null");
+ TryReturn(pAttrValue, true, "pAttrValue is null");
if (strcasecmp(pAttrValue, "eng-GB") == 0 || strcasecmp(pAttrValue, "eng-US") == 0)
{
__pPackageInfoImpl->SetDescription(pCharacters);
}
- AppLogTag(OSP_INSTALLER, "<Description Locale=\"%s\">%s</Description>", pAttrValue, pCharacters);
+ AppLog("<Description Locale=\"%s\">%s</Description>", pAttrValue, pCharacters);
return true;
}
char *pAccessValue = null;
pAttr = GetAttribute();
- TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+ TryReturn(pAttr, true, "pAttr is null");
pAccessValue = pAttr->Find("Access");
- TryReturn(pAccessValue, true, "[osp-installer] pAccessValue is null");
+ TryReturn(pAccessValue, true, "pAccessValue is null");
__pDataControlTypeImpl = new (std::nothrow) _DataControlTypeImpl;
- TryReturn(__pDataControlTypeImpl, false, "[osp-installer] __pDataControlTypeImpl is null");
+ TryReturn(__pDataControlTypeImpl, false, "__pDataControlTypeImpl is null");
__pDataControlTypeImpl->SetType(pCharacters);
__pDataControlTypeImpl->SetAccess(pAccessValue);
- AppLogTag(OSP_INSTALLER, "<DataControlType Access=\"%s\", Type=\"%s\">", pAccessValue, pCharacters);
+ AppLog("<DataControlType Access=\"%s\", Type=\"%s\">", pAccessValue, pCharacters);
return true;
}
char *pName = null;
pAttr = GetAttribute();
- TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+ TryReturn(pAttr, true, "pAttr is null");
pName = pAttr->Find("Name");
- TryReturn(pName, true, "[osp-installer] pName is null");
+ TryReturn(pName, true, "pName is null");
__pLaunchConditionImpl = new (std::nothrow) _LaunchConditionInfoImpl;
- TryReturn(__pLaunchConditionImpl, false, "[osp-installer] __pLaunchConditionImpl is null");
+ TryReturn(__pLaunchConditionImpl, false, "__pLaunchConditionImpl is null");
__pLaunchConditionImpl->SetName(pName);
__pLaunchConditionImpl->SetValue(pCharacters);
- AppLogTag(OSP_INSTALLER, "<LaunchCondition Name=\"%s\", Value=\"%s\">", pName, pCharacters);
+ AppLog("<LaunchCondition Name=\"%s\", Value=\"%s\">", pName, pCharacters);
return true;
}
char *pName = null;
pAttr = GetAttribute();
- TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+ TryReturn(pAttr, true, "pAttr is null");
pName = pAttr->Find("Name");
- TryReturn(pName, true, "[osp-installer] pName is null");
+ TryReturn(pName, true, "pName is null");
__pNotificationImpl = new (std::nothrow) _NotificationInfoImpl;
- TryReturn(__pNotificationImpl, false, "[osp-installer] __pNotificationImpl is null");
+ TryReturn(__pNotificationImpl, false, "__pNotificationImpl is null");
__pNotificationImpl->SetName(pName);
__pNotificationImpl->SetValue(pCharacters);
- AppLogTag(OSP_INSTALLER, "<Notification Name=\"%s\", Value=\"%s\">", pName, pCharacters);
+ AppLog("<Notification Name=\"%s\", Value=\"%s\">", pName, pCharacters);
return true;
}
bool
ManifestHandler::OnInstallationLocationValue(const char *pCharacters)
{
- AppLogTag(OSP_INSTALLER, "<InstallationLocation>%s</InstallationLocation>", pCharacters);
+ AppLog("<InstallationLocation>%s</InstallationLocation>", pCharacters);
if ((strcasecmp(pCharacters, "UserPreferred") == 0) &&
(File::IsFileExist(DIR_MEMORYCARD_INSTALLATION) == true))
{
- AppLogTag(OSP_INSTALLER, "INSTALLATION_STORAGE = [EXTERNAL]");
- __pContext->SetInstallationStorage(InstallationContext::INSTALLATION_STORAGE_EXTERNAL);
+ AppLog("INSTALLATION_STORAGE = [EXTERNAL]");
+ __pContext->__storage = INSTALLATION_STORAGE_EXTERNAL;
__pPackageInfoImpl->SetInstalledInExternalStorage(true);
}
bool
ManifestHandler::OnCategoryValue(const char *pCharacters)
{
- TryReturn(__pAppData, false, "[osp-installer] __pAppData is null");
+ TryReturn(__pAppData, false, "__pAppData is null");
__pAppData->__pCategoryList->Add(new (std::nothrow) String(pCharacters));
{
if (pStr->Equals(pName, false) == true)
{
- AppLogTag(OSP_INSTALLER, "[%s] is matched.", pName);
+ AppLog("[%s] is matched.", pName);
res = true;
break;
}
ManifestHandler::AddAppFeature(const Tizen::Base::String& name, const Tizen::Base::String& value)
{
_AppFeatureInfoImpl* pAppFeatureInfo = new (std::nothrow) _AppFeatureInfoImpl;
- TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
+ TryReturn(pAppFeatureInfo, false, "pAppFeatureInfo is null");
pAppFeatureInfo->SetName(name);
pAppFeatureInfo->SetValue(value);
if (pName)
{
- AppLogTag(OSP_INSTALLER, " - Name=%s", pName);
+ AppLog(" - Name=%s", pName);
__pPackageAppInfoImpl->SetName(pName);
__pAppData->__appId = __pPackageInfoImpl->GetId() + L"." + pName;
}
if (pMain)
{
- AppLogTag(OSP_INSTALLER, " - Main=%s", pMain);
+ AppLog(" - Main=%s", pMain);
__pPackageAppInfoImpl->SetDefault(pMain);
if (pHwAcceleration)
{
AddAppFeature("HwAcceleration", pHwAcceleration);
- AppLogTag(OSP_INSTALLER, " - HwAcceleration=%s", pHwAcceleration);
+ AppLog(" - HwAcceleration=%s", pHwAcceleration);
}
else
{
if (pGlFrame)
{
AddAppFeature("GlFrame", pGlFrame);
- AppLogTag(OSP_INSTALLER, " - GlFrame=%s", pGlFrame);
+ AppLog(" - GlFrame=%s", pGlFrame);
}
}
char* pCategory = pAttr->Find("Category");
if (pCategory)
{
- AppLogTag(OSP_INSTALLER, " - Category=%s", pCategory);
+ AppLog(" - Category=%s", pCategory);
if (strcasecmp(pCategory, "home-screen") == 0)
{
if (strcasecmp(pSubMode, "True") == 0)
{
__pContext->__isSubMode = true;
- AppLogTag(OSP_INSTALLER, " - SubMode=%s", pSubMode);
+ AppLog(" - SubMode=%s", pSubMode);
}
}
}
AddAppFeature("MenuIconVisible", pMenuIconVisible);
- AppLogTag(OSP_INSTALLER, " - MenuIconVisible=%s", pMenuIconVisible);
+ AppLog(" - MenuIconVisible=%s", pMenuIconVisible);
}
}
else
if (pUseUi)
{
AddAppFeature("UseUi", pUseUi);
- AppLogTag(OSP_INSTALLER, " - UseUi=%s", pUseUi);
+ AppLog(" - UseUi=%s", pUseUi);
}
char *pLifeDuration = pAttr->Find("LifeDuration");
if (pLifeDuration)
{
AddAppFeature("LifeDuration", pLifeDuration);
- AppLogTag(OSP_INSTALLER, " - LifeDuration=%s", pLifeDuration);
+ AppLog(" - LifeDuration=%s", pLifeDuration);
}
char *pLaunchOnBoot = pAttr->Find("LaunchOnBoot");
if (pLaunchOnBoot)
{
AddAppFeature("LaunchOnBoot", pLaunchOnBoot);
- AppLogTag(OSP_INSTALLER, " - LaunchOnBoot=%s", pLaunchOnBoot);
+ AppLog(" - LaunchOnBoot=%s", pLaunchOnBoot);
}
char *pAutoRestart = pAttr->Find("AutoRestart");
if (pAutoRestart)
{
AddAppFeature("AutoRestart", pAutoRestart);
- AppLogTag(OSP_INSTALLER, " - AutoRestart=%s", pAutoRestart);
+ AppLog(" - AutoRestart=%s", pAutoRestart);
}
char *pSystemService = pAttr->Find("SystemService");
if (strcasecmp(pSystemService, "True") == 0)
{
__pAppData->__isSystemService = true;
- AppLogTag(OSP_INSTALLER, " - SystemService=%s", pSystemService);
+ AppLog(" - SystemService=%s", pSystemService);
}
}
}
appId.Format(1024, PACKAGE_NAME_RULE, __pPackageInfoImpl->GetId().GetPointer(), pName);
__pPackageAppInfoImpl->SetPackageName(appId);
- AppLogTag(OSP_INSTALLER, " - appId=%ls", appId.GetPointer());
+ AppLog(" - appId=%ls", appId.GetPointer());
return true;
}
bool
ManifestAccountsParser::OnStartElement(const char *pName)
{
- TryReturn(pName, true, "[osp-installer] pName is null");
+ TryReturn(pName, true, "pName is null");
bool status = true;
if (strcasecmp(pName, "Accounts") == 0)
bool
ManifestAccountsParser::OnEndElement(const char *pName)
{
- TryReturn(pName, true, "[osp-installer] pName is null");
+ TryReturn(pName, true, "pName is null");
bool status = true;
if (strcasecmp(pName, "Accounts") == 0)
bool
ManifestAccountsParser::OnCharacters(const char *pCharacters)
{
- TryReturn(pCharacters, true, "[osp-installer] pCharacters is null");
+ TryReturn(pCharacters, true, "pCharacters is null");
bool status = true;
ManifestHandler* pHandler = GetHandler();
- TryReturn(pHandler, false, "[osp-installer] pHandler is null");
+ TryReturn(pHandler, false, "pHandler is null");
char *pName = pHandler->GetElementName();
- TryReturn(pName, false, "[osp-installer] pName is null");
+ TryReturn(pName, false, "pName is null");
if (strcasecmp(pName, "DisplayName") == 0)
{
ManifestAccountsParser::OnAccountsStartElement(void)
{
ManifestHandler* __pHandler = GetHandler();
- TryReturn(__pHandler, false, "[osp-installer] __pHandler is null");
+ TryReturn(__pHandler, false, "__pHandler is null");
__pContext = __pHandler->GetContext();
- TryReturn(__pContext, false, "[osp-installer] __pContext is null");
+ TryReturn(__pContext, false, "__pContext is null");
- AppLogTag(OSP_INSTALLER, " <Accounts>");
+ AppLog(" <Accounts>");
return true;
}
XmlAttribute *pAttr = null;
__pAccountData = new (std::nothrow) AccountData;
- TryReturn(__pAccountData, false, "[osp-installer] __pAccountData is null");
+ TryReturn(__pAccountData, false, "__pAccountData is null");
ManifestHandler* pHandler = GetHandler();
- TryReturn(pHandler, false, "[osp-installer] pHandler is null");
+ TryReturn(pHandler, false, "pHandler is null");
pAttr = pHandler->GetAttribute();
- TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+ TryReturn(pAttr, true, "pAttr is null");
- AppLogTag(OSP_INSTALLER, " <AccountProvider>");
+ AppLog(" <AccountProvider>");
char *pProviderId = pAttr->Find("ProviderId");
if (pProviderId)
{
__pAccountData->__providerId = pProviderId;
- AppLogTag(OSP_INSTALLER, " - ProviderId=%s", pProviderId);
+ AppLog(" - ProviderId=%s", pProviderId);
}
char *pMultipleAccountsSupport = pAttr->Find("MultipleAccountsSupport");
if (pMultipleAccountsSupport)
{
__pAccountData->__multipleAccountsSupport = pMultipleAccountsSupport;
- AppLogTag(OSP_INSTALLER, " - MultipleAccountsSupport=%s", pMultipleAccountsSupport);
+ AppLog(" - MultipleAccountsSupport=%s", pMultipleAccountsSupport);
}
return true;
bool
ManifestAccountsParser::OnAccountsEndElement(void)
{
- AppLogTag(OSP_INSTALLER, " </Accounts>");
+ AppLog(" </Accounts>");
return true;
}
ManifestAccountsParser::OnAccountProviderEndElement(void)
{
ManifestHandler* pHandler = GetHandler();
- TryReturn(pHandler, false, "[osp-installer] pHandler is null");
+ TryReturn(pHandler, false, "pHandler is null");
AppData* pAppData = pHandler->GetAppData();
- TryReturn(pAppData, false, "[osp-installer] pAppData is null");
+ TryReturn(pAppData, false, "pAppData is null");
pAppData->__pAccountDataList->Add(__pAccountData);
__pAccountData = null;
- AppLogTag(OSP_INSTALLER, " </AccountProvider>");
+ AppLog(" </AccountProvider>");
return true;
}
char* pAttrValue = 0;
ManifestHandler* pHandler = GetHandler();
- TryReturn(pHandler, false, "[osp-installer] pHandler is null");
+ TryReturn(pHandler, false, "pHandler is null");
pAttr = pHandler->GetAttribute();
- TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+ TryReturn(pAttr, true, "pAttr is null");
pAttrValue = pAttr->Find("Locale");
- TryReturn(pAttrValue, true, "[osp-installer] pAttrValue is null");
+ TryReturn(pAttrValue, true, "pAttrValue is null");
String* pValue = new (std::nothrow) String;
StringUtil::Utf8ToString(pCharacters, *pValue);
__pAccountData->__pNameList->Add(new (std::nothrow) String(pAttrValue), pValue);
- AppLogTag(OSP_INSTALLER, " <DisplayName>%s</DisplayName>", pCharacters);
+ AppLog(" <DisplayName>%s</DisplayName>", pCharacters);
return true;
}
char* pTypeValue = 0;
ManifestHandler* pHandler = GetHandler();
- TryReturn(pHandler, false, "[osp-installer] pHandler is null");
+ TryReturn(pHandler, false, "pHandler is null");
pAttr = pHandler->GetAttribute();
- TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+ TryReturn(pAttr, true, "pAttr is null");
pSectionValue = pAttr->Find("Section");
- TryReturn(pSectionValue, true, "[osp-installer] pSectionValue is null");
+ TryReturn(pSectionValue, true, "pSectionValue is null");
pTypeValue = pAttr->Find("Type");
- TryReturn(pTypeValue, true, "[osp-installer] pTypeValue is null");
+ TryReturn(pTypeValue, true, "pTypeValue is null");
char* pDefaultIconType = pHandler->GetDefaultIconType();
- TryReturn(pDefaultIconType, false, "[osp-installer] pDefaultIconType is null");
+ TryReturn(pDefaultIconType, false, "pDefaultIconType is null");
String icon;
if (strcasecmp(pTypeValue, "Xhigh") == 0)
}
else
{
- AppLogTag(OSP_INSTALLER, "Invalid Type [%s]", pDefaultIconType);
+ AppLog("Invalid Type [%s]", pDefaultIconType);
return false;
}
}
}
- AppLogTag(OSP_INSTALLER, " <Icon Section=\"%s\" Type=\"%s\">%s</Icon>", pSectionValue, pTypeValue, pCharacters);
+ AppLog(" <Icon Section=\"%s\" Type=\"%s\">%s</Icon>", pSectionValue, pTypeValue, pCharacters);
return true;
}
bool
ManifestAppControlsParser::OnStartElement(const char *pName)
{
- TryReturn(pName, true, "[osp-installer] pName is null");
+ TryReturn(pName, true, "pName is null");
bool status = true;
if (strcasecmp(pName, "AppControls") == 0)
bool
ManifestAppControlsParser::OnEndElement(const char *pName)
{
- TryReturn(pName, true, "[osp-installer] pName is null");
+ TryReturn(pName, true, "pName is null");
bool status = true;
if (strcasecmp(pName, "AppControls") == 0)
bool
ManifestAppControlsParser::OnCharacters(const char *pCharacters)
{
- TryReturn(pCharacters, true, "[osp-installer] pCharacters is null");
+ TryReturn(pCharacters, true, "pCharacters is null");
bool status = true;
ManifestHandler* pHandler = GetHandler();
- TryReturn(pHandler, false, "[osp-installer] pHandler is null");
+ TryReturn(pHandler, false, "pHandler is null");
char *pName = pHandler->GetElementName();
- TryReturn(pName, false, "[osp-installer] pName is null");
+ TryReturn(pName, false, "pName is null");
if (strcasecmp(pName, "Operation") == 0)
{
ManifestAppControlsParser::OnAppControlsStartElement(void)
{
ManifestHandler* __pHandler = GetHandler();
- TryReturn(__pHandler, false, "[osp-installer] __pHandler is null");
+ TryReturn(__pHandler, false, "__pHandler is null");
__pContext = __pHandler->GetContext();
- TryReturn(__pContext, false, "[osp-installer] __pContext is null");
+ TryReturn(__pContext, false, "__pContext is null");
- AppLogTag(OSP_INSTALLER, " <AppControls>");
+ AppLog(" <AppControls>");
return true;
}
ManifestAppControlsParser::OnAppControlStartElement(void)
{
ManifestHandler* pHandler = GetHandler();
- TryReturn(pHandler, false, "[osp-installer] pHandler is null");
+ TryReturn(pHandler, false, "pHandler is null");
AppData* pAppData = pHandler->GetAppData();
- TryReturn(pAppData, false, "[osp-installer] pAppData is null");
+ TryReturn(pAppData, false, "pAppData is null");
- AppLogTag(OSP_INSTALLER, " <AppControl>");
+ AppLog(" <AppControl>");
XmlAttribute *pAttr = pHandler->GetAttribute();
if (pAttr == null)
{
__pAppControlData = new (std::nothrow) AppControlData;
- TryReturn(__pAppControlData, false, "[osp-installer] __pAppControlData is null");
+ TryReturn(__pAppControlData, false, "__pAppControlData is null");
__legacyAppControls = false;
return true;
}
pHandler->__pAppControlInfoImpl = new (std::nothrow) _AppControlInfoImpl;
- TryReturn(pHandler->__pAppControlInfoImpl, false, "[osp-installer] pHandler->__pAppControlInfoImpl is null");
+ TryReturn(pHandler->__pAppControlInfoImpl, false, "pHandler->__pAppControlInfoImpl is null");
char* pProviderId = pAttr->Find("ProviderId");
if (pProviderId)
{
- AppLogTag(OSP_INSTALLER, " - ProviderId=%s", pProviderId);
+ AppLog(" - ProviderId=%s", pProviderId);
pHandler->__pAppControlInfoImpl->SetProviderId(pProviderId);
__legacyAppControls = true;
}
char* pCategory = pAttr->Find("Category");
if (pCategory)
{
- AppLogTag(OSP_INSTALLER, " - Category=%s", pCategory);
+ AppLog(" - Category=%s", pCategory);
pHandler->__pAppControlInfoImpl->SetCategory(pCategory);
}
}
ManifestHandler* pHandler = GetHandler();
- TryReturn(pHandler, false, "[osp-installer] pHandler is null");
+ TryReturn(pHandler, false, "pHandler is null");
XmlAttribute *pAttr = pHandler->GetAttribute();
- TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+ TryReturn(pAttr, true, "pAttr is null");
- AppLogTag(OSP_INSTALLER, " <Capability>");
+ AppLog(" <Capability>");
char* pOperationId = pAttr->Find("OperationId");
if (pOperationId)
{
- AppLogTag(OSP_INSTALLER, " - OperationId=%s", pOperationId);
+ AppLog(" - OperationId=%s", pOperationId);
pHandler->__pAppControlCapabilityInfoImpl = new (std::nothrow) _AppControlCapabilityInfoImpl;
- TryReturn(pHandler->__pAppControlCapabilityInfoImpl, false, "[osp-installer] pHandler->__pAppControlCapabilityInfoImpl is null");
+ TryReturn(pHandler->__pAppControlCapabilityInfoImpl, false, "pHandler->__pAppControlCapabilityInfoImpl is null");
pHandler->__pAppControlCapabilityInfoImpl->SetOperationId(pOperationId);
}
}
ManifestHandler* pHandler = GetHandler();
- TryReturn(pHandler, false, "[osp-installer] pHandler is null");
+ TryReturn(pHandler, false, "pHandler is null");
XmlAttribute *pAttr = pHandler->GetAttribute();
- TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+ TryReturn(pAttr, true, "pAttr is null");
pHandler->__pAppControlResolutionInfoImpl = new (std::nothrow) _AppControlResolutionInfoImpl;
- TryReturn(pHandler->__pAppControlResolutionInfoImpl, false, "[osp-installer] pHandler->__pAppControlResolutionInfoImpl is null");
+ TryReturn(pHandler->__pAppControlResolutionInfoImpl, false, "pHandler->__pAppControlResolutionInfoImpl is null");
- AppLogTag(OSP_INSTALLER, " <Resolution>");
+ AppLog(" <Resolution>");
char* pMimeType = pAttr->Find("MimeType");
if (pMimeType)
{
- AppLogTag(OSP_INSTALLER, " - MimeType=%s", pMimeType);
+ AppLog(" - MimeType=%s", pMimeType);
pHandler->__pAppControlResolutionInfoImpl->SetMimeType(new (std::nothrow) String(pMimeType));
}
char* pUriScheme = pAttr->Find("UriScheme");
if (pUriScheme)
{
- AppLogTag(OSP_INSTALLER, " - UriScheme=%s", pUriScheme);
+ AppLog(" - UriScheme=%s", pUriScheme);
pHandler->__pAppControlResolutionInfoImpl->SetUriScheme(new (std::nothrow) String(pUriScheme));
}
ManifestAppControlsParser::OnAppControlsEndElement(void)
{
ManifestHandler* pHandler = GetHandler();
- TryReturn(pHandler, false, "[osp-installer] pHandler is null");
+ TryReturn(pHandler, false, "pHandler is null");
AppData* pAppData = pHandler->GetAppData();
- TryReturn(pAppData, false, "[osp-installer] pAppData is null");
+ TryReturn(pAppData, false, "pAppData is null");
pAppData->__legacyAppControls = __legacyAppControls;
- AppLogTag(OSP_INSTALLER, " </AppControls>");
+ AppLog(" </AppControls>");
if (pAppData->__legacyAppControls == true)
{
- AppLogTag(OSP_INSTALLER, " AppControls spec is legacy");
+ AppLog(" AppControls spec is legacy");
}
return true;
ManifestAppControlsParser::OnAppControlEndElement(void)
{
ManifestHandler* pHandler = GetHandler();
- TryReturn(pHandler, false, "[osp-installer] pHandler is null");
+ TryReturn(pHandler, false, "pHandler is null");
AppData* pAppData = pHandler->GetAppData();
- TryReturn(pAppData, false, "[osp-installer] pAppData is null");
+ TryReturn(pAppData, false, "pAppData is null");
- AppLogTag(OSP_INSTALLER, " </AppControl>");
+ AppLog(" </AppControl>");
if (__legacyAppControls == true)
{
}
ManifestHandler* pHandler = GetHandler();
- TryReturn(pHandler, false, "[osp-installer] pHandler is null");
+ TryReturn(pHandler, false, "pHandler is null");
if (pHandler->__pAppControlInfoImpl)
{
pHandler->__pAppControlInfoImpl->AddCapability(pHandler->__pAppControlCapabilityInfoImpl);
pHandler->__pAppControlCapabilityInfoImpl = null;
}
- AppLogTag(OSP_INSTALLER, " </Capability>");
+ AppLog(" </Capability>");
return true;
}
}
ManifestHandler* pHandler = GetHandler();
- TryReturn(pHandler, false, "[osp-installer] pHandler is null");
+ TryReturn(pHandler, false, "pHandler is null");
pHandler->__pAppControlCapabilityInfoImpl->AddResolution(pHandler->__pAppControlResolutionInfoImpl);
pHandler->__pAppControlResolutionInfoImpl = null;
- AppLogTag(OSP_INSTALLER, " </Resolution>");
+ AppLog(" </Resolution>");
return true;
}
String* pStr = new (std::nothrow) String(pCharacters);
if (__pAppControlData->__pOperationList->Contains(pStr) == false)
{
- AppLogTag(OSP_INSTALLER, " <Operation>%s</Operation>", pCharacters);
+ AppLog(" <Operation>%s</Operation>", pCharacters);
__pAppControlData->__pOperationList->Add(pStr);
}
}
String* pStr = new (std::nothrow) String(pCharacters);
if (__pAppControlData->__pMimeTypeList->Contains(pStr) == false)
{
- AppLogTag(OSP_INSTALLER, " <MimeType>%s</MimeType>", pCharacters);
+ AppLog(" <MimeType>%s</MimeType>", pCharacters);
__pAppControlData->__pMimeTypeList->Add(pStr);
}
}
String* pStr = new (std::nothrow) String(pCharacters);
if (__pAppControlData->__pUriList->Contains(pStr) == false)
{
- AppLogTag(OSP_INSTALLER, " <Uri>%s</Uri>", pCharacters);
+ AppLog(" <Uri>%s</Uri>", pCharacters);
__pAppControlData->__pUriList->Add(pStr);
}
}
bool
ManifestLiveboxesParser::OnStartElement(const char *pName)
{
- TryReturn(pName, true, "[osp-installer] pName is null");
+ TryReturn(pName, true, "pName is null");
bool status = true;
bool
ManifestLiveboxesParser::OnEndElement(const char *pName)
{
- TryReturn(pName, true, "[osp-installer] pName is null");
+ TryReturn(pName, true, "pName is null");
bool status = true;
bool
ManifestLiveboxesParser::OnCharacters(const char *pCharacters)
{
- TryReturn(pCharacters, true, "[osp-installer] pCharacters is null");
+ TryReturn(pCharacters, true, "pCharacters is null");
bool status = true;
ManifestHandler* pHandler = GetHandler();
- TryReturn(pHandler, false, "[osp-installer] pHandler is null");
+ TryReturn(pHandler, false, "pHandler is null");
char *pName = pHandler->GetElementName();
- TryReturn(pName, false, "[osp-installer] pName is null");
+ TryReturn(pName, false, "pName is null");
if (strcasecmp(pName, "DisplayName") == 0)
{
ManifestLiveboxesParser::OnLiveboxesStartElement()
{
ManifestHandler* __pHandler = GetHandler();
- TryReturn(__pHandler, false, "[osp-installer] __pHandler is null");
+ TryReturn(__pHandler, false, "__pHandler is null");
__pContext = __pHandler->GetContext();
- TryReturn(__pContext, false, "[osp-installer] __pContext is null");
+ TryReturn(__pContext, false, "__pContext is null");
__pLiveboxDataList = new (std::nothrow) ArrayList;
- TryReturn(__pLiveboxDataList, false, "[osp-installer] __pLiveboxDataList is null");
+ TryReturn(__pLiveboxDataList, false, "__pLiveboxDataList is null");
- AppLogTag(OSP_INSTALLER, " <Liveboxes>");
+ AppLog(" <Liveboxes>");
return true;
}
XmlAttribute *pAttr = null;
__pLiveboxData = new (std::nothrow) LiveboxData;
- TryReturn(__pLiveboxData, false, "[osp-installer] __pLiveboxData is null");
+ TryReturn(__pLiveboxData, false, "__pLiveboxData is null");
ManifestHandler* pHandler = GetHandler();
- TryReturn(pHandler, false, "[osp-installer] pHandler is null");
+ TryReturn(pHandler, false, "pHandler is null");
pAttr = pHandler->GetAttribute();
- TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+ TryReturn(pAttr, true, "pAttr is null");
- AppLogTag(OSP_INSTALLER, " <Livebox>");
+ AppLog(" <Livebox>");
char *pProviderName = pAttr->Find("ProviderName");
if (pProviderName)
{
__pLiveboxData->SetProviderName(pProviderName);
- AppLogTag(OSP_INSTALLER, " - ProviderName=%s", pProviderName);
+ AppLog(" - ProviderName=%s", pProviderName);
}
char *pUpdatePeriod = pAttr->Find("UpdatePeriod");
{
long long updatePeriod = atoll(pUpdatePeriod);
__pLiveboxData->SetUpdatePeriod(updatePeriod);
- AppLogTag(OSP_INSTALLER, " - UpdatePeriod=%lld", updatePeriod);
+ AppLog(" - UpdatePeriod=%lld", updatePeriod);
}
char *pLiveboxPopupEnabled = pAttr->Find("LiveboxPopupEnabled");
if (pLiveboxPopupEnabled)
{
__pLiveboxData->SetPopupEnabled(pLiveboxPopupEnabled);
- AppLogTag(OSP_INSTALLER, " - LiveboxPopupEnabled=%s", pLiveboxPopupEnabled);
+ AppLog(" - LiveboxPopupEnabled=%s", pLiveboxPopupEnabled);
}
char *pMain = pAttr->Find("Main");
if (pMain)
{
__pLiveboxData->__main = pMain;
- AppLogTag(OSP_INSTALLER, " - Main=%s", pMain);
+ AppLog(" - Main=%s", pMain);
}
return true;
{
__pContext->SetLiveboxDataList(__pLiveboxDataList);
__pLiveboxDataList = null;
- AppLogTag(OSP_INSTALLER, " </Liveboxes>");
+ AppLog(" </Liveboxes>");
return true;
}
{
__pLiveboxDataList->Add(*__pLiveboxData);
__pLiveboxData = null;
- AppLogTag(OSP_INSTALLER, " </Livebox>");
+ AppLog(" </Livebox>");
return true;
}
{
__pLiveboxData->AddSize(*(new (std::nothrow) String(pCharacters)));
- AppLogTag(OSP_INSTALLER, " <Size>%s</Size>", pCharacters);
+ AppLog(" <Size>%s</Size>", pCharacters);
return true;
}
char* pAttrValue = 0;
ManifestHandler* pHandler = GetHandler();
- TryReturn(pHandler, false, "[osp-installer] pHandler is null");
+ TryReturn(pHandler, false, "pHandler is null");
pAttr = pHandler->GetAttribute();
- TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+ TryReturn(pAttr, true, "pAttr is null");
pAttrValue = pAttr->Find("Locale");
- TryReturn(pAttrValue, true, "[osp-installer] pAttrValue is null");
+ TryReturn(pAttrValue, true, "pAttrValue is null");
String* pValue = new (std::nothrow) String;
StringUtil::Utf8ToString(pCharacters, *pValue);
__pLiveboxData->AddName(*(new (std::nothrow) String(pAttrValue)), *pValue);
- AppLogTag(OSP_INSTALLER, " <DisplayName>%s</DisplayName>", pCharacters);
+ AppLog(" <DisplayName>%s</DisplayName>", pCharacters);
return true;
}
ManifestLiveboxesParser::OnConfigurationAppControlAppIdValue(const char* pCharacters)
{
__pLiveboxData->__configurationAppControlAppId = pCharacters;
- AppLogTag(OSP_INSTALLER, " <ConfigurationAppControlAppId>%s</ConfigurationAppControlAppId>", pCharacters);
+ AppLog(" <ConfigurationAppControlAppId>%s</ConfigurationAppControlAppId>", pCharacters);
return true;
}
if ((pTempString->GetLength()) < (privilegeURI.GetLength()))
{
SysLogException(NID_SEC, E_INVALID_ARG, "[E_INVALID_ARG] Invalid privilege string : %ls", pTempString->GetPointer());
- AppLogTag(OSP_INSTALLER, "[Privilege] PackPrivilegeN(1): length error[%ls]", pTempString->GetPointer());
+ AppLog("[Privilege] PackPrivilegeN(1): length error[%ls]", pTempString->GetPointer());
resultFlag = false;
continue;
}
if (!(uriString.Equals(privilegeURI, true)))
{
SysLogException(NID_SEC, E_INVALID_ARG, "[E_INVALID_ARG] Invalid privilege string : %ls", pTempString->GetPointer());
- AppLogTag(OSP_INSTALLER, "[Privilege] PackPrivilegeN(1): uri error[%ls]", pTempString->GetPointer());
+ AppLog("[Privilege] PackPrivilegeN(1): uri error[%ls]", pTempString->GetPointer());
resultFlag = false;
continue;
}
if (validStringFlag == false)
{
SysLogException(NID_SEC, E_INVALID_ARG, "[E_INVALID_ARG] Invalid privilege string : %ls", pTempString->GetPointer());
- AppLogTag(OSP_INSTALLER, "[Privilege] PackPrivilegeN(1): validStringFlag is false[%ls]", pTempString->GetPointer());
+ AppLog("[Privilege] PackPrivilegeN(1): validStringFlag is false[%ls]", pTempString->GetPointer());
resultFlag = false;
}
}
if ((pTempString->GetLength()) < (privilegeURI.GetLength()))
{
SysLogException(NID_SEC, E_INVALID_ARG, "[E_INVALID_ARG] Invalid privilege string : %ls", pTempString->GetPointer());
- AppLogTag(OSP_INSTALLER, "[Privilege] PackPrivilegeN(3): length error[%ls]", pTempString->GetPointer());
+ AppLog("[Privilege] PackPrivilegeN(3): length error[%ls]", pTempString->GetPointer());
resultFlag = false;
continue;
}
if (!(uriString.Equals(privilegeURI, true)))
{
SysLogException(NID_SEC, E_INVALID_ARG, "[E_INVALID_ARG] Invalid privilege string : %ls", pTempString->GetPointer());
- AppLogTag(OSP_INSTALLER, "[Privilege] PackPrivilegeN(3): uri error[%ls]", pTempString->GetPointer());
+ AppLog("[Privilege] PackPrivilegeN(3): uri error[%ls]", pTempString->GetPointer());
resultFlag = false;
continue;
}
if (validStringFlag == false)
{
SysLogException(NID_SEC, E_INVALID_ARG, "[E_INVALID_ARG] Invalid privilege string : %ls", pTempString->GetPointer());
- AppLogTag(OSP_INSTALLER, "[Privilege] PackPrivilegeN(3): privilege string error[%ls]", pTempString->GetPointer());
+ AppLog("[Privilege] PackPrivilegeN(3): privilege string error[%ls]", pTempString->GetPointer());
resultFlag = false;
}
if (validLevelFlag == false)
{
SysLogException(NID_SEC, E_INVALID_ARG, "[E_INVALID_ARG] The application does not have the visibility to register %ls", pTempString->GetPointer());
- AppLogTag(OSP_INSTALLER, "[Privilege] PackPrivilegeN(3): validLevelFlag is false[%ls]", pTempString->GetPointer());
+ AppLog("[Privilege] PackPrivilegeN(3): validLevelFlag is false[%ls]", pTempString->GetPointer());
resultFlag = false;
}
}
bool
SignatureHandler::OnStartElement(const char *pName)
{
- TryReturn(pName, true, "[osp-installer] pName is null.");
+ TryReturn(pName, true, "pName is null.");
bool status = true;
if (strcasecmp(pName, "Signature") == 0)
{
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "signature.xml");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "<%s>", pName);
+ AppLog("------------------------------------------");
+ AppLog("signature.xml");
+ AppLog("------------------------------------------");
+ AppLog("<%s>", pName);
status = OnSignatureElement();
}
bool
SignatureHandler::OnEndElement(const char *pName)
{
- TryReturn(pName, true, "[osp-installer] pName is null.");
+ TryReturn(pName, true, "pName is null.");
if (strcasecmp(pName, "Signature") == 0)
{
__isDistributorSignature = false;
__isAuthorSignature = false;
- AppLogTag(OSP_INSTALLER, "</%s>", pName);
+ AppLog("</%s>", pName);
}
return true;
char *pName = 0;
pName = GetElementName();
- TryReturn(pName, false, "[osp-installer] pName is null.");
+ TryReturn(pName, false, "pName is null.");
if (strcasecmp(pName, "X509Certificate") == 0)
{
char *pId = null;
pAttr = GetAttribute();
- TryReturn(pAttr, true, "[osp-installer] pAttr is null");
+ TryReturn(pAttr, true, "pAttr is null");
pId = pAttr->Find("Id");
if (pId)
{
- AppLogTag(OSP_INSTALLER, "<Id = %s>", pId);
+ AppLog("<Id = %s>", pId);
if (strcasecmp(pId, "AuthorSignature") == 0)
{
bool
SignatureHandler::OnCertificateValue(const char *pCharacters)
{
- AppLogTag(OSP_INSTALLER, "<X509Certificate>%s</X509Certificate>", pCharacters);
+ AppLog("<X509Certificate>%s</X509Certificate>", pCharacters);
result r = E_SUCCESS;
bool res = true;
if (__pAuthorCertChain == null)
{
__pAuthorCertChain = new (std::nothrow) ArrayList;
- TryCatch(__pAuthorCertChain, res = false, "[osp-installer] __pAuthorCertChain is null");
+ TryCatch(__pAuthorCertChain, res = false, "__pAuthorCertChain is null");
}
pByteBuffer = new (std::nothrow) ByteBuffer;
- TryCatch(pByteBuffer, res = false, "[osp-installer] pByteBuffer is null");
+ TryCatch(pByteBuffer, res = false, "pByteBuffer is null");
int length = strlen(pCharacters);
pByteBuffer->Construct(length);
r = pByteBuffer->SetArray((byte*)pCharacters, 0, length);
- TryCatch(!IsFailed(r), res = false, "[osp-installer] SetArray() is failed.");
+ TryCatch(!IsFailed(r), res = false, "SetArray() is failed.");
pByteBuffer->Flip();
if (__pDistributorCertChain == null)
{
__pDistributorCertChain = new (std::nothrow) ArrayList;
- TryCatch(__pDistributorCertChain, res = false, "[osp-installer] __pDistributorCertChain is null");
+ TryCatch(__pDistributorCertChain, res = false, "__pDistributorCertChain is null");
}
pByteBuffer = new (std::nothrow) ByteBuffer;
- TryCatch(pByteBuffer, res = false, "[osp-installer] pByteBuffer is null");
+ TryCatch(pByteBuffer, res = false, "pByteBuffer is null");
int length = strlen(pCharacters);
pByteBuffer->Construct(length);
r = pByteBuffer->SetArray((byte*)pCharacters, 0, length);
- TryCatch(!IsFailed(r), res = false, "[osp-installer] SetArray() is failed.");
+ TryCatch(!IsFailed(r), res = false, "SetArray() is failed.");
pByteBuffer->Flip();
}
__pName = new (std::nothrow) char[strlen(pName)+1];
- TryReturn(__pName, false, "[osp-installer] __pName is null");
+ TryReturn(__pName, false, "__pName is null");
strcpy(__pName, pName);
__pValue = new (std::nothrow) char[strlen(pValue)+1];
- TryReturn(__pValue, false, "[osp-installer] __pValue is null");
+ TryReturn(__pValue, false, "__pValue is null");
strcpy(__pValue, pValue);
return true;
else
{
__pNext = new (std::nothrow) XmlAttribute();
- TryReturn(__pNext, false, "[osp-installer] __pNext is null");
+ TryReturn(__pNext, false, "__pNext is null");
__pNext->Construct(pName, pValue);
}
bool
XmlHandler::OnStartDocument(void)
{
- AppLogTag(OSP_INSTALLER, "OnStartDocument()");
+ AppLog("OnStartDocument()");
return true;
}
bool
XmlHandler::OnEndDocument(void)
{
- AppLogTag(OSP_INSTALLER, "OnEndDocument()");
+ AppLog("OnEndDocument()");
return true;
}
bool
XmlHandler::OnStartElement(const char *pName)
{
- AppLogTag(OSP_INSTALLER, "OnStartElement()");
+ AppLog("OnStartElement()");
return true;
}
bool
XmlHandler::OnEndElement(const char *pName)
{
- AppLogTag(OSP_INSTALLER, "OnEndElement()");
+ AppLog("OnEndElement()");
return true;
}
bool
XmlHandler::OnCharacters(const char *pCharacters)
{
- AppLogTag(OSP_INSTALLER, "OnCharacters()");
+ AppLog("OnCharacters()");
return true;
}
}
pHandler->SetElementName((const char *)name);
- // AppLogTag(OSP_INSTALLER, "<%s>", (const char*)name);
+ // AppLog("<%s>", (const char*)name);
if (atts)
{
// log
//if (atts[0][0] && atts[1][0])
//{
- // AppLogTag(OSP_INSTALLER, "%s=\"%s\"", (const char*)atts[0], (const char*)atts[1]);
+ // AppLog("%s=\"%s\"", (const char*)atts[0], (const char*)atts[1]);
//}
atts = &atts[2];
// log
//if (atts[0][0] && atts[1][0])
//{
- // AppLogTag(OSP_INSTALLER, "%s=\"%s\"", (const char*)atts[0], (const char*)atts[1]);
+ // AppLog("%s=\"%s\"", (const char*)atts[0], (const char*)atts[1]);
//}
atts = &atts[2];
pHandler->SetError();
}
- // AppLogTag(OSP_INSTALLER, "</%s>", name);
+ // AppLog("</%s>", name);
pHandler->DeleteElement();
pHandler->DeleteAttribute();
pHandler->SetCharacters(pCharacters);
- // AppLogTag(OSP_INSTALLER, "%s", pCharacters);
+ // AppLog("%s", pCharacters);
delete[] pCharacters;
}
int readSize = 0;
r = file.Construct(pFilepath, L"r");
- TryCatch(r == E_SUCCESS, ret = false, "[osp-installer] file.Construct is failed. [%s]", pFilepath);
+ TryCatch(r == E_SUCCESS, ret = false, "file.Construct is failed. [%s]", pFilepath);
r = file.GetAttributes(pFilepath, attr);
- TryCatch(IsFailed(r) == false, ret = false, "[osp-installer] file.GetAttributes is failed. [%s]", pFilepath);
+ TryCatch(IsFailed(r) == false, ret = false, "file.GetAttributes is failed. [%s]", pFilepath);
size = (int)attr.GetFileSize();
- TryCatch(size > 0, ret = false, "[osp-installer] size is invalid. [%s]", pFilepath);
+ TryCatch(size > 0, ret = false, "size is invalid. [%s]", pFilepath);
pBuf = new (std::nothrow) char[size+1];
- TryCatch(pBuf, ret = false, "[osp-installer] pBuf is null");
+ TryCatch(pBuf, ret = false, "pBuf is null");
memset(pBuf, 0, size+1);
readSize = file.Read(pBuf, size);
- TryCatch(readSize > 0, ret = false, "[osp-installer] file.Read is failed. [%s][%d]", pFilepath, readSize);
+ TryCatch(readSize > 0, ret = false, "file.Read is failed. [%s][%d]", pFilepath, readSize);
ctxt = xmlCreateMemoryParserCtxt(pBuf, size+1);
- TryCatch(ctxt, ret = false, "[osp-installer] invalid xml file, %s", pFilepath);
+ TryCatch(ctxt, ret = false, "invalid xml file, %s", pFilepath);
pSAXHandler = new (std::nothrow) xmlSAXHandler;
- TryCatch(pSAXHandler, ret = false, "[osp-installer] pSAXHandler is null");
+ TryCatch(pSAXHandler, ret = false, "pSAXHandler is null");
memset(pSAXHandler, 0, sizeof(xmlSAXHandler));
ctxt->userData = (void *)this;
xmlParseDocument(ctxt);
xmlFreeParserCtxt(ctxt);
- TryCatch(GetError() != true, ret = false, "[osp-installer] xml parsing error is occurred.");
+ TryCatch(GetError() != true, ret = false, "xml parsing error is occurred.");
CATCH:
delete[] pBuf;
int readSize = 0;
r = file.Construct(pFilepath, L"r");
- TryCatch(r == E_SUCCESS, ret = false, "[osp-installer] file.Construct is failed. [%s]", pFilepath);
+ TryCatch(r == E_SUCCESS, ret = false, "file.Construct is failed. [%s]", pFilepath);
r = file.GetAttributes(pFilepath, attr);
- TryCatch(IsFailed(r) == false, ret = false, "[osp-installer] file.GetAttributes is failed. [%s]", pFilepath);
+ TryCatch(IsFailed(r) == false, ret = false, "file.GetAttributes is failed. [%s]", pFilepath);
size = (int)attr.GetFileSize();
- TryCatch(size > 0, ret = false, "[osp-installer] size is invalid. [%s]", pFilepath);
+ TryCatch(size > 0, ret = false, "size is invalid. [%s]", pFilepath);
pBuf = new (std::nothrow) char[size+1];
- TryCatch(pBuf, ret = false, "[osp-installer] pBuf is null");
+ TryCatch(pBuf, ret = false, "pBuf is null");
pNormalizedBuf = new (std::nothrow) char[size+1];
- TryCatch(pNormalizedBuf, ret = false, "[osp-installer] pNormalizedBuf is null");
+ TryCatch(pNormalizedBuf, ret = false, "pNormalizedBuf is null");
memset(pBuf, 0, size+1);
memset(pNormalizedBuf, 0, size+1);
readSize = file.Read(pBuf, size);
- TryCatch(readSize > 0, ret = false, "[osp-installer] file.Read is failed. [%s][%d]", pFilepath, readSize);
+ TryCatch(readSize > 0, ret = false, "file.Read is failed. [%s][%d]", pFilepath, readSize);
normalizedSize = Normalize(pBuf, size, pNormalizedBuf);
- TryCatch(normalizedSize > 0, ret = false, "[osp-installer] normalizedSize [%d]", readSize);
+ TryCatch(normalizedSize > 0, ret = false, "normalizedSize [%d]", readSize);
ctxt = xmlCreateMemoryParserCtxt(pNormalizedBuf, normalizedSize);
- TryCatch(ctxt, ret = false, "[osp-installer] invalid xml file, %s", pFilepath);
+ TryCatch(ctxt, ret = false, "invalid xml file, %s", pFilepath);
pSAXHandler = new (std::nothrow) xmlSAXHandler;
- TryCatch(pSAXHandler, ret = false, "[osp-installer] pSAXHandler is null");
+ TryCatch(pSAXHandler, ret = false, "pSAXHandler is null");
memset(pSAXHandler, 0, sizeof(xmlSAXHandler));
ctxt->userData = (void *)this;
xmlParseDocument(ctxt);
xmlFreeParserCtxt(ctxt);
- TryCatch(GetError() != true, ret = false, "[osp-installer] xml parsing error is occurred.");
+ TryCatch(GetError() != true, ret = false, "xml parsing error is occurred.");
CATCH:
delete[] pBuf;
}
else if((pBuf[idx] == 0X0A) && (pBuf[idx + 1] == 0x4d) && (pBuf[idx - 1] == 0x3E))
{
- //AppLogTag(OSP_INSTALLER, "[pBuf = %s]", pBuf);
+ //AppLog("[pBuf = %s]", pBuf);
idx++;
pNormalizedBuf[normalizedIdx] = pBuf[idx];
normalizedIdx++;
bool
XmlHandler::SetElementName(const char *pElementName)
{
- TryReturn(pElementName, false, "[osp-installer] pElementName is null");
+ TryReturn(pElementName, false, "pElementName is null");
if (__pElementName)
{
}
__pElementName = new (std::nothrow) char[strlen(pElementName)+1];
- TryReturn(__pElementName, false, "[osp-installer] __pElementName is null");
+ TryReturn(__pElementName, false, "__pElementName is null");
strcpy(__pElementName, pElementName);
__elementStack.Push(*new (std::nothrow) String(pElementName));
bool
XmlHandler::SetCharacters(const char* pCharacter)
{
- TryReturn(pCharacter, false, "[osp-installer] pCharacter is null");
+ TryReturn(pCharacter, false, "pCharacter is null");
if (__pCharacters == null)
{
__pCharacters = new (std::nothrow) char[4096];
- TryReturn(__pCharacters, false, "[osp-installer] __pCharacters is null");
+ TryReturn(__pCharacters, false, "__pCharacters is null");
memset(__pCharacters, 0, 4096);
}
err = xmlTextWriterEndDocument(__pXmlWriter);
if (err == -1)
{
- AppLogTag(OSP_INSTALLER, "xmlTextWriterEndDocument() is failed(%d)", err);
+ AppLog("xmlTextWriterEndDocument() is failed(%d)", err);
}
File file;
r = file.Construct(__xmlFilePath, "w");
if (IsFailed(r))
{
- AppLogTag(OSP_INSTALLER, "file.Construct() failed, __xmlFilePath=[%ls]", __xmlFilePath.GetPointer());
+ AppLog("file.Construct() failed, __xmlFilePath=[%ls]", __xmlFilePath.GetPointer());
}
else
{
r = file.Write((char *)__pXmlBuffer->content, __pXmlBuffer->use);
if (IsFailed(r))
{
- AppLogTag(OSP_INSTALLER, "file.Write() failed, __xmlFilePath=[%ls]", __xmlFilePath.GetPointer());
+ AppLog("file.Write() failed, __xmlFilePath=[%ls]", __xmlFilePath.GetPointer());
}
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "%ls is generated", __xmlFilePath.GetPointer());
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- // AppLogTag(OSP_INSTALLER, "%s", __pXmlBuffer->content);
+ AppLog("------------------------------------------");
+ AppLog("%ls is generated", __xmlFilePath.GetPointer());
+ AppLog("------------------------------------------");
+ // AppLog("%s", __pXmlBuffer->content);
// InstallerUtil::DumpLog((const char*)__pXmlBuffer->content);
}
// __pXmlBuffer = xmlBufferCreate();
__pXmlBuffer = xmlBufferCreateSize(4096*10);
- TryCatch(__pXmlBuffer, res = false, "[osp-installer] __pXmlBuffer is null");
+ TryCatch(__pXmlBuffer, res = false, "__pXmlBuffer is null");
__xmlFilePath = filepath;
__pXmlWriter = xmlNewTextWriterMemory(__pXmlBuffer, 0);
- TryCatch(__pXmlWriter, res = false, "[osp-installer] __pXmlWriter is null");
+ TryCatch(__pXmlWriter, res = false, "__pXmlWriter is null");
xmlTextWriterSetIndent(__pXmlWriter, 1);
err = xmlTextWriterStartDocument(__pXmlWriter, null, null, null);
- TryCatch(err == 0, res = false, "[osp-installer] err is %d", err);
+ TryCatch(err == 0, res = false, "err is %d", err);
return true;
CATCH:
Osp_Initialize();
- AppLogTag(OSP_INSTALLER, "--\n\n\n");
- AppLogTag(OSP_INSTALLER, "==========================================");
- AppLogTag(OSP_INSTALLER, " # %s", OSP_INSTALLER_VERSION);
- AppLogTag(OSP_INSTALLER, " # argc = %d", argc);
+ AppLog("--\n\n\n");
+ AppLog("==========================================");
+ AppLog(" # %s", OSP_INSTALLER_VERSION);
+ AppLog(" # argc = %d", argc);
if (argc == TEST_ARG_COUNT)
{
pkg_info = pkgmgr_installer_get_request_info(pi);
pkg_path = (const_cast<char*>(pkg_info));
- AppLogTag(OSP_INSTALLER, " # path = [%s]", pkg_path);
+ AppLog(" # path = [%s]", pkg_path);
path = pkg_path;
}
else
{
- AppLogTag(OSP_INSTALLER, "_pi is null");
+ AppLog("_pi is null");
}
// if (errorType != 0)
path.SubString(0, APPID_LENGTH, requestAppId);
}
- AppLogTag(OSP_INSTALLER, "requestAppId = %ls", requestAppId.GetPointer());
+ AppLog("requestAppId = %ls", requestAppId.GetPointer());
ret = manager.Request(requestAppId, INSTALLER_OPERATION_UNINSTALL, REQUESTER_TYPE_NORMAL);
appId = manager.GetId();
}
else
{
- AppLogTag(OSP_INSTALLER, "_pi is null");
+ AppLog("_pi is null");
}
__osp_installer_report_result(appId, errorType);
const char* pKey = "end";
const char* pValue = null;
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "osp_installer_report_result");
- AppLogTag(OSP_INSTALLER, " # request_type = [%d]", pkgmgr_installer_get_request_type(_pi));
- AppLogTag(OSP_INSTALLER, " # request_info = [%s]", pkgmgr_installer_get_request_info(_pi));
- AppLogTag(OSP_INSTALLER, " # session_id = [%s]", pkgmgr_installer_get_session_id(_pi));
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog("osp_installer_report_result");
+ AppLog(" # request_type = [%d]", pkgmgr_installer_get_request_type(_pi));
+ AppLog(" # request_info = [%s]", pkgmgr_installer_get_request_info(_pi));
+ AppLog(" # session_id = [%s]", pkgmgr_installer_get_session_id(_pi));
+ AppLog("------------------------------------------");
if (_pi == 0)
{
- AppLogTag(OSP_INSTALLER, "_pi is null");
+ AppLog("_pi is null");
return false;
}
}
ret = pkgmgr_installer_send_signal(_pi, pPkgType, resultBuf, pKey, pValue);
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "pkgmgr_installer_send_signal");
- AppLogTag(OSP_INSTALLER, " # type = [%s]", pPkgType);
- AppLogTag(OSP_INSTALLER, " # pkg id = [%s]", resultBuf);
- AppLogTag(OSP_INSTALLER, " # key = [%s]", pKey);
- AppLogTag(OSP_INSTALLER, " # val = [%s]", pValue);
- AppLogTag(OSP_INSTALLER, " # ret = [%s]", (ret == 0)?"success":"failure");
- AppLogTag(OSP_INSTALLER, "------------------------------------------");
+ AppLog("------------------------------------------");
+ AppLog("pkgmgr_installer_send_signal");
+ AppLog(" # type = [%s]", pPkgType);
+ AppLog(" # pkg id = [%s]", resultBuf);
+ AppLog(" # key = [%s]", pKey);
+ AppLog(" # val = [%s]", pValue);
+ AppLog(" # ret = [%s]", (ret == 0)?"success":"failure");
+ AppLog("------------------------------------------");
pkgmgr_installer_free(_pi);
_pi = null;