summaryrefslogtreecommitdiff
path: root/src/shared/gameinfo.h
diff options
context:
space:
mode:
authorThomas Tanner <trtanner@btinternet.com>2015-10-15 18:44:39 +0100
committerThomas Tanner <trtanner@btinternet.com>2015-10-15 18:44:39 +0100
commitd4754f4d3ca7451d784e89ae1ddef240666dfdf8 (patch)
treeb5b47d31c10e3b913de352c0c89337a3e1efee3e /src/shared/gameinfo.h
parent1cb0a49dfc83dbc05850bd4b97ee7e5a48d2879a (diff)
Fix for some nexus fomods having the old version of the mod link and not the new version.
Also fixed a lot of const correctness things
Diffstat (limited to 'src/shared/gameinfo.h')
-rw-r--r--src/shared/gameinfo.h30
1 files changed, 17 insertions, 13 deletions
diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h
index a32b6b82..8caa5937 100644
--- a/src/shared/gameinfo.h
+++ b/src/shared/gameinfo.h
@@ -56,12 +56,12 @@ public:
virtual ~GameInfo() {}
- std::wstring getOrganizerDirectory() { return m_OrganizerDirectory; }
+ std::wstring getOrganizerDirectory() const { return m_OrganizerDirectory; }
- virtual std::wstring getRegPath() = 0;
- virtual std::wstring getBinaryName() = 0;
+ virtual std::wstring getRegPath() const = 0;
+ virtual std::wstring getBinaryName() const = 0;
- virtual GameInfo::Type getType() = 0;
+ virtual GameInfo::Type getType() const = 0;
virtual std::wstring getGameName() const = 0;
virtual std::wstring getGameShortName() const = 0;
@@ -75,22 +75,24 @@ public:
virtual bool requiresSteam() const;
// get a list of file extensions for additional files belonging to a save game
- virtual std::vector<std::wstring> getSavegameAttachmentExtensions() = 0;
+ virtual std::vector<std::wstring> getSavegameAttachmentExtensions() const = 0;
// get a set of esp/esm files that are part of known dlcs
- virtual std::vector<std::wstring> getDLCPlugins() = 0;
+ virtual std::vector<std::wstring> getDLCPlugins() const = 0;
// file name of this games ini file(s)
- virtual std::vector<std::wstring> getIniFileNames() = 0;
+ virtual std::vector<std::wstring> getIniFileNames() const = 0;
- virtual std::wstring getReferenceDataFile() = 0;
+ virtual std::wstring getReferenceDataFile() const = 0;
- virtual std::wstring getNexusPage(bool nmmScheme = true) = 0;
- virtual std::wstring getNexusInfoUrl() = 0;
- virtual int getNexusModID() = 0;
- virtual int getNexusGameID() = 0;
+ virtual std::wstring getNexusPage(bool nmmScheme = true) const = 0;
+ virtual std::wstring getNexusInfoUrl() const = 0;
+ virtual int getNexusModID() const = 0;
+ virtual int getNexusGameID() const = 0;
- virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) = 0;
+ virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) const = 0;
+
+ virtual bool isValidModURL(int modID, std::wstring const &url) const = 0;
public:
@@ -108,6 +110,8 @@ protected:
const std::wstring &getMyGamesDirectory() const { return m_MyGamesDirectory; }
void identifyMyGamesDirectory(const std::wstring &file);
+ bool isValidModURL(int modID, const std::wstring &url, const std::wstring &alt) const;
+
private:
static bool identifyGame(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &searchPath);