Class is a context, not installer.
Change-Id: I63d31467b768de76ffb00212196ae869005bc5e0
SET(SRCS
app_installer.cc
backup_paths.cc
- context_installer.cc
+ installer_context.cc
pkgmgr_interface.cc
pkgmgr_registration.cc
pkgmgr_signal.cc
#include <cstdio>
#include "common/app_installer.h"
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/pkgmgr_interface.h"
#include "common/pkgmgr_signal.h"
#include "common/utils/logging.h"
AppInstaller::AppInstaller(const char* package_type, PkgMgrPtr pkgmgr)
: pkgmgr_(pkgmgr),
- context_(new ContextInstaller()) {
+ context_(new InstallerContext()) {
pi_.reset(new PkgmgrSignal(pkgmgr.get()->GetRawPi(),
pkgmgr->GetRequestType()));
private:
std::list<std::unique_ptr<Step>> steps_;
- std::unique_ptr<ContextInstaller> context_;
+ std::unique_ptr<InstallerContext> context_;
// data used to send signal
std::unique_ptr<PkgmgrSignal> pi_;
// Use of this source code is governed by a apache 2.0 license that can be
// found in the LICENSE file.
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include <unistd.h>
#include <cstdlib>
}
}
-ContextInstaller::ContextInstaller()
+InstallerContext::InstallerContext()
: manifest_data(static_cast<manifest_x*>(calloc(1, sizeof(manifest_x)))),
old_manifest_data(nullptr),
uid(getuid()),
backend_data(nullptr),
privilege_level(PrivilegeLevel::UNTRUSTED) {}
-ContextInstaller::~ContextInstaller() {
+InstallerContext::~InstallerContext() {
if (manifest_data.get())
pkgmgr_parser_free_manifest_xml(manifest_data.get());
if (old_manifest_data.get())
// Use of this source code is governed by a apache 2.0 license that can be
// found in the LICENSE file.
-#ifndef COMMON_CONTEXT_INSTALLER_H_
-#define COMMON_CONTEXT_INSTALLER_H_
+#ifndef COMMON_INSTALLER_CONTEXT_H_
+#define COMMON_INSTALLER_CONTEXT_H_
#include <boost/filesystem/path.hpp>
// CtxUninstall class that inherits from Context
// It is because Uninstallation does not need so many fields.
// similarly, installation may not need some of them
-class ContextInstaller {
+class InstallerContext {
public:
- ContextInstaller();
- ~ContextInstaller();
+ InstallerContext();
+ ~InstallerContext();
// package_type
Property<std::string> pkg_type;
} // namespace common_installer
-#endif // COMMON_CONTEXT_INSTALLER_H_
+#endif // COMMON_INSTALLER_CONTEXT_H_
#include <string>
#include <vector>
-#include "common/context_installer.h"
+#include "common/installer_context.h"
namespace common_installer {
#include <array>
#include <cstring>
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/utils/logging.h"
namespace {
#include <string>
-#include "common/context_installer.h"
+#include "common/installer_context.h"
namespace common_installer {
#ifndef COMMON_STEP_STEP_H_
#define COMMON_STEP_STEP_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
namespace common_installer {
};
/** Standard constructor */
- explicit Step(ContextInstaller* context) : context_(context) { }
+ explicit Step(InstallerContext* context) : context_(context) { }
/** Virtual "empty" destructor */
virtual ~Step() { }
virtual Status precheck() = 0;
protected:
- ContextInstaller* context_;
+ InstallerContext* context_;
};
} // namespace common_installer
#include <utility>
#include <vector>
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#ifndef COMMON_STEP_STEP_BACKUP_MANIFEST_H_
#define COMMON_STEP_STEP_BACKUP_MANIFEST_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#ifndef COMMON_STEP_STEP_CHECK_OLD_CERTIFICATE_H_
#define COMMON_STEP_STEP_CHECK_OLD_CERTIFICATE_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#ifndef COMMON_STEP_STEP_CHECK_SIGNATURE_H_
#define COMMON_STEP_STEP_CHECK_SIGNATURE_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
const char *kStrEmpty = "";
-StepConfigure::StepConfigure(ContextInstaller* context, PkgMgrPtr pkgmgr)
+StepConfigure::StepConfigure(InstallerContext* context, PkgMgrPtr pkgmgr)
: Step(context),
pkgmgr_(pkgmgr) {
}
#ifndef COMMON_STEP_STEP_CONFIGURE_H_
#define COMMON_STEP_STEP_CONFIGURE_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/pkgmgr_interface.h"
#include "common/step/step.h"
/**
* \brief Installation,Update, Deinstallation, RDS.
- * Responsible for filling ContextInstaller based on the request type.
+ * Responsible for filling InstallerContext based on the request type.
*
- * Based on started request, process fills ContextInstaller with proper data.
+ * Based on started request, process fills InstallerContext with proper data.
*/
class StepConfigure : public Step {
public:
- StepConfigure(ContextInstaller* context, PkgMgrPtr pkgmgr);
+ StepConfigure(InstallerContext* context, PkgMgrPtr pkgmgr);
Status process() override;
Status clean() override;
#ifndef COMMON_STEP_STEP_COPY_H_
#define COMMON_STEP_STEP_COPY_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#include <boost/filesystem/path.hpp>
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#include <utility>
#include <vector>
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#ifndef COMMON_STEP_STEP_FAIL_H_
#define COMMON_STEP_STEP_FAIL_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#include <libxml/xmlwriter.h>
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#ifndef COMMON_STEP_STEP_KILL_APPS_H_
#define COMMON_STEP_STEP_KILL_APPS_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#ifndef COMMON_STEP_STEP_OLD_MANIFEST_H_
#define COMMON_STEP_STEP_OLD_MANIFEST_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#ifndef COMMON_STEP_STEP_OPEN_RECOVERY_FILE_H_
#define COMMON_STEP_STEP_OPEN_RECOVERY_FILE_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#ifndef COMMON_STEP_STEP_PARSE_H_
#define COMMON_STEP_STEP_PARSE_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#ifndef COMMON_STEP_STEP_PRIVILEGE_COMPATIBILITY_H_
#define COMMON_STEP_STEP_PRIVILEGE_COMPATIBILITY_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#ifndef COMMON_STEP_STEP_RECOVER_APPLICATION_H_
#define COMMON_STEP_STEP_RECOVER_APPLICATION_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step_recovery.h"
#include "common/utils/logging.h"
#ifndef COMMON_STEP_STEP_RECOVER_FILES_H_
#define COMMON_STEP_STEP_RECOVER_FILES_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step_recovery.h"
#include "common/utils/logging.h"
#include <utility>
#include <vector>
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step_recovery.h"
#include "common/utils/logging.h"
#ifndef COMMON_STEP_STEP_RECOVER_MANIFEST_H_
#define COMMON_STEP_STEP_RECOVER_MANIFEST_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step_recovery.h"
#include "common/utils/logging.h"
#ifndef COMMON_STEP_STEP_RECOVER_SECURITY_H_
#define COMMON_STEP_STEP_RECOVER_SECURITY_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step_recovery.h"
#include "common/utils/logging.h"
#ifndef COMMON_STEP_STEP_RECOVER_STORAGE_DIRECTORIES_H_
#define COMMON_STEP_STEP_RECOVER_STORAGE_DIRECTORIES_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step_recovery.h"
#include "common/utils/logging.h"
#ifndef COMMON_STEP_STEP_RECOVERY_H_
#define COMMON_STEP_STEP_RECOVERY_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#ifndef COMMON_STEP_STEP_REGISTER_APP_H_
#define COMMON_STEP_STEP_REGISTER_APP_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#ifndef COMMON_STEP_STEP_REMOVE_FILES_H_
#define COMMON_STEP_STEP_REMOVE_FILES_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#include <utility>
#include <vector>
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#include <boost/filesystem.hpp>
#include <boost/system/error_code.hpp>
-#include "common/context_installer.h"
+#include "common/installer_context.h"
namespace common_installer {
namespace filesystem {
#ifndef COMMON_STEP_STEP_UNREGISTER_APP_H_
#define COMMON_STEP_STEP_UNREGISTER_APP_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#include <boost/filesystem/path.hpp>
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
* Unzip unpacks resources to following directory:
* * TZ_SYS_RW/tmpuniquedir (/usr/apps/tmpuniquedir)
* * TZ_SER_APPS/tmpdir (/{HOME}/apps_rw/tmpuniquedir)
- * ContextInstaller::unpacked_dir_path points to this location.
+ * InstallerContext::unpacked_dir_path points to this location.
*/
class StepUnzip : public Step {
public:
#ifndef COMMON_STEP_STEP_UPDATE_APP_H_
#define COMMON_STEP_STEP_UPDATE_APP_H_
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#include "common/step/step.h"
#include "common/app_installer.h"
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/utils/clist_helpers.h"
#include "common/utils/file_util.h"
#include "common/utils/logging.h"
namespace filesystem {
namespace bf = boost::filesystem;
-using common_installer::ContextInstaller;
+using common_installer::InstallerContext;
typedef common_installer::Step::Status Status;
namespace {
-bool CreateSymLink(application_x* app, ContextInstaller* context) {
+bool CreateSymLink(application_x* app, InstallerContext* context) {
boost::system::error_code boost_error;
bf::path bindir = context->pkg_path.get() /
bf::path("bin");
return true;
}
-bool RemoveSymLink(application_x* app, ContextInstaller* context) {
+bool RemoveSymLink(application_x* app, InstallerContext* context) {
/* NOTE: Unlike WRT app, tpk apps have bin/ directory by default.
* So we don't remove the bin/ directory.
*/
#include <vector>
#include "common/app_installer.h"
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "utils/clist_helpers.h"
return common_installer::Step::Status::ERROR;
}
- // Copy data from ManifestData to ContextInstaller
+ // Copy data from ManifestData to InstallerContext
std::shared_ptr<const PackageInfo> info =
std::static_pointer_cast<const PackageInfo>(
parser_->GetManifestData(
#include <string>
#include "common/app_installer.h"
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
class StepParse : public common_installer::Step {
public:
using Step::Step;
- explicit StepParse(common_installer::ContextInstaller* context,
+ explicit StepParse(common_installer::InstallerContext* context,
bool check_start_file);
Status process() override;
#define WGT_STEP_STEP_CHECK_SETTINGS_LEVEL_H_
#include "common/app_installer.h"
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#include <boost/filesystem.hpp>
#include "common/app_installer.h"
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#include <vector>
#include "common/app_installer.h"
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "utils/clist_helpers.h"
#include "wgt/wgt_backend_data.h"
namespace app_keys = wgt::application_widget_keys;
-StepParse::StepParse(common_installer::ContextInstaller* context,
+StepParse::StepParse(common_installer::InstallerContext* context,
bool check_start_file)
: Step(context),
check_start_file_(check_start_file) {
return common_installer::Step::Status::ERROR;
}
- // Copy data from ManifestData to ContextInstaller
+ // Copy data from ManifestData to InstallerContext
std::shared_ptr<const TizenApplicationInfo> info =
std::static_pointer_cast<const TizenApplicationInfo>(
parser_->GetManifestData(
#include <string>
#include "common/app_installer.h"
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
class StepParse : public common_installer::Step {
public:
- explicit StepParse(common_installer::ContextInstaller* context,
+ explicit StepParse(common_installer::InstallerContext* context,
bool check_start_file);
Status process() override;
#include "wgt/step/step_parse_recovery.h"
#include "common/backup_paths.h"
-#include "common/context_installer.h"
+#include "common/installer_context.h"
namespace {
namespace parse {
StepParseRecovery::StepParseRecovery(
- common_installer::ContextInstaller* context)
+ common_installer::InstallerContext* context)
: StepParse(context, false) {
}
*/
class StepParseRecovery : public StepParse {
public:
- explicit StepParseRecovery(common_installer::ContextInstaller* context);
+ explicit StepParseRecovery(common_installer::InstallerContext* context);
Status process() override;
Status precheck() override;
namespace bs = boost::system;
namespace cu = common_installer;
-StepRDSModify::StepRDSModify(common_installer::ContextInstaller* context)
+StepRDSModify::StepRDSModify(common_installer::InstallerContext* context)
: Step(context),
backend_data_(nullptr) {}
class StepRDSModify : public common_installer::Step {
public:
- explicit StepRDSModify(common_installer::ContextInstaller* context);
+ explicit StepRDSModify(common_installer::InstallerContext* context);
Status process() override;
Status clean() override;
Status undo() override;
#define WGT_STEP_STEP_WGT_RESOURCE_DIRECTORY_H_
#include "common/app_installer.h"
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/step/step.h"
#include "common/utils/logging.h"
#include <string>
#include <vector>
-#include "common/context_installer.h"
+#include "common/installer_context.h"
#include "common/utils/property.h"
namespace wgt {