1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-22 12:47:44 +00:00
astra/launcher/include/patchlist.h
Joshua Goins c0d68c0b56 Introduce PatchList class to consolidate patchlist body parsing
This also adds tests for the class, which was desperately needed. Also
adds plenty of debug messages to pick apart problems in the patching
process.
2023-10-04 11:09:50 -04:00

29 lines
No EOL
523 B
C++

// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <QString>
#include <QVector>
class Patch
{
public:
QString name, url, repository, version;
QVector<QString> hashes;
long hashBlockSize = 0;
long length = 0;
};
class PatchList
{
public:
explicit PatchList(const QString &patchList);
[[nodiscard]] QVector<Patch> patches() const;
[[nodiscard]] bool isEmpty() const;
private:
QVector<Patch> m_patches;
};