#ifndef UPLOAD_H
#define UPLOAD_H
#include "application.h"
#include "davcontroller.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct DavFileUpload {
DavTransfer trans;
DavBrowser *browser;
DavSession *sn;
UiFileList files;
char *base_path;
UiThreadpool *queue;
TransferProgress progress;
DavBool upload_file;
char *current_file_name;
UiObject *dialog;
UiDouble *progressbar;
UiString *label_top_left;
UiString *label_top_right;
UiString *label_bottom_left;
UiString *label_bottom_right;
DavResource *collection;
int64_t collection_ctn;
DavResource *current_resource;
DavBool cancel;
} DavFileUpload;
typedef struct DUFile {
FILE *fd;
char *path;
char *upload_path;
size_t bytes;
DavBool isdirectory;
DavFileUpload *upload;
DavError error;
} DUFile;
DavFileUpload* dav_upload_create(DavBrowser *browser, UiObject *obj, UiFileList files);
void dav_upload_start(DavFileUpload *upload);
void action_upload_cancel(UiEvent *event,
void *data);
#ifdef __cplusplus
}
#endif
#endif