Remove boost dependency
[platform/core/appfw/app-installers.git] / src / common / step / filesystem / step_recover_icons.h
1 // Copyright (c) 2015 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_FILESYSTEM_STEP_RECOVER_ICONS_H_
6 #define COMMON_STEP_FILESYSTEM_STEP_RECOVER_ICONS_H_
7
8 #include <manifest_parser/utils/logging.h>
9
10 #include <filesystem>
11 #include <set>
12 #include <string>
13 #include <utility>
14
15 #include "common/installer_context.h"
16 #include "common/step/recovery/step_recovery.h"
17
18 namespace common_installer {
19 namespace filesystem {
20
21 /**
22  * @brief The StepRecoverIcons class
23  *        Fixes state of platform icon files in recovery mode.
24  *
25  * For recovery of new installation, all icons files are removed.
26  * For recovery of update installation, all icons of applications of package are
27  * restored to its previous locations.
28  */
29 class StepRecoverIcons : public recovery::StepRecovery {
30  public:
31   using StepRecovery::StepRecovery;
32
33   Status RecoveryNew() override;
34   Status RecoveryUpdate() override;
35
36  private:
37   bool TryGatherIcons();
38
39   std::set<std::pair<std::filesystem::path, std::filesystem::path>>
40       icons_;
41
42   STEP_NAME(RecoverIcons)
43 };
44
45 }  // namespace filesystem
46 }  // namespace common_installer
47
48 #endif  // COMMON_STEP_FILESYSTEM_STEP_RECOVER_ICONS_H_