parent
9e019c7227
commit
a1ea2ed6cd
|
@ -183,8 +183,8 @@ _eio_file_write(int fd, void *mem, ssize_t length)
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void
|
||||||
_eio_file_progress(Eio_Progress *progress, Eio_File_Progress *op)
|
eio_progress_cb(Eio_Progress *progress, Eio_File_Progress *op)
|
||||||
{
|
{
|
||||||
op->progress_cb((void *) op->common.data, progress);
|
op->progress_cb((void *) op->common.data, progress);
|
||||||
|
|
||||||
|
@ -295,7 +295,7 @@ eio_file_copy_do(Ecore_Thread *thread, Eio_File_Progress *copy)
|
||||||
if (in < 0)
|
if (in < 0)
|
||||||
{
|
{
|
||||||
eio_file_thread_error(©->common);
|
eio_file_thread_error(©->common);
|
||||||
return ;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -353,7 +353,7 @@ _eio_file_copy_notify(Ecore_Thread *thread __UNUSED__, void *msg_data, void *dat
|
||||||
{
|
{
|
||||||
Eio_File_Progress *copy = data;
|
Eio_File_Progress *copy = data;
|
||||||
|
|
||||||
_eio_file_progress(msg_data, copy);
|
eio_progress_cb(msg_data, copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -457,7 +457,7 @@ _eio_file_move_notify(Ecore_Thread *thread __UNUSED__, void *msg_data, void *dat
|
||||||
{
|
{
|
||||||
Eio_File_Move *move = data;
|
Eio_File_Move *move = data;
|
||||||
|
|
||||||
_eio_file_progress(msg_data, &move->progress);
|
eio_progress_cb(msg_data, &move->progress);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -642,7 +642,7 @@ eio_file_copy(const char *source,
|
||||||
copy = malloc(sizeof (Eio_File_Progress));
|
copy = malloc(sizeof (Eio_File_Progress));
|
||||||
if (!copy) return NULL;
|
if (!copy) return NULL;
|
||||||
|
|
||||||
move->op = EIO_FILE_COPY;
|
copy->op = EIO_FILE_COPY;
|
||||||
copy->progress_cb = progress_cb;
|
copy->progress_cb = progress_cb;
|
||||||
copy->source = eina_stringshare_add(source);
|
copy->source = eina_stringshare_add(source);
|
||||||
copy->dest = eina_stringshare_add(dest);
|
copy->dest = eina_stringshare_add(dest);
|
||||||
|
|
|
@ -138,6 +138,8 @@ Eio_Progress *eio_progress_malloc(void);
|
||||||
void eio_progress_free(Eio_Progress *progress);
|
void eio_progress_free(Eio_Progress *progress);
|
||||||
void eio_progress_send(Ecore_Thread *thread, Eio_File_Progress *op,
|
void eio_progress_send(Ecore_Thread *thread, Eio_File_Progress *op,
|
||||||
off_t current, off_t max);
|
off_t current, off_t max);
|
||||||
|
void eio_progress_cb(Eio_Progress *progress, Eio_File_Progress *op);
|
||||||
|
|
||||||
Eina_Bool eio_file_copy_do(Ecore_Thread *thread, Eio_File_Progress *copy);
|
Eina_Bool eio_file_copy_do(Ecore_Thread *thread, Eio_File_Progress *copy);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue