summaryrefslogtreecommitdiffstats
path: root/api/logic/java/JavaInstall.h
diff options
context:
space:
mode:
Diffstat (limited to 'api/logic/java/JavaInstall.h')
-rw-r--r--api/logic/java/JavaInstall.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/api/logic/java/JavaInstall.h b/api/logic/java/JavaInstall.h
new file mode 100644
index 00000000..882c7386
--- /dev/null
+++ b/api/logic/java/JavaInstall.h
@@ -0,0 +1,38 @@
+#pragma once
+
+#include "BaseVersion.h"
+#include "JavaVersion.h"
+
+struct JavaInstall : public BaseVersion
+{
+ JavaInstall(){}
+ JavaInstall(QString id, QString arch, QString path)
+ : id(id), arch(arch), path(path)
+ {
+ }
+ virtual QString descriptor()
+ {
+ return id.toString();
+ }
+
+ virtual QString name()
+ {
+ return id.toString();
+ }
+
+ virtual QString typeString() const
+ {
+ return arch;
+ }
+
+ bool operator<(const JavaInstall & rhs);
+ bool operator==(const JavaInstall & rhs);
+ bool operator>(const JavaInstall & rhs);
+
+ JavaVersion id;
+ QString arch;
+ QString path;
+ bool recommended = false;
+};
+
+typedef std::shared_ptr<JavaInstall> JavaInstallPtr;