//
// Created by kikab on 04.06.2018.
//

#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);

        void Init();

        bool CheckIfBackupExists(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);

        void DeInit();

    private:
        DatFile *dat;

    };
}
};

#endif //LOTRO_DAT_LIBRARY_DATBACKUP_H
