summaryrefslogtreecommitdiff
path: root/src/modinforegular.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/modinforegular.h')
-rw-r--r--src/modinforegular.h50
1 files changed, 48 insertions, 2 deletions
diff --git a/src/modinforegular.h b/src/modinforegular.h
index 093b4e5b..7dc2fd6e 100644
--- a/src/modinforegular.h
+++ b/src/modinforegular.h
@@ -256,7 +256,12 @@ public:
/**
* @return true if the mod can be updated
*/
- virtual bool canBeUpdated() const { return m_NexusID > 0; }
+ virtual bool canBeUpdated() const;
+
+ /**
+ * @return the update expiration date based on the last updated date from Nexus
+ */
+ virtual QDateTime getExpires() const;
/**
* @return true if the mod can be enabled/disabled
@@ -285,6 +290,19 @@ public:
*/
virtual QString getDescription() const;
+
+ /**
+ * @return the nexus file status (aka category ID)
+ */
+ virtual int getNexusFileStatus() const;
+
+
+ /**
+ * @brief sets the file status (category ID) from Nexus
+ * @param status the status id of the installed file
+ */
+ virtual void setNexusFileStatus(int status);
+
/**
* @return comments for this mod
*/
@@ -316,10 +334,35 @@ public:
virtual EEndorsedState endorsedState() const;
/**
+ * @brief get the last time nexus was checked for file updates on this mod
+ */
+ virtual QDateTime getLastNexusUpdate() const;
+
+ /**
+ * @brief set the last time nexus was checked for file updates on this mod
+ */
+ virtual void setLastNexusUpdate(QDateTime time);
+
+ /**
* @return last time nexus was queried for infos on this mod
*/
virtual QDateTime getLastNexusQuery() const;
+ /**
+ * @brief set the last time nexus was queried for info on this mod
+ */
+ virtual void setLastNexusQuery(QDateTime time);
+
+ /**
+ * @return last time the mod was updated on Nexus
+ */
+ virtual QDateTime getNexusLastModified() const;
+
+ /**
+ * @brief set the last time the mod was updated on Nexus
+ */
+ virtual void setNexusLastModified(QDateTime time);
+
virtual QStringList archives(bool checkOnDisk = false);
virtual void setColor(QColor color);
@@ -353,7 +396,7 @@ private slots:
void nxmDescriptionAvailable(QString, int modID, QVariant userData, QVariant resultData);
void nxmEndorsementToggled(QString, int, QVariant userData, QVariant resultData);
- void nxmRequestFailed(QString, int modID, int fileID, QVariant userData, const QString &errorMessage);
+ void nxmRequestFailed(QString, int modID, int fileID, QVariant userData, QNetworkReply::NetworkError error, const QString &errorMessage);
protected:
@@ -376,6 +419,8 @@ private:
QDateTime m_CreationTime;
QDateTime m_LastNexusQuery;
+ QDateTime m_LastNexusUpdate;
+ QDateTime m_NexusLastModified;
QColor m_Color;
@@ -386,6 +431,7 @@ private:
bool m_IsAlternate;
bool m_Converted;
bool m_Validated;
+ int m_NexusFileStatus;
MOBase::VersionInfo m_NewestVersion;
MOBase::VersionInfo m_IgnoredVersion;