diff options
author | Ryo Nakamura <upa@haeena.net> | 2024-02-17 13:25:07 +0900 |
---|---|---|
committer | Ryo Nakamura <upa@haeena.net> | 2024-02-17 13:25:07 +0900 |
commit | 2f9c2c0f10f1cf81bb58b1603d089ac0209db8c4 (patch) | |
tree | 340f3c158dfb22162f06c182cf94be488a2a524b /include/mscp.h | |
parent | f71c7a145a4c840baff1d34e9d2c3d9e2f26d74e (diff) |
ready to implement the main-side
Diffstat (limited to 'include/mscp.h')
-rw-r--r-- | include/mscp.h | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/include/mscp.h b/include/mscp.h index c6af3f8..9d83375 100644 --- a/include/mscp.h +++ b/include/mscp.h @@ -173,25 +173,39 @@ int mscp_scan(struct mscp *m); int mscp_scan_join(struct mscp *m); /** - * @brief resume transfer from a checkpoint. mscp_load_checkpoint() - * loads files and associated chunks from a checkpoint file pointed by - * pathname. If you call mscp_load_checkpoint, do not call - * mscp_scan(). + * @brief get information about remote host and copy direction from a + * checkpoint file specified by *pathname. This functions returns + * remote host name to *renote, and the copy direction into *dir. + * Thus, you can call mscp_init with those values. + * + * @param pathname path to a checkpoint file. + * @param remote char buffer to which remote hostname is stored. + * @param len length of *remote. + * @param dir int to which the copy direction is stored. + */ +int mscp_checkpoint_get_remote(const char *pathname, char *remote, size_t len, int *dir); + +/** + * @brief load information about untransferred files and chunks at the + * last transfer . mscp_checkpoint_load() loads files and associated + * chunks from the checkpoint file pointed by pathname. If you call + * mscp_checkpoint_load(), do not call mscp_scan(). * * @param m mscp instance. * @param pathname path to a checkpoint file. * @return 0 on success, < 0 if an error occured. */ -int mscp_load_checkpoint(struct mscp *m, const char *pathname); +int mscp_checkpoint_load(struct mscp *m, const char *pathname); /** - * @brief save untransferred files and chunks to a checkpoint file. + * @brief save information about untransferred files and chunks to a + * checkpoint file. * * @param m mscp instance. * @param pathname path to a checkpoint file. * @return 0 on success, < 0 if an error occured. */ -int mscp_save_checkpoint(struct mscp *m, const char *pathname); +int mscp_checkpoint_save(struct mscp *m, const char *pathname); /** * @brief Start to copy files. mscp_start() returns immediately. You |