mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-24 21:35:47 +03:00
Split download state
This commit is contained in:
parent
8ed89bca86
commit
1507ca2eaf
2 changed files with 9 additions and 6 deletions
|
@ -1610,8 +1610,9 @@ static int owncloud_sendfile(csync_vio_method_handle_t *src, csync_vio_method_ha
|
||||||
|
|
||||||
if (_progresscb) {
|
if (_progresscb) {
|
||||||
ne_set_notifier(dav_session.ctx, 0, 0);
|
ne_set_notifier(dav_session.ctx, 0, 0);
|
||||||
_progresscb(write_ctx->clean_uri, rc != NE_OK ? CSYNC_NOTIFY_ERROR : CSYNC_NOTIFY_FINISHED,
|
_progresscb(write_ctx->clean_uri, rc != NE_OK ? CSYNC_NOTIFY_ERROR :
|
||||||
error_code, (long long)(error_string), dav_session.userdata);
|
CSYNC_NOTIFY_FINISHED_UPLOAD, error_code,
|
||||||
|
(long long)(error_string), dav_session.userdata);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DEBUG_WEBDAV("Could not stat file descriptor");
|
DEBUG_WEBDAV("Could not stat file descriptor");
|
||||||
|
@ -1669,8 +1670,9 @@ static int owncloud_sendfile(csync_vio_method_handle_t *src, csync_vio_method_ha
|
||||||
}
|
}
|
||||||
if (_progresscb) {
|
if (_progresscb) {
|
||||||
ne_set_notifier(dav_session.ctx, 0, 0);
|
ne_set_notifier(dav_session.ctx, 0, 0);
|
||||||
_progresscb(write_ctx->clean_uri, (rc != NE_OK) ? CSYNC_NOTIFY_ERROR : CSYNC_NOTIFY_FINISHED,
|
_progresscb(write_ctx->clean_uri, (rc != NE_OK) ? CSYNC_NOTIFY_ERROR :
|
||||||
error_code , (long long)(error_string), dav_session.userdata);
|
CSYNC_NOTIFY_FINISHED_DOWNLOAD, error_code ,
|
||||||
|
(long long)(error_string), dav_session.userdata);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DEBUG_WEBDAV("Unknown method!");
|
DEBUG_WEBDAV("Unknown method!");
|
||||||
|
|
|
@ -495,8 +495,9 @@ bool csync_file_known( char *statedb_file, const char* url );
|
||||||
*/
|
*/
|
||||||
int csync_set_module_property(CSYNC *ctx, const char *key, void *value);
|
int csync_set_module_property(CSYNC *ctx, const char *key, void *value);
|
||||||
|
|
||||||
enum csync_notify_type_e { CSYNC_NOTIFY_START_DOWNLOAD, CSYNC_NOTIFY_START_UPLOAD, CSYNC_NOTIFY_PROGRESS,
|
enum csync_notify_type_e { CSYNC_NOTIFY_START_DOWNLOAD, CSYNC_NOTIFY_START_UPLOAD,
|
||||||
CSYNC_NOTIFY_FINISHED, CSYNC_NOTIFY_ERROR };
|
CSYNC_NOTIFY_PROGRESS, CSYNC_NOTIFY_FINISHED_DOWNLOAD,
|
||||||
|
CSYNC_NOTIFY_FINISHED_UPLOAD, CSYNC_NOTIFY_ERROR };
|
||||||
|
|
||||||
typedef void (*csync_progress_callback) (const char *remote_url, enum csync_notify_type_e kind,
|
typedef void (*csync_progress_callback) (const char *remote_url, enum csync_notify_type_e kind,
|
||||||
long long o1, long long o2, void *userdata);
|
long long o1, long long o2, void *userdata);
|
||||||
|
|
Loading…
Reference in a new issue