From 0e648c7c62944cd81aa57f10ac01cdabe2f2b7e0 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Sun, 29 Sep 2024 09:28:28 -0500 Subject: Remember various settings. --- src/archive.hpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/archive.hpp') diff --git a/src/archive.hpp b/src/archive.hpp index d8464e5..e803bd2 100644 --- a/src/archive.hpp +++ b/src/archive.hpp @@ -9,6 +9,8 @@ #include #include +#include + namespace getsuyomi { enum class ArchiveError @@ -26,17 +28,26 @@ class Archive { virtual ~Archive() = default; virtual ArchiveResult getPage(size_t page) = 0; virtual size_t numPages() const = 0; + virtual bool valid() const = 0; }; class ZipArchive : public Archive { public: explicit ZipArchive(const QString& filename); + ZipArchive(const ZipArchive&) = delete; + ZipArchive(ZipArchive&&); virtual ~ZipArchive() override; + ZipArchive& operator=(const ZipArchive&) = delete; + ZipArchive& operator=(ZipArchive&& rhs); + virtual ArchiveResult getPage(size_t page) override; virtual size_t numPages() const override; + bool valid() const override; + private: - void populate(); + void cleanup(); + fud::FudStatus populate(); zip_t* m_archive{nullptr}; -- cgit v1.2.3