aboutsummaryrefslogtreecommitdiff
path: root/libs/game_bethesda/src/gamebryo/gamebryodataarchives.h
blob: 13f4130e4178b3cd745f9f543e77ff4efd5dbe2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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