1 // Copyright (c) 2020 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.
5 #ifndef COMMON_GLOBAL_RECOVERY_FILE_H_
6 #define COMMON_GLOBAL_RECOVERY_FILE_H_
12 #include "common/pkgmgr_interface.h"
14 namespace fs = std::filesystem;
16 namespace common_installer {
18 class GlobalRecoveryFile {
20 explicit GlobalRecoveryFile(std::shared_ptr<PkgMgrInterface> pkgmgr);
21 ~GlobalRecoveryFile();
25 std::string AddPathWithType(const std::string& pkg_type);
27 bool AppendPath(const fs::path& additional_path);
32 bool AppendString(const std::string& val);
33 fs::path GenerateRecoveryFilePath(
35 const std::string& type);
36 std::shared_ptr<common_installer::PkgMgrInterface> pkgmgr_;
37 fs::path recovery_filepath_;
38 fs::path backup_path_;
39 std::vector<std::string> recovery_list_;
42 } // namespace common_installer
44 #endif // COMMON_GLOBAL_RECOVERY_FILE_H_