summaryrefslogtreecommitdiffstats
path: root/api/logic/meta/Index.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-03-17 01:48:54 +0100
committerPetr Mrázek <peterix@gmail.com>2017-04-07 00:20:01 +0200
commit0060b506257b906d40ef53d1e23404dba76afcee (patch)
tree19060c5a8d6525bbed6a91afa249a17e678e37fa /api/logic/meta/Index.h
parent40cf38bc3225c614e7e81d074f890e6f9da0507b (diff)
downloadMultiMC-0060b506257b906d40ef53d1e23404dba76afcee.tar
MultiMC-0060b506257b906d40ef53d1e23404dba76afcee.tar.gz
MultiMC-0060b506257b906d40ef53d1e23404dba76afcee.tar.lz
MultiMC-0060b506257b906d40ef53d1e23404dba76afcee.tar.xz
MultiMC-0060b506257b906d40ef53d1e23404dba76afcee.zip
NOISSUE simplify.
Diffstat (limited to 'api/logic/meta/Index.h')
-rw-r--r--api/logic/meta/Index.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/api/logic/meta/Index.h b/api/logic/meta/Index.h
index 16e95d5a..37341656 100644
--- a/api/logic/meta/Index.h
+++ b/api/logic/meta/Index.h
@@ -27,6 +27,7 @@ class Task;
namespace Meta
{
using VersionListPtr = std::shared_ptr<class VersionList>;
+using VersionPtr = std::shared_ptr<class Version>;
class MULTIMC_LOGIC_EXPORT Index : public QAbstractListModel, public BaseEntity
{
@@ -51,17 +52,21 @@ public:
std::unique_ptr<Task> localUpdateTask() override;
QString localFilename() const override { return "index.json"; }
- QJsonObject serialized() const override;
// queries
+ VersionListPtr get(const QString &uid);
+ VersionPtr get(const QString &uid, const QString &version);
bool hasUid(const QString &uid) const;
+ /*
VersionListPtr getList(const QString &uid) const;
VersionListPtr getListGuaranteed(const QString &uid) const;
+ */
QVector<VersionListPtr> lists() const { return m_lists; }
public: // for usage by parsers only
void merge(const BaseEntity::Ptr &other) override;
+ void parse(const QJsonObject &obj) override;
private:
QVector<VersionListPtr> m_lists;