From 9799803529c57930a0e7f12e45cbcf2b2e4419eb Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 28 May 2020 02:08:40 +0200 Subject: Add support for mangadex --- plugins/Manga.hpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plugins/Manga.hpp (limited to 'plugins/Manga.hpp') diff --git a/plugins/Manga.hpp b/plugins/Manga.hpp new file mode 100644 index 0000000..18ed2f9 --- /dev/null +++ b/plugins/Manga.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "Plugin.hpp" +#include +#include + +namespace QuickMedia { + // Return false to stop iteration + using PageCallback = std::function; + + class Manga : public Plugin { + public: + Manga(const std::string &plugin_name) : Plugin(plugin_name) {} + bool is_manga() override { return true; } + virtual ImageResult get_number_of_images(const std::string &url, int &num_images) = 0; + virtual ImageResult for_each_page_in_chapter(const std::string &chapter_url, PageCallback callback) = 0; + virtual bool extract_id_from_url(const std::string &url, std::string &manga_id) = 0; + }; +} \ No newline at end of file -- cgit v1.2.3