summaryrefslogtreecommitdiff
path: root/src/modinfo.h
diff options
context:
space:
mode:
authorSilarn <jrim@rimpo.org>2018-04-16 12:47:17 -0500
committerSilarn <jrim@rimpo.org>2018-04-16 12:47:17 -0500
commit30c177cb371e92fe5e4cfc600cf27586402cf0a8 (patch)
tree1975b385cc0f379b5330304860b13151fb6bbda9 /src/modinfo.h
parent978d71bb433aa8525c33715de6112f9e201b216f (diff)
Support for multi-game downloads
Diffstat (limited to 'src/modinfo.h')
-rw-r--r--src/modinfo.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/modinfo.h b/src/modinfo.h
index 1ceb8e1f..f321f068 100644
--- a/src/modinfo.h
+++ b/src/modinfo.h
@@ -23,6 +23,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "imodinterface.h"
#include "versioninfo.h"
+class PluginContainer;
+
class QDateTime;
class QDir;
#include <QMutex>
@@ -115,6 +117,7 @@ public:
**/
static void updateFromDisc(const QString &modDirectory,
MOShared::DirectoryEntry **directoryStructure,
+ PluginContainer *pluginContainer,
bool displayForeign,
MOBase::IPluginGame const *game);
@@ -176,19 +179,19 @@ public:
* @param modIDs list of mods (Nexus Mod IDs) to check for updates
* @return
*/
- static void checkChunkForUpdate(const std::vector<int> &modIDs, QObject *receiver);
+ static void checkChunkForUpdate(PluginContainer *pluginContainer, const std::vector<int> &modIDs, QObject *receiver, QString gameName);
/**
* @brief query nexus information for every mod and update the "newest version" information
**/
- static int checkAllForUpdate(QObject *receiver);
+ static int checkAllForUpdate(PluginContainer *pluginContainer, QObject *receiver);
/**
* @brief create a new mod from the specified directory and add it to the collection
* @param dir directory to create from
* @return pointer to the info-structure of the newly created/added mod
*/
- static ModInfo::Ptr createFrom(const QDir &dir, MOShared::DirectoryEntry **directoryStructure);
+ static ModInfo::Ptr createFrom(PluginContainer *pluginContainer, QString gameName, const QDir &dir, MOShared::DirectoryEntry **directoryStructure);
/**
* @brief create a new "foreign-managed" mod from a tuple of plugin and archives
@@ -196,7 +199,7 @@ public:
* @param bsaNames names of archives
* @return a new mod
*/
- static ModInfo::Ptr createFromPlugin(const QString &modName, const QString &espName, const QStringList &bsaNames, ModInfo::EModType modType, MOShared::DirectoryEntry **directoryStructure);
+ static ModInfo::Ptr createFromPlugin(const QString &modName, const QString &espName, const QStringList &bsaNames, ModInfo::EModType modType, MOShared::DirectoryEntry **directoryStructure, PluginContainer *pluginContainer);
/**
* @brief retieve a name for one of the CONTENT_ enums
@@ -408,7 +411,14 @@ public:
*
* @return the nexus mod id. may be 0 if the mod id isn't known or doesn't exist
**/
- virtual int getNexusID() const = 0;
+ virtual int getNexusID() const = 0;
+
+ /**
+ * @brief getter for the source game repository
+ *
+ * @return the source game repository. should default to the active game.
+ **/
+ virtual QString getGameName() const = 0;
/**
* @return the fixed priority of mods of this type or INT_MIN if the priority of mods
@@ -596,14 +606,14 @@ signals:
protected:
- ModInfo();
+ ModInfo(PluginContainer *pluginContainer);
static void updateIndices();
static bool ByName(const ModInfo::Ptr &LHS, const ModInfo::Ptr &RHS);
private:
- static void createFromOverwrite();
+ static void createFromOverwrite(PluginContainer *pluginContainer);
protected: