summaryrefslogtreecommitdiffstats
path: root/api/logic/BaseInstanceProvider.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2018-07-24 00:11:24 +0200
committerPetr Mrázek <peterix@gmail.com>2018-07-28 22:12:57 +0200
commit76d6ec91a4a9b330e8df413f76b3d8189e0eec2f (patch)
tree80ddc5d403f830ab68750b0042b5aa36d366eb8a /api/logic/BaseInstanceProvider.h
parent7b439c85c0bf3583ac8970e7ab9e8db3bd65c968 (diff)
downloadMultiMC-76d6ec91a4a9b330e8df413f76b3d8189e0eec2f.tar
MultiMC-76d6ec91a4a9b330e8df413f76b3d8189e0eec2f.tar.gz
MultiMC-76d6ec91a4a9b330e8df413f76b3d8189e0eec2f.tar.lz
MultiMC-76d6ec91a4a9b330e8df413f76b3d8189e0eec2f.tar.xz
MultiMC-76d6ec91a4a9b330e8df413f76b3d8189e0eec2f.zip
NOISSUE simplify.
Diffstat (limited to 'api/logic/BaseInstanceProvider.h')
-rw-r--r--api/logic/BaseInstanceProvider.h58
1 files changed, 0 insertions, 58 deletions
diff --git a/api/logic/BaseInstanceProvider.h b/api/logic/BaseInstanceProvider.h
deleted file mode 100644
index 095d4dab..00000000
--- a/api/logic/BaseInstanceProvider.h
+++ /dev/null
@@ -1,58 +0,0 @@
-#pragma once
-
-#include <QObject>
-#include <QString>
-#include "BaseInstance.h"
-#include "settings/SettingsObject.h"
-
-#include "multimc_logic_export.h"
-
-using InstanceId = QString;
-using GroupId = QString;
-using InstanceLocator = std::pair<InstancePtr, int>;
-
-enum class InstCreateError
-{
- NoCreateError = 0,
- NoSuchVersion,
- UnknownCreateError,
- InstExists,
- CantCreateDir
-};
-
-class MULTIMC_LOGIC_EXPORT BaseInstanceProvider : public QObject
-{
- Q_OBJECT
-public:
- BaseInstanceProvider(SettingsObjectPtr settings) : m_globalSettings(settings)
- {
- // nil
- }
-public:
- virtual QList<InstanceId> discoverInstances() = 0;
- virtual InstancePtr loadInstance(const InstanceId &id) = 0;
- virtual void loadGroupList() = 0;
- virtual void saveGroupList() = 0;
-
- virtual QString getStagedInstancePath()
- {
- return QString();
- }
- virtual bool commitStagedInstance(const QString & path, const QString& instanceName, const QString & groupName)
- {
- return false;
- }
- virtual bool destroyStagingPath(const QString & path)
- {
- return true;
- }
-
-signals:
- // Emit this when the list of provided instances changed
- void instancesChanged();
- // Emit when the set of groups your provider supplies changes.
- void groupsChanged(QSet<QString> groups);
-
-protected:
- SettingsObjectPtr m_globalSettings;
-};