--- /dev/null
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * @file job_exception_error.h
+ * @author Soyoung Kim (sy037.kim@samsung.com)
+ * @version 1.0
+ * @brief This file contains declarations of wrt api
+ */
+
+/*
+ * @defgroup wrt_engine_group WebRunTime engine Library
+ * @ingroup internet_FW
+ * Functions to APIs to access wrt-engine
+ */
+
+#ifndef JOB_EXCEPTION_ERROR_H
+#define JOB_EXCEPTION_ERROR_H
+
+#include <stdbool.h>
+#include <stddef.h>
+
+namespace Jobs {
+namespace Exceptions {
+enum Type
+{
+ Success = 0, ///< Success
+
+ /* pkgmgr error */
+ ErrorPackageNotFound, ///<
+ ErrorPackageInvalid, ///< invalid widget package
+ ErrorPackageLowerVersion, ///< given version is lower
+ ///< than existing version
+ ErrorManifestNotFound, ///<
+ ErrorManifestInvalid, ///<
+ ErrorConfigNotFound, ///< couldn't find config.xml
+ ///< in package.
+ ErrorConfigInvalid, ///< invalid config.xml
+ ErrorSignatureNotFound, ///< signature file not exist.
+ ErrorSignatureInvalid, ///< invalid signature file
+ ErrorSignatureVerificationFailed, ///< failure in verificate
+ ///< signature
+ ErrorRootCertificateNotFound, ///< couldn't find root
+ ///< certificate.
+ ErrorCertificationInvaid, ///< invalid certification
+ ErrorCertificateChainVerificationFailed, ///< failure in verificate
+ ///< certification chain.
+ ErrorCertificateExpired, ///< expire cerification.
+ ErrorInvalidPrivilege, ///< invalid privilege.
+ ErrorMenuIconNotFound, ///<
+ ErrorFatalError, ///< failure in db operation
+ ///< or file opertion..
+ ErrorOutOfStorage, ///< failure in shortage of
+ ///< memory
+ ErrorOutOfMemory, ///< failure in shortage of RAM
+
+ /* wrt-installer error */
+ /* 121-140 : reserved for Web installer */
+ ErrorPackageAlreadyInstalled = 121, ///< package already in target.
+ ErrorAceCheckFailed, ///< failure in ace check.
+ ErrorManifestCreateFailed, ///< failure in creating manifest
+ ErrorEncryptionFailed, ///< failure in encryption resource
+ ErrorInstallOspServcie, ///< Failure in installing osp service
+ ErrorPluginInstallationFailed, ///< failure in plugin installation
+ ErrorWidgetUninstallationFailed, ///< failure in uninstallation
+
+ ErrorUnknown = 140, ///< do not use this error code.
+};
+}
+}
+
+#endif /* JOB_EXCEPTION_ERROR_H */
{
LogDebug("Call Plugin install success finishedCallback");
getInstallerStruct().finishedCallback(getInstallerStruct().userParam,
- Exceptions::Success);
+ Jobs::Exceptions::Success);
} else {
LogDebug("Call Plugin install waiting finishedCallback");
getInstallerStruct().finishedCallback(getInstallerStruct().userParam,
- Exceptions::InstallationWaiting);
+ Jobs::Exceptions::ErrorPluginInstallationFailed);
LogInfo("Installation: " << getFilePath() <<
" NOT possible");
void JobPluginInstall::SaveExceptionData(const Jobs::JobExceptionBase &e)
{
- m_exceptionCaught = static_cast<Exceptions::Type>(e.getParam());
+ m_exceptionCaught = static_cast<Jobs::Exceptions::Type>(e.getParam());
m_exceptionMessage = e.GetMessage();
}
} //namespace Jobs
//TODO move it to base class of all jobs
//maybe separate JobBase class for this?
- Exceptions::Type m_exceptionCaught;
+ Jobs::Exceptions::Type m_exceptionCaught;
std::string m_exceptionMessage;
};
} //namespace Jobs
WRT_SRC_INSTALLER_CORE_PLUGIN_INSTALLER_TASKS_PLUGIN_INSTALLER_ERRORS_H_
#include <job_exception_base.h>
+#include <job_exception_error.h>
+
+using namespace Jobs::Exceptions;
namespace Jobs {
namespace PluginInstall {
namespace Exceptions {
-enum Type
-{
- Success, ///< Success
-
- WrongPluginPath, ///< Wrong plugin path
- MetafileError, ///< Metafile parse error
- AlreadyInstalled, ///< Plugin already installed
- LoadingLibraryError, ///< Loading library by dlopen failed.
- /// It may be caused by missing symbols
- InstallationWaiting, /// Installation failed due to dependencies
- Unknown ///< Temporary error. Try to not use this.
-};
-DECLARE_JOB_EXCEPTION_BASE(JobExceptionBase, Base, Unknown)
-DECLARE_JOB_EXCEPTION(Base, PluginPathFailed, WrongPluginPath)
-DECLARE_JOB_EXCEPTION(Base, PluginMetafileFailed, MetafileError)
-DECLARE_JOB_EXCEPTION(Base, PluginAlreadyInstalled, AlreadyInstalled)
-DECLARE_JOB_EXCEPTION(Base, PluginLibraryError, LoadingLibraryError)
-DECLARE_JOB_EXCEPTION(Base, InstallationWaitingError, InstallationWaiting)
-DECLARE_JOB_EXCEPTION(Base, UnknownError, Unknown)
+DECLARE_JOB_EXCEPTION_BASE(JobExceptionBase, Base, ErrorUnknown)
+DECLARE_JOB_EXCEPTION(Base, PluginPathFailed, ErrorPluginInstallationFailed)
+DECLARE_JOB_EXCEPTION(Base, PluginMetafileFailed, ErrorPluginInstallationFailed)
+DECLARE_JOB_EXCEPTION(Base, PluginAlreadyInstalled,
+ ErrorPluginInstallationFailed)
+DECLARE_JOB_EXCEPTION(Base, PluginLibraryError, ErrorPluginInstallationFailed)
+DECLARE_JOB_EXCEPTION(Base, InstallationWaitingError,
+ ErrorPluginInstallationFailed)
+DECLARE_JOB_EXCEPTION(Base, UnknownError, ErrorUnknown)
} //namespace
} //namespace
} //namespace
//Plugin Installer typedefs
typedef void (*PluginInstallerFinishedCallback)(
void *userParam,
- Jobs::PluginInstall::Exceptions::Type);
+ Jobs::Exceptions::Type);
//installer progress
typedef void (*PluginInstallerProgressCallback)(
#include <widget_install_to_external.h>
using namespace WrtDB;
+using namespace Jobs::Exceptions;
namespace // anonymous
{
const DPL::String SETTING_VALUE_INSTALLTOEXT_PREPER_EXT =
L"prefer-external";
-class InstallerTaskFail :
- public DPL::TaskDecl<InstallerTaskFail>
-{
- private:
- bool m_deferred;
-
- void StepFail()
- {
- if (m_deferred) {
- ThrowMsg(Jobs::WidgetInstall::Exceptions::Deferred,
- "Widget installation or update deferred!");
- } else {
- ThrowMsg(Jobs::WidgetInstall::Exceptions::NotAllowed,
- "Widget installation or update not allowed!");
- }
- }
-
- public:
- InstallerTaskFail(bool deferred) :
- DPL::TaskDecl<InstallerTaskFail>(this),
- m_deferred(deferred)
- {
- AddStep(&InstallerTaskFail::StepFail);
- }
-};
-
const std::string XML_EXTENSION = ".xml";
bool hasExtension(const std::string& filename, const std::string& extension)
namespace Jobs {
namespace WidgetInstall {
+class InstallerTaskFail :
+ public DPL::TaskDecl<InstallerTaskFail>
+{
+ private:
+ ConfigureResult m_result;
+
+ void StepFail()
+ {
+ if (m_result == ConfigureResult::Deferred) {
+ ThrowMsg(Jobs::WidgetInstall::Exceptions::Deferred,
+ "widget installation or update deferred!");
+ } else if (m_result == ConfigureResult::Failed_InvalidConfig) {
+ ThrowMsg(Jobs::WidgetInstall::Exceptions::WidgetConfigFileInvalid,
+ "invalid config");
+ } else if (m_result == ConfigureResult::Failed_LowerVersion) {
+ ThrowMsg(Jobs::WidgetInstall::Exceptions::PackageLowerVersion,
+ "package version is lower than installed version");
+ } else if (m_result == ConfigureResult::Failed_AlreadyInstalled) {
+ ThrowMsg(Jobs::WidgetInstall::Exceptions::PackageAlreadyInstalled,
+ "package is already installed");
+ } else if (m_result == ConfigureResult::Failed_WidgetRunning) {
+ ThrowMsg(Jobs::WidgetInstall::Exceptions::WidgetRunningError,
+ "widget is running");
+ } else if (m_result == ConfigureResult::Failed_DrmError) {
+ ThrowMsg(Jobs::WidgetInstall::Exceptions::DRMFailed,
+ "drm failed");
+ } else {
+ ThrowMsg(Jobs::WidgetInstall::Exceptions::NotAllowed,
+ "widget installation or update not allowed!");
+ }
+ }
+
+ public:
+ InstallerTaskFail(ConfigureResult result) :
+ DPL::TaskDecl<InstallerTaskFail>(this),
+ m_result(result)
+ {
+ AddStep(&InstallerTaskFail::StepFail);
+ }
+};
+
JobWidgetInstall::JobWidgetInstall(
std::string const &widgetPath,
const WidgetInstallationStruct &
installerStruct) :
Job(Installation),
JobContextBase<WidgetInstallationStruct>(installerStruct),
- m_exceptionCaught(Exceptions::Success)
+ m_exceptionCaught(Jobs::Exceptions::Success)
{
m_installerContext.m_quiet = m_jobStruct.m_quiet;
// Installation is deferred
LogInfo("Configure installation deferred");
- AddTask(new InstallerTaskFail(true));
- } else if (result == ConfigureResult::Failed) {
+ AddTask(new InstallerTaskFail(result));
+ } else if (result >= ConfigureResult::Failed &&
+ result <= ConfigureResult::Failed_DrmError) {
// Installation is not allowed to proceed due to widget update policy
LogWarning("Configure installation failed!");
- AddTask(new InstallerTaskFail(false));
+ AddTask(new InstallerTaskFail(result));
} else {
Assert(false && "Invalid configure result!");
}
}
-JobWidgetInstall::ConfigureResult JobWidgetInstall::PrePareInstallation(
+ConfigureResult JobWidgetInstall::PrePareInstallation(
const std::string &widgetPath)
{
ConfigureResult result;
LogDebug("decrypt DRM widget");
if (DecryptDRMWidget(widgetPath, tempDir)) {
LogDebug("Failed decrypt DRM widget");
- return ConfigureResult::Failed;
+ return ConfigureResult::Failed_DrmError;
}
}
Catch(Exceptions::ExtractFileFailed)
{
LogError("Failed to create temporary path for widget");
- result = ConfigureResult::Failed;
+ result = ConfigureResult::Failed_InvalidConfig;
}
return result;
LogInfo("widgetSource " << widgetPath);
}
-JobWidgetInstall::ConfigureResult JobWidgetInstall::ConfigureInstallation(
+ConfigureResult JobWidgetInstall::ConfigureInstallation(
const std::string &widgetSource,
const WrtDB::ConfigParserData &configData,
const std::string &tempPath)
//TODO(t.iwanek): appId is unique, what about installation of
// abcdefghij.test1 and abcdefghij.test2?
regfree(®);
- return ConfigureResult::Failed;
+ return ConfigureResult::Failed_AlreadyInstalled;
}
regfree(®);
return result;
}
-JobWidgetInstall::ConfigureResult JobWidgetInstall::checkWidgetUpdate(
+ConfigureResult JobWidgetInstall::checkWidgetUpdate(
const WidgetUpdateInfo &update)
{
LogInfo(
tzAppid).c_str(), &isRunning);
if (APP_MANAGER_ERROR_NONE != retval) {
LogError("Fail to get running state");
- return ConfigureResult::Failed;
+ return ConfigureResult::Failed_WidgetRunning;
}
if (true == isRunning) {
LogInfo(
"Widget is already running. Policy is not update according to WAC");
- return ConfigureResult::Failed;
+ return ConfigureResult::Failed_WidgetRunning;
}
}
LogInfo("Whether widget policy allow proceed ok");
return ConfigureResult::Updated;
} else {
- return ConfigureResult::Failed;
+ return ConfigureResult::Failed_LowerVersion;
}
}
return ConfigureResult::Ok;
LogDebug("Call widget install successfinishedCallback");
getInstallerStruct().finishedCallback(getInstallerStruct().userParam,
DPL::ToUTF8String(
- tizenId), Exceptions::Success);
+ tizenId), Jobs::Exceptions::Success);
}
void JobWidgetInstall::SendFinishedFailure()
// remove widget install information file
unlink(m_installerContext.installInfo.c_str());
- LogError("Error in installation step: " << m_exceptionCaught);
+ LogError("Error number: " << m_exceptionCaught);
LogError("Message: " << m_exceptionMessage);
TizenAppId & tizenId = m_installerContext.widgetConfig.tzAppid;
LogDebug("Call widget install failure finishedCallback");
+ std::stringstream errorNum;
+ errorNum << m_exceptionCaught;
// send signal of pkgmgr
getInstallerStruct().pkgmgrInterface->sendSignal(
+ PKGMGR_ERROR,
+ errorNum.str());
+
+ getInstallerStruct().pkgmgrInterface->sendSignal(
PKGMGR_END_KEY,
PKGMGR_END_FAILURE);
void JobWidgetInstall::SaveExceptionData(const Jobs::JobExceptionBase &e)
{
- m_exceptionCaught = static_cast<Exceptions::Type>(e.getParam());
+ m_exceptionCaught = static_cast<Jobs::Exceptions::Type>(e.getParam());
m_exceptionMessage = e.GetMessage();
}
#include <dpl/wrt-dao-ro/config_parser_data.h>
#include "widget_installer_struct.h"
+using namespace Jobs::Exceptions;
+
namespace Jobs {
namespace WidgetInstall {
+enum class ConfigureResult
+{
+ Ok,
+ Deferred,
+ Updated,
+ Failed,
+ Failed_InvalidConfig,
+ Failed_LowerVersion,
+ Failed_AlreadyInstalled,
+ Failed_WidgetRunning,
+ Failed_DrmError,
+};
+
class JobWidgetInstall :
public Job,
public JobProgressBase<InstallerContext::InstallStep,
InstallerContext m_installerContext;
//TODO move it to base class of all jobs -> make it base template class??
- Exceptions::Type m_exceptionCaught;
+ Jobs::Exceptions::Type m_exceptionCaught;
std::string m_exceptionMessage;
WidgetUpdateInfo m_widgetUpdateInfo;
bool m_needEncryption;
bool m_isDRM;
- enum class ConfigureResult
- {
- Ok, Failed, Deferred, Updated
- };
-
ConfigureResult ConfigureInstallation(const std::string &widgetSource,
const WrtDB::ConfigParserData
&configData,
dao.getHandle(),
&policyResult);
if (ACE_OK != ret) {
- ThrowMsg(Exceptions::NotAllowed, "Instalation failure. "
+ ThrowMsg(Exceptions::AceCheckFailed, "Instalation failure. "
"ACE check failure");
}
ace_return_t ret = ace_set_requested_dev_caps(dao.getHandle(),
&list);
if (ACE_OK != ret) {
- ThrowMsg(Exceptions::NotAllowed, "Instalation failure. "
+ ThrowMsg(Exceptions::AceCheckFailed, "Instalation failure. "
"ACE failure");
}
delete[] list.items;
if (ACE_OK != ret) {
LogError("Error in ace_set_feature");
- ThrowMsg(Exceptions::NotAllowed, "Instalation failure. "
+ ThrowMsg(Exceptions::AceCheckFailed, "Instalation failure. "
"ace_set_feature failure.");
}
return;
if (m_context.featureLogic->isRejected()) {
LogError("Installation failure. Some devCap was not accepted by ACE.");
ThrowMsg(
- Exceptions::NotAllowed,
+ Exceptions::AceCheckFailed,
"Instalation failure. "
"Some deviceCap was not accepted by ACE.");
}
SignatureFinder signatureFinder(widgetPath);
if (SignatureFinder::NO_ERROR != signatureFinder.find(signatureFiles)) {
LogError("Error in Signature Finder");
- ThrowMsg(Exceptions::InvalidPackage,
+ ThrowMsg(Exceptions::SignatureNotFound,
"Error openig temporary widget directory");
}
if (result == WrtSignatureValidator::SIGNATURE_REVOKED) {
LogWarning("Certificate is REVOKED");
- ThrowMsg(Exceptions::InvalidPackage,
+ ThrowMsg(Exceptions::CertificateExpired,
"Certificate is REVOKED");
}
if (result == WrtSignatureValidator::SIGNATURE_INVALID) {
LogWarning("Signature is INVALID");
// TODO change exception name
- ThrowMsg(Exceptions::InvalidPackage,
+ ThrowMsg(Exceptions::SignatureInvalid,
"Invalid Package");
}
// now signature _must_ be verified
processDistributorSignature(data);
}
-
} Catch(ParserSchemaException::Base) {
LogError("Error occured in ParserSchema.");
- ReThrowMsg(Exceptions::InvalidPackage,
+ ReThrowMsg(Exceptions::SignatureInvalid,
"Error occured in ParserSchema.");
}
}
oldCertificate->getBase64());
LogDebug("new widget's author signer certificate : " <<
newCertificate->getBase64());
- ThrowMsg(Exceptions::InvalidPackage,
+ ThrowMsg(Exceptions::NotMatchedCertification,
"Author signer certificates doesn't match \
between old widget and installing widget");
}
} else {
if (!(NULL == newCertificate.Get() && NULL == oldCertificate.Get())) {
- ThrowMsg(Exceptions::InvalidPackage,
+ ThrowMsg(Exceptions::NotMatchedCertification,
"Author signer certificates doesn't match \
between old widget and installing widget");
}
}
// Create new path
if (!WrtUtilMakeDir(tempPath, TEMPORARY_PATH_MODE)) {
- ThrowMsg(Exceptions::InternalError,
+ ThrowMsg(Exceptions::FileOperationFailed,
"Failed to create temporary directory");
}
void createTempPath(const std::string& path)
{
if (!WrtUtilMakeDir(path, TEMPORARY_PATH_MODE)) {
- ThrowMsg(Exceptions::InternalError,
+ ThrowMsg(Exceptions::FileOperationFailed,
"Failed to create temporary directory");
}
}
{
LogError(
"Given tizenId not found for update installation (Same GUID?)");
- ThrowMsg(Exceptions::InvalidPackage,
+ ThrowMsg(Exceptions::DatabaseFailure,
"Given tizenId not found for update installation");
}
WidgetDAO::registerOrUpdateWidget(
if (NULL == result)
{
- ThrowMsg(Jobs::WidgetInstall::Exceptions::InternalError,
+ ThrowMsg(Jobs::WidgetInstall::Exceptions::EncryptionFailed,
"Could not open file " << path);
}
{
if (EINTR != error)
{
- ThrowMsg(Jobs::WidgetInstall::Exceptions::InternalError,
+ ThrowMsg(Jobs::WidgetInstall::Exceptions::ErrorExternalInstallingFailure,
"Error while reading data" <<
" [" << DPL::GetErrnoString(error) << "]");
}
if ((bytesWritten != bytesToWrite) && (EINTR != errno))
{
int error = errno;
- ThrowMsg(Jobs::WidgetInstall::Exceptions::InternalError,
+ ThrowMsg(Jobs::WidgetInstall::Exceptions::EncryptionFailed,
"Error while writing data" <<
" [" << DPL::GetErrnoString(error) << "]");
}
int error = errno;
LogWarning(__PRETTY_FUNCTION__ << ": fts_open failed with error: "
<< strerror(error));
- ThrowMsg(Exceptions::InternalError, "Error reading directory: "
+ ThrowMsg(Exceptions::EncryptionFailed, "Error reading directory: "
<< path);
}
<< ftsent->fts_path
<< " with error: "
<< strerror(ftsent->fts_errno));
- ThrowMsg(Exceptions::InternalError, "Error reading file");
+ ThrowMsg(Exceptions::EncryptionFailed, "Error reading file");
break;
}
}
void TaskEncryptResource::EncryptFile(const std::string &fileName)
{
- try
- {
- LogDebug("Encrypt file: " << fileName);
- std::string encFile = fileName + ".enc";
-
- struct stat info;
- memset(&info, 0, sizeof(info));
- if (stat(fileName.c_str(), &info) != 0)
- {
- int error = errno;
- ThrowMsg(Exceptions::InternalError,
- "Could not access file " << fileName <<
- "[" << DPL::GetErrnoString(error) << "]");
- }
- const std::size_t fileSize = info.st_size;
-
- DPL::ScopedFClose inFile(openFile(fileName, "r"));
- DPL::ScopedFClose outFile(openFile(encFile, "w"));
+ LogDebug("Encrypt file: " << fileName);
+ std::string encFile = fileName + ".enc";
- const std::size_t chunkSize = (fileSize > ENCRYPTION_CHUNK_MAX_SIZE
- ? ENCRYPTION_CHUNK_MAX_SIZE : fileSize);
-
- std::unique_ptr<unsigned char[]> inChunk(new unsigned char[chunkSize]);
- std::unique_ptr<unsigned char[]> outChunk;
-
- std::size_t bytesRead = 0;
- using namespace Tizen::Base;
+ struct stat info;
+ memset(&info, 0, sizeof(info));
+ if (stat(fileName.c_str(), &info) != 0)
+ {
+ int error = errno;
+ ThrowMsg(Exceptions::EncryptionFailed,
+ "Could not access file " << fileName <<
+ "[" << DPL::GetErrnoString(error) << "]");
+ }
+ const std::size_t fileSize = info.st_size;
- std::string pkgid =
- DPL::ToUTF8String(m_context.widgetConfig.tzAppid).c_str();
- const byte *b_pkgid = reinterpret_cast<const byte*>(
- pkgid.c_str());
- ByteBuffer appInfo;
- appInfo.Construct(pkgid.length());
- appInfo.SetArray(b_pkgid, 0, pkgid.length());
- appInfo.Flip();
+ DPL::ScopedFClose inFile(openFile(fileName, "r"));
+ DPL::ScopedFClose outFile(openFile(encFile, "w"));
- do
- {
- bytesRead = readBytes(inChunk.get(), chunkSize, inFile.Get());
- if (0 != bytesRead) {
- ByteBuffer *getBuffer = EncryptChunkByTrustZone(
- &appInfo,
- inChunk.get(), bytesRead);
- int decBufSize = getBuffer->GetRemaining();
-
- outChunk.reset(new unsigned char[decBufSize]);
- memcpy(outChunk.get(), getBuffer->GetPointer(), getBuffer->GetRemaining());
- getBuffer->Reset();
-
- char writeSize[ENCRYPTION_DEC_CHUNK_SIZE];
- memset(writeSize, 0x00, ENCRYPTION_DEC_CHUNK_SIZE);
- std::stringstream toString;
- toString << decBufSize;
- strncpy(writeSize, toString.str().c_str(), toString.str().length());
-
- writeBytes((unsigned char*)writeSize,
- ENCRYPTION_DEC_CHUNK_SIZE, outFile.Get());
- writeBytes(outChunk.get(), decBufSize, outFile.Get());
- }
+ const std::size_t chunkSize = (fileSize > ENCRYPTION_CHUNK_MAX_SIZE
+ ? ENCRYPTION_CHUNK_MAX_SIZE : fileSize);
- } while (0 == std::feof(inFile.Get()));
+ std::unique_ptr<unsigned char[]> inChunk(new unsigned char[chunkSize]);
+ std::unique_ptr<unsigned char[]> outChunk;
- outFile.Reset();
- inFile.Reset();
+ std::size_t bytesRead = 0;
+ using namespace Tizen::Base;
- LogDebug("File encrypted successfully");
- LogDebug("Remove plain-text file: " << fileName);
- if (0 != unlink(fileName.c_str()))
- {
- Throw(Exceptions::InternalError);
- }
+ std::string pkgid =
+ DPL::ToUTF8String(m_context.widgetConfig.tzAppid).c_str();
+ const byte *b_pkgid = reinterpret_cast<const byte*>(
+ pkgid.c_str());
+ ByteBuffer appInfo;
+ appInfo.Construct(pkgid.length());
+ appInfo.SetArray(b_pkgid, 0, pkgid.length());
+ appInfo.Flip();
- LogDebug("Rename encrypted file");
- if (0 != std::rename(encFile.c_str(), fileName.c_str()))
- {
- Throw(Exceptions::InternalError);
+ do
+ {
+ bytesRead = readBytes(inChunk.get(), chunkSize, inFile.Get());
+ if (0 != bytesRead) {
+ ByteBuffer *getBuffer = EncryptChunkByTrustZone(
+ &appInfo,
+ inChunk.get(), bytesRead);
+ int decBufSize = getBuffer->GetRemaining();
+
+ outChunk.reset(new unsigned char[decBufSize]);
+ memcpy(outChunk.get(), getBuffer->GetPointer(), getBuffer->GetRemaining());
+ getBuffer->Reset();
+
+ char writeSize[ENCRYPTION_DEC_CHUNK_SIZE];
+ memset(writeSize, 0x00, ENCRYPTION_DEC_CHUNK_SIZE);
+ std::stringstream toString;
+ toString << decBufSize;
+ strncpy(writeSize, toString.str().c_str(), toString.str().length());
+
+ writeBytes((unsigned char*)writeSize,
+ ENCRYPTION_DEC_CHUNK_SIZE, outFile.Get());
+ writeBytes(outChunk.get(), decBufSize, outFile.Get());
}
- std::string realPath = fileName;
- realPath.replace(0,
- m_context.locations->getTemporaryRootDir().length(),
- m_context.locations->getSourceDir());
+ } while (0 == std::feof(inFile.Get()));
- WrtDB::EncryptedFileInfo fileInfo;
- fileInfo.fileName = DPL::FromUTF8String(realPath);
- fileInfo.fileSize = fileSize;
+ outFile.Reset();
+ inFile.Reset();
- m_context.widgetConfig.encryptedFiles.insert(fileInfo);
+ LogDebug("File encrypted successfully");
+ LogDebug("Remove plain-text file: " << fileName);
+ if (0 != unlink(fileName.c_str()))
+ {
+ Throw(Exceptions::EncryptionFailed);
}
- Catch (Exceptions::InternalError)
+
+ LogDebug("Rename encrypted file");
+ if (0 != std::rename(encFile.c_str(), fileName.c_str()))
{
- ReThrowMsg(Exceptions::ExtractFileFailed, fileName);
+ Throw(Exceptions::EncryptionFailed);
}
+
+ std::string realPath = fileName;
+ realPath.replace(0,
+ m_context.locations->getTemporaryRootDir().length(),
+ m_context.locations->getSourceDir());
+
+ WrtDB::EncryptedFileInfo fileInfo;
+ fileInfo.fileName = DPL::FromUTF8String(realPath);
+ fileInfo.fileSize = fileSize;
+
+ m_context.widgetConfig.encryptedFiles.insert(fileInfo);
}
} //namespace WidgetInstall
if (euidaccess(storagePath.c_str(), F_OK) != 0) {
if (!WrtUtilMakeDir(storagePath, PRIVATE_STORAGE_MODE)) {
LogError("Failed to create directory for private storage");
- ThrowMsg(Exceptions::InternalError,
+ ThrowMsg(Exceptions::FileOperationFailed,
"Failed to create directory for private storage");
}
// '5000' is default uid, gid for applications.
WEBAPP_DEFAULT_UID,
WEBAPP_DEFAULT_GID) != 0)
{
- ThrowMsg(Exceptions::InternalError,
+ ThrowMsg(Exceptions::FileOperationFailed,
"Chown to invaild user");
}
} else if (euidaccess(storagePath.c_str(), W_OK | R_OK | X_OK) == 0) {
WEBAPP_DEFAULT_UID,
WEBAPP_DEFAULT_GID) != 0)
{
- ThrowMsg(Exceptions::InternalError,
+ ThrowMsg(Exceptions::FileOperationFailed,
"Chown to invaild user");
}
if (chmod(storagePath.c_str(), PRIVATE_STORAGE_MODE) != 0) {
- ThrowMsg(Exceptions::InternalError,
+ ThrowMsg(Exceptions::FileOperationFailed,
"chmod to 0700");
}
} else {
- ThrowMsg(Exceptions::InternalError,
+ ThrowMsg(Exceptions::FileOperationFailed,
"No access to private storage.");
}
}
if (!(rename(m_context.locations->getTemporaryPackageDir().c_str(),
instDir.c_str()) == 0))
{
- ThrowMsg(Exceptions::UnknownError,
+ ThrowMsg(Exceptions::FileOperationFailed,
"Error occurs during renaming widget folder");
}
m_context.job->UpdateProgress(
if (!_FolderCopy(m_context.locations->getTemporaryPackageDir(),
m_context.locations->getSourceDir()))
{
- ThrowMsg(Exceptions::UnknownError,
+ ThrowMsg(Exceptions::ErrorExternalInstallingFailure,
"Error occurs during renaming widget folder");
}
}
if(error)
LogPedantic("Failed to make a symbolic name for a file "
<< "[" << DPL::GetErrnoString(error) << "]");
- ThrowMsg(Exceptions::InstallationFailed,
+ ThrowMsg(Exceptions::FileOperationFailed,
"Symbolic link creating is not done.");
}
m_context.job->UpdateProgress(
DIR* dir = opendir(path);
if (!dir) {
LogError("icon directory doesn't exist");
- ThrowMsg(Exceptions::InternalError, path);
+ ThrowMsg(Exceptions::FileOperationFailed, path);
}
struct dirent entry;
if (code != 0) {
LogError("Manifest parser error: " << code);
- ThrowMsg(ManifestParsingError, "Parser returncode: " << code);
+ ThrowMsg(Exceptions::ManifestInvalid, "Parser returncode: " << code);
}
// TODO : It will be removed. AIL update is temporary code request by pkgmgr
if (code != 0) {
LogError("Manifest parser error: " << code);
- ThrowMsg(ManifestParsingError, "Parser returncode: " << code);
+ ThrowMsg(Exceptions::ManifestInvalid, "Parser returncode: " << code);
}
// TODO : It will be removed. AIL update is temporary code request by pkgmgr
if (0 != code) {
LogWarning("Manifest parser error: " << code);
- ThrowMsg(ManifestParsingError, "Parser returncode: " << code);
+ ThrowMsg(Exceptions::ManifestInvalid, "Parser returncode: " << code);
}
int ret = unlink(DPL::ToUTF8String(manifest_file).c_str());
if (0 != ret) {
dir = opendir(m_npsource.c_str());
if (dir == NULL) {
LogError("Unable to open plugins directory");
- ThrowMsg(Exceptions::InternalError, "Unable to read plugins directory");
+ ThrowMsg(Exceptions::FileOperationFailed, "Unable to read plugins directory");
}
std::string tempname;
struct dirent entry;
LogDebug("Creating destination plugin directory");
if (!WrtUtilMakeDir(m_npdestination, InstallationPluginsDirMode)) {
LogError("Failed to create directory for plugins");
- ThrowMsg(Exceptions::InternalError,
+ ThrowMsg(Exceptions::FileOperationFailed,
"Failed to create directory for plugins");
}
if (rename(source.c_str(), destination.c_str()) != 0) {
LogError("Failed to move " << source << " to " << destination);
LogError("(errno: " << errno << ")");
- ThrowMsg(Exceptions::InternalError, "Failed to copy plugin file");
+ ThrowMsg(Exceptions::FileOperationFailed, "Failed to copy plugin file");
}
}
* architectures). */
if (!WrtUtilRemove(source)) {
LogError("Failed to plugins source remove directory");
- ThrowMsg(Exceptions::InternalError,
+ ThrowMsg(Exceptions::FileOperationFailed,
"Failed to plugins source remove directory");
}
LogDebug("Plugins copying step ended");
int ret = fsync(temp->_fileno);
fclose(temp);
if (-1 == ret) {
- ThrowMsg(Exceptions::InternalError, "Fail to fsync for recovery.");
+ ThrowMsg(Exceptions::FileOperationFailed, "Fail to fsync for recovery.");
}
m_context.installInfo = infoPath.str();
LogDebug("Create file : " << m_context.installInfo);
} else {
- ThrowMsg(Exceptions::InternalError, "Fail to create file for recovery.");
+ ThrowMsg(Exceptions::FileOperationFailed, "Fail to create file for recovery.");
}
m_context.job->UpdateProgress(
DIR* pkgDir = opendir(dirPath.c_str());
if (!pkgDir) {
LogError("Package directory " << dirPath << " doesn't exist");
- ThrowMsg(Exceptions::InternalError,
+ ThrowMsg(Exceptions::BackupFailed,
"Error occurs during read \
directory");
}
std::string dirName = dirent.d_name;
std::string absFileName = dirPath + "/" + dirName;
if (stat(absFileName.c_str(), &statInfo) != 0) {
- ThrowMsg(Exceptions::InternalError, "Error occurs read file");
+ ThrowMsg(Exceptions::BackupFailed, "Error occurs read file");
}
if (S_ISDIR(statInfo.st_mode)) {
struct stat sInfo;
if (stat(resFile.c_str(), &sInfo) != 0) {
- ThrowMsg(Exceptions::InternalError, "Error occurs read file");
+ ThrowMsg(Exceptions::BackupFailed, "Error occurs read file");
}
if (S_ISDIR(sInfo.st_mode)) {
#include <dpl/exception.h>
#include <job_exception_base.h>
+#include <job_exception_error.h>
//TODO SafeException(...)
+using namespace Jobs::Exceptions;
+
namespace Jobs {
namespace WidgetInstall {
namespace Exceptions {
-enum Type
-{
- Success, ///< Success
-
- ErrorInvalidWidgetPackage, ///< invalid widget package
- ErrorWidgetDoesNotExist, ///< given tizenAppId is invalid, no app
- ErrorAreadyUninstalling, ///< Widget is already being uninstalled
- ErrorInvalidPackage, ///< Widget signature is invalid.
- ErrorInternal, ///< Internal error due to inconsistency
- ErrorNotAllowed, ///< Widget installation or update not
- // allowed
- ///< because violation of policy ocurred
- ErrorDeferred, ///< Widget installation was deferred and
- // will be continued when possible
- ErrorDatabaseFailure, ///< Failure in database
- ErrorRemovingFolderFailure, ///< Failure in removing existing widget
- // folder
- ErrorCreateVconfFailure, ///< Failure in creating vconf
- ErrorInstallOspServcie, ///< Failure in installing osp service
- ErrorUpdateWidget, ///< Failure in widget update.
- ErrorInstallToExt, ///< Failure in install to sdcard
- ErrorUnknown ///< Temporary error. Try to not use this.
-};
DECLARE_JOB_EXCEPTION_BASE(JobExceptionBase, Base, ErrorUnknown)
-// PREPARE
-DECLARE_JOB_EXCEPTION(Base, NotAllowed, ErrorNotAllowed)
-DECLARE_JOB_EXCEPTION(Base, Deferred, ErrorDeferred)
+DECLARE_JOB_EXCEPTION(Base, OpenZipFailed, ErrorPackageInvalid)
+DECLARE_JOB_EXCEPTION(Base, ZipEmpty, ErrorPackageInvalid)
+DECLARE_JOB_EXCEPTION(Base, ExtractFileFailed, ErrorPackageInvalid)
+DECLARE_JOB_EXCEPTION(Base, EmptyPluginsDirectory, ErrorPackageInvalid)
+DECLARE_JOB_EXCEPTION(Base, PluginsSubdirectory, ErrorPackageInvalid)
-//UNZIP
-DECLARE_JOB_EXCEPTION(Base, OpenZipFailed, ErrorInvalidWidgetPackage)
-DECLARE_JOB_EXCEPTION(Base, ZipEmpty, ErrorInvalidWidgetPackage)
-DECLARE_JOB_EXCEPTION(Base, ExtractFileFailed, ErrorInvalidWidgetPackage)
-DECLARE_JOB_EXCEPTION(Base, InternalError, ErrorInternal)
+DECLARE_JOB_EXCEPTION(Base, PackageLowerVersion, ErrorPackageLowerVersion)
-//CERTIFY
-DECLARE_JOB_EXCEPTION(Base, InvalidPackage, ErrorInvalidPackage)
+DECLARE_JOB_EXCEPTION(Base, ManifestInvalid, ErrorManifestInvalid)
-//WCONFIG
-DECLARE_JOB_EXCEPTION(Base, WidgetConfigFileInvalid, ErrorInvalidWidgetPackage)
-DECLARE_JOB_EXCEPTION(Base, InstallationFailed, ErrorInvalidWidgetPackage)
-DECLARE_JOB_EXCEPTION(Base, UnknownError, ErrorUnknown)
-DECLARE_JOB_EXCEPTION(Base, DatabaseFailure, ErrorDatabaseFailure)
-DECLARE_JOB_EXCEPTION(Base, RemovingFolderFailure, ErrorRemovingFolderFailure)
-DECLARE_JOB_EXCEPTION(Base, RemovingFileFailure, ErrorRemovingFolderFailure)
-DECLARE_JOB_EXCEPTION(Base, CreateVconfFailure, ErrorCreateVconfFailure)
+DECLARE_JOB_EXCEPTION(Base, WidgetConfigFileNotFound, ErrorConfigNotFound)
+DECLARE_JOB_EXCEPTION(Base, WidgetConfigFileInvalid, ErrorConfigInvalid)
-DECLARE_JOB_EXCEPTION(Base, CopyIconFailed, ErrorUnknown)
+DECLARE_JOB_EXCEPTION(Base, SignatureNotFound, ErrorSignatureNotFound)
-DECLARE_JOB_EXCEPTION(Base, ErrorExternalInstallingFailure, ErrorInstallToExt)
+DECLARE_JOB_EXCEPTION(Base, SignatureInvalid, ErrorSignatureInvalid)
-// Installation osp service
-DECLARE_JOB_EXCEPTION(Base, InstallOspsvcFailed, ErrorInstallOspServcie)
-//UPDATE
-DECLARE_JOB_EXCEPTION(Base, BackupFailed, ErrorUpdateWidget)
-DECLARE_JOB_EXCEPTION(Base, InsertNewWidgetFailed, ErrorUpdateWidget)
-DECLARE_JOB_EXCEPTION(Base, RemoveBackupFailed, ErrorUpdateWidget)
+DECLARE_JOB_EXCEPTION(Base, SignatureVerificationFailed, ErrorSignatureVerificationFailed)
+
+DECLARE_JOB_EXCEPTION(Base, RootCertificateNotFound, ErrorRootCertificateNotFound)
-//Database
-DECLARE_JOB_EXCEPTION(Base, UpdateFailed, ErrorInvalidWidgetPackage)
+DECLARE_JOB_EXCEPTION(Base, CertificationInvaid, ErrorCertificationInvaid)
+DECLARE_JOB_EXCEPTION(Base, NotMatchedCertification, ErrorCertificationInvaid)
-// Plugins copy errors
-DECLARE_JOB_EXCEPTION(Base, EmptyPluginsDirectory, ErrorInvalidWidgetPackage)
-DECLARE_JOB_EXCEPTION(Base, PluginsSubdirectory, ErrorInvalidWidgetPackage)
+DECLARE_JOB_EXCEPTION(Base, CertificateChainVerificationFailed, ErrorCertificateChainVerificationFailed)
-DECLARE_JOB_EXCEPTION(Base, SetCertificateInfoFailed, ErrorUnknown)
+DECLARE_JOB_EXCEPTION(Base, CertificateExpired, ErrorCertificateExpired)
+
+DECLARE_JOB_EXCEPTION(Base, NotAllowed, ErrorFatalError)
+DECLARE_JOB_EXCEPTION(Base, Deferred, ErrorFatalError)
+DECLARE_JOB_EXCEPTION(Base, WidgetRunningError, ErrorFatalError)
+DECLARE_JOB_EXCEPTION(Base, DRMFailed, ErrorFatalError)
+DECLARE_JOB_EXCEPTION(Base, DatabaseFailure, ErrorFatalError)
+DECLARE_JOB_EXCEPTION(Base, RemovingFolderFailure, ErrorFatalError)
+DECLARE_JOB_EXCEPTION(Base, RemovingFileFailure, ErrorFatalError)
+DECLARE_JOB_EXCEPTION(Base, CreateVconfFailure, ErrorFatalError)
+DECLARE_JOB_EXCEPTION(Base, CopyIconFailed, ErrorFatalError)
+DECLARE_JOB_EXCEPTION(Base, FileOperationFailed, ErrorFatalError)
+DECLARE_JOB_EXCEPTION(Base, InstallToExternalFailed, ErrorFatalError)
+DECLARE_JOB_EXCEPTION(Base, BackupFailed, ErrorFatalError)
+DECLARE_JOB_EXCEPTION(Base, InsertNewWidgetFailed, ErrorFatalError)
+DECLARE_JOB_EXCEPTION(Base, RemoveBackupFailed, ErrorFatalError)
+DECLARE_JOB_EXCEPTION(Base, UpdateFailed, ErrorFatalError)
+DECLARE_JOB_EXCEPTION(Base, SetCertificateInfoFailed, ErrorFatalError)
+DECLARE_JOB_EXCEPTION(Base, ErrorExternalInstallingFailure, ErrorFatalError)
+
+DECLARE_JOB_EXCEPTION(Base, PackageAlreadyInstalled, ErrorPackageAlreadyInstalled)
+DECLARE_JOB_EXCEPTION(Base, AceCheckFailed, ErrorAceCheckFailed)
+DECLARE_JOB_EXCEPTION(Base, EncryptionFailed, ErrorEncryptionFailed)
+DECLARE_JOB_EXCEPTION(Base, InstallOspsvcFailed, ErrorInstallOspServcie)
} //namespace
} //namespace
} //namespace
typedef void (*InstallerFinishedCallback)(
void *userParam,
std::string tizenId,
- Jobs::WidgetInstall::Exceptions::Type);
+ Jobs::Exceptions::Type);
typedef void (*InstallerProgressCallback)(void *userParam,
ProgressPercent percent,
LogDebug("Call widget uninstall success finishedCallback");
getInstallerStruct().finishedCallback(getInstallerStruct().userParam,
getRemovedTizenId(),
- Exceptions::Success);
+ Jobs::Exceptions::Success);
}
void JobWidgetUninstall::SendFinishedFailure()
void JobWidgetUninstall::SaveExceptionData(const Jobs::JobExceptionBase &e)
{
- m_exceptionCaught = static_cast<Exceptions::Type>(e.getParam());
+ m_exceptionCaught = static_cast<Jobs::Exceptions::Type>(e.getParam());
m_exceptionMessage = e.GetMessage();
}
UninstallerContext m_context;
//TODO move it to base class of all jobs
- Exceptions::Type m_exceptionCaught;
+ Jobs::Exceptions::Type m_exceptionCaught;
std::string m_exceptionMessage;
public:
#define WIDGET_UNINSTALL_ERRORS_H_
#include <job_exception_base.h>
+#include <job_exception_error.h>
+
+using namespace Jobs::Exceptions;
namespace Jobs {
namespace WidgetUninstall {
namespace Exceptions {
-enum Type
-{
- Success,
-
- ErrorWidgetDoesNotExist,
- ErrorAlreadyUninstalling,
- ErrorDatabaseFailure,
- ErrorUninstallOspSvcFailed,
- ErrorPlatformAPI,
- ErrorUnknown
-};
DECLARE_JOB_EXCEPTION_BASE(JobExceptionBase, Base, ErrorUnknown)
-DECLARE_JOB_EXCEPTION(Base, DatabaseFailure, ErrorDatabaseFailure)
-DECLARE_JOB_EXCEPTION(Base, AlreadyUninstalling, ErrorAlreadyUninstalling)
-DECLARE_JOB_EXCEPTION(Base, WidgetNotExist, ErrorWidgetDoesNotExist)
-DECLARE_JOB_EXCEPTION(Base, UninstallOspSvcFailed, ErrorUninstallOspSvcFailed)
-DECLARE_JOB_EXCEPTION(Base, PlatformAPIFailure, ErrorPlatformAPI)
+DECLARE_JOB_EXCEPTION(Base, DatabaseFailure, ErrorWidgetUninstallationFailed)
+DECLARE_JOB_EXCEPTION(Base, AlreadyUninstalling,
+ ErrorWidgetUninstallationFailed)
+DECLARE_JOB_EXCEPTION(Base, WidgetNotExist, ErrorWidgetUninstallationFailed)
+DECLARE_JOB_EXCEPTION(Base, UninstallOspSvcFailed,
+ ErrorWidgetUninstallationFailed)
+DECLARE_JOB_EXCEPTION(Base, PlatformAPIFailure, ErrorWidgetUninstallationFailed)
} //namespace
} //namespace
} //namespace
typedef void (*UninstallerFinishedCallback)(
void *userParam,
std::string tizenId,
- Jobs::WidgetUninstall::Exceptions::Type);
+ Jobs::Exceptions::Type);
typedef void (*UninstallerProgressCallback)(
void *userParam,
#define PKGMGR_END_FAILURE "fail"
#define PKGMGR_PROGRESS_KEY "install_percent"
#define PKGMGR_ICON_PATH "icon_path"
+#define PKGMGR_ERROR "error"
typedef pkgmgr_installer* PkgmgrHandle;
// callback for finished install
void installFinishedCallback(void *userParam,
std::string tizenId,
- Jobs::WidgetInstall::Exceptions::Type status)
+ Jobs::Exceptions::Type status)
{
Assert(userParam != NULL);
WrtErrStatus errorStatus;
switch (status) {
- case Jobs::WidgetInstall::Exceptions::Success:
+ case Jobs::Exceptions::Success:
errorStatus = WRT_SUCCESS;
break;
- case Jobs::WidgetInstall::Exceptions::ErrorWidgetDoesNotExist:
- errorStatus = WRT_INSTALLER_ERROR_WIDGET_DOES_NOT_EXIST;
+ case Jobs::Exceptions::ErrorPackageNotFound:
+ errorStatus = WRT_INSTALLER_ERROR_PACKAGE_NOT_FOUND;
break;
- case Jobs::WidgetInstall::Exceptions::ErrorAreadyUninstalling:
- errorStatus = WRT_INSTALLER_ERROR_ALREADY_UNINSTALLING;
+ case Jobs::Exceptions::ErrorPackageLowerVersion:
+ errorStatus = WRT_INSTALLER_ERROR_PACKAGE_LOWER_VERSION;
break;
- case Jobs::WidgetInstall::Exceptions::ErrorInvalidPackage:
- errorStatus = WRT_INSTALLER_ERROR_INVALID_CERTIFICATE;
+ case Jobs::Exceptions::ErrorManifestNotFound:
+ errorStatus = WRT_INSTALLER_ERROR_MANIFEST_NOT_FOUND;
break;
- case Jobs::WidgetInstall::Exceptions::ErrorInternal:
- errorStatus = WRT_INSTALLER_ERROR_INTERNAL;
+ case Jobs::Exceptions::ErrorManifestInvalid:
+ errorStatus = WRT_INSTALLER_ERROR_MANIFEST_INVALID;
break;
- case Jobs::WidgetInstall::Exceptions::ErrorNotAllowed:
- errorStatus = WRT_INSTALLER_ERROR_NOT_ALLOWED;
+ case Jobs::Exceptions::ErrorConfigNotFound:
+ errorStatus = WRT_INSTALLER_CONFIG_NOT_FOUND;
break;
- case Jobs::WidgetInstall::Exceptions::ErrorDeferred:
- errorStatus = WRT_INSTALLER_ERROR_DEFERRED;
+ case Jobs::Exceptions::ErrorConfigInvalid:
+ errorStatus = WRT_INSTALLER_ERROR_CONFIG_INVALID;
break;
- case Jobs::WidgetInstall::Exceptions::ErrorDatabaseFailure:
- errorStatus = WRT_INSTALLER_ERROR_DATABASE_FAILURE;
+ case Jobs::Exceptions::ErrorSignatureNotFound:
+ errorStatus = WRT_INSTALLER_ERROR_SIGNATURE_NOT_FOUND;
break;
- case Jobs::WidgetInstall::Exceptions::ErrorInstallOspServcie:
- errorStatus = WRT_INSTALLER_ERROR_OSPSVC;
+ case Jobs::Exceptions::ErrorSignatureInvalid:
+ errorStatus = WRT_INSTALLER_ERROR_SIGNATURE_INVALID;
break;
- case Jobs::WidgetInstall::Exceptions::ErrorUnknown:
- errorStatus = WRT_INSTALLER_ERROR_UNKNOWN;
+ case Jobs::Exceptions::ErrorSignatureVerificationFailed:
+ errorStatus = WRT_INSTALLER_ERROR_SIGNATURE_VERIFICATION_FAILED;
+ break;
+
+ case Jobs::Exceptions::ErrorRootCertificateNotFound:
+ errorStatus = WRT_INSTALLER_ERROR_ROOT_CERTIFICATE_NOT_FOUND;
+ break;
+
+ case Jobs::Exceptions::ErrorCertificationInvaid:
+ errorStatus = WRT_INSTALLER_ERROR_CERTIFICATION_INVAID;
+ break;
+
+ case
+ Jobs::Exceptions::ErrorCertificateChainVerificationFailed:
+ errorStatus =
+ WRT_INSTALLER_ERROR_CERTIFICATE_CHAIN_VERIFICATION_FAILED;
+ break;
+
+ case Jobs::Exceptions::ErrorCertificateExpired:
+ errorStatus = WRT_INSTALLER_ERROR_CERTIFICATE_EXPIRED;
+ break;
+
+ case Jobs::Exceptions::ErrorInvalidPrivilege:
+ errorStatus = WRT_INSTALLER_ERROR_INVALID_PRIVILEGE;
+ break;
+
+ case Jobs::Exceptions::ErrorMenuIconNotFound:
+ errorStatus = WRT_INSTALLER_ERROR_MENU_ICON_NOT_FOUND;
+ break;
+
+ case Jobs::Exceptions::ErrorFatalError:
+ errorStatus = WRT_INSTALLER_ERROR_FATAL_ERROR;
+ break;
+
+ case Jobs::Exceptions::ErrorOutOfStorage:
+ errorStatus = WRT_INSTALLER_ERROR_OUT_OF_STORAGE;
+ break;
+
+ case Jobs::Exceptions::ErrorOutOfMemory:
+ errorStatus = WRT_INSTALLER_ERROR_OUT_OF_MEMORY;
+ break;
+
+ case Jobs::Exceptions::ErrorPackageAlreadyInstalled:
+ errorStatus = WRT_INSTALLER_ERROR_PACKAGE_ALREADY_INSTALLED;
+ break;
+
+ case Jobs::Exceptions::ErrorAceCheckFailed:
+ errorStatus = WRT_INSTALLER_ERROR_ACE_CHECK_FAILED;
+ break;
+
+ case Jobs::Exceptions::ErrorManifestCreateFailed:
+ errorStatus = WRT_INSTALLER_ERROR_MANIFEST_CREATE_FAILED;
+ break;
+
+ case Jobs::Exceptions::ErrorEncryptionFailed:
+ errorStatus = WRT_INSTALLER_ERROR_ENCRYPTION_FAILED;
+ break;
+
+ case Jobs::Exceptions::ErrorInstallOspServcie:
+ errorStatus = WRT_INSTALLER_ERROR_INSTALL_OSP_SERVCIE;
break;
default:
// callback for finished install
void uninstallFinishedCallback(void *userParam,
std::string tizenId,
- Jobs::WidgetUninstall::Exceptions::Type status)
+ Jobs::Exceptions::Type status)
{
Assert(userParam != NULL);
WrtErrStatus errorStatus;
switch (status) {
- case Jobs::WidgetUninstall::Exceptions::Success:
+ case Jobs::Exceptions::Success:
errorStatus = WRT_SUCCESS;
break;
- case Jobs::WidgetUninstall::Exceptions::ErrorAlreadyUninstalling:
- errorStatus = WRT_INSTALLER_ERROR_ALREADY_UNINSTALLING;
- break;
-
- case Jobs::WidgetUninstall::Exceptions::ErrorWidgetDoesNotExist:
- errorStatus = WRT_INSTALLER_ERROR_WIDGET_DOES_NOT_EXIST;
- break;
-
- case Jobs::WidgetUninstall::Exceptions::ErrorDatabaseFailure:
- errorStatus = WRT_INSTALLER_ERROR_DATABASE_FAILURE;
- break;
-
- case Jobs::WidgetUninstall::Exceptions::ErrorUninstallOspSvcFailed:
- errorStatus = WRT_INSTALLER_ERROR_OSPSVC;
+ case Jobs::Exceptions::ErrorWidgetUninstallationFailed:
+ errorStatus = WRT_INSTALLER_ERROR_UNINSTALLATION_FAILED;
break;
- case Jobs::WidgetUninstall::Exceptions::ErrorUnknown:
+ case Jobs::Exceptions::ErrorUnknown:
errorStatus = WRT_INSTALLER_ERROR_UNKNOWN;
break;
}
void pluginInstallFinishedCallback(void *userParam,
- Jobs::PluginInstall::Exceptions::Type status)
+ Jobs::Exceptions::Type status)
{
Assert(userParam);
WrtErrStatus errorStatus;
switch (status) {
- case Jobs::PluginInstall::Exceptions::Success:
+ case Jobs::Exceptions::Success:
errorStatus = WRT_SUCCESS;
break;
- case Jobs::PluginInstall::Exceptions::WrongPluginPath:
- errorStatus = WRT_PLUGIN_INSTALLER_ERROR_WRONG_PATH;
- break;
- case Jobs::PluginInstall::Exceptions::MetafileError:
- errorStatus = WRT_PLUGIN_INSTALLER_ERROR_METAFILE;
- break;
- case Jobs::PluginInstall::Exceptions::AlreadyInstalled:
- errorStatus = WRT_PLUGIN_INSTALLER_ERROR_ALREADY_INSTALLED;
- break;
- case Jobs::PluginInstall::Exceptions::LoadingLibraryError:
- errorStatus = WRT_PLUGIN_INSTALLER_ERROR_LIBRARY_ERROR;
- break;
- case Jobs::PluginInstall::Exceptions::InstallationWaiting:
- errorStatus = WRT_PLUGIN_INSTALLER_ERROR_WAITING;
- break;
+ case Jobs::Exceptions::ErrorPluginInstallationFailed:
+ errorStatus = WRT_INSTALLER_ERROR_PLUGIN_INSTALLATION_FAILED;
default:
errorStatus = WRT_INSTALLER_ERROR_UNKNOWN;
break;
void installFinishedCallback(void *userParam,
std::string tizenId,
- Jobs::WidgetInstall::Exceptions::Type status);
+ Jobs::Exceptions::Type status);
void uninstallFinishedCallback(void *userParam,
std::string tizenId,
- Jobs::WidgetUninstall::Exceptions::Type status);
+ Jobs::Exceptions::Type status);
void pluginInstallFinishedCallback(void *userParam,
- Jobs::PluginInstall::Exceptions::Type status);
+ Jobs::Exceptions::Type status);
// callback for progress of install OR uninstall
void installProgressCallback(void *userParam,
} else if (!PluginUtils::lockPluginInstallation()) {
LogError("Failed to open plugin installation lock file"
" Plugins are currently installed by other process");
- staticWrtPluginInstallationCallback(WRT_PLUGIN_INSTALLER_ERROR_LOCK,
+ staticWrtPluginInstallationCallback(WRT_INSTALLER_ERROR_PLUGIN_INSTALLATION_FAILED,
this);
return;
}
}
switch (status) {
- case WRT_INSTALLER_ERROR_INVALID_WIDGET_PACKAGE:
+ case WRT_INSTALLER_ERROR_PACKAGE_NOT_FOUND:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - widget package does not exist\n",
+ tizenId.c_str(), printMsg.c_str());
+ break;
+
+ case WRT_INSTALLER_ERROR_PACKAGE_INVALID:
This->m_returnStatus = 1; //this status is specific
fprintf(stderr, "## wrt-installer : %s %s has failed - invalid widget package\n",
tizenId.c_str(), printMsg.c_str());
break;
- case WRT_INSTALLER_ERROR_WIDGET_DOES_NOT_EXIST:
- fprintf(stderr, "## wrt-installer : %s %s has failed - widget package does not exist\n",
+ case WRT_INSTALLER_ERROR_PACKAGE_LOWER_VERSION:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - given"
+ " version is lower than existing version\n",
+ tizenId.c_str(), printMsg.c_str());
+ break;
+
+ case WRT_INSTALLER_ERROR_MANIFEST_NOT_FOUND:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - manifest"
+ " file doesn't find in package.\n",
+ tizenId.c_str(), printMsg.c_str());
+ break;
+
+ case WRT_INSTALLER_ERROR_MANIFEST_INVALID:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "invalid manifestx.xml\n",
+ tizenId.c_str(), printMsg.c_str());
+ break;
+
+ case WRT_INSTALLER_CONFIG_NOT_FOUND:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "config.xml does not exist\n",
+ tizenId.c_str(), printMsg.c_str());
+ break;
+
+ case WRT_INSTALLER_ERROR_CONFIG_INVALID:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "invalid config.xml\n",
+ tizenId.c_str(), printMsg.c_str());
+ break;
+
+ case WRT_INSTALLER_ERROR_SIGNATURE_NOT_FOUND:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "signature doesn't exist in package.\n",
+ tizenId.c_str(), printMsg.c_str());
+ break;
+
+ case WRT_INSTALLER_ERROR_SIGNATURE_INVALID:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "invalid signature.\n",
+ tizenId.c_str(), printMsg.c_str());
+ break;
+
+ case WRT_INSTALLER_ERROR_SIGNATURE_VERIFICATION_FAILED:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "signature verification failed.\n",
+ tizenId.c_str(), printMsg.c_str());
+ break;
+
+ case WRT_INSTALLER_ERROR_ROOT_CERTIFICATE_NOT_FOUND:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "root certificate could not find.\n",
+ tizenId.c_str(), printMsg.c_str());
+ break;
+
+ case WRT_INSTALLER_ERROR_CERTIFICATION_INVAID:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "invalid certification.\n",
+ tizenId.c_str(), printMsg.c_str());
+ break;
+
+ case WRT_INSTALLER_ERROR_CERTIFICATE_CHAIN_VERIFICATION_FAILED:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "certificate chain verification failed.\n",
+ tizenId.c_str(), printMsg.c_str());
+ break;
+
+ case WRT_INSTALLER_ERROR_CERTIFICATE_EXPIRED:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "certificate expired.\n",
+ tizenId.c_str(), printMsg.c_str());
+ break;
+
+ case WRT_INSTALLER_ERROR_INVALID_PRIVILEGE:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "invalid privilege\n",
+ tizenId.c_str(), printMsg.c_str());
+ break;
+
+ case WRT_INSTALLER_ERROR_MENU_ICON_NOT_FOUND:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "menu icon could not find\n",
+ tizenId.c_str(), printMsg.c_str());
+ break;
+
+ case WRT_INSTALLER_ERROR_FATAL_ERROR:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "fatal error\n",
tizenId.c_str(), printMsg.c_str());
break;
- case WRT_INSTALLER_ERROR_ALREADY_UNINSTALLING:
- fprintf(stderr, "## wrt-installer : %s %s has failed - already uninstalling\n",
+ case WRT_INSTALLER_ERROR_OUT_OF_STORAGE:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "out of storage\n",
tizenId.c_str(), printMsg.c_str());
break;
- case WRT_INSTALLER_ERROR_INVALID_CERTIFICATE:
- fprintf(stderr,"## wrt-installer : %s %s has failed - invalid certificate - invalid signature\n",
+ case WRT_INSTALLER_ERROR_OUT_OF_MEMORY:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "out of memory\n",
tizenId.c_str(), printMsg.c_str());
break;
- case WRT_INSTALLER_ERROR_ALREADY_INSTALLED:
- fprintf(stderr,"## wrt-installer : %s %s has failed - already installed\n",
+ case WRT_INSTALLER_ERROR_PACKAGE_ALREADY_INSTALLED:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "package already installed\n",
tizenId.c_str(), printMsg.c_str());
break;
- case WRT_INSTALLER_ERROR_INTERNAL:
- fprintf(stderr,"## wrt-installer : %s %s has failed - internal error\n",
+ case WRT_INSTALLER_ERROR_ACE_CHECK_FAILED:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "ace check failure\n",
tizenId.c_str(), printMsg.c_str());
break;
- case WRT_INSTALLER_ERROR_NOT_ALLOWED:
- fprintf(stderr,"## wrt-installer : %s %s has failed - installation or update not allowed; invalid"
- " mode\n", tizenId.c_str(), printMsg.c_str());
+ case WRT_INSTALLER_ERROR_MANIFEST_CREATE_FAILED:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "to create manifest failed\n",
+ tizenId.c_str(), printMsg.c_str());
break;
- case WRT_INSTALLER_ERROR_DEFERRED:
- fprintf(stderr,"## wrt-installer : deferred: widget update will continue after the widget"
- " has been stopped\n");
+ case WRT_INSTALLER_ERROR_ENCRYPTION_FAILED:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "encryption of resource failed\n",
+ tizenId.c_str(), printMsg.c_str());
break;
- case WRT_INSTALLER_ERROR_DATABASE_FAILURE:
- fprintf(stderr,"## wrt-installer : %s %s has failed - database failure\n",
+ case WRT_INSTALLER_ERROR_INSTALL_OSP_SERVCIE:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "installation of osp service failed\n",
tizenId.c_str(), printMsg.c_str());
break;
- case WRT_INSTALLER_ERROR_OSPSVC:
- fprintf(stderr,"## wrt-installer : %s %s has failed - during installation or"
- " uninstallation osp service\n", tizenId.c_str(),
- printMsg.c_str());
+ case WRT_INSTALLER_ERROR_UNINSTALLATION_FAILED:
+ This->m_returnStatus = 1; //this status is specific
+ fprintf(stderr, "## wrt-installer : %s %s has failed - "
+ "widget uninstallation failed\n",
+ tizenId.c_str(), printMsg.c_str());
break;
+
case WRT_INSTALLER_ERROR_UNKNOWN:
fprintf(stderr,"## wrt-installer : %s %s has failed - unknown error\n",
tizenId.c_str(), printMsg.c_str());
// Failure
LogWarning("One of the plugins installation failed!: " << path);
- if (WRT_PLUGIN_INSTALLER_ERROR_WAITING == status) {
- LogInfo("Plugin installation is waiting for dependencies");
- fprintf(stderr, "## wrt-installer : plugin installation failed [%s]\n",
- path.c_str());
- }
-
switch (status) {
- case WRT_PLUGIN_INSTALLER_ERROR_WRONG_PATH:
- LogError("failed: wrong path to plugin directory\n");
- break;
-
- case WRT_PLUGIN_INSTALLER_ERROR_METAFILE:
- LogError("failed: plugin metafile error\n");
- break;
-
- case WRT_PLUGIN_INSTALLER_ERROR_ALREADY_INSTALLED:
- LogError("failed: plugin already installed\n");
- break;
-
- case WRT_PLUGIN_INSTALLER_ERROR_LIBRARY_ERROR:
- LogError("failed: plugin library: missing symbols or structures\n");
+ case WRT_INSTALLER_ERROR_PLUGIN_INSTALLATION_FAILED:
+ LogError("failed: plugin installation failed\n");
break;
- case WRT_PLUGIN_INSTALLER_ERROR_UNKNOWN:
+ case WRT_INSTALLER_ERROR_UNKNOWN:
LogError("failed: unknown error\n");
break;
LogError("Fail to install plugin : " << plugin_data->plugin_path);
switch (status) {
- case WRT_PLUGIN_INSTALLER_ERROR_WRONG_PATH:
+ case WRT_INSTALLER_ERROR_PLUGIN_INSTALLATION_FAILED:
LogError("Failed : Plugin install path is wrong");
break;
- case WRT_PLUGIN_INSTALLER_ERROR_METAFILE:
- LogError("Failed : Plugin Metafile Error");
- break;
- case WRT_PLUGIN_INSTALLER_ERROR_ALREADY_INSTALLED:
- LogError("Failed : This Plugin is already installed");
- break;
- case WRT_PLUGIN_INSTALLER_ERROR_LIBRARY_ERROR:
- LogError("Failed : Library Error. Missing symbol or structures");
- break;
- case WRT_PLUGIN_INSTALLER_ERROR_WAITING:
- LogError("Failed : Waiting for plugin dependencies");
- break;
- case WRT_PLUGIN_INSTALLER_ERROR_LOCK:
- LogError("Failed : Lock Error");
- break;
- case WRT_PLUGIN_INSTALLER_ERROR_UNKNOWN:
+ case WRT_INSTALLER_ERROR_UNKNOWN:
LogError("Failed : Unkown Error");
break;
default:
// Check paths
if (!checkPaths()) {
if (callback) {
- callback(WRT_ERROR_NO_PATH, userdata);
+ callback(WRT_INSTALLER_ERROR_FATAL_ERROR, userdata);
}
return TRUE;
}
LogError("Internal Error during Init:");
DPL::Exception::DisplayKnownException(ex);
if (callback) {
- callback(WRT_ERROR_INTERNAL, userdata);
+ callback(WRT_INSTALLER_ERROR_FATAL_ERROR, userdata);
}
return FALSE;
}
// Check paths
if (!checkPaths()) {
if (callback) {
- callback(WRT_ERROR_NO_PATH, userdata);
+ callback(WRT_INSTALLER_ERROR_FATAL_ERROR, userdata);
}
return TRUE;
}
LogError("Internal Error during Init:");
DPL::Exception::DisplayKnownException(ex);
if (callback) {
- callback(WRT_ERROR_INTERNAL, userdata);
+ callback(WRT_INSTALLER_ERROR_FATAL_ERROR, userdata);
}
return FALSE;
}
return WRT_SUCCESS;
} catch (WidgetDAOReadOnly::Exception::WidgetNotExist&) {
LogError("Error package name is not found");
- return WRT_ERROR_PKGNAME_NOT_FOUND;
+ return WRT_INSTALLER_ERROR_FATAL_ERROR;
} catch (const DPL::Exception& ex) {
LogError("Internal Error during get widget id by package name");
DPL::Exception::DisplayKnownException(ex);
- return WRT_ERROR_INTERNAL;
+ return WRT_INSTALLER_ERROR_FATAL_ERROR;
}
}
#ifdef __cplusplus
/* Generic success */
WRT_SUCCESS = 0, /*< Success*/
- /* Error result */
- WRT_ERROR_INTERNAL = -128, /*< Internal library error.
- * Should never occur */
+ /* pkgmgr error */
+ WRT_INSTALLER_ERROR_PACKAGE_NOT_FOUND, ///<
+ WRT_INSTALLER_ERROR_PACKAGE_INVALID, ///< invalid widget package
+ WRT_INSTALLER_ERROR_PACKAGE_LOWER_VERSION, ///< given version is lower than existing version
+ WRT_INSTALLER_ERROR_MANIFEST_NOT_FOUND, ///<
+ WRT_INSTALLER_ERROR_MANIFEST_INVALID, ///<
+ WRT_INSTALLER_CONFIG_NOT_FOUND, ///< couldn't find config.xml
+ ///< in package.
+ WRT_INSTALLER_ERROR_CONFIG_INVALID, ///< invalid config.xml
+ WRT_INSTALLER_ERROR_SIGNATURE_NOT_FOUND, ///< signature file not exist.
+ WRT_INSTALLER_ERROR_SIGNATURE_INVALID, ///< invalid signature file
+ WRT_INSTALLER_ERROR_SIGNATURE_VERIFICATION_FAILED, ///< failure in verificate
+ ///< signature
+ WRT_INSTALLER_ERROR_ROOT_CERTIFICATE_NOT_FOUND, ///< couldn't find root certificate.
+ WRT_INSTALLER_ERROR_CERTIFICATION_INVAID, ///< invalid certification
+ WRT_INSTALLER_ERROR_CERTIFICATE_CHAIN_VERIFICATION_FAILED, ///< failure in verificate
+ ///< certification chain.
+ WRT_INSTALLER_ERROR_CERTIFICATE_EXPIRED, ///< expire cerification.
+ WRT_INSTALLER_ERROR_INVALID_PRIVILEGE, ///< invalid privilege.
+ WRT_INSTALLER_ERROR_MENU_ICON_NOT_FOUND, ///<
+ WRT_INSTALLER_ERROR_FATAL_ERROR, ///< failure in db operation or file opertion..
+ WRT_INSTALLER_ERROR_OUT_OF_STORAGE, ///< failure in shortage of memory
+ WRT_INSTALLER_ERROR_OUT_OF_MEMORY, ///< failure in shortage of RAM
- WRT_ERROR_PKGNAME_NOT_FOUND, /*< package name was not found */
- WRT_ERROR_NO_PATH, /*<One of specific directory does not
- * exist*/
+ /* wrt-installer error */
+ /* 121-140 : reserved for Web installer */
- /* Installer Errors*/
- WRT_INSTALLER_ERROR_INVALID_WIDGET_PACKAGE, /*< package is malformed */
- WRT_INSTALLER_ERROR_WIDGET_DOES_NOT_EXIST, /*< given tizenAppId is invalid */
+ /* installation */
+ WRT_INSTALLER_ERROR_PACKAGE_ALREADY_INSTALLED = 121,
+ WRT_INSTALLER_ERROR_ACE_CHECK_FAILED,
+ WRT_INSTALLER_ERROR_MANIFEST_CREATE_FAILED, ///<
+ WRT_INSTALLER_ERROR_ENCRYPTION_FAILED, ///< Failure in reousrce encrypttion
+ WRT_INSTALLER_ERROR_INSTALL_OSP_SERVCIE, ///< Failure in installing osp service
+ WRT_INSTALLER_ERROR_PLUGIN_INSTALLATION_FAILED,
+ WRT_INSTALLER_ERROR_UNINSTALLATION_FAILED,
+
+ WRT_INSTALLER_ERROR_UNKNOWN, ///< do not use this error code.
- WRT_INSTALLER_ERROR_ALREADY_UNINSTALLING, /*< Widget is already being
- * uninstalled */
- WRT_INSTALLER_ERROR_INVALID_CERTIFICATE, /*< */
- WRT_INSTALLER_ERROR_ALREADY_INSTALLED, /*< Widget is already installed
- */
- WRT_INSTALLER_ERROR_INTERNAL, /*< Internal error due to inconsistency */
- WRT_INSTALLER_ERROR_NOT_ALLOWED, /*< Widget installation or
- * update not allowed */
- /*< because violation of policy
- * ocurred */
- WRT_INSTALLER_ERROR_DEFERRED, /*< Widget installation deferred
- */
- WRT_INSTALLER_ERROR_DATABASE_FAILURE, /*< Failure in database */
- WRT_INSTALLER_ERROR_UNKNOWN, /*< Temporary error. Try to not
- * use this. */
- WRT_INSTALLER_ERROR_OSPSVC, /*< Error of installation
- * of osp service */
- /* Plugin Installer Errors */
- WRT_PLUGIN_INSTALLER_ERROR_WRONG_PATH, /*< Wrong Path to plugin Dir */
- WRT_PLUGIN_INSTALLER_ERROR_METAFILE, /*< Plugin metafile error */
- WRT_PLUGIN_INSTALLER_ERROR_ALREADY_INSTALLED, /*< Plugin already installed*/
- WRT_PLUGIN_INSTALLER_ERROR_LIBRARY_ERROR, /*< Shared library error*/
- WRT_PLUGIN_INSTALLER_ERROR_WAITING, /*< Missing dependencies*/
- WRT_PLUGIN_INSTALLER_ERROR_LOCK, /*< Another installation
- * in progress or lock file
- * error*/
- WRT_PLUGIN_INSTALLER_ERROR_UNKNOWN /*< Unknown error*/
} WrtErrStatus;
#ifdef __cplusplus