summaryrefslogtreecommitdiff
path: root/src/modinfo.h
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2013-10-05 14:20:48 +0200
committerTannin <devnull@localhost>2013-10-05 14:20:48 +0200
commitcffd9eb4e21f0ddcddca68d8eb0f1c80c8ac6ae1 (patch)
treee6ee4888366aa0412296df6118f8d563a4bf9d50 /src/modinfo.h
parent640b14ef257aa3b681e9c1ba72a88707dfdc7632 (diff)
- hook.dll now doesn't inject to certain applications (currently steam, chrome and firefox)
- versioning system improved. Will now report "downgrades" for mods and support a different versioning system (requires manual switch) - updates can now be ignored until a new version is uploaded - new splash screen - bugfix: a few memory leaks (shouldn't account for much) - bugfix: result of GetModuleHandle wasn't zero-terminated in some cases
Diffstat (limited to 'src/modinfo.h')
-rw-r--r--src/modinfo.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/modinfo.h b/src/modinfo.h
index 7e217de7..3b83d207 100644
--- a/src/modinfo.h
+++ b/src/modinfo.h
@@ -193,6 +193,22 @@ public:
virtual bool updateAvailable() const = 0;
/**
+ * @return true if the update currently available is ignored
+ */
+ virtual bool updateIgnored() const = 0;
+
+ /**
+ * @brief test if the "newest" version of the mod is older than the installed version
+ *
+ * test if there is a newer version of the mod. This does NOT cause
+ * information to be retrieved from the nexus, it will only test version information already
+ * available locally. Use checkAllForUpdate() to update this version information
+ *
+ * @return true if the newest version is older than the installed one
+ **/
+ virtual bool downgradeAvailable() const = 0;
+
+ /**
* @brief request an update of nexus description for this mod.
*
* This requests mod information from the nexus. This is an asynchronous request,
@@ -310,6 +326,11 @@ public:
virtual MOBase::VersionInfo getNewestVersion() const = 0;
/**
+ * @brief ignore the newest version for updates
+ */
+ virtual void ignoreUpdate(bool ignore) = 0;
+
+ /**
* @brief getter for the nexus mod id
*
* @return the nexus mod id. may be 0 if the mod id isn't known or doesn't exist
@@ -495,6 +516,22 @@ public:
bool updateAvailable() const;
/**
+ * @return true if the current update is being ignored
+ */
+ virtual bool updateIgnored() const { return m_IgnoredVersion == m_NewestVersion; }
+
+ /**
+ * @brief test if there is a newer version of the mod
+ *
+ * test if there is a newer version of the mod. This does NOT cause
+ * information to be retrieved from the nexus, it will only test version information already
+ * available locally. Use checkAllForUpdate() to update this version information
+ *
+ * @return true if there is a newer version
+ **/
+ bool downgradeAvailable() const;
+
+ /**
* @brief request an update of nexus description for this mod.
*
* This requests mod information from the nexus. This is an asynchronous request,
@@ -621,6 +658,11 @@ public:
MOBase::VersionInfo getNewestVersion() const { return m_NewestVersion; }
/**
+ * @brief ignore the newest version for updates
+ */
+ void ignoreUpdate(bool ignore);
+
+ /**
* @brief getter for the installation file
*
* @return file used to install this mod from
@@ -746,6 +788,7 @@ private:
bool m_MetaInfoChanged;
MOBase::VersionInfo m_NewestVersion;
+ MOBase::VersionInfo m_IgnoredVersion;
EEndorsedState m_EndorsedState;
@@ -767,10 +810,13 @@ class ModInfoBackup : public ModInfoRegular
public:
virtual bool updateAvailable() const { return false; }
+ virtual bool updateIgnored() const { return false; }
+ virtual bool downgradeAvailable() const { return false; }
virtual bool updateNXMInfo() { return false; }
virtual void setNexusID(int) {}
virtual void endorse(bool) {}
virtual int getFixedPriority() const { return -1; }
+ virtual void ignoreUpdate(bool) {}
virtual bool canBeUpdated() const { return false; }
virtual bool canBeEnabled() const { return false; }
virtual std::vector<QString> getIniTweaks() const { return std::vector<QString>(); }
@@ -798,12 +844,15 @@ class ModInfoOverwrite : public ModInfo
public:
virtual bool updateAvailable() const { return false; }
+ virtual bool updateIgnored() const { return false; }
+ virtual bool downgradeAvailable() const { return false; }
virtual bool updateNXMInfo() { return false; }
virtual void setCategory(int, bool) {}
virtual bool setName(const QString&) { return false; }
virtual void setNotes(const QString&) {}
virtual void setNexusID(int) {}
virtual void setNewestVersion(const MOBase::VersionInfo&) {}
+ virtual void ignoreUpdate(bool) {}
virtual void setNexusDescription(const QString&) {}
virtual void setIsEndorsed(bool) {}
virtual void setNeverEndorse() {}