1 // Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by a apache 2.0 license that can be
3 // found in the LICENSE file.
5 #include "common/step/backup/step_backup_plugin_info.h"
7 namespace common_installer {
10 Step::Status StepBackupPluginInfo::precheck() {
11 if (context_->pkgid.get().empty()) {
12 LOG(ERROR) << "pkgid attribute is empty";
13 return Step::Status::INVALID_VALUE;
16 return Step::Status::OK;
19 Step::Status StepBackupPluginInfo::process() {
20 PkgQueryInterface pkg_query(context_->pkgid.get(), context_->uid.get());
21 if (!pkg_query.PluginExecutionInfo(&context_->backup_plugin_info.get()))
22 return Step::Status::PACKAGE_NOT_FOUND;
24 return Step::Status::OK;
28 } // namespace common_installer