diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-08-05 21:07:11 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2019-08-05 21:07:14 +0200 |
commit | b894f0b2283a4fcd42fc41f9517b16d623ae3adb (patch) | |
tree | bca95c9bcf3947886fd85d1759cb8349a563bfd2 /plugins | |
parent | 2b294258bbc89f1b49554468022a035782e49074 (diff) |
Add thumbnails for manganelo
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Plugin.hpp | 16 |
1 files changed, 3 insertions, 13 deletions
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 <string> #include <vector> #include <memory> 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<CommandArg> &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<std::unique_ptr<BodyItem>> &result_items); virtual std::vector<std::unique_ptr<BodyItem>> get_related_media(const std::string &url); protected: - DownloadResult download_to_string(const std::string &url, std::string &result, const std::vector<CommandArg> &additional_args = {}); std::string url_param_encode(const std::string ¶m) const; }; }
\ No newline at end of file |