1 /* 2014, Copyright © Intel Coporation, license APACHE-2.0, see LICENSE file */
3 #include "common/step/pkgmgr/step_register_app.h"
11 #include "common/pkgmgr_registration.h"
12 #include "common/utils/file_util.h"
14 namespace common_installer {
17 Step::Status StepRegisterApplication::process() {
18 if (!RegisterAppInPkgmgr(context_->manifest_data.get(),
19 context_->pkgid.get(),
20 context_->certificate_info.get(),
22 context_->storage.get(),
23 context_->request_mode.get(),
24 context_->tep_path.get())) {
25 LOG(ERROR) << "Failed to register the app";
26 return Step::Status::REGISTER_ERROR;
29 LOG(INFO) << "Successfully registered the app";
33 Step::Status StepRegisterApplication::undo() {
34 if (!UnregisterAppInPkgmgr(context_->manifest_data.get(),
35 context_->pkgid.get(),
37 context_->request_mode.get())) {
38 LOG(ERROR) << "Application couldn't be unregistered";
39 return Status::REGISTER_ERROR;
42 LOG(INFO) << "Successfuly clean database";
47 } // namespace common_installer