diff options
Diffstat (limited to 'src/modinfo.h')
| -rw-r--r-- | src/modinfo.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/modinfo.h b/src/modinfo.h index d217fb9d..048196f7 100644 --- a/src/modinfo.h +++ b/src/modinfo.h @@ -276,12 +276,23 @@ 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
*/
virtual void setNexusDescription(const QString &description) = 0;
/**
+ * @brief sets the file this mod was installed from
+ * @param fileName name of the file
+ */
+ virtual void setInstallationFile(const QString &fileName) = 0;
+
+ /**
* @brief sets the category id from a nexus category id. Conversion to MO id happens internally
* @param categoryID the nexus category id
* @note if a mapping is not possible, the category is set to the default value
@@ -359,6 +370,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
*/
virtual void ignoreUpdate(bool ignore) = 0;
@@ -462,6 +478,13 @@ public: virtual QStringList archives() const = 0;
/**
+ * @brief adds the information that a file has been installed into this mod
+ * @param modId id of the mod installed
+ * @param fileId id of the file installed
+ */
+ virtual void addInstalledFile(int modId, int fileId) = 0;
+
+ /**
* @brief test if the mod belongs to the specified category
*
* @param categoryID the category to test for.
@@ -746,6 +769,8 @@ public: */
virtual void setNexusDescription(const QString &description);
+ virtual void setInstallationFile(const QString &fileName);
+
/**
* @brief sets the category id from a nexus category id. Conversion to MO id happens internally
* @param categoryID the nexus category id
@@ -760,6 +785,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
* @param endorsed the new endorsement state
@@ -877,6 +908,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
*/
virtual EEndorsedState endorsedState() const;
@@ -888,6 +924,8 @@ public: virtual QStringList archives() const;
+ virtual void addInstalledFile(int modId, int fileId);
+
/**
* @brief stores meta information back to disk
*/
@@ -912,11 +950,13 @@ private: QString m_InstallationFile;
QString m_Notes;
QString m_NexusDescription;
+ QString m_Repository;
QDateTime m_CreationTime;
QDateTime m_LastNexusQuery;
int m_NexusID;
+ std::set<std::pair<int, int>> m_InstalledFileIDs;
bool m_MetaInfoChanged;
MOBase::VersionInfo m_NewestVersion;
@@ -954,6 +994,8 @@ public: QList<MOBase::ModRepositoryFileInfo*>::const_iterator&) {}
virtual QString getNexusDescription() const { return QString(); }
+ virtual void addInstalledFile(int, int) {}
+
private:
ModInfoBackup(const QDir &path, MOShared::DirectoryEntry **directoryStructure);
@@ -981,6 +1023,7 @@ public: virtual void setNewestVersion(const MOBase::VersionInfo&) {}
virtual void ignoreUpdate(bool) {}
virtual void setNexusDescription(const QString&) {}
+ virtual void setInstallationFile(const QString&) {}
virtual void addNexusCategory(int) {}
virtual void setIsEndorsed(bool) {}
virtual void setNeverEndorse() {}
@@ -1003,6 +1046,7 @@ public: virtual QDateTime getLastNexusQuery() const { return QDateTime(); }
virtual QString getNexusDescription() const { return QString(); }
virtual QStringList archives() const;
+ virtual void addInstalledFile(int, int) {}
private:
@@ -1039,6 +1083,7 @@ public: virtual void setNewestVersion(const MOBase::VersionInfo&) {}
virtual void ignoreUpdate(bool) {}
virtual void setNexusDescription(const QString&) {}
+ virtual void setInstallationFile(const QString&) {}
virtual void addNexusCategory(int) {}
virtual void setIsEndorsed(bool) {}
virtual void setNeverEndorse() {}
@@ -1063,6 +1108,7 @@ public: virtual QStringList archives() const { return m_Archives; }
virtual QStringList stealFiles() const { return m_Archives + QStringList(m_ReferenceFile); }
virtual bool alwaysEnabled() const { return true; }
+ virtual void addInstalledFile(int, int) {}
protected:
|
