1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #ifndef LOTRO_DAT_LIBRARY_DATBACKUP_H
- #define LOTRO_DAT_LIBRARY_DATBACKUP_H
- #include <string>
- #include "../DatOperationResult.h"
- extern "C++" {
- namespace LOTRO_DAT {
- class DatFile;
-
- class DatBackupManager {
- public:
- DatBackupManager() = delete;
- DatBackupManager(const DatBackupManager &other) = delete;
- DatBackupManager &operator=(const DatBackupManager &other) = delete;
- ~DatBackupManager() = default;
- explicit DatBackupManager(DatFile *datFilePtr);
- bool CheckIfBackupAvailable(const std::string &backup_datname);
- DatOperationResult<> CreateBackup(const std::string &backup_datname);
- DatOperationResult<> RestoreFromBackup(const std::string &backup_datname);
- DatOperationResult<> RemoveBackup(const std::string &backup_datname);
- private:
- DatOperationResult<> CopyDatFile(DatFile &source, FILE* target);
- DatFile *dat;
- const unsigned COPY_BLOCK_SIZE = 16 * 1024 * 1024;
- };
- }
- };
- #endif
|