DatBackupManager.h 994 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // Created by kikab on 04.06.2018.
  3. //
  4. #ifndef LOTRO_DAT_LIBRARY_DATBACKUP_H
  5. #define LOTRO_DAT_LIBRARY_DATBACKUP_H
  6. #include <string>
  7. #include <DatOperationResult.h>
  8. extern "C++" {
  9. namespace LOTRO_DAT {
  10. class DatFile;
  11. class DatBackupManager {
  12. public:
  13. DatBackupManager() = delete;
  14. DatBackupManager(const DatBackupManager &other) = delete;
  15. DatBackupManager &operator=(const DatBackupManager &other) = delete;
  16. ~DatBackupManager() = default;
  17. explicit DatBackupManager(DatFile *datFilePtr);
  18. void Init();
  19. bool CheckIfBackupExists(const std::string &backup_datname);
  20. DatOperationResult<> CreateBackup(const std::string &backup_datname);
  21. DatOperationResult<> RestoreFromBackup(const std::string &backup_datname);
  22. DatOperationResult<> RemoveBackup(const std::string &backup_datname);
  23. void DeInit();
  24. private:
  25. DatFile *dat;
  26. };
  27. }
  28. };
  29. #endif //LOTRO_DAT_LIBRARY_DATBACKUP_H