Refactor using Fable

This commit is contained in:
Agel committed 2026-07-31 17:31:02 +02:00
1 parent 1a60a6b93c
commit 83968646c6
90 files changed
+2080 -2267

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
#pragma once
#include <QByteArray>
#include <QString>
#include <QStringList>
// Abstracts how raw image bytes are obtained from a named entry.
// Implementations: ZipByteSource (minizip), RarByteSource (libarchive), DirByteSource (QDir/QFile).
class IByteSource {
public:
virtual ~IByteSource() = default;
// Opens the source. After returning true, listEntries/readEntry/contentHash are valid.
virtual bool open(const QString &path) = 0;
// All entry names in the source's natural order. Caller filters and sorts.
virtual QStringList listEntries() const = 0;
// Full bytes of one named entry. Returns empty on miss.
virtual QByteArray readEntry(const QString &entryName) const = 0;
// MD5 of the source. For archives: MD5 of file bytes.
// For directories: MD5 of sorted "name:size\n" lines.
virtual QByteArray contentHash() const = 0;
};