From: Stefan Schmidt Date: Thu, 23 Jun 2016 08:30:57 +0000 (+0200) Subject: examples: rename eio_job to efl_io_manager, finish a job half done X-Git-Tag: upstream/1.20.0~5558 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=433a351cbbbfdadb75037138423ad7774a14fc97;p=platform%2Fupstream%2Fefl.git examples: rename eio_job to efl_io_manager, finish a job half done This rename was missing in the examples. Running make examples or even a simple grep shows this. I expect higher b0rking skills by now. :) --- diff --git a/src/examples/eio/.gitignore b/src/examples/eio/.gitignore index fe4cc22..d9ac11b 100644 --- a/src/examples/eio/.gitignore +++ b/src/examples/eio/.gitignore @@ -1,6 +1,6 @@ /eio_file_copy /eio_file_ls -/eio_job_ls -/eio_job_open -/eio_job_open_multi +/efl_io_manager_ls +/efl_io_manager_open +/efl_io_manager_multi /eio_sentry diff --git a/src/examples/eio/Makefile.am b/src/examples/eio/Makefile.am index 4fccc70..1620d81 100644 --- a/src/examples/eio/Makefile.am +++ b/src/examples/eio/Makefile.am @@ -25,9 +25,9 @@ endif EXTRA_PROGRAMS = \ eio_file_ls \ eio_file_copy \ -eio_job_open \ -eio_job_open_multi \ -eio_job_ls \ +efl_io_manager_open \ +efl_io_manager_open_multi \ +efl_io_manager_ls \ eio_sentry EIO_EXAMPLES_LDADD = \ @@ -48,16 +48,16 @@ eio_file_copy_SOURCES = eio_file_copy.c eio_file_copy_LDADD = \ $(EIO_EXAMPLES_LDADD) -eio_job_open_SOURCES = eio_job_open.c -eio_job_open_LDADD = \ +efl_io_manager_open_SOURCES = efl_io_manager_open.c +efl_io_manager_open_LDADD = \ $(EIO_EXAMPLES_LDADD) -eio_job_open_multi_SOURCES = eio_job_open_multi.c -eio_job_open_multi_LDADD = \ +efl_io_manager_open_multi_SOURCES = efl_io_manager_open_multi.c +efl_io_manager_open_multi_LDADD = \ $(EIO_EXAMPLES_LDADD) -eio_job_ls_SOURCES = eio_job_ls.c -eio_job_ls_LDADD = \ +efl_io_manager_ls_SOURCES = efl_io_manager_ls.c +efl_io_manager_ls_LDADD = \ $(EIO_EXAMPLES_LDADD) eio_sentry_SOURCES = eio_sentry.c @@ -67,9 +67,9 @@ $(EIO_EXAMPLES_LDADD) SRCS = \ eio_file_ls.c \ eio_file_copy.c \ -eio_job_open.c \ -eio_job_open_multi.c \ -eio_job_ls.c \ +efl_io_manager_open.c \ +efl_io_manager_open_multi.c \ +efl_io_manager_ls.c \ eio_sentry.c DATA_FILES = Makefile.examples diff --git a/src/examples/eio/eio_job_ls.c b/src/examples/eio/efl_io_manager_ls.c similarity index 85% rename from src/examples/eio/eio_job_ls.c rename to src/examples/eio/efl_io_manager_ls.c index 2054f22..c231bad 100644 --- a/src/examples/eio/eio_job_ls.c +++ b/src/examples/eio/efl_io_manager_ls.c @@ -12,7 +12,7 @@ void done_cb(void *data, void *value EINA_UNUSED) { - Eio_Job *job = data; + Efl_Io_Manager *job = data; printf("%s done listing files.\n", __FUNCTION__); ecore_main_loop_quit(); eo_unref(job); @@ -20,7 +20,7 @@ void done_cb(void *data, void *value EINA_UNUSED) void error_cb(void *data, Eina_Error error) { - Eio_Job *job = data; + Efl_Io_Manager *job = data; const char *msg = eina_error_msg_get(error); printf("%s error: %s\n", __FUNCTION__, msg); ecore_main_loop_quit(); @@ -51,9 +51,9 @@ void list_files(void *data) Eina_Promise *promise; const char *path = data; - Eio_Job *job = eo_add(EIO_JOB_CLASS, NULL); - eo_event_callback_add(job, EIO_JOB_EVENT_FILTER_NAME, (Eo_Event_Cb)&filter_cb, NULL); - promise = eio_job_file_ls(job, path); + Efl_Io_Manager *job = eo_add(EFL_IO_MANAGER_CLASS, NULL); + eo_event_callback_add(job, EFL_IO_MANAGER_EVENT_FILTER_NAME, (Eo_Event_Cb)&filter_cb, NULL); + promise = efl_io_manager_file_ls(job, path); eina_promise_progress_cb_add(promise, (Eina_Promise_Progress_Cb)&progress_cb, NULL, NULL); eina_promise_then(promise, &done_cb, &error_cb, job); } diff --git a/src/examples/eio/eio_job_open.c b/src/examples/eio/efl_io_manager_open.c similarity index 80% rename from src/examples/eio/eio_job_open.c rename to src/examples/eio/efl_io_manager_open.c index f31491b..daa9ded 100644 --- a/src/examples/eio/eio_job_open.c +++ b/src/examples/eio/efl_io_manager_open.c @@ -26,11 +26,11 @@ void done_closing_cb(void* data EINA_UNUSED, void *value EINA_UNUSED) ecore_main_loop_quit(); } -void closing_job(Eio_Job *job, Eina_File *file) +void closing_job(Efl_Io_Manager *job, Eina_File *file) { Eina_Promise *promise = NULL; printf("%s Will close the file...\n", __FUNCTION__); - eio_job_file_close(job, file, &promise); + efl_io_manager_file_close(job, file, &promise); eina_promise_then(promise, &done_closing_cb, &error_cb, job); } @@ -41,7 +41,7 @@ void done_open_cb(void *data, void* value) Eina_File *file = eina_file_dup(value); - Eio_Job *job = data; + Efl_Io_Manager *job = data; const char *name = eina_file_filename_get(file); printf("%s opened file %s\n", __FUNCTION__, name); @@ -51,8 +51,8 @@ void done_open_cb(void *data, void* value) void open_file(const char *path) { - Eio_Job *job = eo_add(EIO_JOB_CLASS, NULL); - eina_promise_then(eio_job_file_open(job, path, EINA_FALSE), &done_open_cb, &error_cb, job); + Efl_Io_Manager *job = eo_add(EFL_IO_MANAGER_CLASS, NULL); + eina_promise_then(efl_io_manager_file_open(job, path, EINA_FALSE), &done_open_cb, &error_cb, job); eo_unref(job); } diff --git a/src/examples/eio/eio_job_open_multi.c b/src/examples/eio/efl_io_manager_open_multi.c similarity index 81% rename from src/examples/eio/eio_job_open_multi.c rename to src/examples/eio/efl_io_manager_open_multi.c index c621ade..291f5a2 100644 --- a/src/examples/eio/eio_job_open_multi.c +++ b/src/examples/eio/efl_io_manager_open_multi.c @@ -16,7 +16,7 @@ void error_cb(void *data, Eina_Error error) const char *msg = eina_error_msg_get(error); EINA_LOG_ERR("error: %s", msg); - Eio_Job *job = data; + Efl_Io_Manager *job = data; eo_unref(job); ecore_main_loop_quit(); @@ -30,20 +30,20 @@ void done_closing_cb(void *data, void* value EINA_UNUSED) printf("%s closed file.\n", __FUNCTION__); - Eio_Job *job = data; + Efl_Io_Manager *job = data; eo_unref(job); ecore_main_loop_quit(); } -void closing_job(Eio_Job *job, Eina_File *file1, Eina_File *file2) +void closing_job(Efl_Io_Manager *job, Eina_File *file1, Eina_File *file2) { Eina_Promise *promise; Eina_Promise *tasks[3] = {NULL, NULL, NULL}; printf("%s Closing files.\n", __FUNCTION__); - eio_job_file_close(job, file1, &tasks[0]); - eio_job_file_close(job, file2, &tasks[1]); + efl_io_manager_file_close(job, file1, &tasks[0]); + efl_io_manager_file_close(job, file2, &tasks[1]); promise = eina_promise_all(eina_carray_iterator_new((void**)&tasks[0])); eina_promise_then(promise, &done_closing_cb, &error_cb, job); } @@ -53,7 +53,7 @@ void done_open_cb(void *data, Eina_Iterator **iterator) EINA_SAFETY_ON_NULL_RETURN(data); EINA_SAFETY_ON_NULL_RETURN(iterator); EINA_SAFETY_ON_NULL_RETURN(*iterator); - Eio_Job *job = data; + Efl_Io_Manager *job = data; Eina_File **file = NULL; Eina_File **files = calloc(sizeof(Eina_File*),2); @@ -74,9 +74,9 @@ void open_file(const char *path, const char *path2) Eina_Promise *promise; Eina_Promise *tasks[3] = {NULL, NULL, NULL}; - Eio_Job *job = eo_add(EIO_JOB_CLASS, NULL); - tasks[0] = eio_job_file_open(job, path, EINA_FALSE); - tasks[1] = eio_job_file_open(job, path2, EINA_FALSE); + Efl_Io_Manager *job = eo_add(EFL_IO_MANAGER_CLASS, NULL); + tasks[0] = efl_io_manager_file_open(job, path, EINA_FALSE); + tasks[1] = efl_io_manager_file_open(job, path2, EINA_FALSE); promise = eina_promise_all(eina_carray_iterator_new((void**)&tasks[0])); eina_promise_then(promise, (Eina_Promise_Cb)&done_open_cb, (Eina_Promise_Error_Cb)&error_cb, job); }