From d4754f4d3ca7451d784e89ae1ddef240666dfdf8 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Thu, 15 Oct 2015 18:44:39 +0100 Subject: 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 --- src/shared/gameinfo.h | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'src/shared/gameinfo.h') 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 getSavegameAttachmentExtensions() = 0; + virtual std::vector getSavegameAttachmentExtensions() const = 0; // get a set of esp/esm files that are part of known dlcs - virtual std::vector getDLCPlugins() = 0; + virtual std::vector getDLCPlugins() const = 0; // file name of this games ini file(s) - virtual std::vector getIniFileNames() = 0; + virtual std::vector 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); -- cgit v1.3.1