aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-11-18 23:32:08 +0100
committerdec05eba <dec05eba@protonmail.com>2022-11-18 23:32:12 +0100
commitde45f6d8d7d777244006a7998ec971157e51296e (patch)
tree93ab54b196bda4af7d7fe16d74fb25f08c37a931 /include
parentc56cb5d25388d938fce485ff02b067a2fd70e096 (diff)
Readd meme gpg encryption in matrix, this time asynchronous decryption
of only visible items
Diffstat (limited to 'include')
-rw-r--r--include/BodyItem.hpp3
-rw-r--r--include/Config.hpp1
-rw-r--r--include/Program.hpp2
-rw-r--r--include/StringUtils.hpp2
4 files changed, 8 insertions, 0 deletions
diff --git a/include/BodyItem.hpp b/include/BodyItem.hpp
index 647d344..89adc5d 100644
--- a/include/BodyItem.hpp
+++ b/include/BodyItem.hpp
@@ -36,13 +36,16 @@ namespace QuickMedia {
mgl::vec2f size;
};
+ class BodyItem;
struct Widgets {
+ BodyItem *body_item = nullptr;
std::optional<ThumbnailWidget> thumbnail;
};
// TODO: Remove and create an Userdata class instead to replace the void* userdata in BodyItem
class BodyItemExtra {
public:
+ BodyItemExtra() = default;
virtual ~BodyItemExtra() = default;
virtual void draw_overlay(mgl::Window &window, const Widgets &widgets) {
diff --git a/include/Config.hpp b/include/Config.hpp
index 9edc44b..832824f 100644
--- a/include/Config.hpp
+++ b/include/Config.hpp
@@ -49,6 +49,7 @@ namespace QuickMedia {
struct MatrixConfig {
std::vector<std::string> known_homeservers;
+ std::string gpg_user_id;
};
struct PeertubeConfig {
diff --git a/include/Program.hpp b/include/Program.hpp
index e60a6ae..674c834 100644
--- a/include/Program.hpp
+++ b/include/Program.hpp
@@ -9,6 +9,8 @@ struct ReadProgram {
int read_fd = -1;
};
+int accumulate_string(char *data, int size, void *userdata);
+
/* Return 0 if you want to continue reading. @data is null-terminated */
typedef int (*ProgramOutputCallback)(char *data, int size, void *userdata);
diff --git a/include/StringUtils.hpp b/include/StringUtils.hpp
index 2a01f54..91de829 100644
--- a/include/StringUtils.hpp
+++ b/include/StringUtils.hpp
@@ -9,6 +9,8 @@ namespace QuickMedia {
void string_split(const std::string &str, const std::string &delimiter, StringSplitCallback callback_func, bool include_empty = true);
void string_split(const std::string &str, char delimiter, StringSplitCallback callback_func, bool include_empty = true);
+ void string_split_view(const std::string_view str, const std::string &delimiter, StringSplitCallback callback_func, bool include_empty = true);
+ void string_split_view(const std::string_view str, char delimiter, StringSplitCallback callback_func, bool include_empty = true);
// Returns the number of replaced substrings
size_t string_replace_all(std::string &str, char old_char, char new_char);
// Returns the number of replaced substrings