aboutsummaryrefslogtreecommitdiff
path: root/libs/game_gamebryo/src/gamebryo/gamebryodataarchives.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/game_gamebryo/src/gamebryo/gamebryodataarchives.h')
-rw-r--r--libs/game_gamebryo/src/gamebryo/gamebryodataarchives.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/libs/game_gamebryo/src/gamebryo/gamebryodataarchives.h b/libs/game_gamebryo/src/gamebryo/gamebryodataarchives.h
new file mode 100644
index 0000000..13f4130
--- /dev/null
+++ b/libs/game_gamebryo/src/gamebryo/gamebryodataarchives.h
@@ -0,0 +1,37 @@
+#ifndef GAMEBRYODATAARCHIVES_H
+#define GAMEBRYODATAARCHIVES_H
+
+#include <QDir>
+
+#include "dataarchives.h"
+
+class GameGamebryo;
+
+class GamebryoDataArchives : public MOBase::DataArchives
+{
+
+public:
+ GamebryoDataArchives(const GameGamebryo* game);
+
+ virtual void addArchive(MOBase::IProfile* profile, int index,
+ const QString& archiveName) override;
+ virtual void removeArchive(MOBase::IProfile* profile,
+ const QString& archiveName) override;
+
+protected:
+ QDir gameDirectory() const;
+ QDir localGameDirectory() const;
+
+ QStringList getArchivesFromKey(const QString& iniFile, const QString& key,
+ int size = 256) const;
+ void setArchivesToKey(const QString& iniFile, const QString& key,
+ const QString& value);
+
+private:
+ const GameGamebryo* m_Game;
+
+ virtual void writeArchiveList(MOBase::IProfile* profile,
+ const QStringList& before) = 0;
+};
+
+#endif // GAMEBRYODATAARCHIVES_H