Remove boost dependency
[platform/core/appfw/app-installers.git] / src / common / step / mount / step_mount_unpacked.h
1 // Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by an apache-2.0 license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMMON_STEP_MOUNT_STEP_MOUNT_UNPACKED_H_
6 #define COMMON_STEP_MOUNT_STEP_MOUNT_UNPACKED_H_
7
8 #include <manifest_parser/utils/logging.h>
9
10 #include <filesystem>
11
12 #include "common/installer_context.h"
13 #include "common/mount_base.h"
14 #include "common/step/step.h"
15
16 namespace common_installer {
17 namespace mount {
18
19 /**
20  * \brief Responsible for mounting package zip in temporary directory (wgt/tpk)
21  *
22  * Mounts package zip in temporary location to enable step to access package
23  * content for parsing, signature check and others.
24  *
25  * Following directories are used as mount points:
26  * * TZ_SYS_RW/tmpuniquedir (/usr/apps/tmpuniquedir)
27  * * TZ_SER_APPS/tmpdir  (/{HOME}/apps_rw/tmpuniquedir)
28  */
29 class StepMountUnpacked : public MountBase, public Step {
30  public:
31   using MountBase::MountBase;
32   using Step::Step;
33
34   Status process() override;
35   Status clean() override { return Status::OK; }
36   Status undo() override;
37   Status precheck() override;
38
39  protected:
40   std::unique_ptr<IZipInterface> CreateZipInterface(
41       const std::filesystem::path& mount_path) override;
42
43   STEP_NAME(MountUnpacked)
44 };
45
46 }  // namespace mount
47 }  // namespace common_installer
48
49 #endif  // COMMON_STEP_MOUNT_STEP_MOUNT_UNPACKED_H_