if (__fromDatabase)
{
SysTryReturn(NID_APP, __id.IsEmpty() == false, 0, E_SYSTEM, "id is IsEmpty.");
+ SysTryReturn(NID_APP, __type.IsEmpty() == false, 0, E_SYSTEM, "type is IsEmpty.");
std::unique_ptr<char[]> pPackage(_StringConverter::CopyToCharArrayN(__id));
SysTryReturn(NID_APP, pPackage, 0, E_OUT_OF_MEMORY, "pPackage is null.");
+ std::unique_ptr<char[]> pType(_StringConverter::CopyToCharArrayN(__type));
+ SysTryReturn(NID_APP, pType, 0, E_OUT_OF_MEMORY, "pType is null.");
+
void* pClient = pkgmgr_client_new(PC_REQUEST);
SysTryReturn(NID_APP, pClient, 0, E_SYSTEM, "pkgmgr_client_new() failed.");
- SysLog(NID_APP, "pkgmgr_client_request_service(PM_REQUEST_GET_SIZE, %s)", pPackage.get());
- size = pkgmgr_client_request_service(PM_REQUEST_GET_SIZE, 0, pClient, null, pPackage.get(), null, null, null);
+ SysLog(NID_APP, "pkgmgr_client_request_service(PM_REQUEST_GET_SIZE, %s, %s)", pType.get(), pPackage.get());
+ size = pkgmgr_client_request_service(PM_REQUEST_GET_SIZE, 0, pClient, pType.get(), pPackage.get(), null, null, null);
pkgmgr_client_free(pClient);
}
if (__fromDatabase)
{
SysTryReturn(NID_APP, __id.IsEmpty() == false, 0, E_SYSTEM, "id is IsEmpty.");
+ SysTryReturn(NID_APP, __type.IsEmpty() == false, 0, E_SYSTEM, "type is IsEmpty.");
std::unique_ptr<char[]> pPackage(_StringConverter::CopyToCharArrayN(__id));
SysTryReturn(NID_APP, pPackage, 0, E_OUT_OF_MEMORY, "pPackage is null.");
+ std::unique_ptr<char[]> pType(_StringConverter::CopyToCharArrayN(__type));
+ SysTryReturn(NID_APP, pType, 0, E_OUT_OF_MEMORY, "pType is null.");
+
void* pClient = pkgmgr_client_new(PC_REQUEST);
SysTryReturn(NID_APP, pClient, 0, E_SYSTEM, "pkgmgr_client_new() failed.");
- SysLog(NID_APP, "pkgmgr_client_request_service(PM_REQUEST_GET_SIZE, %s)", pPackage.get());
- dataSize = pkgmgr_client_request_service(PM_REQUEST_GET_SIZE, 1, pClient, null, pPackage.get(), null, null, null);
+ SysLog(NID_APP, "pkgmgr_client_request_service(PM_REQUEST_GET_SIZE, %s, %s)", pType.get(), pPackage.get());
+ dataSize = pkgmgr_client_request_service(PM_REQUEST_GET_SIZE, 1, pClient, pType.get(), pPackage.get(), null, null, null);
pkgmgr_client_free(pClient);
}
}
else
{
- if (pArg->__install)
+ if (pArg->__install == false)
{
- SysLog(NID_APP, "Installation is Completed(Error). [Package = %ls]", pArg->__packageId.GetPointer());
- pListener->OnPackageInstallationCompleted(pArg->__packageId, PACKAGE_INSTALLATION_RESULT_INVALID_PACKAGE);
+ SysLog(NID_APP, "Uninstallation is Completed(Error). [Package = %ls]", pArg->__packageId.GetPointer());
+ pListener->OnPackageUninstallationCompleted(pArg->__packageId, false);
+ }
+ }
+ }
+ else if (pArg->__eventKey == L"error")
+ {
+ if (pArg->__install)
+ {
+ if (pArg->__eventValue == L"62")
+ {
+ SysLog(NID_APP, "Installation is Completed(Error = STORAGE_FULL(62)). [Package = %ls]", pArg->__packageId.GetPointer());
+ pListener->OnPackageInstallationCompleted(pArg->__packageId, PACKAGE_INSTALLATION_RESULT_STORAGE_FULL);
}
else
{
- SysLog(NID_APP, "Uninstallation is Completed(Error). [Package = %ls]", pArg->__packageId.GetPointer());
- pListener->OnPackageUninstallationCompleted(pArg->__packageId, false);
+ SysLog(NID_APP, "Installation is Completed(Error). [Package = %ls]", pArg->__packageId.GetPointer());
+ pListener->OnPackageInstallationCompleted(pArg->__packageId, PACKAGE_INSTALLATION_RESULT_INVALID_PACKAGE);
}
}
}
pListener->OnPackageInstallationResponseReceived(pPackageId, PACKAGE_INSTALLATION_RESULT_SUCCESS);
SysLog(NID_APP, "OnPackageInstallationResponseReceived(PACKAGE_INSTALLATION_RESULT_SUCCESS)");
}
+
+ delete pListener;
+ }
+ else if (strcmp(pKey, "error") == 0)
+ {
+ if (strcmp(pVal, "62") == 0)
+ {
+ pListener->OnPackageInstallationResponseReceived(pPackageId, PACKAGE_INSTALLATION_RESULT_STORAGE_FULL);
+ SysLog(NID_APP, "OnPackageInstallationResponseReceived(PACKAGE_INSTALLATION_RESULT_STORAGE_FULL)");
+ }
else
{
pListener->OnPackageInstallationResponseReceived(pPackageId, PACKAGE_INSTALLATION_RESULT_INVALID_PACKAGE);
SysLog(NID_APP, "OnPackageInstallationResponseReceived(PACKAGE_INSTALLATION_RESULT_INVALID_PACKAGE)");
}
-
- delete pListener;
}
else if (strcmp(pKey, "install_percent") == 0)
{