summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2010-11-12 14:08:01 +0000
committerCedric BAIL <cedric.bail@free.fr>2010-11-12 14:08:01 +0000
commit581a3c66e260608c81861864966799271d2e2c17 (patch)
treef75e64d361a9554f393b13275190a7267cdfa5e5 /legacy
parente61f8560ea08e64e450c8cc84c0147e1727ade24 (diff)
* eio: fix API to match the rest of the EFL API.
SVN revision: 54504
Diffstat (limited to 'legacy')
-rw-r--r--legacy/eio/src/lib/Eio.h16
-rw-r--r--legacy/eio/src/lib/eio_dir.c8
-rw-r--r--legacy/eio/src/lib/eio_file.c38
-rw-r--r--legacy/eio/src/lib/eio_single.c10
4 files changed, 36 insertions, 36 deletions
diff --git a/legacy/eio/src/lib/Eio.h b/legacy/eio/src/lib/Eio.h
index 495d7a4d0e..33fe8c8b8d 100644
--- a/legacy/eio/src/lib/Eio.h
+++ b/legacy/eio/src/lib/Eio.h
@@ -108,17 +108,17 @@ typedef struct _Eio_File Eio_File;
108 */ 108 */
109typedef struct _Eio_Progress Eio_Progress; 109typedef struct _Eio_Progress Eio_Progress;
110 110
111typedef Eina_Bool (*Eio_Filter_Cb)(void *data, const char *file); 111typedef Eina_Bool (*Eio_Filter_Cb)(void *data, Eio_File *handler, const char *file);
112typedef void (*Eio_Main_Cb)(void *data, const char *file); 112typedef void (*Eio_Main_Cb)(void *data, Eio_File *handler, const char *file);
113 113
114typedef Eina_Bool (*Eio_Filter_Direct_Cb)(void *data, const Eina_File_Direct_Info *info); 114typedef Eina_Bool (*Eio_Filter_Direct_Cb)(void *data, Eio_File *handler, const Eina_File_Direct_Info *info);
115typedef void (*Eio_Main_Direct_Cb)(void *data, const Eina_File_Direct_Info *info); 115typedef void (*Eio_Main_Direct_Cb)(void *data, Eio_File *handler, const Eina_File_Direct_Info *info);
116 116
117typedef void (*Eio_Stat_Cb)(void *data, const struct stat *stat); 117typedef void (*Eio_Stat_Cb)(void *data, Eio_File *handler, const struct stat *stat);
118typedef void (*Eio_Progress_Cb)(void *data, const Eio_Progress *info); 118typedef void (*Eio_Progress_Cb)(void *data, Eio_File *handler, const Eio_Progress *info);
119 119
120typedef void (*Eio_Done_Cb)(void *data); 120typedef void (*Eio_Done_Cb)(void *data, Eio_File *handler);
121typedef void (*Eio_Error_Cb)(void *data, int error); 121typedef void (*Eio_Error_Cb)(void *data, Eio_File *handler, int error);
122 122
123struct _Eio_Progress 123struct _Eio_Progress
124{ 124{
diff --git a/legacy/eio/src/lib/eio_dir.c b/legacy/eio/src/lib/eio_dir.c
index 2d0a238bd6..2d70d018b8 100644
--- a/legacy/eio/src/lib/eio_dir.c
+++ b/legacy/eio/src/lib/eio_dir.c
@@ -40,7 +40,7 @@
40 * #include <Eio.h> 40 * #include <Eio.h>
41 * 41 *
42 * static void 42 * static void
43 * _test_notify_cb(void *data, const Eio_Progress *info) 43 * _test_notify_cb(void *data, Eio_File *handler, const Eio_Progress *info)
44 * { 44 * {
45 * switch (info->op) 45 * switch (info->op)
46 * { 46 * {
@@ -54,14 +54,14 @@
54 * } 54 * }
55 * 55 *
56 * static void 56 * static void
57 * _test_done_cb(void *data) 57 * _test_done_cb(void *data, Eio_File *handler)
58 * { 58 * {
59 * printf("copy done\n"); 59 * printf("copy done\n");
60 * ecore_main_loop_quit(); 60 * ecore_main_loop_quit();
61 * } 61 * }
62 * 62 *
63 * static void 63 * static void
64 * _test_error_cb(int error, void *data) 64 * _test_error_cb(int error, Eio_File *handler, void *data)
65 * { 65 * {
66 * fprintf(stderr, "error: [%s]\n", strerror(error)); 66 * fprintf(stderr, "error: [%s]\n", strerror(error));
67 * ecore_main_loop_quit(); 67 * ecore_main_loop_quit();
@@ -496,7 +496,7 @@ _eio_dir_copy_end(void *data, Ecore_Thread *thread __UNUSED__)
496{ 496{
497 Eio_Dir_Copy *copy = data; 497 Eio_Dir_Copy *copy = data;
498 498
499 copy->progress.common.done_cb((void*) copy->progress.common.data); 499 copy->progress.common.done_cb((void*) copy->progress.common.data, &copy->progress.common);
500 500
501 _eio_dir_copy_free(copy); 501 _eio_dir_copy_free(copy);
502} 502}
diff --git a/legacy/eio/src/lib/eio_file.c b/legacy/eio/src/lib/eio_file.c
index d1f02ba626..84d43a4d48 100644
--- a/legacy/eio/src/lib/eio_file.c
+++ b/legacy/eio/src/lib/eio_file.c
@@ -44,27 +44,27 @@
44 * #include <Eio.h> 44 * #include <Eio.h>
45 * 45 *
46 * static Eina_Bool 46 * static Eina_Bool
47 * _test_filter_cb(void *data, const char *file) 47 * _test_filter_cb(void *data, Eio_File *handler, const char *file)
48 * { 48 * {
49 * fprintf(stderr, "ACCEPTING: %s\n", file); 49 * fprintf(stderr, "ACCEPTING: %s\n", file);
50 * return EINA_TRUE; 50 * return EINA_TRUE;
51 * } 51 * }
52 * 52 *
53 * static void 53 * static void
54 * _test_main_cb(void *data, const char *file) 54 * _test_main_cb(void *data, Eio_File *handler, const char *file)
55 * { 55 * {
56 * fprintf(stderr, "PROCESS: %s\n", file); 56 * fprintf(stderr, "PROCESS: %s\n", file);
57 * } 57 * }
58 * 58 *
59 * static void 59 * static void
60 * _test_done_cb(void *data) 60 * _test_done_cb(void *data, Eio_File *handler)
61 * { 61 * {
62 * printf("ls done\n"); 62 * printf("ls done\n");
63 * ecore_main_loop_quit(); 63 * ecore_main_loop_quit();
64 * } 64 * }
65 * 65 *
66 * static void 66 * static void
67 * _test_error_cb(void *data, int error) 67 * _test_error_cb(void *data, Eio_File *handler, int error)
68 * { 68 * {
69 * fprintf(stderr, "error: [%s]\n", strerror(error)); 69 * fprintf(stderr, "error: [%s]\n", strerror(error));
70 * ecore_main_loop_quit(); 70 * ecore_main_loop_quit();
@@ -133,7 +133,7 @@ _eio_file_heavy(void *data, Ecore_Thread *thread)
133 133
134 if (async->filter_cb) 134 if (async->filter_cb)
135 { 135 {
136 filter = async->filter_cb((void*) async->ls.common.data, file); 136 filter = async->filter_cb((void*) async->ls.common.data, &async->ls.common, file);
137 } 137 }
138 138
139 if (filter) ecore_thread_feedback(thread, file); 139 if (filter) ecore_thread_feedback(thread, file);
@@ -152,7 +152,7 @@ _eio_file_notify(void *data, Ecore_Thread *thread __UNUSED__, void *msg_data)
152 Eio_File_Char_Ls *async = data; 152 Eio_File_Char_Ls *async = data;
153 const char *file = msg_data; 153 const char *file = msg_data;
154 154
155 async->main_cb((void*) async->ls.common.data, file); 155 async->main_cb((void*) async->ls.common.data, &async->ls.common, file);
156 156
157 eina_stringshare_del(file); 157 eina_stringshare_del(file);
158} 158}
@@ -174,7 +174,7 @@ _eio_file_eina_ls_heavy(Ecore_Thread *thread, Eio_File_Direct_Ls *async, Eina_It
174 174
175 if (async->filter_cb) 175 if (async->filter_cb)
176 { 176 {
177 filter = async->filter_cb((void*) async->ls.common.data, info); 177 filter = async->filter_cb((void*) async->ls.common.data, &async->ls.common, info);
178 } 178 }
179 179
180 if (filter) 180 if (filter)
@@ -224,7 +224,7 @@ _eio_file_direct_notify(void *data, Ecore_Thread *thread __UNUSED__, void *msg_d
224 Eio_File_Direct_Ls *async = data; 224 Eio_File_Direct_Ls *async = data;
225 Eina_File_Direct_Info *info = msg_data; 225 Eina_File_Direct_Info *info = msg_data;
226 226
227 async->main_cb((void*) async->ls.common.data, info); 227 async->main_cb((void*) async->ls.common.data, &async->ls.common, info);
228 228
229 eio_direct_info_free(info); 229 eio_direct_info_free(info);
230} 230}
@@ -234,7 +234,7 @@ _eio_file_end(void *data, Ecore_Thread *thread __UNUSED__)
234{ 234{
235 Eio_File_Ls *async = data; 235 Eio_File_Ls *async = data;
236 236
237 async->common.done_cb((void*) async->common.data); 237 async->common.done_cb((void*) async->common.data, &async->common);
238 238
239 eina_stringshare_del(async->directory); 239 eina_stringshare_del(async->directory);
240 free(async); 240 free(async);
@@ -384,7 +384,7 @@ _eio_file_copy_end(void *data, Ecore_Thread *thread __UNUSED__)
384{ 384{
385 Eio_File_Progress *copy = data; 385 Eio_File_Progress *copy = data;
386 386
387 copy->common.done_cb((void*) copy->common.data); 387 copy->common.done_cb((void*) copy->common.data, &copy->common);
388 388
389 _eio_file_copy_free(copy); 389 _eio_file_copy_free(copy);
390} 390}
@@ -408,25 +408,25 @@ _eio_file_move_free(Eio_File_Move *move)
408} 408}
409 409
410static void 410static void
411_eio_file_move_copy_progress(void *data, const Eio_Progress *info) 411_eio_file_move_copy_progress(void *data, Eio_File *handler __UNUSED__, const Eio_Progress *info)
412{ 412{
413 Eio_File_Move *move = data; 413 Eio_File_Move *move = data;
414 414
415 move->progress.progress_cb((void*) move->progress.common.data, info); 415 move->progress.progress_cb((void*) move->progress.common.data, &move->progress.common, info);
416} 416}
417 417
418static void 418static void
419_eio_file_move_unlink_done(void *data) 419_eio_file_move_unlink_done(void *data, Eio_File *handler __UNUSED__)
420{ 420{
421 Eio_File_Move *move = data; 421 Eio_File_Move *move = data;
422 422
423 move->progress.common.done_cb((void*) move->progress.common.data); 423 move->progress.common.done_cb((void*) move->progress.common.data, &move->progress.common);
424 424
425 _eio_file_move_free(move); 425 _eio_file_move_free(move);
426} 426}
427 427
428static void 428static void
429_eio_file_move_unlink_error(void *data, int error) 429_eio_file_move_unlink_error(void *data, Eio_File *handler __UNUSED__, int error)
430{ 430{
431 Eio_File_Move *move = data; 431 Eio_File_Move *move = data;
432 432
@@ -439,7 +439,7 @@ _eio_file_move_unlink_error(void *data, int error)
439} 439}
440 440
441static void 441static void
442_eio_file_move_copy_done(void *data) 442_eio_file_move_copy_done(void *data, Eio_File *handler __UNUSED__)
443{ 443{
444 Eio_File_Move *move = data; 444 Eio_File_Move *move = data;
445 Eio_File *rm; 445 Eio_File *rm;
@@ -452,7 +452,7 @@ _eio_file_move_copy_done(void *data)
452} 452}
453 453
454static void 454static void
455_eio_file_move_copy_error(void *data, int error) 455_eio_file_move_copy_error(void *data, Eio_File *handler __UNUSED__, int error)
456{ 456{
457 Eio_File_Move *move = data; 457 Eio_File_Move *move = data;
458 458
@@ -486,7 +486,7 @@ _eio_file_move_end(void *data, Ecore_Thread *thread __UNUSED__)
486{ 486{
487 Eio_File_Move *move = data; 487 Eio_File_Move *move = data;
488 488
489 move->progress.common.done_cb((void*) move->progress.common.data); 489 move->progress.common.done_cb((void*) move->progress.common.data, &move->progress.common);
490 490
491 _eio_file_move_free(move); 491 _eio_file_move_free(move);
492} 492}
@@ -542,7 +542,7 @@ _eio_file_move_error(void *data, Ecore_Thread *thread __UNUSED__)
542void 542void
543eio_progress_cb(Eio_Progress *progress, Eio_File_Progress *op) 543eio_progress_cb(Eio_Progress *progress, Eio_File_Progress *op)
544{ 544{
545 op->progress_cb((void *) op->common.data, progress); 545 op->progress_cb((void *) op->common.data, &op->common, progress);
546 546
547 eio_progress_free(progress); 547 eio_progress_free(progress);
548} 548}
diff --git a/legacy/eio/src/lib/eio_single.c b/legacy/eio/src/lib/eio_single.c
index a39091ece0..4dc6d695ce 100644
--- a/legacy/eio/src/lib/eio_single.c
+++ b/legacy/eio/src/lib/eio_single.c
@@ -51,7 +51,7 @@ _eio_file_mkdir_done(void *data, Ecore_Thread *thread __UNUSED__)
51 Eio_File_Mkdir *m = data; 51 Eio_File_Mkdir *m = data;
52 52
53 if (m->common.done_cb) 53 if (m->common.done_cb)
54 m->common.done_cb((void*) m->common.data); 54 m->common.done_cb((void*) m->common.data, &m->common);
55 55
56 _eio_mkdir_free(m); 56 _eio_mkdir_free(m);
57} 57}
@@ -87,7 +87,7 @@ _eio_file_unlink_done(void *data, Ecore_Thread *thread __UNUSED__)
87 Eio_File_Unlink *l = data; 87 Eio_File_Unlink *l = data;
88 88
89 if (l->common.done_cb) 89 if (l->common.done_cb)
90 l->common.done_cb((void*) l->common.data); 90 l->common.done_cb((void*) l->common.data, &l->common);
91 91
92 _eio_unlink_free(l); 92 _eio_unlink_free(l);
93} 93}
@@ -123,7 +123,7 @@ _eio_file_stat_done(void *data, Ecore_Thread *thread __UNUSED__)
123 Eio_File_Stat *s = data; 123 Eio_File_Stat *s = data;
124 124
125 if (s->done_cb) 125 if (s->done_cb)
126 s->done_cb((void*) s->common.data, &s->buffer); 126 s->done_cb((void*) s->common.data, &s->common, &s->buffer);
127 127
128 _eio_stat_free(s); 128 _eio_stat_free(s);
129} 129}
@@ -218,7 +218,7 @@ _eio_file_chown_done(void *data, Ecore_Thread *thread __UNUSED__)
218 Eio_File_Chown *ch = data; 218 Eio_File_Chown *ch = data;
219 219
220 if (ch->common.done_cb) 220 if (ch->common.done_cb)
221 ch->common.done_cb((void*) ch->common.data); 221 ch->common.done_cb((void*) ch->common.data, &ch->common);
222 222
223 _eio_chown_free(ch); 223 _eio_chown_free(ch);
224} 224}
@@ -248,7 +248,7 @@ void
248eio_file_error(Eio_File *common) 248eio_file_error(Eio_File *common)
249{ 249{
250 if (common->error_cb) 250 if (common->error_cb)
251 common->error_cb((void*) common->data, common->error); 251 common->error_cb((void*) common->data, common, common->error);
252} 252}
253 253
254void 254void