step/mount/step_mount_install.cc
step/mount/step_mount_unpacked.cc
step/mount/step_mount_update.cc
- step/pkgmgr/step_check_blacklist.cc
step/pkgmgr/step_check_removable.cc
step/pkgmgr/step_kill_apps.cc
step/pkgmgr/step_recover_application.cc
+++ /dev/null
-// Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache 2.0 license that can be
-// found in the LICENSE file.
-
-#include "common/step/pkgmgr/step_check_blacklist.h"
-
-#include <package-manager.h>
-
-#include "common/app_installer.h"
-#include "common/step/step.h"
-
-namespace common_installer {
-namespace pkgmgr {
-
-Step::Status StepCheckBlacklist::process() {
- if (context_->installation_mode.get() == InstallationMode::OFFLINE ||
- context_->is_preload_request.get())
- return Status::OK;
- bool result;
- pkgmgr_client* pc = pkgmgr_client_new(PC_REQUEST);
- if (!pc)
- return Status::ERROR;
- int ret = context_->request_mode.get() != RequestMode::GLOBAL ?
- pkgmgr_client_usr_check_blacklist(pc, context_->pkgid.get().c_str(),
- &result, context_->uid.get()) :
- pkgmgr_client_check_blacklist(pc, context_->pkgid.get().c_str(),
- &result);
- pkgmgr_client_free(pc);
- if (ret != PKGMGR_R_OK)
- return Status::ERROR;
-
- if (result) {
- LOG(ERROR) << "This package is blacklisted";
- return Status::OPERATION_NOT_ALLOWED;
- }
-
- return Status::OK;
-}
-
-Step::Status StepCheckBlacklist::precheck() {
- if (context_->pkgid.get().empty())
- return Status::INVALID_VALUE;
- return Status::OK;
-}
-
-} // namespace pkgmgr
-} // namespace common_installer
+++ /dev/null
-// Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache 2.0 license that can be
-// found in the LICENSE file.
-
-#ifndef COMMON_STEP_PKGMGR_STEP_CHECK_BLACKLIST_H_
-#define COMMON_STEP_PKGMGR_STEP_CHECK_BLACKLIST_H_
-
-#include "common/step/step.h"
-
-namespace common_installer {
-namespace pkgmgr {
-
-class StepCheckBlacklist : public Step {
- public:
- using Step::Step;
-
- Status process() override;
- Status undo() override { return Status::OK; }
- Status clean() override { return Status::OK; }
- Status precheck() override;
-
- SCOPE_LOG_TAG(Blacklist)
-};
-
-} // namespace pkgmgr
-} // namespace common_installer
-
-#endif // COMMON_STEP_PKGMGR_STEP_CHECK_BLACKLIST_H_