Public Member Functions | |
| signal void | stdout_line_read (string line) |
| signal void | stderr_line_read (string line) |
| signal void | task_complete () |
| virtual void | prepare () |
| void | write_stdin (string line) |
| virtual void | execute () |
| bool | is_running () |
| void | stop (AppStatus status_to_update=AppStatus.CANCELLED) |
| void | pause (AppStatus status_to_update=AppStatus.PAUSED) |
| void | resume (AppStatus status_to_update=AppStatus.RUNNING) |
| void | print_app_status () |
Public Attributes | |
| AppStatus | status = AppStatus.NOT_STARTED |
| GLib.Mutex | status_line_mutex |
| int | exit_code = 0 |
| GLib.Timer | timer |
| double | progress = 0.0 |
| double | percent = 0.0 |
| int64 | prg_count = 0 |
| int64 | prg_count_total = 0 |
Protected Member Functions | |
| AsyncTask () | |
| string | build_script () |
| virtual bool | begin () |
| void | parse_stdout_line (string out_line) |
| void | parse_stderr_line (string err_line) |
| virtual void | finish_task () |
| int | read_exit_code () |
Protected Attributes | |
| DataOutputStream | dos_log = null |
| Pid | child_pid = 0 |
| string | script_file = "" |
| string | working_dir = "" |
Properties | |
| string | status_line [get, set] |
| double | elapsed [get] |
| string | stat_time_elapsed [get] |
| string??? | stat_time_remaining [get] |
Private Member Functions | |
| string | _get_status_line () |
| void | read_stdout () |
| void | read_stderr () |
| void | finish () |
Private Attributes | |
| string | err_line = "" |
| string | out_line = "" |
| DataOutputStream | dos_in = null |
| DataInputStream | dis_out = null |
| DataInputStream | dis_err = null |
| bool | stdout_is_open = false |
| bool | stderr_is_open = false |
| int | input_fd = -1 |
| int | output_fd = -1 |
| int | error_fd = -1 |
| bool | finish_called = false |
| string | _status_line = "" |
| double | timerOffset = 0.0 |
Definition at line 31 of file AsyncTask.vala.
|
inlineprotected |
Definition at line 97 of file AsyncTask.vala.
References TeeJee.FileSystem.dir_create(), TeeJee.FileSystem.path_combine(), script_file, status_line_mutex, TeeJee.ProcessHelper.TEMP_DIR, TeeJee.Misc.timestamp_for_path(), and working_dir.
|
inlineprivate |
Definition at line 86 of file AsyncTask.vala.
References _status_line, and status_line_mutex.
|
inlineprotectedvirtual |
Definition at line 116 of file AsyncTask.vala.
References child_pid, dis_err, dis_out, dos_in, Error, error_fd, finish_called, input_fd, TeeJee.Logging.log_debug(), TeeJee.Logging.log_error(), output_fd, prg_count, read_stderr(), read_stdout(), script_file, status, timer, and working_dir.
Referenced by execute().
|
abstractprotected |
Referenced by prepare().
|
inlinevirtual |
Definition at line 270 of file AsyncTask.vala.
References begin(), TeeJee.Logging.log_debug(), and prepare().
Referenced by Main.create_snapshot_with_rsync(), Main.estimate_system_size(), Main.get_space_needed_for_rsync_snapshot(), Snapshot.remove_rsync(), and Main.restore_other_gui().
|
inlineprivate |
Definition at line 280 of file AsyncTask.vala.
References child_pid, dos_in, err_line, finish_called, finish_task(), TeeJee.Logging.log_debug(), out_line, read_exit_code(), status, status_line, task_complete(), and timer.
Referenced by read_stderr(), and read_stdout().
|
inlineprotectedvirtual |
Reimplemented in RsyncTask.
Definition at line 322 of file AsyncTask.vala.
Referenced by finish().
|
inline |
Definition at line 336 of file AsyncTask.vala.
References status.
|
abstractprotected |
References err_line.
Referenced by read_stderr().
|
abstractprotected |
References out_line.
Referenced by read_stdout().
|
inline |
Definition at line 353 of file AsyncTask.vala.
References child_pid, TeeJee.Logging.log_debug(), status, and timer.
Referenced by BackupWindow.create_actions().
|
inlinevirtual |
Reimplemented in DeleteFileTask, RsyncSpaceCheckTask, and RsyncTask.
Definition at line 106 of file AsyncTask.vala.
References build_script(), TeeJee.Logging.log_debug(), TeeJee.ProcessHelper.save_bash_script_temp(), and script_file.
Referenced by execute().
|
inline |
Definition at line 412 of file AsyncTask.vala.
References TeeJee.Logging.log_debug(), and status.
|
inlineprotected |
Definition at line 324 of file AsyncTask.vala.
References exit_code, TeeJee.FileSystem.file_exists(), TeeJee.FileSystem.file_parent(), TeeJee.FileSystem.file_read(), TeeJee.Logging.log_debug(), and script_file.
Referenced by finish().
|
inlineprivate |
Definition at line 220 of file AsyncTask.vala.
References dis_err, err_line, Error, finish(), TeeJee.Logging.log_error(), parse_stderr_line(), stderr_is_open, stderr_line_read(), and stdout_is_open.
Referenced by begin().
|
inlineprivate |
Definition at line 184 of file AsyncTask.vala.
References dis_out, Error, finish(), TeeJee.Logging.log_error(), out_line, parse_stdout_line(), stderr_is_open, stdout_is_open, and stdout_line_read().
Referenced by begin().
|
inline |
Definition at line 367 of file AsyncTask.vala.
References child_pid, TeeJee.Logging.log_debug(), status, and timer.
Referenced by BackupWindow.create_actions().
| signal void AsyncTask.stderr_line_read | ( | string | line | ) |
Referenced by read_stderr().
| signal void AsyncTask.stdout_line_read | ( | string | line | ) |
Referenced by read_stdout().
|
inline |
Definition at line 342 of file AsyncTask.vala.
References child_pid, TeeJee.Logging.log_debug(), TeeJee.ProcessHelper.process_quit(), and status.
Referenced by BackupWindow.create_actions(), DeleteWindow.create_actions(), RestoreWindow.create_actions(), SetupWizardWindow.create_actions(), and MainWindow.on_close_request().
| signal void AsyncTask.task_complete | ( | ) |
Referenced by finish().
|
inline |
Definition at line 255 of file AsyncTask.vala.
References dos_in, Error, TeeJee.Logging.log_error(), and status.
|
private |
Definition at line 55 of file AsyncTask.vala.
Referenced by _get_status_line().
|
protected |
|
private |
Definition at line 37 of file AsyncTask.vala.
Referenced by begin(), and read_stderr().
|
private |
Definition at line 36 of file AsyncTask.vala.
Referenced by begin(), and read_stdout().
|
private |
Definition at line 35 of file AsyncTask.vala.
Referenced by begin(), finish(), and write_stdin().
|
protected |
Definition at line 38 of file AsyncTask.vala.
|
private |
Definition at line 33 of file AsyncTask.vala.
Referenced by finish(), parse_stderr_line(), DeleteFileTask.parse_stderr_line(), RsyncSpaceCheckTask.parse_stderr_line(), RsyncTask.parse_stderr_line(), and read_stderr().
|
private |
Definition at line 46 of file AsyncTask.vala.
Referenced by begin().
| int AsyncTask.exit_code = 0 |
Definition at line 58 of file AsyncTask.vala.
Referenced by read_exit_code(), and RestoreBox.restore().
|
private |
Definition at line 47 of file AsyncTask.vala.
|
private |
Definition at line 44 of file AsyncTask.vala.
Referenced by begin().
|
private |
Definition at line 34 of file AsyncTask.vala.
Referenced by finish(), parse_stdout_line(), DeleteFileTask.parse_stdout_line(), RsyncSpaceCheckTask.parse_stdout_line(), RsyncTask.parse_stdout_line(), and read_stdout().
|
private |
Definition at line 45 of file AsyncTask.vala.
Referenced by begin().
| double AsyncTask.percent = 0.0 |
Definition at line 62 of file AsyncTask.vala.
| int64 AsyncTask.prg_count = 0 |
Definition at line 63 of file AsyncTask.vala.
Referenced by begin(), RsyncTask.parse_log(), RsyncLogBox.parse_log_file(), DeleteFileTask.update_progress_parse_console_output(), RsyncSpaceCheckTask.update_progress_parse_console_output(), and RsyncTask.update_progress_parse_console_output().
| int64 AsyncTask.prg_count_total = 0 |
Definition at line 64 of file AsyncTask.vala.
Referenced by RsyncTask.parse_log(), RsyncLogBox.parse_log_file(), DeleteFileTask.update_progress_parse_console_output(), RsyncSpaceCheckTask.update_progress_parse_console_output(), and RsyncTask.update_progress_parse_console_output().
| double AsyncTask.progress = 0.0 |
Definition at line 61 of file AsyncTask.vala.
Referenced by Main.create_snapshot_with_rsync(), DeleteBox.delete_snapshots(), Snapshot.remove_rsync(), RestoreBox.restore(), BackupBox.take_snapshot(), DeleteFileTask.update_progress_parse_console_output(), RsyncSpaceCheckTask.update_progress_parse_console_output(), and RsyncTask.update_progress_parse_console_output().
|
protected |
Definition at line 49 of file AsyncTask.vala.
Referenced by AsyncTask(), begin(), prepare(), and read_exit_code().
| AppStatus AsyncTask.status = AppStatus.NOT_STARTED |
Definition at line 53 of file AsyncTask.vala.
Referenced by begin(), BackupWindow.create_actions(), Main.create_snapshot_with_rsync(), Main.delete_thread(), Main.estimate_system_size(), finish(), Main.get_space_needed_for_rsync_snapshot(), is_running(), MainWindow.on_close_request(), pause(), print_app_status(), Snapshot.remove_rsync(), Main.restore_other_gui(), resume(), stop(), BackupBox.take_snapshot(), and write_stdin().
| GLib.Mutex AsyncTask.status_line_mutex |
Definition at line 56 of file AsyncTask.vala.
Referenced by _get_status_line(), and AsyncTask().
|
private |
Definition at line 41 of file AsyncTask.vala.
Referenced by read_stderr(), and read_stdout().
|
private |
Definition at line 40 of file AsyncTask.vala.
Referenced by read_stderr(), and read_stdout().
| GLib.Timer AsyncTask.timer |
|
private |
Definition at line 60 of file AsyncTask.vala.
|
protected |
Definition at line 50 of file AsyncTask.vala.
Referenced by AsyncTask(), and begin().
|
getprivate |
Definition at line 381 of file AsyncTask.vala.
|
get |
Definition at line 391 of file AsyncTask.vala.
Referenced by Main.delete_thread().
|
get |
Definition at line 397 of file AsyncTask.vala.
Referenced by Main.create_snapshot_with_rsync(), Snapshot.remove_rsync(), and BackupBox.take_snapshot().
|
getset |
Definition at line 72 of file AsyncTask.vala.
Referenced by DeleteBox.delete_snapshots(), finish(), RestoreBox.restore(), Main.restore_other_gui(), BackupBox.take_snapshot(), DeleteFileTask.update_progress_parse_console_output(), and RsyncTask.update_progress_parse_console_output().