pkgmgr_signal.cc
security_registration.cc
step/step_unzip.cc
- step/step_signature.cc
+ step/step_check_signature.cc
step/step_copy.cc
step/step_generate_xml.cc
- step/step_record.cc
+ step/step_register_app.cc
step/step_parse.cc
- step/step_remove.cc
+ step/step_remove_files.cc
step/step_revoke_security.cc
- step/step_security.cc
+ step/step_register_security.cc
step/step_signal.cc
- step/step_unregister.cc
+ step/step_unregister_app.cc
)
# Target - definition
ADD_LIBRARY(${TARGET_LIBNAME_COMMON} SHARED ${SRCS})
// Use of this source code is governed by an apache 2.0 license that can be
// found in the LICENSE file.
-#include "common/step/step_signature.h"
+#include "common/step/step_check_signature.h"
#include <boost/filesystem/path.hpp>
namespace common_installer {
namespace signature {
-Step::Status StepSignature::process() {
+Step::Status StepCheckSignature::process() {
return (SignatureValidator::Check(bf::path(context_->unpacked_dir_path()))
== SignatureValidator::INVALID) ? Status::ERROR : Status::OK;
}
// Use of this source code is governed by an apache 2.0 license that can be
// found in the LICENSE file.
-#ifndef COMMON_STEP_STEP_SIGNATURE_H_
-#define COMMON_STEP_STEP_SIGNATURE_H_
+#ifndef COMMON_STEP_STEP_CHECK_SIGNATURE_H_
+#define COMMON_STEP_STEP_CHECK_SIGNATURE_H_
#include "common/context_installer.h"
#include "common/step/step.h"
namespace common_installer {
namespace signature {
-class StepSignature : public Step {
+class StepCheckSignature : public Step {
public:
using Step::Step;
} // namespace signature
} // namespace common_installer
-#endif // COMMON_STEP_STEP_SIGNATURE_H_
+#endif // COMMON_STEP_STEP_CHECK_SIGNATURE_H_
/* 2014, Copyright © Intel Coporation, license APACHE-2.0, see LICENSE file */
-#include "common/step/step_record.h"
+#include "common/step/step_register_app.h"
#include <pkgmgr-info.h>
#include <unistd.h>
} // anonymous namespace
namespace common_installer {
-namespace record {
+namespace register_app {
namespace fs = boost::filesystem;
-Step::Status StepRecord::process() {
+Step::Status StepRegisterApplication::process() {
assert(!context_->xml_path().empty());
const char* const appinst_tags[] = {"removable=true", nullptr, };
return Status::OK;
}
-Step::Status StepRecord::clean() {
+Step::Status StepRegisterApplication::clean() {
return Status::OK;
}
-Step::Status StepRecord::undo() {
+Step::Status StepRegisterApplication::undo() {
if (context_->uid() != tzplatform_getuid(TZ_SYS_GLOBALAPP_USER)) {
const char* ail_cmd[] = {kAilInitUser, nullptr};
const char* pkgmgr_cmd[] = {kPkgInitUser, nullptr};
return Status::OK;
}
-} // namespace record
+} // namespace register_app
} // namespace common_installer
/* 2014, Copyright © Intel Coporation, license APACHE-2.0, see LICENSE file */
-#ifndef COMMON_STEP_STEP_RECORD_H_
-#define COMMON_STEP_STEP_RECORD_H_
+#ifndef COMMON_STEP_STEP_REGISTER_APP_H_
+#define COMMON_STEP_STEP_REGISTER_APP_H_
#include "common/context_installer.h"
#include "common/step/step.h"
#include "utils/logging.h"
namespace common_installer {
-namespace record {
+namespace register_app {
-class StepRecord : public Step {
+class StepRegisterApplication : public Step {
public:
using Step::Step;
SCOPE_LOG_TAG(Record)
};
-} // namespace record
+} // namespace register_app
} // namespace common_installer
-#endif // COMMON_STEP_STEP_RECORD_H_
+#endif // COMMON_STEP_STEP_REGISTER_APP_H_
// Use of this source code is governed by a apache 2.0 license that can be
// found in the LICENSE file.
-#include "common/step/step_security.h"
+#include "common/step/step_register_security.h"
#include "common/security_registration.h"
namespace common_installer {
namespace security {
-Step::Status StepSecurity::process() {
+Step::Status StepRegisterSecurity::process() {
if (!RegisterSecurityContextForApps(
context_->pkgid(), context_->GetApplicationPath(),
context_->manifest_data())) {
return Status::OK;
}
-Step::Status StepSecurity::undo() {
+Step::Status StepRegisterSecurity::undo() {
if (!UnregisterSecurityContextForApps(
context_->pkgid(), context_->manifest_data())) {
return Status::ERROR;
// Use of this source code is governed by a apache 2.0 license that can be
// found in the LICENSE file.
-#ifndef COMMON_STEP_STEP_SECURITY_H_
-#define COMMON_STEP_STEP_SECURITY_H_
+#ifndef COMMON_STEP_STEP_REGISTER_SECURITY_H_
+#define COMMON_STEP_STEP_REGISTER_SECURITY_H_
#include "common/step/step.h"
#include "utils/logging.h"
namespace common_installer {
namespace security {
-class StepSecurity : public Step {
+class StepRegisterSecurity : public Step {
public:
using Step::Step;
} // namespace security
} // namespace common_installer
-#endif // COMMON_STEP_STEP_SECURITY_H_
+#endif // COMMON_STEP_STEP_REGISTER_SECURITY_H_
// found in the LICENSE file.
-#include "common/step/step_remove.h"
+#include "common/step/step_remove_files.h"
#include <pkgmgr-info.h>
namespace fs = boost::filesystem;
-Step::Status StepRemove::process() {
+Step::Status StepRemoveFiles::process() {
uiapplication_x* ui = context_->manifest_data()->uiapplication;
if (!fs::exists(context_->pkg_path()))
return Status::OK;
}
-Step::Status StepRemove::clean() {
+Step::Status StepRemoveFiles::clean() {
return Status::OK;
}
-Step::Status StepRemove::undo() {
+Step::Status StepRemoveFiles::undo() {
return Status::OK;
}
// Use of this source code is governed by an apache 2.0 license that can be
// found in the LICENSE file.
-#ifndef COMMON_STEP_STEP_REMOVE_H_
-#define COMMON_STEP_STEP_REMOVE_H_
+#ifndef COMMON_STEP_STEP_REMOVE_FILES_H_
+#define COMMON_STEP_STEP_REMOVE_FILES_H_
#include "common/context_installer.h"
namespace common_installer {
namespace remove {
-class StepRemove : public Step {
+class StepRemoveFiles : public Step {
public:
using Step::Step;
} // namespace remove
} // namespace common_installer
-#endif // COMMON_STEP_STEP_REMOVE_H_
+#endif // COMMON_STEP_STEP_REMOVE_FILES_H_
#include <cassert>
#include <cstring>
-#include "common/step/step_unregister.h"
+#include "common/step/step_unregister_app.h"
#include "utils/file_util.h"
namespace common_installer {
-namespace unregister {
+namespace unregister_app {
namespace fs = boost::filesystem;
-Step::Status StepUnregister::process() {
+Step::Status StepUnregisterApplication::process() {
assert(!context_->pkgid().empty());
const char* const appinst_tags[] = {"removable=true", nullptr, };
return Status::OK;
}
-Step::Status StepUnregister::clean() {
+Step::Status StepUnregisterApplication::clean() {
LOG(DEBUG) << "Empty 'clean' method";
return Status::OK;
}
-Step::Status StepUnregister::undo() {
+Step::Status StepUnregisterApplication::undo() {
LOG(DEBUG) << "Empty 'undo' method";
return Status::OK;
}
-} // namespace unregister
+} // namespace unregister_app
} // namespace common_installer
// Use of this source code is governed by an apache 2.0 license that can be
// found in the LICENSE file.
-#ifndef COMMON_STEP_STEP_UNREGISTER_H_
-#define COMMON_STEP_STEP_UNREGISTER_H_
+#ifndef COMMON_STEP_STEP_UNREGISTER_APP_H_
+#define COMMON_STEP_STEP_UNREGISTER_APP_H_
#include "common/context_installer.h"
#include "common/step/step.h"
#include "utils/logging.h"
namespace common_installer {
-namespace unregister {
+namespace unregister_app {
-class StepUnregister : public Step {
+class StepUnregisterApplication : public Step {
public:
using Step::Step;
SCOPE_LOG_TAG(Unregister)
};
-} // namespace unregister
+} // namespace unregister_app
} // namespace common_installer
-#endif // COMMON_STEP_STEP_UNREGISTER_H_
+#endif // COMMON_STEP_STEP_UNREGISTER_APP_H_
main.cc
task.cc
step/step_parse.cc
- step/step_symbolic_link.cc
+ step/step_create_symbolic_link.cc
../xml_parser/xml_parser.cc
)
ADD_EXECUTABLE(${TARGET_TPK} ${SRCS})
/* Copyright 2015 Samsung Electronics, license APACHE-2.0, see LICENSE file */
-#include "tpk/step/step_symbolic_link.h"
+#include "tpk/step/step_create_symbolic_link.h"
#include <boost/filesystem.hpp>
#include <iostream>
#include "common/step/step.h"
-Status StepSymbolicLink::process() {
+Status StepCreateSymbolicLink::process() {
// Get manifest_x
manifest_x *m = context_->manifest_data();
if (!m) {
}
-Status StepSymbolicLink::clean() {
+Status StepCreateSymbolicLink::clean() {
return Status::OK;
}
-Status StepSymbolicLink::undo() {
+Status StepCreateSymbolicLink::undo() {
manifest_x* m = context_->manifest_data();
uiapplication_x *uiapp = m->uiapplication;
serviceapplication_x *svcapp = m->serviceapplication;
/* Copyright 2015 Samsung Electronics, license APACHE-2.0, see LICENSE file */
-#ifndef TPK_STEP_STEP_SYMBOLIC_LINK_H_
-#define TPK_STEP_STEP_SYMBOLIC_LINK_H_
+#ifndef TPK_STEP_STEP_CREATE_SYMBOLIC_LINK_H_
+#define TPK_STEP_STEP_CREATE_SYMBOLIC_LINK_H_
#include "common/app_installer.h"
namespace tpk {
namespace step {
-class StepSymbolicLink : public common_installer::Step {
+class StepCreateSymbolicLink : public common_installer::Step {
public:
using Step::Step;
Status process() override;
} // namespace step
} // namespace tpk
-#endif // TPK_STEP_STEP_SYMBOLIC_LINK_H_
+#endif // TPK_STEP_STEP_CREATE_SYMBOLIC_LINK_H_
#include "common/step/step_copy.h"
#include "common/step/step_generate_xml.h"
#include "common/step/step_parse.h"
-#include "common/step/step_record.h"
-#include "common/step/step_remove.h"
+#include "common/step/step_register_app.h"
+#include "common/step/step_remove_files.h"
#include "common/step/step_revoke_security.h"
-#include "common/step/step_security.h"
+#include "common/step/step_register_security.h"
#include "common/step/step_signal.h"
-#include "common/step/step_signature.h"
-#include "common/step/step_unregister.h"
+#include "common/step/step_check_signature.h"
+#include "common/step/step_unregister_app.h"
#include "common/step/step_unzip.h"
#include "tpk/step/step_parse.h"
-#include "tpk/step/step_symbolic_link.h"
+#include "tpk/step/step_create_symbolic_link.h"
#include "utils/logging.h"
#endif
ci::AppInstaller ai(pi_, kPkgType);
ai.AddStep<ci::unzip::StepUnzip>();
- ai.AddStep<ci::signature::StepSignature>();
+ ai.AddStep<ci::signature::StepCheckSignature>();
ai.AddStep<tpk::step::StepParse>();
ai.AddStep<ci::signal::StepSignal>();
ai.AddStep<ci::copy::StepCopy>();
- ai.AddStep<tpk::step::StepSymbolicLink>();
- ai.AddStep<ci::security::StepSecurity>();
+ ai.AddStep<tpk::step::StepCreateSymbolicLink>();
+ ai.AddStep<ci::security::StepRegisterSecurity>();
ai.AddStep<ci::generate_xml::StepGenerateXml>();
- ai.AddStep<ci::record::StepRecord>();
+ ai.AddStep<ci::register_app::StepRegisterApplication>();
return ai.Run();
}
ai.AddStep<ci::parse::StepParse>();
ai.AddStep<ci::signal::StepSignal>();
- ai.AddStep<ci::unregister::StepUnregister>();
- ai.AddStep<ci::remove::StepRemove>();
+ ai.AddStep<ci::unregister_app::StepUnregisterApplication>();
+ ai.AddStep<ci::remove::StepRemoveFiles>();
ai.AddStep<ci::revoke_security::StepRevokeSecurity>();
return ai.Run();
# Target - sources
SET(SRCS
step/step_parse.cc
- step/step_symbolic_link.cc
+ step/step_create_symbolic_link.cc
wgt_backend.cc
)
/* 2014, Copyright © Eurogiciel Coporation, APACHE-2.0, see LICENSE file */
-#include "wgt/step/step_symbolic_link.h"
+#include "wgt/step/step_create_symbolic_link.h"
#include <pkgmgr-info.h>
#include <unistd.h>
namespace fs = boost::filesystem;
-common_installer::Step::Status StepSymbolicLink::process() {
+common_installer::Step::Status StepCreateSymbolicLink::process() {
assert(context_->manifest_data());
boost::system::error_code error;
uiapplication_x* ui = context_->manifest_data()->uiapplication;
return Status::OK;
}
-common_installer::Step::Status StepSymbolicLink::clean() {
+common_installer::Step::Status StepCreateSymbolicLink::clean() {
return Status::OK;
}
-common_installer::Step::Status StepSymbolicLink::undo() {
+common_installer::Step::Status StepCreateSymbolicLink::undo() {
uiapplication_x* ui = context_->manifest_data()->uiapplication;
serviceapplication_x* svc = context_->manifest_data()->serviceapplication;
/* 2014, Copyright © Samsung, license APACHE-2.0, see LICENSE file */
-#ifndef WGT_STEP_STEP_SYMBOLIC_LINK_H_
-#define WGT_STEP_STEP_SYMBOLIC_LINK_H_
+#ifndef WGT_STEP_STEP_CREATE_SYMBOLIC_LINK_H_
+#define WGT_STEP_STEP_CREATE_SYMBOLIC_LINK_H_
#include <boost/filesystem.hpp>
namespace wgt {
namespace symbolic_link {
-class StepSymbolicLink : public common_installer::Step {
+class StepCreateSymbolicLink : public common_installer::Step {
public:
using Step::Step;
} // namespace symbolic_link
} // namespace wgt
-#endif // WGT_STEP_STEP_SYMBOLIC_LINK_H_
+#endif // WGT_STEP_STEP_CREATE_SYMBOLIC_LINK_H_
#include "common/step/step_copy.h"
#include "common/step/step_generate_xml.h"
#include "common/step/step_parse.h"
-#include "common/step/step_record.h"
-#include "common/step/step_remove.h"
+#include "common/step/step_register_app.h"
+#include "common/step/step_remove_files.h"
#include "common/step/step_revoke_security.h"
-#include "common/step/step_security.h"
+#include "common/step/step_register_security.h"
#include "common/step/step_signal.h"
-#include "common/step/step_signature.h"
-#include "common/step/step_unregister.h"
+#include "common/step/step_check_signature.h"
+#include "common/step/step_unregister_app.h"
#include "common/step/step_unzip.h"
#include "wgt/step/step_parse.h"
-#include "wgt/step/step_symbolic_link.h"
+#include "wgt/step/step_create_symbolic_link.h"
namespace ci = common_installer;
switch (pkgmgr_installer_get_request_type(pi)) {
case PKGMGR_REQ_INSTALL: {
installer.AddStep<ci::unzip::StepUnzip>();
- installer.AddStep<ci::signature::StepSignature>();
+ installer.AddStep<ci::signature::StepCheckSignature>();
installer.AddStep<wgt::parse::StepParse>();
installer.AddStep<ci::signal::StepSignal>();
installer.AddStep<ci::copy::StepCopy>();
- installer.AddStep<wgt::symbolic_link::StepSymbolicLink>();
- installer.AddStep<ci::security::StepSecurity>();
+ installer.AddStep<wgt::symbolic_link::StepCreateSymbolicLink>();
+ installer.AddStep<ci::security::StepRegisterSecurity>();
installer.AddStep<ci::generate_xml::StepGenerateXml>();
- installer.AddStep<ci::record::StepRecord>();
+ installer.AddStep<ci::register_app::StepRegisterApplication>();
break;
}
case PKGMGR_REQ_UNINSTALL: {
installer.AddStep<ci::parse::StepParse>();
installer.AddStep<ci::signal::StepSignal>();
- installer.AddStep<ci::unregister::StepUnregister>();
- installer.AddStep<ci::remove::StepRemove>();
+ installer.AddStep<ci::unregister_app::StepUnregisterApplication>();
+ installer.AddStep<ci::remove::StepRemoveFiles>();
installer.AddStep<ci::revoke_security::StepRevokeSecurity>();
break;
}