summaryrefslogtreecommitdiff
path: root/src/installationmanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/installationmanager.h')
-rw-r--r--src/installationmanager.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/installationmanager.h b/src/installationmanager.h
index b3a7362f..149295a6 100644
--- a/src/installationmanager.h
+++ b/src/installationmanager.h
@@ -34,6 +34,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <map>
#include <errorcodes.h>
+#include "modinfo.h"
+
/**
* @brief manages the installation of mod archives
@@ -63,6 +65,24 @@ public:
void setURL(const QString &url);
/**
+ * @brief Notify all installer plugins that an installation is about to start.
+ *
+ * @param archive Path to the archive that is going to be installed.
+ * @param reinstallation True if this is a reinstallation, false otherwise.
+ * @param currentMod The installed mod corresponding to the archive being installed, or a null
+ * if there is no such mod.
+ */
+ void notifyInstallationStart(QString const& archive, bool reinstallation, ModInfo::Ptr currentMod);
+
+ /**
+ * @brief notify all installer plugins that an installation has ended.
+ *
+ * @param result The result of the installation process.
+ * @param currentMod The newly install mod, if result is SUCCESS, a null pointer otherwise.
+ */
+ void notifyInstallationEnd(MOBase::IPluginInstaller::EInstallResult result, ModInfo::Ptr newMod);
+
+ /**
* @brief update the directory where mods are to be installed
* @param modsDirectory the mod directory
* @note this is called a lot, probably redundantly
@@ -185,7 +205,7 @@ public:
* @param merge if this value is not null, the value will be set to whether the use chose to merge or replace
* @return true if we can proceed with the installation, false if the user canceled or in case of an unrecoverable error
*/
- virtual bool testOverwrite(MOBase::GuessedValue<QString> &modName, bool *merge = nullptr);
+ virtual MOBase::IPluginInstaller::EInstallResult testOverwrite(MOBase::GuessedValue<QString> &modName, bool *merge = nullptr);
QString generateBackupName(const QString &directoryName) const;