diff -r 000cdd124115 -r 5f80c5d0e87f dav/main.h --- a/dav/main.h Wed Oct 25 17:52:35 2017 +0200 +++ b/dav/main.h Sat Oct 28 15:25:17 2017 +0200 @@ -33,6 +33,7 @@ #include "optparser.h" #include +#include "tar.h" #include "version.h" #ifdef __cplusplus @@ -43,6 +44,8 @@ DavResource *res; char *path; } GetResource; + +typedef int(*getfunc)(Repository *, GetResource *, CmdArgs *, void *); void print_usage(char *cmd); char* password_input(char *prompt); @@ -53,10 +56,12 @@ void ls_print_elm(DavResource *res, char *parent, CmdArgs *args); int cmd_get(CmdArgs *args); -int get_resource(Repository *repo, DavResource *res, CmdArgs *a, char *out); +int get_resource(Repository *repo, GetResource *res, CmdArgs *a, void *unused); +int resource2tar(Repository *repo, GetResource *res, CmdArgs *a, TarOutputStream *tar); int cmd_put(CmdArgs *args); int put_entry(Repository *repo, CmdArgs *a, DavSession *sn, char *path, char *file, DavBool root); +int put_tar(Repository *repo, CmdArgs *a, DavSession *sn, char *tarfile, char *path); int put_file(Repository *repo, CmdArgs *a, DavSession *sn, char *path, char *name, FILE *in, off_t len); int cmd_remove(CmdArgs *args);