summaryrefslogtreecommitdiff
path: root/src/file.h
diff options
context:
space:
mode:
authorRyo Nakamura <upa@haeena.net>2022-10-20 18:58:06 +0900
committerRyo Nakamura <upa@haeena.net>2022-10-20 18:58:06 +0900
commit808069ab9dc57dbebcf46d0ff95114581cb5315c (patch)
tree1c719853f59f9b43a1b0b0f2466ce4daba54e6c2 /src/file.h
parentdef9cfeba74357ca98fc25469d4285139ecd42ce (diff)
implement chunk fill
Diffstat (limited to 'src/file.h')
-rw-r--r--src/file.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/file.h b/src/file.h
index d6a8681..0c22944 100644
--- a/src/file.h
+++ b/src/file.h
@@ -14,6 +14,7 @@ struct file {
};
struct chunk {
+ struct list_head list; /* sscp->chunk_list */
struct file *f;
size_t off; /* offset of this chunk on the file f */
size_t len; /* length of this chunk */
@@ -25,8 +26,13 @@ int file_is_directory(char *path, sftp_session sftp);
int file_fill(sftp_session sftp, struct list_head *head, char **src_array, int count);
+int chunk_fill(struct list_head *file_head, struct list_head *chunk_head,
+ int nr_conn, int min_chunk_sz, int max_chunk_sz);
+
#ifdef DEBUG
-void file_dump(struct list_head *head);
+void file_dump(struct list_head *file_head);
+void chunk_dump(struct list_head *chunk_head);
#endif
+
#endif /* _FILE_H_ */