summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-06-03 20:03:13 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-06-03 20:03:13 -0300
commitf6a260e7a9ff550483d0a081cf4ce90cc4e2bfc8 (patch)
tree6db17e0cf5e61d376b55a8ff8189a848cd2170e8 /src/examples
parentcd91b02dd1f04daaed19b51c7fda2d4047b4ad78 (diff)
eina: Remove Eina_Promise* parameter to callbacks to promises in examples
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/eio/eio_job_ls.c1
-rw-r--r--src/examples/eio/eio_job_open.c6
-rw-r--r--src/examples/eio/eio_job_open_multi.c1
-rw-r--r--src/examples/eldbus/dbusmodel.c20
-rw-r--r--src/examples/elementary/filemvc.c2
5 files changed, 15 insertions, 15 deletions
diff --git a/src/examples/eio/eio_job_ls.c b/src/examples/eio/eio_job_ls.c
index 2e2db1f..9426c23 100644
--- a/src/examples/eio/eio_job_ls.c
+++ b/src/examples/eio/eio_job_ls.c
@@ -21,7 +21,6 @@ void done_cb(void *data, void *value EINA_UNUSED)
21void error_cb(void *data, Eina_Error error) 21void error_cb(void *data, Eina_Error error)
22{ 22{
23 Eio_Job *job = data; 23 Eio_Job *job = data;
24 EINA_SAFETY_ON_NULL_RETURN(error);
25 const char *msg = eina_error_msg_get(error); 24 const char *msg = eina_error_msg_get(error);
26 printf("%s error: %s\n", __FUNCTION__, msg); 25 printf("%s error: %s\n", __FUNCTION__, msg);
27 ecore_main_loop_quit(); 26 ecore_main_loop_quit();
diff --git a/src/examples/eio/eio_job_open.c b/src/examples/eio/eio_job_open.c
index 7662bfb..9977243 100644
--- a/src/examples/eio/eio_job_open.c
+++ b/src/examples/eio/eio_job_open.c
@@ -9,7 +9,7 @@
9#include <Eio.h> 9#include <Eio.h>
10#include <Ecore.h> 10#include <Ecore.h>
11 11
12void error_cb(void *data, Eina_Error error, Eina_Promise* promise EINA_UNUSED) 12void error_cb(void *data, Eina_Error error)
13{ 13{
14 EINA_SAFETY_ON_NULL_RETURN(data); 14 EINA_SAFETY_ON_NULL_RETURN(data);
15 15
@@ -19,7 +19,7 @@ void error_cb(void *data, Eina_Error error, Eina_Promise* promise EINA_UNUSED)
19 ecore_main_loop_quit(); 19 ecore_main_loop_quit();
20} 20}
21 21
22void done_closing_cb(void* data EINA_UNUSED, void *value EINA_UNUSED, Eina_Promise* promise EINA_UNUSED) 22void done_closing_cb(void* data EINA_UNUSED, void *value EINA_UNUSED)
23{ 23{
24 printf("%s closed file.\n", __FUNCTION__); 24 printf("%s closed file.\n", __FUNCTION__);
25 25
@@ -34,7 +34,7 @@ void closing_job(Eio_Job *job, Eina_File *file)
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
37void done_open_cb(void *data, void* value, Eina_Promise* promise) 37void done_open_cb(void *data, void* value)
38{ 38{
39 EINA_SAFETY_ON_NULL_RETURN(data); 39 EINA_SAFETY_ON_NULL_RETURN(data);
40 EINA_SAFETY_ON_NULL_RETURN(value); 40 EINA_SAFETY_ON_NULL_RETURN(value);
diff --git a/src/examples/eio/eio_job_open_multi.c b/src/examples/eio/eio_job_open_multi.c
index d1f8fa9..c621ade 100644
--- a/src/examples/eio/eio_job_open_multi.c
+++ b/src/examples/eio/eio_job_open_multi.c
@@ -11,7 +11,6 @@
11 11
12void error_cb(void *data, Eina_Error error) 12void error_cb(void *data, Eina_Error error)
13{ 13{
14 EINA_SAFETY_ON_NULL_RETURN(error);
15 EINA_SAFETY_ON_NULL_RETURN(data); 14 EINA_SAFETY_ON_NULL_RETURN(data);
16 15
17 const char *msg = eina_error_msg_get(error); 16 const char *msg = eina_error_msg_get(error);
diff --git a/src/examples/eldbus/dbusmodel.c b/src/examples/eldbus/dbusmodel.c
index 4cc7178..9695bd5 100644
--- a/src/examples/eldbus/dbusmodel.c
+++ b/src/examples/eldbus/dbusmodel.c
@@ -16,8 +16,9 @@
16static int prop_count = 0; 16static int prop_count = 0;
17 17
18static void 18static void
19promise_then_prop_c(Eo* obj, void* data) 19promise_then_prop_c(void* priv_obj, void* data)
20{ 20{
21 Eo* obj = priv_obj;
21 Eina_Value * property_value; 22 Eina_Value * property_value;
22 const Eina_Array *properties_list; 23 const Eina_Array *properties_list;
23 Eina_Array_Iterator a_it; 24 Eina_Array_Iterator a_it;
@@ -46,14 +47,14 @@ promise_then_prop_c(Eo* obj, void* data)
46} 47}
47 48
48static void 49static void
49error_cb(void* data EINA_UNUSED, const Eina_Error *error EINA_UNUSED) 50error_cb(void* data EINA_UNUSED, Eina_Error error EINA_UNUSED)
50{ 51{
51 printf(" ERROR\n"); 52 printf(" ERROR\n");
52 ecore_main_loop_quit(); 53 ecore_main_loop_quit();
53} 54}
54 55
55static void 56static void
56promise_then_a(Eo* obj EINA_UNUSED, void* data) 57promise_then_a(void* priv_obj EINA_UNUSED, void* data)
57{ 58{
58 const Eina_Array *properties_list; 59 const Eina_Array *properties_list;
59 Eina_Array_Iterator a_it; 60 Eina_Array_Iterator a_it;
@@ -95,7 +96,7 @@ promise_then_a(Eo* obj EINA_UNUSED, void* data)
95 ecore_main_loop_quit(); 96 ecore_main_loop_quit();
96} 97}
97static void 98static void
98promise_then(Eo* obj EINA_UNUSED, void* data) 99promise_then(void* obj EINA_UNUSED, void* data)
99{ 100{
100 Eina_Accessor *accessor; 101 Eina_Accessor *accessor;
101 unsigned int* count; 102 unsigned int* count;
@@ -109,12 +110,13 @@ promise_then(Eo* obj EINA_UNUSED, void* data)
109 return; 110 return;
110 } 111 }
111 112
112 eina_iterator_next(iterator, (void **)&count); 113 if(eina_iterator_next(iterator, (void **)&count))
113 114 {
114 printf("efl_model_loaded count %d\n", (int)*count); fflush(stdout); 115 printf("efl_model_loaded count %d\n", (int)*count); fflush(stdout);
115 printf("efl_model_loaded accessor %p\n", accessor); fflush(stdout); 116 printf("efl_model_loaded accessor %p\n", accessor); fflush(stdout);
116 117
117 promise_then_a(NULL, accessor); 118 promise_then_a(NULL, accessor);
119 }
118} 120}
119 121
120int 122int
diff --git a/src/examples/elementary/filemvc.c b/src/examples/elementary/filemvc.c
index 1f05feb..75fe652 100644
--- a/src/examples/elementary/filemvc.c
+++ b/src/examples/elementary/filemvc.c
@@ -71,7 +71,7 @@ _promise_then(void *data, void *value)
71} 71}
72 72
73static void 73static void
74_promise_error(void *data, const Eina_Error *err) 74_promise_error(void *data, const Eina_Error err)
75{ 75{
76} 76}
77 77