diff options
Diffstat (limited to 'libmultimc/include')
-rw-r--r-- | libmultimc/include/instversion.h | 13 | ||||
-rw-r--r-- | libmultimc/include/minecraftversion.h | 40 |
2 files changed, 17 insertions, 36 deletions
diff --git a/libmultimc/include/instversion.h b/libmultimc/include/instversion.h index 009bd412..af632939 100644 --- a/libmultimc/include/instversion.h +++ b/libmultimc/include/instversion.h @@ -50,18 +50,6 @@ class LIBMULTIMC_EXPORT InstVersion : public QObject Q_PROPERTY(QString typeName READ typeName) /*! - * Whether or not this is a meta version. - * Meta versions are not real versions, merely versions that act as aliases - * for other versions. - * For example: There could be a meta version called "Latest" that always - * points to the latest version. The user would pick this version and when - * a new version came out, it would point to the new one and update the instance - * automatically. - */ - Q_PROPERTY(bool isMeta READ isMeta) - - - /*! * Gets the version's timestamp. * This is primarily used for sorting versions in a list. */ @@ -93,7 +81,6 @@ public: virtual QString name() const; virtual QString typeName() const = 0; virtual qint64 timestamp() const; - virtual bool isMeta() const; virtual InstVersionList *versionList() const; diff --git a/libmultimc/include/minecraftversion.h b/libmultimc/include/minecraftversion.h index fd11b316..6f9b7879 100644 --- a/libmultimc/include/minecraftversion.h +++ b/libmultimc/include/minecraftversion.h @@ -30,6 +30,11 @@ class LIBMULTIMC_EXPORT MinecraftVersion : public InstVersion Q_PROPERTY(VersionType versionType READ versionType WRITE setVersionType) /*! + * This version's launcher. Used to identify the launcher version this is intended for. + */ + Q_PROPERTY(LauncherVersion versionType READ launcherVersion WRITE setLauncherVersion) + + /*! * The URL that this version will be downloaded from. */ Q_PROPERTY(QString downloadURL READ downloadURL) @@ -39,10 +44,6 @@ class LIBMULTIMC_EXPORT MinecraftVersion : public InstVersion */ Q_PROPERTY(QString etag READ etag) - /*! - * True if this is a version from the new Minecraft launcher's version list. - */ - Q_PROPERTY(bool isForNewLauncher READ isForNewLauncher WRITE setIsForNewLauncher) public: explicit MinecraftVersion(QString descriptor, @@ -52,15 +53,6 @@ public: QString etag, InstVersionList *parent = 0); - /*! - * Creates a meta version that links to the given version. - * This is *NOT* a copy constructor. - * \param linkedVersion the version that the meta version will link to. - */ - explicit MinecraftVersion(const MinecraftVersion *linkedVersion); - - MinecraftVersion(const MinecraftVersion &other, QObject *parent); - static InstVersion *mcnVersion(QString rawName, QString niceName); enum VersionType @@ -69,10 +61,14 @@ public: Stable, CurrentStable, Snapshot, - MCNostalgia, - MetaCustom, - MetaLatestSnapshot, - MetaLatestStable + MCNostalgia + }; + + enum LauncherVersion + { + Unknown = -1, + Legacy = 0, // the legacy launcher that's been around since ... forever + Launcher16 = 1, // current launcher as of 26/06/2013 }; virtual QString descriptor() const; @@ -80,24 +76,22 @@ public: virtual QString typeName() const; virtual qint64 timestamp() const; - virtual bool isForNewLauncher() const; - virtual void setIsForNewLauncher(bool val); - virtual VersionType versionType() const; virtual void setVersionType(VersionType typeName); + virtual LauncherVersion launcherVersion() const; + virtual void setLauncherVersion(LauncherVersion launcherVersion); + virtual QString downloadURL() const; virtual QString etag() const; - virtual bool isMeta() const; virtual InstVersion *copyVersion(InstVersionList *newParent) const; private: - InstVersion *m_linkedVersion; - QString m_dlUrl; QString m_etag; VersionType m_type; + LauncherVersion m_launcherVersion; bool m_isNewLauncherVersion; }; |