forked from enlightenment/efl
* eio: fix API to match the rest of the EFL API.
SVN revision: 54504
This commit is contained in:
parent
e61f8560ea
commit
581a3c66e2
|
@ -108,17 +108,17 @@ typedef struct _Eio_File Eio_File;
|
||||||
*/
|
*/
|
||||||
typedef struct _Eio_Progress Eio_Progress;
|
typedef struct _Eio_Progress Eio_Progress;
|
||||||
|
|
||||||
typedef Eina_Bool (*Eio_Filter_Cb)(void *data, const char *file);
|
typedef Eina_Bool (*Eio_Filter_Cb)(void *data, Eio_File *handler, const char *file);
|
||||||
typedef void (*Eio_Main_Cb)(void *data, const char *file);
|
typedef void (*Eio_Main_Cb)(void *data, Eio_File *handler, const char *file);
|
||||||
|
|
||||||
typedef Eina_Bool (*Eio_Filter_Direct_Cb)(void *data, const Eina_File_Direct_Info *info);
|
typedef Eina_Bool (*Eio_Filter_Direct_Cb)(void *data, Eio_File *handler, const Eina_File_Direct_Info *info);
|
||||||
typedef void (*Eio_Main_Direct_Cb)(void *data, const Eina_File_Direct_Info *info);
|
typedef void (*Eio_Main_Direct_Cb)(void *data, Eio_File *handler, const Eina_File_Direct_Info *info);
|
||||||
|
|
||||||
typedef void (*Eio_Stat_Cb)(void *data, const struct stat *stat);
|
typedef void (*Eio_Stat_Cb)(void *data, Eio_File *handler, const struct stat *stat);
|
||||||
typedef void (*Eio_Progress_Cb)(void *data, const Eio_Progress *info);
|
typedef void (*Eio_Progress_Cb)(void *data, Eio_File *handler, const Eio_Progress *info);
|
||||||
|
|
||||||
typedef void (*Eio_Done_Cb)(void *data);
|
typedef void (*Eio_Done_Cb)(void *data, Eio_File *handler);
|
||||||
typedef void (*Eio_Error_Cb)(void *data, int error);
|
typedef void (*Eio_Error_Cb)(void *data, Eio_File *handler, int error);
|
||||||
|
|
||||||
struct _Eio_Progress
|
struct _Eio_Progress
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
* #include <Eio.h>
|
* #include <Eio.h>
|
||||||
*
|
*
|
||||||
* static void
|
* static void
|
||||||
* _test_notify_cb(void *data, const Eio_Progress *info)
|
* _test_notify_cb(void *data, Eio_File *handler, const Eio_Progress *info)
|
||||||
* {
|
* {
|
||||||
* switch (info->op)
|
* switch (info->op)
|
||||||
* {
|
* {
|
||||||
|
@ -54,14 +54,14 @@
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* static void
|
* static void
|
||||||
* _test_done_cb(void *data)
|
* _test_done_cb(void *data, Eio_File *handler)
|
||||||
* {
|
* {
|
||||||
* printf("copy done\n");
|
* printf("copy done\n");
|
||||||
* ecore_main_loop_quit();
|
* ecore_main_loop_quit();
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* static void
|
* static void
|
||||||
* _test_error_cb(int error, void *data)
|
* _test_error_cb(int error, Eio_File *handler, void *data)
|
||||||
* {
|
* {
|
||||||
* fprintf(stderr, "error: [%s]\n", strerror(error));
|
* fprintf(stderr, "error: [%s]\n", strerror(error));
|
||||||
* ecore_main_loop_quit();
|
* ecore_main_loop_quit();
|
||||||
|
@ -496,7 +496,7 @@ _eio_dir_copy_end(void *data, Ecore_Thread *thread __UNUSED__)
|
||||||
{
|
{
|
||||||
Eio_Dir_Copy *copy = data;
|
Eio_Dir_Copy *copy = data;
|
||||||
|
|
||||||
copy->progress.common.done_cb((void*) copy->progress.common.data);
|
copy->progress.common.done_cb((void*) copy->progress.common.data, ©->progress.common);
|
||||||
|
|
||||||
_eio_dir_copy_free(copy);
|
_eio_dir_copy_free(copy);
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,27 +44,27 @@
|
||||||
* #include <Eio.h>
|
* #include <Eio.h>
|
||||||
*
|
*
|
||||||
* static Eina_Bool
|
* static Eina_Bool
|
||||||
* _test_filter_cb(void *data, const char *file)
|
* _test_filter_cb(void *data, Eio_File *handler, const char *file)
|
||||||
* {
|
* {
|
||||||
* fprintf(stderr, "ACCEPTING: %s\n", file);
|
* fprintf(stderr, "ACCEPTING: %s\n", file);
|
||||||
* return EINA_TRUE;
|
* return EINA_TRUE;
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* static void
|
* static void
|
||||||
* _test_main_cb(void *data, const char *file)
|
* _test_main_cb(void *data, Eio_File *handler, const char *file)
|
||||||
* {
|
* {
|
||||||
* fprintf(stderr, "PROCESS: %s\n", file);
|
* fprintf(stderr, "PROCESS: %s\n", file);
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* static void
|
* static void
|
||||||
* _test_done_cb(void *data)
|
* _test_done_cb(void *data, Eio_File *handler)
|
||||||
* {
|
* {
|
||||||
* printf("ls done\n");
|
* printf("ls done\n");
|
||||||
* ecore_main_loop_quit();
|
* ecore_main_loop_quit();
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* static void
|
* static void
|
||||||
* _test_error_cb(void *data, int error)
|
* _test_error_cb(void *data, Eio_File *handler, int error)
|
||||||
* {
|
* {
|
||||||
* fprintf(stderr, "error: [%s]\n", strerror(error));
|
* fprintf(stderr, "error: [%s]\n", strerror(error));
|
||||||
* ecore_main_loop_quit();
|
* ecore_main_loop_quit();
|
||||||
|
@ -133,7 +133,7 @@ _eio_file_heavy(void *data, Ecore_Thread *thread)
|
||||||
|
|
||||||
if (async->filter_cb)
|
if (async->filter_cb)
|
||||||
{
|
{
|
||||||
filter = async->filter_cb((void*) async->ls.common.data, file);
|
filter = async->filter_cb((void*) async->ls.common.data, &async->ls.common, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filter) ecore_thread_feedback(thread, file);
|
if (filter) ecore_thread_feedback(thread, file);
|
||||||
|
@ -152,7 +152,7 @@ _eio_file_notify(void *data, Ecore_Thread *thread __UNUSED__, void *msg_data)
|
||||||
Eio_File_Char_Ls *async = data;
|
Eio_File_Char_Ls *async = data;
|
||||||
const char *file = msg_data;
|
const char *file = msg_data;
|
||||||
|
|
||||||
async->main_cb((void*) async->ls.common.data, file);
|
async->main_cb((void*) async->ls.common.data, &async->ls.common, file);
|
||||||
|
|
||||||
eina_stringshare_del(file);
|
eina_stringshare_del(file);
|
||||||
}
|
}
|
||||||
|
@ -174,7 +174,7 @@ _eio_file_eina_ls_heavy(Ecore_Thread *thread, Eio_File_Direct_Ls *async, Eina_It
|
||||||
|
|
||||||
if (async->filter_cb)
|
if (async->filter_cb)
|
||||||
{
|
{
|
||||||
filter = async->filter_cb((void*) async->ls.common.data, info);
|
filter = async->filter_cb((void*) async->ls.common.data, &async->ls.common, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filter)
|
if (filter)
|
||||||
|
@ -224,7 +224,7 @@ _eio_file_direct_notify(void *data, Ecore_Thread *thread __UNUSED__, void *msg_d
|
||||||
Eio_File_Direct_Ls *async = data;
|
Eio_File_Direct_Ls *async = data;
|
||||||
Eina_File_Direct_Info *info = msg_data;
|
Eina_File_Direct_Info *info = msg_data;
|
||||||
|
|
||||||
async->main_cb((void*) async->ls.common.data, info);
|
async->main_cb((void*) async->ls.common.data, &async->ls.common, info);
|
||||||
|
|
||||||
eio_direct_info_free(info);
|
eio_direct_info_free(info);
|
||||||
}
|
}
|
||||||
|
@ -234,7 +234,7 @@ _eio_file_end(void *data, Ecore_Thread *thread __UNUSED__)
|
||||||
{
|
{
|
||||||
Eio_File_Ls *async = data;
|
Eio_File_Ls *async = data;
|
||||||
|
|
||||||
async->common.done_cb((void*) async->common.data);
|
async->common.done_cb((void*) async->common.data, &async->common);
|
||||||
|
|
||||||
eina_stringshare_del(async->directory);
|
eina_stringshare_del(async->directory);
|
||||||
free(async);
|
free(async);
|
||||||
|
@ -384,7 +384,7 @@ _eio_file_copy_end(void *data, Ecore_Thread *thread __UNUSED__)
|
||||||
{
|
{
|
||||||
Eio_File_Progress *copy = data;
|
Eio_File_Progress *copy = data;
|
||||||
|
|
||||||
copy->common.done_cb((void*) copy->common.data);
|
copy->common.done_cb((void*) copy->common.data, ©->common);
|
||||||
|
|
||||||
_eio_file_copy_free(copy);
|
_eio_file_copy_free(copy);
|
||||||
}
|
}
|
||||||
|
@ -408,25 +408,25 @@ _eio_file_move_free(Eio_File_Move *move)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_eio_file_move_copy_progress(void *data, const Eio_Progress *info)
|
_eio_file_move_copy_progress(void *data, Eio_File *handler __UNUSED__, const Eio_Progress *info)
|
||||||
{
|
{
|
||||||
Eio_File_Move *move = data;
|
Eio_File_Move *move = data;
|
||||||
|
|
||||||
move->progress.progress_cb((void*) move->progress.common.data, info);
|
move->progress.progress_cb((void*) move->progress.common.data, &move->progress.common, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_eio_file_move_unlink_done(void *data)
|
_eio_file_move_unlink_done(void *data, Eio_File *handler __UNUSED__)
|
||||||
{
|
{
|
||||||
Eio_File_Move *move = data;
|
Eio_File_Move *move = data;
|
||||||
|
|
||||||
move->progress.common.done_cb((void*) move->progress.common.data);
|
move->progress.common.done_cb((void*) move->progress.common.data, &move->progress.common);
|
||||||
|
|
||||||
_eio_file_move_free(move);
|
_eio_file_move_free(move);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_eio_file_move_unlink_error(void *data, int error)
|
_eio_file_move_unlink_error(void *data, Eio_File *handler __UNUSED__, int error)
|
||||||
{
|
{
|
||||||
Eio_File_Move *move = data;
|
Eio_File_Move *move = data;
|
||||||
|
|
||||||
|
@ -439,7 +439,7 @@ _eio_file_move_unlink_error(void *data, int error)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_eio_file_move_copy_done(void *data)
|
_eio_file_move_copy_done(void *data, Eio_File *handler __UNUSED__)
|
||||||
{
|
{
|
||||||
Eio_File_Move *move = data;
|
Eio_File_Move *move = data;
|
||||||
Eio_File *rm;
|
Eio_File *rm;
|
||||||
|
@ -452,7 +452,7 @@ _eio_file_move_copy_done(void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_eio_file_move_copy_error(void *data, int error)
|
_eio_file_move_copy_error(void *data, Eio_File *handler __UNUSED__, int error)
|
||||||
{
|
{
|
||||||
Eio_File_Move *move = data;
|
Eio_File_Move *move = data;
|
||||||
|
|
||||||
|
@ -486,7 +486,7 @@ _eio_file_move_end(void *data, Ecore_Thread *thread __UNUSED__)
|
||||||
{
|
{
|
||||||
Eio_File_Move *move = data;
|
Eio_File_Move *move = data;
|
||||||
|
|
||||||
move->progress.common.done_cb((void*) move->progress.common.data);
|
move->progress.common.done_cb((void*) move->progress.common.data, &move->progress.common);
|
||||||
|
|
||||||
_eio_file_move_free(move);
|
_eio_file_move_free(move);
|
||||||
}
|
}
|
||||||
|
@ -542,7 +542,7 @@ _eio_file_move_error(void *data, Ecore_Thread *thread __UNUSED__)
|
||||||
void
|
void
|
||||||
eio_progress_cb(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, &op->common, progress);
|
||||||
|
|
||||||
eio_progress_free(progress);
|
eio_progress_free(progress);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ _eio_file_mkdir_done(void *data, Ecore_Thread *thread __UNUSED__)
|
||||||
Eio_File_Mkdir *m = data;
|
Eio_File_Mkdir *m = data;
|
||||||
|
|
||||||
if (m->common.done_cb)
|
if (m->common.done_cb)
|
||||||
m->common.done_cb((void*) m->common.data);
|
m->common.done_cb((void*) m->common.data, &m->common);
|
||||||
|
|
||||||
_eio_mkdir_free(m);
|
_eio_mkdir_free(m);
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ _eio_file_unlink_done(void *data, Ecore_Thread *thread __UNUSED__)
|
||||||
Eio_File_Unlink *l = data;
|
Eio_File_Unlink *l = data;
|
||||||
|
|
||||||
if (l->common.done_cb)
|
if (l->common.done_cb)
|
||||||
l->common.done_cb((void*) l->common.data);
|
l->common.done_cb((void*) l->common.data, &l->common);
|
||||||
|
|
||||||
_eio_unlink_free(l);
|
_eio_unlink_free(l);
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ _eio_file_stat_done(void *data, Ecore_Thread *thread __UNUSED__)
|
||||||
Eio_File_Stat *s = data;
|
Eio_File_Stat *s = data;
|
||||||
|
|
||||||
if (s->done_cb)
|
if (s->done_cb)
|
||||||
s->done_cb((void*) s->common.data, &s->buffer);
|
s->done_cb((void*) s->common.data, &s->common, &s->buffer);
|
||||||
|
|
||||||
_eio_stat_free(s);
|
_eio_stat_free(s);
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ _eio_file_chown_done(void *data, Ecore_Thread *thread __UNUSED__)
|
||||||
Eio_File_Chown *ch = data;
|
Eio_File_Chown *ch = data;
|
||||||
|
|
||||||
if (ch->common.done_cb)
|
if (ch->common.done_cb)
|
||||||
ch->common.done_cb((void*) ch->common.data);
|
ch->common.done_cb((void*) ch->common.data, &ch->common);
|
||||||
|
|
||||||
_eio_chown_free(ch);
|
_eio_chown_free(ch);
|
||||||
}
|
}
|
||||||
|
@ -248,7 +248,7 @@ void
|
||||||
eio_file_error(Eio_File *common)
|
eio_file_error(Eio_File *common)
|
||||||
{
|
{
|
||||||
if (common->error_cb)
|
if (common->error_cb)
|
||||||
common->error_cb((void*) common->data, common->error);
|
common->error_cb((void*) common->data, common, common->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue