summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2016-06-23 10:30:57 +0200
committerStefan Schmidt <stefan@osg.samsung.com>2016-06-23 10:32:59 +0200
commit433a351cbbbfdadb75037138423ad7774a14fc97 (patch)
treee28f1a8cbc7c0d1e5d54e569fc5f07d7ad707b3d /src/examples
parentfb352e17c65fb26624e01ed1558d8614bf593f93 (diff)
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. :)
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/eio/.gitignore6
-rw-r--r--src/examples/eio/Makefile.am24
-rw-r--r--src/examples/eio/efl_io_manager_ls.c (renamed from src/examples/eio/eio_job_ls.c)10
-rw-r--r--src/examples/eio/efl_io_manager_open.c (renamed from src/examples/eio/eio_job_open.c)10
-rw-r--r--src/examples/eio/efl_io_manager_open_multi.c (renamed from src/examples/eio/eio_job_open_multi.c)18
5 files changed, 34 insertions, 34 deletions
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 @@
1/eio_file_copy 1/eio_file_copy
2/eio_file_ls 2/eio_file_ls
3/eio_job_ls 3/efl_io_manager_ls
4/eio_job_open 4/efl_io_manager_open
5/eio_job_open_multi 5/efl_io_manager_multi
6/eio_sentry 6/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
25EXTRA_PROGRAMS = \ 25EXTRA_PROGRAMS = \
26eio_file_ls \ 26eio_file_ls \
27eio_file_copy \ 27eio_file_copy \
28eio_job_open \ 28efl_io_manager_open \
29eio_job_open_multi \ 29efl_io_manager_open_multi \
30eio_job_ls \ 30efl_io_manager_ls \
31eio_sentry 31eio_sentry
32 32
33EIO_EXAMPLES_LDADD = \ 33EIO_EXAMPLES_LDADD = \
@@ -48,16 +48,16 @@ eio_file_copy_SOURCES = eio_file_copy.c
48eio_file_copy_LDADD = \ 48eio_file_copy_LDADD = \
49$(EIO_EXAMPLES_LDADD) 49$(EIO_EXAMPLES_LDADD)
50 50
51eio_job_open_SOURCES = eio_job_open.c 51efl_io_manager_open_SOURCES = efl_io_manager_open.c
52eio_job_open_LDADD = \ 52efl_io_manager_open_LDADD = \
53$(EIO_EXAMPLES_LDADD) 53$(EIO_EXAMPLES_LDADD)
54 54
55eio_job_open_multi_SOURCES = eio_job_open_multi.c 55efl_io_manager_open_multi_SOURCES = efl_io_manager_open_multi.c
56eio_job_open_multi_LDADD = \ 56efl_io_manager_open_multi_LDADD = \
57$(EIO_EXAMPLES_LDADD) 57$(EIO_EXAMPLES_LDADD)
58 58
59eio_job_ls_SOURCES = eio_job_ls.c 59efl_io_manager_ls_SOURCES = efl_io_manager_ls.c
60eio_job_ls_LDADD = \ 60efl_io_manager_ls_LDADD = \
61$(EIO_EXAMPLES_LDADD) 61$(EIO_EXAMPLES_LDADD)
62 62
63eio_sentry_SOURCES = eio_sentry.c 63eio_sentry_SOURCES = eio_sentry.c
@@ -67,9 +67,9 @@ $(EIO_EXAMPLES_LDADD)
67SRCS = \ 67SRCS = \
68eio_file_ls.c \ 68eio_file_ls.c \
69eio_file_copy.c \ 69eio_file_copy.c \
70eio_job_open.c \ 70efl_io_manager_open.c \
71eio_job_open_multi.c \ 71efl_io_manager_open_multi.c \
72eio_job_ls.c \ 72efl_io_manager_ls.c \
73eio_sentry.c 73eio_sentry.c
74 74
75DATA_FILES = Makefile.examples 75DATA_FILES = Makefile.examples
diff --git a/src/examples/eio/eio_job_ls.c b/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 @@
12 12
13void done_cb(void *data, void *value EINA_UNUSED) 13void done_cb(void *data, void *value EINA_UNUSED)
14{ 14{
15 Eio_Job *job = data; 15 Efl_Io_Manager *job = data;
16 printf("%s done listing files.\n", __FUNCTION__); 16 printf("%s done listing files.\n", __FUNCTION__);
17 ecore_main_loop_quit(); 17 ecore_main_loop_quit();
18 eo_unref(job); 18 eo_unref(job);
@@ -20,7 +20,7 @@ void done_cb(void *data, void *value EINA_UNUSED)
20 20
21void error_cb(void *data, Eina_Error error) 21void error_cb(void *data, Eina_Error error)
22{ 22{
23 Eio_Job *job = data; 23 Efl_Io_Manager *job = data;
24 const char *msg = eina_error_msg_get(error); 24 const char *msg = eina_error_msg_get(error);
25 printf("%s error: %s\n", __FUNCTION__, msg); 25 printf("%s error: %s\n", __FUNCTION__, msg);
26 ecore_main_loop_quit(); 26 ecore_main_loop_quit();
@@ -51,9 +51,9 @@ void list_files(void *data)
51 Eina_Promise *promise; 51 Eina_Promise *promise;
52 const char *path = data; 52 const char *path = data;
53 53
54 Eio_Job *job = eo_add(EIO_JOB_CLASS, NULL); 54 Efl_Io_Manager *job = eo_add(EFL_IO_MANAGER_CLASS, NULL);
55 eo_event_callback_add(job, EIO_JOB_EVENT_FILTER_NAME, (Eo_Event_Cb)&filter_cb, NULL); 55 eo_event_callback_add(job, EFL_IO_MANAGER_EVENT_FILTER_NAME, (Eo_Event_Cb)&filter_cb, NULL);
56 promise = eio_job_file_ls(job, path); 56 promise = efl_io_manager_file_ls(job, path);
57 eina_promise_progress_cb_add(promise, (Eina_Promise_Progress_Cb)&progress_cb, NULL, NULL); 57 eina_promise_progress_cb_add(promise, (Eina_Promise_Progress_Cb)&progress_cb, NULL, NULL);
58 eina_promise_then(promise, &done_cb, &error_cb, job); 58 eina_promise_then(promise, &done_cb, &error_cb, job);
59} 59}
diff --git a/src/examples/eio/eio_job_open.c b/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)
26 ecore_main_loop_quit(); 26 ecore_main_loop_quit();
27} 27}
28 28
29void closing_job(Eio_Job *job, Eina_File *file) 29void closing_job(Efl_Io_Manager *job, Eina_File *file)
30{ 30{
31 Eina_Promise *promise = NULL; 31 Eina_Promise *promise = NULL;
32 printf("%s Will close the file...\n", __FUNCTION__); 32 printf("%s Will close the file...\n", __FUNCTION__);
33 eio_job_file_close(job, file, &promise); 33 efl_io_manager_file_close(job, file, &promise);
34 eina_promise_then(promise, &done_closing_cb, &error_cb, job); 34 eina_promise_then(promise, &done_closing_cb, &error_cb, job);
35} 35}
36 36
@@ -41,7 +41,7 @@ void done_open_cb(void *data, void* value)
41 41
42 Eina_File *file = eina_file_dup(value); 42 Eina_File *file = eina_file_dup(value);
43 43
44 Eio_Job *job = data; 44 Efl_Io_Manager *job = data;
45 45
46 const char *name = eina_file_filename_get(file); 46 const char *name = eina_file_filename_get(file);
47 printf("%s opened file %s\n", __FUNCTION__, name); 47 printf("%s opened file %s\n", __FUNCTION__, name);
@@ -51,8 +51,8 @@ void done_open_cb(void *data, void* value)
51 51
52void open_file(const char *path) 52void open_file(const char *path)
53{ 53{
54 Eio_Job *job = eo_add(EIO_JOB_CLASS, NULL); 54 Efl_Io_Manager *job = eo_add(EFL_IO_MANAGER_CLASS, NULL);
55 eina_promise_then(eio_job_file_open(job, path, EINA_FALSE), &done_open_cb, &error_cb, job); 55 eina_promise_then(efl_io_manager_file_open(job, path, EINA_FALSE), &done_open_cb, &error_cb, job);
56 56
57 eo_unref(job); 57 eo_unref(job);
58} 58}
diff --git a/src/examples/eio/eio_job_open_multi.c b/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)
16 const char *msg = eina_error_msg_get(error); 16 const char *msg = eina_error_msg_get(error);
17 EINA_LOG_ERR("error: %s", msg); 17 EINA_LOG_ERR("error: %s", msg);
18 18
19 Eio_Job *job = data; 19 Efl_Io_Manager *job = data;
20 eo_unref(job); 20 eo_unref(job);
21 21
22 ecore_main_loop_quit(); 22 ecore_main_loop_quit();
@@ -30,20 +30,20 @@ void done_closing_cb(void *data, void* value EINA_UNUSED)
30 30
31 printf("%s closed file.\n", __FUNCTION__); 31 printf("%s closed file.\n", __FUNCTION__);
32 32
33 Eio_Job *job = data; 33 Efl_Io_Manager *job = data;
34 eo_unref(job); 34 eo_unref(job);
35 35
36 ecore_main_loop_quit(); 36 ecore_main_loop_quit();
37} 37}
38 38
39void closing_job(Eio_Job *job, Eina_File *file1, Eina_File *file2) 39void closing_job(Efl_Io_Manager *job, Eina_File *file1, Eina_File *file2)
40{ 40{
41 Eina_Promise *promise; 41 Eina_Promise *promise;
42 Eina_Promise *tasks[3] = {NULL, NULL, NULL}; 42 Eina_Promise *tasks[3] = {NULL, NULL, NULL};
43 43
44 printf("%s Closing files.\n", __FUNCTION__); 44 printf("%s Closing files.\n", __FUNCTION__);
45 eio_job_file_close(job, file1, &tasks[0]); 45 efl_io_manager_file_close(job, file1, &tasks[0]);
46 eio_job_file_close(job, file2, &tasks[1]); 46 efl_io_manager_file_close(job, file2, &tasks[1]);
47 promise = eina_promise_all(eina_carray_iterator_new((void**)&tasks[0])); 47 promise = eina_promise_all(eina_carray_iterator_new((void**)&tasks[0]));
48 eina_promise_then(promise, &done_closing_cb, &error_cb, job); 48 eina_promise_then(promise, &done_closing_cb, &error_cb, job);
49} 49}
@@ -53,7 +53,7 @@ void done_open_cb(void *data, Eina_Iterator **iterator)
53 EINA_SAFETY_ON_NULL_RETURN(data); 53 EINA_SAFETY_ON_NULL_RETURN(data);
54 EINA_SAFETY_ON_NULL_RETURN(iterator); 54 EINA_SAFETY_ON_NULL_RETURN(iterator);
55 EINA_SAFETY_ON_NULL_RETURN(*iterator); 55 EINA_SAFETY_ON_NULL_RETURN(*iterator);
56 Eio_Job *job = data; 56 Efl_Io_Manager *job = data;
57 57
58 Eina_File **file = NULL; 58 Eina_File **file = NULL;
59 Eina_File **files = calloc(sizeof(Eina_File*),2); 59 Eina_File **files = calloc(sizeof(Eina_File*),2);
@@ -74,9 +74,9 @@ void open_file(const char *path, const char *path2)
74 Eina_Promise *promise; 74 Eina_Promise *promise;
75 Eina_Promise *tasks[3] = {NULL, NULL, NULL}; 75 Eina_Promise *tasks[3] = {NULL, NULL, NULL};
76 76
77 Eio_Job *job = eo_add(EIO_JOB_CLASS, NULL); 77 Efl_Io_Manager *job = eo_add(EFL_IO_MANAGER_CLASS, NULL);
78 tasks[0] = eio_job_file_open(job, path, EINA_FALSE); 78 tasks[0] = efl_io_manager_file_open(job, path, EINA_FALSE);
79 tasks[1] = eio_job_file_open(job, path2, EINA_FALSE); 79 tasks[1] = efl_io_manager_file_open(job, path2, EINA_FALSE);
80 promise = eina_promise_all(eina_carray_iterator_new((void**)&tasks[0])); 80 promise = eina_promise_all(eina_carray_iterator_new((void**)&tasks[0]));
81 eina_promise_then(promise, (Eina_Promise_Cb)&done_open_cb, (Eina_Promise_Error_Cb)&error_cb, job); 81 eina_promise_then(promise, (Eina_Promise_Cb)&done_open_cb, (Eina_Promise_Error_Cb)&error_cb, job);
82} 82}