123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #ifndef LOTRO_DAT_LIBRARY_DATPATCHER_H
- #define LOTRO_DAT_LIBRARY_DATPATCHER_H
- #include "yaml-cpp/yaml.h"
- #include <DatOperationResult.h>
- extern "C++"
- {
- namespace LOTRO_DAT {
- class DatFile;
- class SubfileData;
- class SubFile;
- class Database;
- class BinaryData;
- class DatPatcher {
- public:
- DatPatcher() = delete;
- DatPatcher(const DatPatcher &other) = delete;
- DatPatcher& operator=(const DatPatcher &other) = delete;
- ~DatPatcher() = default;
- explicit DatPatcher(DatFile *datFilePtr);
- void Init();
- DatOperationResult<> PatchFile(const SubfileData &data);
- DatOperationResult<> PatchFile(const char *filename, YAML::Node options);
- DatOperationResult<> PatchAllDatabase(Database *db);
- void DeInit();
- private:
- DatOperationResult<> ApplyFilePatch(std::shared_ptr<SubFile> file, BinaryData &data);
- private:
- DatFile *dat;
- };
- }
- }
- #endif
|