55 int64_t last_res_total; |
55 int64_t last_res_total; |
56 DavResource *last_resource; |
56 DavResource *last_resource; |
57 time_t ts; |
57 time_t ts; |
58 } Progress; |
58 } Progress; |
59 |
59 |
60 typedef int(*getfunc)(Repository *, GetResource *, CmdArgs *, void *); |
60 typedef int(*getfunc)(DavCfgRepository *, GetResource *, CmdArgs *, void *); |
61 |
61 |
62 void print_usage(char *cmd); |
62 void print_usage(char *cmd); |
63 |
63 |
64 int update_progress(DavResource *res, int64_t total, int64_t now, Progress *p); |
64 int update_progress(DavResource *res, int64_t total, int64_t now, Progress *p); |
65 void download_progress(DavResource *res, int64_t total, int64_t now, void *data); |
65 void download_progress(DavResource *res, int64_t total, int64_t now, void *data); |
67 int cmd_list(CmdArgs *args); |
67 int cmd_list(CmdArgs *args); |
68 void ls_print_list_elm(DavResource *res, char *parent, CmdArgs *args); |
68 void ls_print_list_elm(DavResource *res, char *parent, CmdArgs *args); |
69 void ls_print_elm(DavResource *res, char *parent, CmdArgs *args); |
69 void ls_print_elm(DavResource *res, char *parent, CmdArgs *args); |
70 |
70 |
71 int cmd_get(CmdArgs *args, DavBool export); |
71 int cmd_get(CmdArgs *args, DavBool export); |
72 int get_resource(Repository *repo, GetResource *res, CmdArgs *a, void *unused); |
72 int get_resource(DavCfgRepository *repo, GetResource *res, CmdArgs *a, void *unused); |
73 int resource2tar(Repository *repo, GetResource *res, CmdArgs *a, TarOutputStream *tar); |
73 int resource2tar(DavCfgRepository *repo, GetResource *res, CmdArgs *a, TarOutputStream *tar); |
74 |
74 |
75 int cmd_put(CmdArgs *args, DavBool import); |
75 int cmd_put(CmdArgs *args, DavBool import); |
76 int put_entry( |
76 int put_entry( |
77 Repository *repo, |
77 DavCfgRepository *repo, |
78 CmdArgs *a, |
78 CmdArgs *a, |
79 DavSession *sn, |
79 DavSession *sn, |
80 char *path, |
80 char *path, |
81 char *file, |
81 char *file, |
82 uint32_t finfo, |
82 uint32_t finfo, |
83 DavBool root, |
83 DavBool root, |
84 DavBool printfile, |
84 DavBool printfile, |
85 DavBool ignoredirerr); |
85 DavBool ignoredirerr); |
86 int put_tar(Repository *repo, CmdArgs *a, DavSession *sn, char *tarfile, char *path); |
86 int put_tar(DavCfgRepository *repo, CmdArgs *a, DavSession *sn, char *tarfile, char *path); |
87 int put_file( |
87 int put_file( |
88 Repository *repo, |
88 DavCfgRepository *repo, |
89 CmdArgs *a, |
89 CmdArgs *a, |
90 DavSession *sn, |
90 DavSession *sn, |
91 const char *path, |
91 const char *path, |
92 const char *name, |
92 const char *name, |
93 uint32_t finfo, |
93 uint32_t finfo, |