summaryrefslogtreecommitdiff
path: root/src/modinfo.h
diff options
context:
space:
mode:
authorLostDragonist <lost.dragonist@gmail.com>2019-03-06 20:12:09 -0600
committerLostDragonist <lost.dragonist@gmail.com>2019-03-07 11:21:47 -0600
commitd5332c5080ea5e1d0812cc900bb5ed6e20ff8f0e (patch)
treefe39b16810e537e7e4f3a97b4e2c599590748067 /src/modinfo.h
parent09a68079bb9ac083bd060b1e75bf329917a7d888 (diff)
Add support for displaying tracked mods and setting tracked status
Diffstat (limited to 'src/modinfo.h')
-rw-r--r--src/modinfo.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/modinfo.h b/src/modinfo.h
index 52c29154..365dfe50 100644
--- a/src/modinfo.h
+++ b/src/modinfo.h
@@ -78,7 +78,8 @@ public:
FLAG_ARCHIVE_CONFLICT_OVERWRITTEN,
FLAG_ARCHIVE_CONFLICT_MIXED,
FLAG_PLUGIN_SELECTED,
- FLAG_ALTERNATE_GAME
+ FLAG_ALTERNATE_GAME,
+ FLAG_TRACKED,
};
enum EContent {
@@ -114,6 +115,12 @@ public:
ENDORSED_NEVER
};
+ enum ETrackedState {
+ TRACKED_FALSE,
+ TRACKED_TRUE,
+ TRACKED_UNKNOWN,
+ };
+
enum EModType {
MOD_DEFAULT,
MOD_DLC,
@@ -363,6 +370,13 @@ public:
virtual void setNeverEndorse() = 0;
/**
+ * update the tracked state for the mod. This only changes the
+ * buffered state, it does not sync with Nexus
+ * @param tracked the new tracked state
+ */
+ virtual void setIsTracked(bool tracked) = 0;
+
+ /**
* @brief delete the mod from the disc. This does not update the global ModInfo structure or indices
* @return true if the mod was successfully removed
**/
@@ -376,6 +390,13 @@ public:
virtual void endorse(bool doEndorse) = 0;
/**
+ * @brief track or untrack the mod. This will sync with nexus!
+ * @param doTrack if true, the mod is tracked, if false, it's untracked.
+ * @note if doTrack doesn't differ from the current value, nothing happens.
+ */
+ virtual void track(bool doTrack) = 0;
+
+ /**
* @brief clear all caches held for this mod
*/
virtual void clearCaches() {}
@@ -637,6 +658,11 @@ public:
virtual EEndorsedState endorsedState() const { return ENDORSED_NEVER; }
/**
+ * @return true if the file is being tracked on nexus
+ */
+ virtual ETrackedState trackedState() const { return TRACKED_FALSE; }
+
+ /**
* @brief updates the valid-flag for this mod
*/
void testValid();