diff options
author | Ryo Nakamura <upa@haeena.net> | 2023-03-04 15:44:10 +0900 |
---|---|---|
committer | Ryo Nakamura <upa@haeena.net> | 2023-03-04 15:44:10 +0900 |
commit | df2f922b0d73f9605965cd37683fb22b7c12b2a3 (patch) | |
tree | 3552dd0dedb0aec916867c3b92b7262bb820cae4 /src/mscp.h | |
parent | 1e57e8fb2fcbf64ad518a5f6aa763725cbb43244 (diff) |
remove pprint, use message (mpr_*) instead.
ToDo:
main should use pipe to receive messages from libmscp.
Diffstat (limited to 'src/mscp.h')
-rw-r--r-- | src/mscp.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -57,6 +57,7 @@ struct mscp_ssh_opts { struct mscp_stats { size_t total; /* total bytes to be transferred */ size_t done; /* total bytes transferred */ + bool finished; /* true when all copy threads finished */ }; struct mscp; @@ -79,12 +80,15 @@ int mscp_set_dst_path(struct mscp *m, const char *dst_path); * files, and prepare chunks for all files. */ int mscp_prepare(struct mscp *m); -/* start to copy files */ +/* start to copy files. this function returns soon (non blocking) */ int mscp_start(struct mscp *m); /* stop copying files */ void mscp_stop(struct mscp *m); +/* wait for copy thread join */ +int mscp_join(struct mscp *m); + /* get stats */ void mscp_get_stats(struct mscp *m, struct mscp_stats *s); |