summaryrefslogtreecommitdiff
path: root/legacy/eio/src
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2010-10-05 15:32:24 +0000
committerCedric BAIL <cedric.bail@free.fr>2010-10-05 15:32:24 +0000
commita1ea2ed6cd43cada10b6872a23329e651cd44d06 (patch)
treedc8a36750fb7c9ac474fc9d2f060454d34133beb /legacy/eio/src
parent9e019c72279121888c1f2ea8fa87a511f196ca8d (diff)
* eio: more code to share.
SVN revision: 53065
Diffstat (limited to 'legacy/eio/src')
-rw-r--r--legacy/eio/src/lib/eio_file.c12
-rw-r--r--legacy/eio/src/lib/eio_private.h2
2 files changed, 8 insertions, 6 deletions
diff --git a/legacy/eio/src/lib/eio_file.c b/legacy/eio/src/lib/eio_file.c
index d5b3b0ac40..675107626e 100644
--- a/legacy/eio/src/lib/eio_file.c
+++ b/legacy/eio/src/lib/eio_file.c
@@ -183,8 +183,8 @@ _eio_file_write(int fd, void *mem, ssize_t length)
183 return EINA_TRUE; 183 return EINA_TRUE;
184} 184}
185 185
186static void 186void
187_eio_file_progress(Eio_Progress *progress, Eio_File_Progress *op) 187eio_progress_cb(Eio_Progress *progress, Eio_File_Progress *op)
188{ 188{
189 op->progress_cb((void *) op->common.data, progress); 189 op->progress_cb((void *) op->common.data, progress);
190 190
@@ -295,7 +295,7 @@ eio_file_copy_do(Ecore_Thread *thread, Eio_File_Progress *copy)
295 if (in < 0) 295 if (in < 0)
296 { 296 {
297 eio_file_thread_error(&copy->common); 297 eio_file_thread_error(&copy->common);
298 return ; 298 return EINA_FALSE;
299 } 299 }
300 300
301 /* 301 /*
@@ -353,7 +353,7 @@ _eio_file_copy_notify(Ecore_Thread *thread __UNUSED__, void *msg_data, void *dat
353{ 353{
354 Eio_File_Progress *copy = data; 354 Eio_File_Progress *copy = data;
355 355
356 _eio_file_progress(msg_data, copy); 356 eio_progress_cb(msg_data, copy);
357} 357}
358 358
359static void 359static void
@@ -457,7 +457,7 @@ _eio_file_move_notify(Ecore_Thread *thread __UNUSED__, void *msg_data, void *dat
457{ 457{
458 Eio_File_Move *move = data; 458 Eio_File_Move *move = data;
459 459
460 _eio_file_progress(msg_data, &move->progress); 460 eio_progress_cb(msg_data, &move->progress);
461} 461}
462 462
463static void 463static void
@@ -642,7 +642,7 @@ eio_file_copy(const char *source,
642 copy = malloc(sizeof (Eio_File_Progress)); 642 copy = malloc(sizeof (Eio_File_Progress));
643 if (!copy) return NULL; 643 if (!copy) return NULL;
644 644
645 move->op = EIO_FILE_COPY; 645 copy->op = EIO_FILE_COPY;
646 copy->progress_cb = progress_cb; 646 copy->progress_cb = progress_cb;
647 copy->source = eina_stringshare_add(source); 647 copy->source = eina_stringshare_add(source);
648 copy->dest = eina_stringshare_add(dest); 648 copy->dest = eina_stringshare_add(dest);
diff --git a/legacy/eio/src/lib/eio_private.h b/legacy/eio/src/lib/eio_private.h
index d4d8ab30d0..1c5ad6c998 100644
--- a/legacy/eio/src/lib/eio_private.h
+++ b/legacy/eio/src/lib/eio_private.h
@@ -138,6 +138,8 @@ Eio_Progress *eio_progress_malloc(void);
138void eio_progress_free(Eio_Progress *progress); 138void eio_progress_free(Eio_Progress *progress);
139void eio_progress_send(Ecore_Thread *thread, Eio_File_Progress *op, 139void eio_progress_send(Ecore_Thread *thread, Eio_File_Progress *op,
140 off_t current, off_t max); 140 off_t current, off_t max);
141void eio_progress_cb(Eio_Progress *progress, Eio_File_Progress *op);
142
141Eina_Bool eio_file_copy_do(Ecore_Thread *thread, Eio_File_Progress *copy); 143Eina_Bool eio_file_copy_do(Ecore_Thread *thread, Eio_File_Progress *copy);
142 144
143#endif 145#endif