Remove boost dependency
[platform/core/appfw/wgt-backend.git] / src / wgt / step / filesystem / step_create_wgt_symbolic_link.h
1 // Copyright (c) 2015 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.
4
5 #ifndef WGT_STEP_FILESYSTEM_STEP_CREATE_WGT_SYMBOLIC_LINK_H_
6 #define WGT_STEP_FILESYSTEM_STEP_CREATE_WGT_SYMBOLIC_LINK_H_
7
8 #include <manifest_parser/utils/logging.h>
9
10 #include <common/installer/app_installer.h>
11 #include <common/installer_context.h>
12 #include <common/step/step.h>
13
14 namespace wgt {
15 namespace filesystem {
16
17 /**
18  * \brief Step that create symbolic link to application
19  */
20 class StepCreateWgtSymbolicLink : public common_installer::Step {
21  public:
22   using Step::Step;
23
24   /**
25    * \brief Create symbolic link
26    *
27    * \return Status::ERROR when failed to create symbolic link,
28    *         Status::OK otherwise
29    */
30   Status process() override;
31
32   /**
33    * \brief Empty method
34    *
35    * \return Status::OK
36    */
37   Status clean() override { return Status::OK; }
38
39   /**
40    * \brief Delete created symbolic link
41    *
42    * \return Status::OK
43    */
44   Status undo() override;
45
46   /**
47    * \brief Check weather manifest data is empty or not
48    *
49    * \return Status::OK
50    */
51   Status precheck() override;
52
53  private:
54   bool CreateSymlinksForApps();
55
56   STEP_NAME(CreateWgtSymbolicLink)
57 };
58
59 }  // namespace filesystem
60 }  // namespace wgt
61
62 #endif  // WGT_STEP_FILESYSTEM_STEP_CREATE_WGT_SYMBOLIC_LINK_H_