diff options
author | Andrew <forkk@forkk.net> | 2013-02-20 19:45:00 -0600 |
---|---|---|
committer | Andrew <forkk@forkk.net> | 2013-02-20 19:45:00 -0600 |
commit | f3b6eeeac4e1606a288c7f12fec271fbb7f120f6 (patch) | |
tree | 50885f4302d1df8386716df9423fcd3c529010ee /libinstance/include/instanceloader.h | |
parent | dd2e836b4cf4cfa043f9ea2911f58f1d22d4e282 (diff) | |
download | MultiMC-f3b6eeeac4e1606a288c7f12fec271fbb7f120f6.tar MultiMC-f3b6eeeac4e1606a288c7f12fec271fbb7f120f6.tar.gz MultiMC-f3b6eeeac4e1606a288c7f12fec271fbb7f120f6.tar.lz MultiMC-f3b6eeeac4e1606a288c7f12fec271fbb7f120f6.tar.xz MultiMC-f3b6eeeac4e1606a288c7f12fec271fbb7f120f6.zip |
Got instance loading working.
Diffstat (limited to 'libinstance/include/instanceloader.h')
-rw-r--r-- | libinstance/include/instanceloader.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libinstance/include/instanceloader.h b/libinstance/include/instanceloader.h index 39696639..96be36fb 100644 --- a/libinstance/include/instanceloader.h +++ b/libinstance/include/instanceloader.h @@ -51,6 +51,7 @@ public: * - InstExists is returned by createInstance() if the given instance directory is already an instance. * - NotAnInstance is returned by loadInstance() if the given instance directory is not a valid instance. * - WrongInstType is returned by loadInstance() if the given instance directory's type doesn't match the given type. + * - CantCreateDir is returned by createInstance( if the given instance directory can't be created.) */ enum InstTypeError { @@ -62,7 +63,8 @@ public: TypeNotRegistered, InstExists, NotAnInstance, - WrongInstType + WrongInstType, + CantCreateDir }; /*! @@ -83,8 +85,9 @@ public: * \return An InstTypeError error code. * - TypeNotRegistered if the given type is not registered with the InstanceLoader. * - InstExists if the given instance directory is already an instance. + * - CantCreateDir if the given instance directory cannot be created. */ - InstTypeError createInstance(Instance *inst, const InstanceTypeInterface *type, const QString &instDir); + InstTypeError createInstance(Instance *&inst, const InstanceTypeInterface *type, const QString &instDir); /*! * \brief Loads an instance from the given directory. @@ -97,7 +100,7 @@ public: * - NotAnInstance if the given instance directory isn't a valid instance. * - WrongInstType if the given instance directory's type isn't the same as the given type. */ - InstTypeError loadInstance(Instance *inst, const InstanceTypeInterface *type, const QString &instDir); + InstTypeError loadInstance(Instance *&inst, const InstanceTypeInterface *type, const QString &instDir); /*! * \brief Loads an instance from the given directory. @@ -108,7 +111,7 @@ public: * - TypeNotRegistered if the instance's type is not registered with the InstanceLoader. * - NotAnInstance if the given instance directory isn't a valid instance. */ - InstTypeError loadInstance(Instance *inst, const QString &instDir); + InstTypeError loadInstance(Instance *&inst, const QString &instDir); /*! * \brief Finds an instance type with the given ID. |