AddStep(&TaskConfiguration::ParseXMLConfigStep);
AddStep(&TaskConfiguration::TizenIdStep);
+ AddStep(&TaskConfiguration::LockInstallationStep);
AddStep(&TaskConfiguration::CheckAppRunningStateStep);
AddStep(&TaskConfiguration::ApplicationTypeStep);
AddStep(&TaskConfiguration::ResourceEncryptionStep);
_D("Tizen Pkg Id : %ls", (m_context.widgetConfig.tzPkgid).c_str());
}
+void TaskConfiguration::LockInstallationStep()
+{
+ std::string lockString = DPL::ToUTF8String(m_context.widgetConfig.tzAppid);
+ _D("Locking installation on file '%s'", lockString.c_str());
+ m_context.installationLock.reset(new DPL::FileBasedMutex(lockString));
+ _D("Installation locked");
+}
+
void TaskConfiguration::CheckAppRunningStateStep()
{
bool isRunning = false;
void ParseXMLConfigStep();
void TizenIdStep();
+ void LockInstallationStep();
void CheckAppRunningStateStep();
void DetectUpdateInstallationStep();
void PkgmgrStartStep();
#include <map>
#include <string>
+#include <memory>
+
#include <dpl/string.h>
#include <dpl/wrt-dao-rw/widget_dao.h>
+#include <dpl/file_lock.h>
+
#include <widget_install/widget_security.h>
#include <feature_logic.h>
#include <widget_install/widget_update_info.h>
#include <widget_location.h>
#include <wrt_install_mode.h>
+
namespace Jobs {
namespace WidgetInstall {
class JobWidgetInstall;
std::string requestedPath; ///input path of widget
bool needEncryption; ///for configuring right task if encryption needed
+
+ std::unique_ptr<DPL::FileBasedMutex> installationLock;
};
#endif // INSTALLER_CONTEXT_H
#include <widget_uninstall/widget_uninstall_errors.h>
#include <dpl/wrt-dao-ro/global_config.h>
#include <dpl/wrt-dao-ro/widget_dao_read_only.h>
+#include <dpl/file_lock.h>
#include <app_manager.h>
#include <pkgmgr/pkgmgr_parser.h>
#include <pkgmgr-info.h>
m_context(context)
{
AddStep(&TaskCheck::StartStep);
+ AddStep(&TaskCheck::SetUninstallationLockStep);
AddStep(&TaskCheck::StepUninstallPreCheck);
AddStep(&TaskCheck::StepCheckMDM);
AddStep(&TaskCheck::EndStep);
_D("--------- <TaskCheck> : END ----------");
}
+void TaskCheck::SetUninstallationLockStep()
+{
+ std::string lockString = m_context.tzAppid;
+ _D("Locking uninstallation on file '%s'", lockString.c_str());
+ m_context.installationLock.reset(new DPL::FileBasedMutex(lockString));
+ _D("Uninstallation locked");
+}
+
void TaskCheck::StepUninstallPreCheck()
{
bool isRunning = false;
UninstallerContext& m_context;
//steps
+ void SetUninstallationLockStep();
void StepUninstallPreCheck();
void StepCheckMDM();
void StartStep();
#include <widget_uninstall/widget_uninstaller_struct.h>
#include <widget_location.h>
#include <dpl/utils/path.h>
+#include <dpl/file_lock.h>
namespace Jobs {
namespace WidgetUninstall {
bool removeAbnormal;
DPL::Utils::Path installedPath;
DPL::Utils::Path manifestFile;
+
+ std::unique_ptr<DPL::FileBasedMutex> installationLock;
};
#endif // WRT_SRC_INSTALLER_CORE_UNINSTALLER_TASKS_UNINSTALLER_CONTEXT_H_