#ifndef DOWNLOAD_H
#define DOWNLOAD_H
#include "application.h"
#include "davcontroller.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct DavFileDownload {
DavTransfer trans;
DavBrowser *browser;
DavSession *sn;
DavSession *download_sn;
DavResource *reslist;
char *local_path;
DavBool isdirectory;
UiThreadpool *queue;
TransferProgress progress;
UiObject *dialog;
UiDouble *progressbar;
UiString *label_top_left;
UiString *label_top_right;
UiString *label_bottom_left;
UiString *label_bottom_right;
DavBool cancel;
} DavFileDownload;
typedef struct DDFile {
DavFileDownload *download;
size_t size;
char *path;
char *to;
FILE *fd;
} DDFile;
DavFileDownload* dav_download_create(DavBrowser *browser, UiObject *dialog, DavResource *reslist,
const char *local_path);
void dav_download_start(DavFileDownload *download);
void action_download_cancel(UiEvent *event,
void *data);
#ifdef __cplusplus
}
#endif
#endif