From d5332c5080ea5e1d0812cc900bb5ed6e20ff8f0e Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Wed, 6 Mar 2019 20:12:09 -0600 Subject: Add support for displaying tracked mods and setting tracked status --- src/modinfo.h | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'src/modinfo.h') 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, @@ -362,6 +369,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 @@ -375,6 +389,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 */ @@ -636,6 +657,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 */ -- cgit v1.3.1