mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-22 04:37:46 +00:00
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.
29 lines
No EOL
523 B
C++
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;
|
|
}; |