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