summaryrefslogtreecommitdiffstats
path: root/api/logic/BaseInstance.h
diff options
context:
space:
mode:
Diffstat (limited to 'api/logic/BaseInstance.h')
-rw-r--r--api/logic/BaseInstance.h45
1 files changed, 9 insertions, 36 deletions
diff --git a/api/logic/BaseInstance.h b/api/logic/BaseInstance.h
index 27b167a6..282bfb70 100644
--- a/api/logic/BaseInstance.h
+++ b/api/logic/BaseInstance.h
@@ -1,4 +1,4 @@
-/* Copyright 2013-2017 MultiMC Contributors
+/* Copyright 2013-2018 MultiMC Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,6 +30,8 @@
#include "MessageLevel.h"
#include "pathmatcher/IPathMatcher.h"
+#include "net/Mode.h"
+
#include "multimc_logic_export.h"
class QDir;
@@ -67,9 +69,8 @@ public:
/// virtual destructor to make sure the destruction is COMPLETE
virtual ~BaseInstance() {};
- virtual void copy(SettingsObjectPtr newSettings, const QDir &newDir) {}
-
virtual void init() = 0;
+ virtual void saveNow() = 0;
/// nuke thoroughly - deletes the instance contents, notifies the list/model which is
/// responsible of cleaning up the husk
@@ -129,25 +130,8 @@ public:
virtual QStringList extraArguments() const;
- virtual QString intendedVersionId() const = 0;
- virtual bool setIntendedVersionId(QString version) = 0;
-
- /*!
- * The instance's current version.
- * This value represents the instance's current version. If this value is
- * different from the intendedVersion, the instance should be updated.
- * \warning Don't change this value unless you know what you're doing.
- */
- virtual QString currentVersionId() const = 0;
-
- /*!
- * Whether or not 'the game' should be downloaded when the instance is launched.
- */
- virtual bool shouldUpdate() const = 0;
- virtual void setShouldUpdate(bool val) = 0;
-
/// Traits. Normally inside the version, depends on instance implementation.
- virtual QSet <QString> traits() = 0;
+ virtual QSet <QString> traits() const = 0;
/**
* Gets the time that the instance was last launched.
@@ -160,12 +144,6 @@ public:
InstancePtr getSharedPtr();
/*!
- * \brief Gets a pointer to this instance's version list.
- * \return A pointer to the available version list for this instance.
- */
- virtual std::shared_ptr<BaseVersionList> versionList() const = 0;
-
- /*!
* \brief Gets this instance's settings object.
* This settings object stores instance-specific settings.
* \return A pointer to this instance's settings object.
@@ -173,7 +151,7 @@ public:
virtual SettingsObjectPtr settings() const;
/// returns a valid update task
- virtual shared_qobject_ptr<Task> createUpdateTask() = 0;
+ virtual shared_qobject_ptr<Task> createUpdateTask(Net::Mode mode) = 0;
/// returns a valid launcher (task container)
virtual std::shared_ptr<LaunchTask> createLaunchTask(AuthSessionPtr account) = 0;
@@ -182,12 +160,6 @@ public:
std::shared_ptr<LaunchTask> getLaunchTask();
/*!
- * Returns a task that should be done right before launch
- * This task should do any extra preparations needed
- */
- virtual std::shared_ptr<Task> createJarModdingTask() = 0;
-
- /*!
* Create envrironment variables for running the instance
*/
virtual QProcessEnvironment createEnvironment() = 0;
@@ -251,10 +223,11 @@ public:
}
}
- bool canLaunch() const;
+ virtual bool canLaunch() const;
+ virtual bool canEdit() const = 0;
virtual bool canExport() const = 0;
- virtual bool reload();
+ bool reloadSettings();
/**
* 'print' a verbose desription of the instance into a QStringList