From 9b5c238938461f8c811555647e459259b8aca2b3 Mon Sep 17 00:00:00 2001 From: Tannin Date: Sat, 3 Jan 2015 12:35:25 +0100 Subject: - repository info is now stored with the mod --- src/modinfo.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/modinfo.h') diff --git a/src/modinfo.h b/src/modinfo.h index 70bc88c6..6fbab1a0 100644 --- a/src/modinfo.h +++ b/src/modinfo.h @@ -266,6 +266,11 @@ public: **/ virtual void setNewestVersion(const MOBase::VersionInfo &version) = 0; + /** + * @brief sets the repository that was used to download the mod + */ + virtual void setRepository(const QString &) {} + /** * @brief changes/updates the nexus description text * @param description the current description text @@ -348,6 +353,11 @@ public: **/ virtual MOBase::VersionInfo getNewestVersion() const = 0; + /** + * @return the repository from which the file was downloaded. Only relevant regular mods + */ + virtual QString repository() const { return ""; } + /** * @brief ignore the newest version for updates */ @@ -726,6 +736,12 @@ public: */ virtual void setPrimaryCategory(int categoryID) { m_PrimaryCategory = categoryID; m_MetaInfoChanged = true; } + /** + * @brief sets the download repository + * @param repository + */ + virtual void setRepository(const QString &repository) { m_Repository = repository; } + /** * update the endorsement state for the mod. This only changes the * buffered state, it does not sync with Nexus @@ -843,6 +859,11 @@ public: */ QString getNexusDescription() const; + /** + * @return repository from which the file was downloaded + */ + virtual QString repository() const; + /** * @return true if the file has been endorsed on nexus */ @@ -881,6 +902,7 @@ private: QString m_InstallationFile; QString m_Notes; QString m_NexusDescription; + QString m_Repository; QDateTime m_CreationTime; QDateTime m_LastNexusQuery; -- cgit v1.3.1