From b894f0b2283a4fcd42fc41f9517b16d623ae3adb Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 5 Aug 2019 21:07:11 +0200 Subject: Add thumbnails for manganelo --- plugins/Plugin.hpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'plugins') diff --git a/plugins/Plugin.hpp b/plugins/Plugin.hpp index 818cc5f..2d6005e 100644 --- a/plugins/Plugin.hpp +++ b/plugins/Plugin.hpp @@ -1,23 +1,12 @@ #pragma once #include "../include/Page.hpp" +#include "../include/Body.hpp" #include #include #include namespace QuickMedia { - class BodyItem { - public: - BodyItem(const std::string &_title): title(_title), visible(true) { - - } - - std::string title; - std::string url; - std::string thumbnail_url; - bool visible; - }; - enum class SearchResult { OK, ERR, @@ -48,6 +37,8 @@ namespace QuickMedia { std::string value; }; + DownloadResult download_to_string(const std::string &url, std::string &result, const std::vector &additional_args = {}); + class Plugin { public: virtual ~Plugin() = default; @@ -56,7 +47,6 @@ namespace QuickMedia { virtual SuggestionResult update_search_suggestions(const std::string &text, std::vector> &result_items); virtual std::vector> get_related_media(const std::string &url); protected: - DownloadResult download_to_string(const std::string &url, std::string &result, const std::vector &additional_args = {}); std::string url_param_encode(const std::string ¶m) const; }; } \ No newline at end of file -- cgit v1.2.3