Remove boost dependency
[platform/core/appfw/app-installers.git] / src / common / step / mount / step_mount_install.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_INSTALL_H_
6 #define COMMON_STEP_MOUNT_STEP_MOUNT_INSTALL_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 package installation directory
21  *        in process of new installation request.
22  *
23  * Mounts package zip in installation location to enable step to access package
24  * content for security applying and others. This step copies package zip into
25  * $HOME/$PKGID/.image. This location will be used in runtime to mount package
26  * when applcation from package is about being started.
27  *
28  * Resources to following directory:
29  * * TZ_SYS_RW/$PKGID (/usr/apps/$PKGID)
30  * * TZ_SER_APPS/$PKGID  (/{HOME}/apps_rw/$PKGID)
31  */
32 class StepMountInstall : public MountBase, public Step {
33  public:
34   using Step::Step;
35   using MountBase::MountBase;
36
37   Status process() override;
38   Status clean() override { return Status::OK; }
39   Status undo() override;
40   Status precheck() override;
41
42  protected:
43   std::unique_ptr<IZipInterface> CreateZipInterface(
44       const std::filesystem::path& mount_path) override;
45   Status UmountPackagePath();
46
47   STEP_NAME(MountInstall);
48 };
49
50 }  // namespace mount
51 }  // namespace common_installer
52
53 #endif  // COMMON_STEP_MOUNT_STEP_MOUNT_INSTALL_H_