aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
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,