aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/QuickMedia.hpp14
-rw-r--r--include/Storage.hpp2
2 files changed, 16 insertions, 0 deletions
diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp
index 70c7001..8479d58 100644
--- a/include/QuickMedia.hpp
+++ b/include/QuickMedia.hpp
@@ -14,6 +14,7 @@
namespace QuickMedia {
class Plugin;
+ class Manganelo;
class Program {
public:
@@ -30,6 +31,14 @@ namespace QuickMedia {
void content_list_page();
void content_details_page();
+ enum class LoadImageResult {
+ OK,
+ FAILED,
+ DOWNLOAD_IN_PROGRESS
+ };
+
+ LoadImageResult load_image_by_index(int image_index, sf::Texture &image_texture, sf::String &error_message);
+ void download_chapter_images_if_needed(Manganelo *image_plugin);
void select_episode(BodyItem *item, bool start_from_beginning);
private:
sf::RenderWindow window;
@@ -49,8 +58,13 @@ namespace QuickMedia {
std::string chapter_title;
int image_index;
Path content_storage_file;
+ Path content_cache_dir;
+ std::string manga_id_base64;
Json::Value content_storage_json;
std::unordered_set<std::string> watched_videos;
std::future<BodyItems> search_suggestion_future;
+ std::future<void> image_download_future;
+ std::string downloading_chapter_url;
+ bool image_download_cancel;
};
} \ No newline at end of file
diff --git a/include/Storage.hpp b/include/Storage.hpp
index bd4283c..5b35ba7 100644
--- a/include/Storage.hpp
+++ b/include/Storage.hpp
@@ -11,8 +11,10 @@ namespace QuickMedia {
Path get_home_dir();
Path get_storage_dir();
+ Path get_cache_dir();
int create_directory_recursive(const Path &path);
FileType get_file_type(const Path &path);
int file_get_content(const Path &path, std::string &result);
int file_overwrite(const Path &path, const std::string &data);
+ int create_lock_file(const Path &path);
} \ No newline at end of file