1 /* 2014, Copyright © Intel Coporation, license APACHE-2.0, see LICENSE file */
2 // Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3 // Use of this source code is governed by a apache 2.0 license that can be
4 // found in the LICENSE file.
6 #ifndef COMMON_STEP_FILESYSTEM_STEP_UNZIP_H_
7 #define COMMON_STEP_FILESYSTEM_STEP_UNZIP_H_
9 #include <manifest_parser/utils/logging.h>
11 #include "common/installer_context.h"
12 #include "common/step/step.h"
14 namespace common_installer {
15 namespace filesystem {
18 * \brief Installation and Update.
19 * Responsible for unpacking the archive (wgt/tpk)
21 * process method implements unpacking the archive. It also checks the
22 * rough space requirements vs availability.
23 * Since process method unpacks the package to given directory, undo method
26 * Unzip unpacks resources to following directory:
27 * * TZ_SYS_RW/tmpuniquedir (/usr/apps/tmpuniquedir)
28 * * TZ_SER_APPS/tmpdir (/{HOME}/apps_rw/tmpuniquedir)
29 * InstallerContext::unpacked_dir_path points to this location.
31 class StepUnzip : public Step {
34 Status process() override;
35 Status clean() override { return Status::OK; }
36 Status undo() override;
37 Status precheck() override;
42 } // namespace filesystem
43 } // namespace common_installer
46 #endif // COMMON_STEP_FILESYSTEM_STEP_UNZIP_H_