aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-10-31 07:12:16 +0100
committerdec05eba <dec05eba@protonmail.com>2020-10-31 07:12:16 +0100
commit11f644afe434ce6b6d570c9da2a95590321871b3 (patch)
tree065ce7f5a9615daba7eb758bb30ccdd46bed3bc2 /include
parent928f2525c29929de0c2ab520f48c82b5cb882aa7 (diff)
Make matrix posting, deleting, replying, edit async and video check if streamable async
Diffstat (limited to 'include')
-rw-r--r--include/Program.hpp5
-rw-r--r--include/QuickMedia.hpp8
2 files changed, 11 insertions, 2 deletions
diff --git a/include/Program.hpp b/include/Program.hpp
index 8ac2d2d..82c912a 100644
--- a/include/Program.hpp
+++ b/include/Program.hpp
@@ -20,9 +20,10 @@ int exec_program_pipe(const char **args, ReadProgram *read_program);
/*
@args need to have at least 2 arguments. The first which is the program name
- and the last which is NULL, which indicates end of args
+ and the last which is NULL, which indicates end of args.
+ |buffer_size| has to be between 1 and 65536.
*/
-int exec_program(const char **args, ProgramOutputCallback output_callback, void *userdata);
+int exec_program(const char **args, ProgramOutputCallback output_callback, void *userdata, int buffer_size = 4096);
// Return the exit status, or a negative value if waiting failed
int wait_program(pid_t process_id);
diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp
index 6f8e3ff..b9ec2d9 100644
--- a/include/QuickMedia.hpp
+++ b/include/QuickMedia.hpp
@@ -36,6 +36,12 @@ namespace QuickMedia {
Path source;
Path destination;
};
+
+ enum class TaskResult {
+ TRUE,
+ FALSE,
+ CANCEL
+ };
class Program {
public:
@@ -65,6 +71,8 @@ namespace QuickMedia {
void chat_page(MatrixChatPage *chat_page, RoomData *current_room);
void after_matrix_login_page();
+ TaskResult run_task_with_loading_screen(std::function<bool()> callback);
+
enum class LoadImageResult {
OK,
FAILED,