summaryrefslogtreecommitdiff
path: root/src/lib/eldbus
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-09-29 13:12:09 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-09-29 13:12:27 -0300
commit1a2014a12234593f4ba27f2f76f87dc481447e7c (patch)
treee7d76fed06f8d4981dbb84c827b1c45970d0b1d3 /src/lib/eldbus
parent6a5ae00ffaa20b6c1ccdd7891039d76b51099ced (diff)
efl: Update Efl.Model to use new Efl_Promise and Efl_Future
Replaced all Eina_Promise_Owner and Eina_Promise with Efl_Promise and Efl_Future.
Diffstat (limited to 'src/lib/eldbus')
-rw-r--r--src/lib/eldbus/eldbus_model_arguments.c51
-rw-r--r--src/lib/eldbus/eldbus_model_connection.c66
-rw-r--r--src/lib/eldbus/eldbus_model_object.c67
-rw-r--r--src/lib/eldbus/eldbus_model_private.h6
-rw-r--r--src/lib/eldbus/eldbus_model_proxy.c98
5 files changed, 150 insertions, 138 deletions
diff --git a/src/lib/eldbus/eldbus_model_arguments.c b/src/lib/eldbus/eldbus_model_arguments.c
index f9f7f51c47..6e89db1096 100644
--- a/src/lib/eldbus/eldbus_model_arguments.c
+++ b/src/lib/eldbus/eldbus_model_arguments.c
@@ -113,60 +113,62 @@ _eldbus_model_arguments_properties_load(Eldbus_Model_Arguments_Data *pd)
113 } 113 }
114} 114}
115 115
116static void 116static Efl_Future*
117_eldbus_model_arguments_efl_model_property_set(Eo *obj EINA_UNUSED, 117_eldbus_model_arguments_efl_model_property_set(Eo *obj EINA_UNUSED,
118 Eldbus_Model_Arguments_Data *pd, 118 Eldbus_Model_Arguments_Data *pd,
119 const char *property, 119 const char *property,
120 Eina_Value const* value, 120 Eina_Value const* value)
121 Eina_Promise_Owner *promise)
122{ 121{
123 Eina_Value *prop_value; 122 Eina_Value *prop_value;
124 Eina_Value *promise_value; 123 Eina_Value *promise_value;
124 Efl_Promise* promise = efl_add(EFL_PROMISE_CLASS, obj);
125 Efl_Future* future = efl_promise_future_get(promise);
125 126
126 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(property, promise, EFL_MODEL_ERROR_INCORRECT_VALUE, ); 127 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(property, promise, EFL_MODEL_ERROR_INCORRECT_VALUE, future);
127 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(value, promise, EFL_MODEL_ERROR_INCORRECT_VALUE, ); 128 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(value, promise, EFL_MODEL_ERROR_INCORRECT_VALUE, future);
128 DBG("(%p): property=%s", obj, property); 129 DBG("(%p): property=%s", obj, property);
129 130
130 _eldbus_model_arguments_properties_load(pd); 131 _eldbus_model_arguments_properties_load(pd);
131 132
132 Eina_Bool ret = _eldbus_model_arguments_is_input_argument(pd, property); 133 Eina_Bool ret = _eldbus_model_arguments_is_input_argument(pd, property);
133 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(ret, promise, EFL_MODEL_ERROR_READ_ONLY, ); 134 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(ret, promise, EFL_MODEL_ERROR_READ_ONLY, future);
134 135
135 prop_value = eina_hash_find(pd->properties_hash, property); 136 prop_value = eina_hash_find(pd->properties_hash, property);
136 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(prop_value, promise, EFL_MODEL_ERROR_NOT_FOUND, ); 137 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(prop_value, promise, EFL_MODEL_ERROR_NOT_FOUND, future);
137 138
138 eina_value_flush(prop_value); 139 eina_value_flush(prop_value);
139 eina_value_copy(value, prop_value); 140 eina_value_copy(value, prop_value);
140 141
141 promise_value = eina_value_new(eina_value_type_get(value)); 142 promise_value = eina_value_new(eina_value_type_get(value));
142 eina_value_copy(value, promise_value); 143 eina_value_copy(value, promise_value);
143 eina_promise_owner_value_set(promise, promise_value, (Eina_Promise_Free_Cb)&eina_value_free); 144 efl_promise_value_set(promise, promise_value, (Eina_Free_Cb)&eina_value_free);
145 return future;
144} 146}
145 147
146static Eina_Promise* 148static Efl_Future*
147_eldbus_model_arguments_efl_model_property_get(Eo *obj EINA_UNUSED, 149_eldbus_model_arguments_efl_model_property_get(Eo *obj EINA_UNUSED,
148 Eldbus_Model_Arguments_Data *pd, 150 Eldbus_Model_Arguments_Data *pd,
149 const char *property) 151 const char *property)
150{ 152{
151 Eina_Promise_Owner *promise = eina_promise_add(); 153 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, obj);
152 Eina_Promise *rpromise = eina_promise_owner_promise_get(promise); 154 Efl_Future *future = efl_promise_future_get(promise);
153 Eina_Value *promise_value; 155 Eina_Value *promise_value;
154 156
155 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(property, promise, EFL_MODEL_ERROR_INCORRECT_VALUE, rpromise); 157 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(property, promise, EFL_MODEL_ERROR_INCORRECT_VALUE, future);
156 DBG("(%p): property=%s", obj, property); 158 DBG("(%p): property=%s", obj, property);
157 159
158 _eldbus_model_arguments_properties_load(pd); 160 _eldbus_model_arguments_properties_load(pd);
159 161
160 Eina_Value* value = eina_hash_find(pd->properties_hash, property); 162 Eina_Value* value = eina_hash_find(pd->properties_hash, property);
161 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(value, promise, EFL_MODEL_ERROR_NOT_FOUND, rpromise); 163 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(value, promise, EFL_MODEL_ERROR_NOT_FOUND, future);
162 164
163 Eina_Bool ret = _eldbus_model_arguments_is_output_argument(pd, property); 165 Eina_Bool ret = _eldbus_model_arguments_is_output_argument(pd, property);
164 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(ret, promise, EFL_MODEL_ERROR_PERMISSION_DENIED, rpromise); 166 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(ret, promise, EFL_MODEL_ERROR_PERMISSION_DENIED, future);
165 167
166 promise_value = eina_value_new(eina_value_type_get(value)); 168 promise_value = eina_value_new(eina_value_type_get(value));
167 eina_value_copy(value, promise_value); 169 eina_value_copy(value, promise_value);
168 eina_promise_owner_value_set(promise, promise_value, (Eina_Promise_Free_Cb)&eina_value_free); 170 efl_promise_value_set(promise, promise_value, (Eina_Free_Cb)&eina_value_free);
169 return rpromise; 171 return future;
170} 172}
171 173
172static Eo * 174static Eo *
@@ -182,26 +184,27 @@ _eldbus_model_arguments_efl_model_child_del(Eo *obj EINA_UNUSED,
182{ 184{
183} 185}
184 186
185static Eina_Promise* 187static Efl_Future*
186_eldbus_model_arguments_efl_model_children_slice_get(Eo *obj EINA_UNUSED, 188_eldbus_model_arguments_efl_model_children_slice_get(Eo *obj EINA_UNUSED,
187 Eldbus_Model_Arguments_Data *pd EINA_UNUSED, 189 Eldbus_Model_Arguments_Data *pd EINA_UNUSED,
188 unsigned start EINA_UNUSED, 190 unsigned start EINA_UNUSED,
189 unsigned count EINA_UNUSED) 191 unsigned count EINA_UNUSED)
190{ 192{
191 Eina_Promise_Owner *promise = eina_promise_add(); 193 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, obj);
192 eina_promise_owner_error_set(promise, EFL_MODEL_ERROR_NOT_SUPPORTED); 194 efl_promise_failed_set(promise, EFL_MODEL_ERROR_NOT_SUPPORTED);
193 return eina_promise_owner_promise_get(promise); 195 return efl_promise_future_get(promise);
194} 196}
195 197
196static Eina_Promise* 198static Efl_Future*
197_eldbus_model_arguments_efl_model_children_count_get(Eo *obj EINA_UNUSED, 199_eldbus_model_arguments_efl_model_children_count_get(Eo *obj EINA_UNUSED,
198 Eldbus_Model_Arguments_Data *pd EINA_UNUSED) 200 Eldbus_Model_Arguments_Data *pd EINA_UNUSED)
199{ 201{
200 Eina_Promise_Owner *promise = eina_promise_add(); 202 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, obj);
203 Efl_Future* future = efl_promise_future_get(promise);
201 unsigned *count = malloc(sizeof(unsigned)); 204 unsigned *count = malloc(sizeof(unsigned));
202 *count = 0; 205 *count = 0;
203 eina_promise_owner_value_set(promise, count, free); 206 efl_promise_value_set(promise, count, free);
204 return eina_promise_owner_promise_get(promise); 207 return future;
205} 208}
206 209
207static const char * 210static const char *
diff --git a/src/lib/eldbus/eldbus_model_connection.c b/src/lib/eldbus/eldbus_model_connection.c
index aee061e6af..27ace02e99 100644
--- a/src/lib/eldbus/eldbus_model_connection.c
+++ b/src/lib/eldbus/eldbus_model_connection.c
@@ -80,45 +80,49 @@ _eldbus_model_connection_efl_model_properties_get(Eo *obj EINA_UNUSED,
80} 80}
81 81
82 82
83static void 83static Efl_Future*
84_eldbus_model_connection_efl_model_property_set(Eo *obj EINA_UNUSED, 84_eldbus_model_connection_efl_model_property_set(Eo *obj EINA_UNUSED,
85 Eldbus_Model_Connection_Data *pd EINA_UNUSED, 85 Eldbus_Model_Connection_Data *pd EINA_UNUSED,
86 const char *property, 86 const char *property,
87 Eina_Value const* value EINA_UNUSED, 87 Eina_Value const* value EINA_UNUSED)
88 Eina_Promise_Owner *promise)
89{ 88{
90 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET((strcmp(property, UNIQUE_NAME_PROPERTY) == 0), promise, EFL_MODEL_ERROR_NOT_FOUND, ); 89 Efl_Promise* promise = efl_add(EFL_PROMISE_CLASS, obj);
91 eina_promise_owner_error_set(promise, EFL_MODEL_ERROR_READ_ONLY); 90 Efl_Future* future = efl_promise_future_get(promise);
91 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET((strcmp(property, UNIQUE_NAME_PROPERTY) == 0), promise,
92 EFL_MODEL_ERROR_NOT_FOUND, future);
93 efl_promise_failed_set(promise, EFL_MODEL_ERROR_READ_ONLY);
94 return future;
92} 95}
93 96
94static Eina_Promise* 97static Efl_Future*
95_eldbus_model_connection_efl_model_property_get(Eo *obj EINA_UNUSED, 98_eldbus_model_connection_efl_model_property_get(Eo *obj EINA_UNUSED,
96 Eldbus_Model_Connection_Data *pd, 99 Eldbus_Model_Connection_Data *pd,
97 const char *property) 100 const char *property)
98{ 101{
99 Eina_Promise_Owner *promise = eina_promise_add(); 102 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, obj);
100 Eina_Promise *rpromise = eina_promise_owner_promise_get(promise); 103 Efl_Future *future = efl_promise_future_get(promise);
101 104
102 DBG("(%p): property=%s", obj, property); 105 DBG("(%p): property=%s", obj, property);
103 106
104 if (!pd->connection) 107 if (!pd->connection)
105 _eldbus_model_connection_connect(pd); 108 _eldbus_model_connection_connect(pd);
106 109
107 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET((strcmp(property, UNIQUE_NAME_PROPERTY) == 0), promise, EFL_MODEL_ERROR_NOT_FOUND, rpromise); 110 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET((strcmp(property, UNIQUE_NAME_PROPERTY) == 0), promise,
111 EFL_MODEL_ERROR_NOT_FOUND, future);
108 112
109 if (pd->unique_name == NULL) 113 if (pd->unique_name == NULL)
110 { 114 {
111 const char *unique_name; 115 const char *unique_name;
112 116
113 unique_name = eldbus_connection_unique_name_get(pd->connection); 117 unique_name = eldbus_connection_unique_name_get(pd->connection);
114 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(unique_name, promise, EFL_MODEL_ERROR_NOT_FOUND, rpromise); 118 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(unique_name, promise, EFL_MODEL_ERROR_NOT_FOUND, future);
115 pd->unique_name = strdup(unique_name); 119 pd->unique_name = strdup(unique_name);
116 } 120 }
117 121
118 Eina_Value* v = eina_value_new(EINA_VALUE_TYPE_STRING); 122 Eina_Value* v = eina_value_new(EINA_VALUE_TYPE_STRING);
119 eina_value_set(v, pd->unique_name); 123 eina_value_set(v, pd->unique_name);
120 eina_promise_owner_value_set(promise, v, (Eina_Promise_Free_Cb)&eina_value_free); 124 efl_promise_value_set(promise, v, (Eina_Free_Cb)&eina_value_free);
121 return rpromise; 125 return future;
122} 126}
123 127
124static Eo * 128static Eo *
@@ -134,19 +138,19 @@ _eldbus_model_connection_efl_model_child_del(Eo *obj EINA_UNUSED,
134{ 138{
135} 139}
136 140
137static Eina_Promise* 141static Efl_Promise*
138_eldbus_model_connection_efl_model_children_slice_get(Eo *obj EINA_UNUSED, 142_eldbus_model_connection_efl_model_children_slice_get(Eo *obj EINA_UNUSED,
139 Eldbus_Model_Connection_Data *pd, 143 Eldbus_Model_Connection_Data *pd,
140 unsigned int start, 144 unsigned int start,
141 unsigned int count) 145 unsigned int count)
142{ 146{
143 Eina_Promise_Owner *promise; 147 Efl_Promise *promise;
144 Eina_Promise *rpromise; 148 Efl_Future *future;
145 _Eldbus_Children_Slice_Promise* data; 149 _Eldbus_Children_Slice_Promise* data;
146 Eldbus_Pending *pending; 150 Eldbus_Pending *pending;
147 151
148 promise = eina_promise_add(); 152 promise = efl_add(EFL_PROMISE_CLASS, obj);
149 rpromise = eina_promise_owner_promise_get(promise); 153 future = efl_promise_future_get(promise);
150 154
151 if (!pd->connection) 155 if (!pd->connection)
152 _eldbus_model_connection_connect(pd); 156 _eldbus_model_connection_connect(pd);
@@ -154,12 +158,12 @@ _eldbus_model_connection_efl_model_children_slice_get(Eo *obj EINA_UNUSED,
154 if (pd->is_listed) 158 if (pd->is_listed)
155 { 159 {
156 Eina_Accessor *ac = efl_model_list_slice(pd->children_list, start, count); 160 Eina_Accessor *ac = efl_model_list_slice(pd->children_list, start, count);
157 eina_promise_owner_value_set(promise, ac, (Eina_Promise_Free_Cb)&eina_accessor_free); 161 efl_promise_value_set(promise, ac, (Eina_Free_Cb)&eina_accessor_free);
158 return eina_promise_owner_promise_get(promise); 162 return future;
159 } 163 }
160 164
161 data = calloc(1, sizeof(struct _Eldbus_Children_Slice_Promise)); 165 data = calloc(1, sizeof(struct _Eldbus_Children_Slice_Promise));
162 EINA_SAFETY_ON_NULL_RETURN_VAL(data, rpromise); 166 EINA_SAFETY_ON_NULL_RETURN_VAL(data, future);
163 data->promise = promise; 167 data->promise = promise;
164 data->start = start; 168 data->start = start;
165 data->count = count; 169 data->count = count;
@@ -171,17 +175,17 @@ _eldbus_model_connection_efl_model_children_slice_get(Eo *obj EINA_UNUSED,
171 pending = eldbus_names_list(pd->connection, &_eldbus_model_connection_names_list_cb, pd); 175 pending = eldbus_names_list(pd->connection, &_eldbus_model_connection_names_list_cb, pd);
172 pd->pending_list = eina_list_append(pd->pending_list, pending); 176 pd->pending_list = eina_list_append(pd->pending_list, pending);
173 } 177 }
174 return rpromise; 178 return future;
175} 179}
176 180
177static Eina_Promise* 181static Efl_Future*
178_eldbus_model_connection_efl_model_children_count_get(Eo *obj EINA_UNUSED, 182_eldbus_model_connection_efl_model_children_count_get(Eo *obj EINA_UNUSED,
179 Eldbus_Model_Connection_Data *pd) 183 Eldbus_Model_Connection_Data *pd)
180{ 184{
181 Eina_Promise_Owner *promise; 185 Efl_Promise *promise;
182 Eldbus_Pending *pending; 186 Eldbus_Pending *pending;
183 187
184 promise = eina_promise_add(); 188 promise = efl_add(EFL_PROMISE_CLASS, obj);
185 if (!pd->connection) 189 if (!pd->connection)
186 _eldbus_model_connection_connect(pd); 190 _eldbus_model_connection_connect(pd);
187 191
@@ -189,8 +193,8 @@ _eldbus_model_connection_efl_model_children_count_get(Eo *obj EINA_UNUSED,
189 { 193 {
190 unsigned int *c = calloc(sizeof(unsigned int), 1); 194 unsigned int *c = calloc(sizeof(unsigned int), 1);
191 *c = eina_list_count(pd->children_list); 195 *c = eina_list_count(pd->children_list);
192 eina_promise_owner_value_set(promise, c, free); 196 efl_promise_value_set(promise, c, free);
193 return eina_promise_owner_promise_get(promise); 197 return efl_promise_future_get(promise);
194 } 198 }
195 199
196 pd->count_promises = eina_list_prepend(pd->count_promises, promise); 200 pd->count_promises = eina_list_prepend(pd->count_promises, promise);
@@ -199,7 +203,7 @@ _eldbus_model_connection_efl_model_children_count_get(Eo *obj EINA_UNUSED,
199 pending = eldbus_names_list(pd->connection, &_eldbus_model_connection_names_list_cb, pd); 203 pending = eldbus_names_list(pd->connection, &_eldbus_model_connection_names_list_cb, pd);
200 pd->pending_list = eina_list_append(pd->pending_list, pending); 204 pd->pending_list = eina_list_append(pd->pending_list, pending);
201 } 205 }
202 return eina_promise_owner_promise_get(promise); 206 return efl_promise_future_get(promise);
203} 207}
204 208
205static const char * 209static const char *
@@ -333,7 +337,7 @@ _eldbus_model_connection_names_list_cb(void *data,
333 { 337 {
334 DBG("(%p): bus = %s", pd->obj, bus); 338 DBG("(%p): bus = %s", pd->obj, bus);
335 339
336 Eo *child = efl_add(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_connection_constructor(efl_added, pd->connection, bus, "/")); 340 Eo *child = efl_add(ELDBUS_MODEL_OBJECT_CLASS, pd->obj, eldbus_model_object_connection_constructor(efl_added, pd->connection, bus, "/"));
337 341
338 pd->children_list = eina_list_append(pd->children_list, child); 342 pd->children_list = eina_list_append(pd->children_list, child);
339 } 343 }
@@ -348,17 +352,17 @@ _eldbus_model_connection_names_list_cb(void *data,
348 EINA_LIST_FOREACH(pd->children_promises, i, p) 352 EINA_LIST_FOREACH(pd->children_promises, i, p)
349 { 353 {
350 Eina_Accessor *ac = efl_model_list_slice(pd->children_list, p->start, p->count); 354 Eina_Accessor *ac = efl_model_list_slice(pd->children_list, p->start, p->count);
351 eina_promise_owner_value_set(p->promise, ac, (Eina_Promise_Free_Cb)&eina_accessor_free); 355 efl_promise_value_set(p->promise, ac, (Eina_Free_Cb)&eina_accessor_free);
352 free(p); 356 free(p);
353 } 357 }
354 eina_list_free(pd->children_promises); 358 eina_list_free(pd->children_promises);
355 359
356 Eina_Promise_Owner *ep; 360 Efl_Promise *ep;
357 EINA_LIST_FOREACH(pd->count_promises, i, ep) 361 EINA_LIST_FOREACH(pd->count_promises, i, ep)
358 { 362 {
359 unsigned *c = calloc(sizeof(unsigned), 1); 363 unsigned *c = calloc(sizeof(unsigned), 1);
360 *c = eina_list_count(pd->children_list); 364 *c = eina_list_count(pd->children_list);
361 eina_promise_owner_value_set(ep, c, free); 365 efl_promise_value_set(ep, c, free);
362 } 366 }
363 eina_list_free(pd->count_promises); 367 eina_list_free(pd->count_promises);
364} 368}
diff --git a/src/lib/eldbus/eldbus_model_object.c b/src/lib/eldbus/eldbus_model_object.c
index 2baf940923..a03030b6a5 100644
--- a/src/lib/eldbus/eldbus_model_object.c
+++ b/src/lib/eldbus/eldbus_model_object.c
@@ -113,46 +113,49 @@ _eldbus_model_object_efl_model_properties_get(Eo *obj EINA_UNUSED,
113 return pd->properties_array; 113 return pd->properties_array;
114} 114}
115 115
116static void 116static Efl_Future*
117_eldbus_model_object_efl_model_property_set(Eo *obj EINA_UNUSED, 117_eldbus_model_object_efl_model_property_set(Eo *obj EINA_UNUSED,
118 Eldbus_Model_Object_Data *pd EINA_UNUSED, 118 Eldbus_Model_Object_Data *pd EINA_UNUSED,
119 const char *property, 119 const char *property,
120 const Eina_Value *value EINA_UNUSED, 120 const Eina_Value *value EINA_UNUSED)
121 Eina_Promise_Owner *promise)
122{ 121{
123 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET((strcmp(property, UNIQUE_NAME_PROPERTY) == 0), promise, EFL_MODEL_ERROR_NOT_FOUND, ); 122 Efl_Promise* promise = efl_add(EFL_PROMISE_CLASS, obj);
124 eina_promise_owner_error_set(promise, EFL_MODEL_ERROR_READ_ONLY); 123 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET((strcmp(property, UNIQUE_NAME_PROPERTY) == 0), promise,
124 EFL_MODEL_ERROR_NOT_FOUND, efl_promise_future_get(promise));
125 efl_promise_failed_set(promise, EFL_MODEL_ERROR_READ_ONLY);
126 return efl_promise_future_get(promise);
125} 127}
126 128
127static Eina_Promise* 129static Efl_Future*
128_eldbus_model_object_efl_model_property_get(Eo *obj EINA_UNUSED, 130_eldbus_model_object_efl_model_property_get(Eo *obj EINA_UNUSED,
129 Eldbus_Model_Object_Data *pd, 131 Eldbus_Model_Object_Data *pd,
130 const char *property) 132 const char *property)
131{ 133{
132 Eina_Promise_Owner *promise = eina_promise_add(); 134 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, obj);
133 Eina_Promise *rpromise = eina_promise_owner_promise_get(promise); 135 Efl_Future *future = efl_promise_future_get(promise);
134 136
135 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(property, promise, EFL_MODEL_ERROR_INCORRECT_VALUE, rpromise); 137 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(property, promise, EFL_MODEL_ERROR_INCORRECT_VALUE, future);
136 DBG("(%p): property=%s", obj, property); 138 DBG("(%p): property=%s", obj, property);
137 139
138 if (!pd->connection) 140 if (!pd->connection)
139 _eldbus_model_object_connect(pd); 141 _eldbus_model_object_connect(pd);
140 142
141 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET((strcmp(property, UNIQUE_NAME_PROPERTY) == 0), promise, EFL_MODEL_ERROR_NOT_FOUND, rpromise); 143 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET((strcmp(property, UNIQUE_NAME_PROPERTY) == 0), promise,
144 EFL_MODEL_ERROR_NOT_FOUND, future);
142 145
143 if (pd->unique_name == NULL) 146 if (pd->unique_name == NULL)
144 { 147 {
145 const char *unique_name; 148 const char *unique_name;
146 149
147 unique_name = eldbus_connection_unique_name_get(pd->connection); 150 unique_name = eldbus_connection_unique_name_get(pd->connection);
148 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(unique_name, promise, EFL_MODEL_ERROR_NOT_FOUND, rpromise); 151 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(unique_name, promise, EFL_MODEL_ERROR_NOT_FOUND, future);
149 pd->unique_name = strdup(unique_name); 152 pd->unique_name = strdup(unique_name);
150 } 153 }
151 154
152 Eina_Value* v = eina_value_new(EINA_VALUE_TYPE_STRING); 155 Eina_Value* v = eina_value_new(EINA_VALUE_TYPE_STRING);
153 eina_value_set(v, pd->unique_name); 156 eina_value_set(v, pd->unique_name);
154 eina_promise_owner_value_set(promise, v, (Eina_Promise_Free_Cb)&eina_value_free); 157 efl_promise_value_set(promise, v, (Eina_Free_Cb)&eina_value_free);
155 return eina_promise_owner_promise_get(promise); 158 return future;
156} 159}
157 160
158static Eo * 161static Eo *
@@ -168,15 +171,15 @@ _eldbus_model_object_efl_model_child_del(Eo *obj EINA_UNUSED,
168{ 171{
169} 172}
170 173
171static Eina_Promise* 174static Efl_Future*
172_eldbus_model_object_efl_model_children_slice_get(Eo *obj EINA_UNUSED, 175_eldbus_model_object_efl_model_children_slice_get(Eo *obj EINA_UNUSED,
173 Eldbus_Model_Object_Data *pd, 176 Eldbus_Model_Object_Data *pd,
174 unsigned start, 177 unsigned start,
175 unsigned count) 178 unsigned count)
176{ 179{
177 _Eldbus_Children_Slice_Promise* p; 180 _Eldbus_Children_Slice_Promise* p;
178 Eina_Promise_Owner *promise = eina_promise_add(); 181 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, obj);
179 Eina_Promise *rpromise = eina_promise_owner_promise_get(promise); 182 Efl_Future *future = efl_promise_future_get(promise);
180 183
181 if (!pd->connection) 184 if (!pd->connection)
182 _eldbus_model_object_connect(pd); 185 _eldbus_model_object_connect(pd);
@@ -184,12 +187,12 @@ _eldbus_model_object_efl_model_children_slice_get(Eo *obj EINA_UNUSED,
184 if (pd->is_listed) 187 if (pd->is_listed)
185 { 188 {
186 Eina_Accessor* ac = efl_model_list_slice(pd->children_list, start, count); 189 Eina_Accessor* ac = efl_model_list_slice(pd->children_list, start, count);
187 eina_promise_owner_value_set(promise, ac, (Eina_Promise_Free_Cb)&eina_accessor_free); 190 efl_promise_value_set(promise, ac, (Eina_Free_Cb)&eina_accessor_free);
188 return eina_promise_owner_promise_get(promise); 191 return future;
189 } 192 }
190 193
191 p = calloc(1, sizeof(struct _Eldbus_Children_Slice_Promise)); 194 p = calloc(1, sizeof(struct _Eldbus_Children_Slice_Promise));
192 EINA_SAFETY_ON_NULL_RETURN_VAL(p, rpromise); 195 EINA_SAFETY_ON_NULL_RETURN_VAL(p, future);
193 p->promise = promise; 196 p->promise = promise;
194 p->start = start; 197 p->start = start;
195 p->count = count; 198 p->count = count;
@@ -197,14 +200,14 @@ _eldbus_model_object_efl_model_children_slice_get(Eo *obj EINA_UNUSED,
197 pd->children_promises = eina_list_prepend(pd->children_promises, p); 200 pd->children_promises = eina_list_prepend(pd->children_promises, p);
198 if (pd->pending_list == NULL) 201 if (pd->pending_list == NULL)
199 _eldbus_model_object_introspect(pd, pd->bus, pd->path); 202 _eldbus_model_object_introspect(pd, pd->bus, pd->path);
200 return rpromise; 203 return future;
201} 204}
202 205
203static Eina_Promise* 206static Efl_Future*
204_eldbus_model_object_efl_model_children_count_get(Eo *obj EINA_UNUSED, 207_eldbus_model_object_efl_model_children_count_get(Eo *obj EINA_UNUSED,
205 Eldbus_Model_Object_Data *pd) 208 Eldbus_Model_Object_Data *pd)
206{ 209{
207 Eina_Promise_Owner *promise = eina_promise_add(); 210 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, obj);
208 if (!pd->connection) 211 if (!pd->connection)
209 _eldbus_model_object_connect(pd); 212 _eldbus_model_object_connect(pd);
210 213
@@ -212,14 +215,14 @@ _eldbus_model_object_efl_model_children_count_get(Eo *obj EINA_UNUSED,
212 { 215 {
213 unsigned int *c = calloc(sizeof(unsigned int), 1); 216 unsigned int *c = calloc(sizeof(unsigned int), 1);
214 *c = eina_list_count(pd->children_list); 217 *c = eina_list_count(pd->children_list);
215 eina_promise_owner_value_set(promise, c, free); 218 efl_promise_value_set(promise, c, free);
216 return eina_promise_owner_promise_get(promise); 219 return efl_promise_future_get(promise);
217 } 220 }
218 221
219 pd->count_promises = eina_list_prepend(pd->count_promises, promise); 222 pd->count_promises = eina_list_prepend(pd->count_promises, promise);
220 if (pd->pending_list == NULL) 223 if (pd->pending_list == NULL)
221 _eldbus_model_object_introspect(pd, pd->bus, pd->path); 224 _eldbus_model_object_introspect(pd, pd->bus, pd->path);
222 return eina_promise_owner_promise_get(promise); 225 return efl_promise_future_get(promise);
223} 226}
224 227
225static const char * 228static const char *
@@ -434,19 +437,19 @@ _eldbus_model_object_introspect_cb(void *data,
434 EINA_LIST_FOREACH(pd->children_promises, i, p) 437 EINA_LIST_FOREACH(pd->children_promises, i, p)
435 { 438 {
436 Eina_Accessor* ac = efl_model_list_slice(pd->children_list, p->start, p->count); 439 Eina_Accessor* ac = efl_model_list_slice(pd->children_list, p->start, p->count);
437 eina_promise_owner_value_set(p->promise, ac, (Eina_Promise_Free_Cb)&eina_accessor_free); 440 efl_promise_value_set(p->promise, ac, (Eina_Free_Cb)&eina_accessor_free);
438 free(p); 441 free(p);
439 } 442 }
440 eina_list_free(pd->children_promises); 443 pd->children_promises = eina_list_free(pd->children_promises);
441 444
442 Eina_Promise_Owner *ep; 445 Efl_Promise *ep;
443 EINA_LIST_FOREACH(pd->count_promises, i, ep) 446 EINA_LIST_FOREACH(pd->count_promises, i, ep)
444 { 447 {
445 unsigned *c = calloc(sizeof(unsigned), 1); 448 unsigned *c = calloc(sizeof(unsigned), 1);
446 *c = eina_list_count(pd->children_list); 449 *c = eina_list_count(pd->children_list);
447 eina_promise_owner_value_set(ep, c, free); 450 efl_promise_value_set(ep, c, free);
448 } 451 }
449 eina_list_free(pd->count_promises); 452 pd->count_promises = eina_list_free(pd->count_promises);
450 453
451 } 454 }
452} 455}
@@ -514,10 +517,10 @@ _eldbus_model_object_create_children(Eldbus_Model_Object_Data *pd, Eldbus_Object
514 { 517 {
515 Eo *child; 518 Eo *child;
516 519
517 WRN("(%p) Creating child: bus = %s, path = %s, interface = %s", pd->obj, pd->bus, current_path, interface->name); 520 DBG("(%p) Creating child: bus = %s, path = %s, interface = %s", pd->obj, pd->bus, current_path, interface->name);
518 521
519 // TODO: increment reference to keep 'interface' in memory 522 // TODO: increment reference to keep 'interface' in memory
520 child = efl_add_ref(ELDBUS_MODEL_PROXY_CLASS, NULL, eldbus_model_proxy_constructor(efl_added, object, interface)); 523 child = efl_add_ref(ELDBUS_MODEL_PROXY_CLASS, pd->obj, eldbus_model_proxy_constructor(efl_added, object, interface));
521 524
522 pd->children_list = eina_list_append(pd->children_list, child); 525 pd->children_list = eina_list_append(pd->children_list, child);
523 } 526 }
diff --git a/src/lib/eldbus/eldbus_model_private.h b/src/lib/eldbus/eldbus_model_private.h
index b4fb49b5ba..0487b3e341 100644
--- a/src/lib/eldbus/eldbus_model_private.h
+++ b/src/lib/eldbus/eldbus_model_private.h
@@ -13,14 +13,14 @@ struct _Eldbus_Children_Slice_Promise
13{ 13{
14 unsigned start; 14 unsigned start;
15 unsigned count; 15 unsigned count;
16 Eina_Promise_Owner* promise; 16 Efl_Promise* promise;
17}; 17};
18 18
19typedef struct _Eldbus_Property_Promise _Eldbus_Property_Promise; 19typedef struct _Eldbus_Property_Promise _Eldbus_Property_Promise;
20struct _Eldbus_Property_Promise 20struct _Eldbus_Property_Promise
21{ 21{
22 char *property; 22 char *property;
23 Eina_Promise_Owner* promise; 23 Efl_Promise* promise;
24}; 24};
25 25
26/* logging support */ 26/* logging support */
@@ -31,7 +31,7 @@ extern int eldbus_model_log_dom;
31 { \ 31 { \
32 if (EINA_UNLIKELY(!(exp))) \ 32 if (EINA_UNLIKELY(!(exp))) \
33 { \ 33 { \
34 eina_promise_owner_error_set(promise, err); \ 34 efl_promise_failed_set(promise, err); \
35 return v; \ 35 return v; \
36 } \ 36 } \
37 } \ 37 } \
diff --git a/src/lib/eldbus/eldbus_model_proxy.c b/src/lib/eldbus/eldbus_model_proxy.c
index bc249abb88..9b5fa888c3 100644
--- a/src/lib/eldbus/eldbus_model_proxy.c
+++ b/src/lib/eldbus/eldbus_model_proxy.c
@@ -34,10 +34,10 @@ struct _Eldbus_Model_Proxy_Property_Set_Data
34 Eldbus_Model_Proxy_Data *pd; 34 Eldbus_Model_Proxy_Data *pd;
35 Eina_Stringshare *property; 35 Eina_Stringshare *property;
36 Eina_Value value; 36 Eina_Value value;
37 Eina_Promise_Owner *promise; 37 Efl_Promise *promise;
38}; 38};
39 39
40static Eldbus_Model_Proxy_Property_Set_Data * _eldbus_model_proxy_property_set_data_new(Eldbus_Model_Proxy_Data *, const char *, const Eina_Value *, Eina_Promise_Owner *promise); 40static Eldbus_Model_Proxy_Property_Set_Data * _eldbus_model_proxy_property_set_data_new(Eldbus_Model_Proxy_Data *, const char *, const Eina_Value *, Efl_Promise *promise);
41static void _eldbus_model_proxy_property_set_data_free(Eldbus_Model_Proxy_Property_Set_Data *); 41static void _eldbus_model_proxy_property_set_data_free(Eldbus_Model_Proxy_Property_Set_Data *);
42 42
43static void 43static void
@@ -108,40 +108,41 @@ _eldbus_model_proxy_efl_model_properties_get(Eo *obj EINA_UNUSED,
108 return pd->properties_array; 108 return pd->properties_array;
109} 109}
110 110
111static void 111static Efl_Future*
112_eldbus_model_proxy_efl_model_property_set(Eo *obj EINA_UNUSED, 112_eldbus_model_proxy_efl_model_property_set(Eo *obj EINA_UNUSED,
113 Eldbus_Model_Proxy_Data *pd, 113 Eldbus_Model_Proxy_Data *pd,
114 const char *property, 114 const char *property,
115 Eina_Value const* value, 115 Eina_Value const* value)
116 Eina_Promise_Owner *promise)
117{ 116{
118 Eldbus_Model_Proxy_Property_Set_Data *data; 117 Eldbus_Model_Proxy_Property_Set_Data *data;
119 const char *signature; 118 const char *signature;
120 Eldbus_Pending *pending; 119 Eldbus_Pending *pending;
121 Eina_Bool ret; 120 Eina_Bool ret;
121 Efl_Promise* promise = efl_add(EFL_PROMISE_CLASS, obj);
122 Efl_Future* future = efl_promise_future_get(promise);
122 123
123 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(property, promise, EFL_MODEL_ERROR_INCORRECT_VALUE, ); 124 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(property, promise, EFL_MODEL_ERROR_INCORRECT_VALUE, future);
124 125
125 DBG("(%p): property=%s", obj, property); 126 DBG("(%p): property=%s", obj, property);
126 ret = _eldbus_model_proxy_load(pd); 127 ret = _eldbus_model_proxy_load(pd);
127 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(ret, promise, EFL_MODEL_ERROR_INIT_FAILED, ); 128 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(ret, promise, EFL_MODEL_ERROR_INIT_FAILED, future);
128 129
129 ret = _eldbus_model_proxy_has_property(pd, property); 130 ret = _eldbus_model_proxy_has_property(pd, property);
130 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(ret, promise, EFL_MODEL_ERROR_NOT_FOUND, ); 131 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(ret, promise, EFL_MODEL_ERROR_NOT_FOUND, future);
131 132
132 ret = _eldbus_model_proxy_is_property_writeable(pd, property); 133 ret = _eldbus_model_proxy_is_property_writeable(pd, property);
133 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(ret, promise, EFL_MODEL_ERROR_READ_ONLY, ); 134 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(ret, promise, EFL_MODEL_ERROR_READ_ONLY, future);
134 135
135 signature = _eldbus_model_proxy_property_type_get(pd, property); 136 signature = _eldbus_model_proxy_property_type_get(pd, property);
136 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(signature, promise, EFL_MODEL_ERROR_UNKNOWN, ); 137 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(signature, promise, EFL_MODEL_ERROR_UNKNOWN, future);
137 138
138 data = _eldbus_model_proxy_property_set_data_new(pd, property, value, promise); 139 data = _eldbus_model_proxy_property_set_data_new(pd, property, value, promise);
139 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(data, promise, EFL_MODEL_ERROR_UNKNOWN, ); 140 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(data, promise, EFL_MODEL_ERROR_UNKNOWN, future);
140 141
141 if (!pd->is_loaded) 142 if (!pd->is_loaded)
142 { 143 {
143 _Eldbus_Property_Promise *p = calloc(1, sizeof(_Eldbus_Property_Promise)); 144 _Eldbus_Property_Promise *p = calloc(1, sizeof(_Eldbus_Property_Promise));
144 EINA_SAFETY_ON_NULL_RETURN(p); 145 EINA_SAFETY_ON_NULL_RETURN_VAL(p, future);
145 146
146 p->promise = promise; 147 p->promise = promise;
147 p->property = strdup(property); 148 p->property = strdup(property);
@@ -152,37 +153,38 @@ _eldbus_model_proxy_efl_model_property_set(Eo *obj EINA_UNUSED,
152 pending = eldbus_proxy_property_get_all(pd->proxy, _eldbus_model_proxy_property_set_load_cb, data); 153 pending = eldbus_proxy_property_get_all(pd->proxy, _eldbus_model_proxy_property_set_load_cb, data);
153 pd->pending_list = eina_list_append(pd->pending_list, pending); 154 pd->pending_list = eina_list_append(pd->pending_list, pending);
154 } 155 }
155 return; 156 return future;
156 } 157 }
157 158
158 pending = eldbus_proxy_property_value_set 159 pending = eldbus_proxy_property_value_set
159 (pd->proxy, property, signature, (Eina_Value*)value, _eldbus_model_proxy_property_set_cb, data); 160 (pd->proxy, property, signature, (Eina_Value*)value, _eldbus_model_proxy_property_set_cb, data);
160 pd->pending_list = eina_list_append(pd->pending_list, pending); 161 pd->pending_list = eina_list_append(pd->pending_list, pending);
162 return future;
161} 163}
162 164
163static Eina_Promise* 165static Efl_Future*
164_eldbus_model_proxy_efl_model_property_get(Eo *obj EINA_UNUSED, 166_eldbus_model_proxy_efl_model_property_get(Eo *obj EINA_UNUSED,
165 Eldbus_Model_Proxy_Data *pd, 167 Eldbus_Model_Proxy_Data *pd,
166 const char *property) 168 const char *property)
167{ 169{
168 Eina_Bool ret; 170 Eina_Bool ret;
169 Eina_Value *promise_value; 171 Eina_Value *promise_value;
170 Eina_Promise_Owner *promise = eina_promise_add(); 172 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, obj);
171 Eina_Promise *rpromise = eina_promise_owner_promise_get(promise); 173 Efl_Future *future = efl_promise_future_get(promise);
172 174
173 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(property, promise, EFL_MODEL_ERROR_INCORRECT_VALUE, rpromise); 175 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(property, promise, EFL_MODEL_ERROR_INCORRECT_VALUE, future);
174 176
175 ret = _eldbus_model_proxy_load(pd); 177 ret = _eldbus_model_proxy_load(pd);
176 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(ret, promise, EFL_MODEL_ERROR_INIT_FAILED, rpromise); 178 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(ret, promise, EFL_MODEL_ERROR_INIT_FAILED, future);
177 179
178 ret = _eldbus_model_proxy_has_property(pd, property); 180 ret = _eldbus_model_proxy_has_property(pd, property);
179 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(ret, promise, EFL_MODEL_ERROR_NOT_FOUND, rpromise); 181 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(ret, promise, EFL_MODEL_ERROR_NOT_FOUND, future);
180 182
181 if (!pd->is_loaded) 183 if (!pd->is_loaded)
182 { 184 {
183 Eldbus_Pending *pending; 185 Eldbus_Pending *pending;
184 _Eldbus_Property_Promise *p = calloc(1, sizeof(_Eldbus_Property_Promise)); 186 _Eldbus_Property_Promise *p = calloc(1, sizeof(_Eldbus_Property_Promise));
185 EINA_SAFETY_ON_NULL_RETURN_VAL(p, rpromise); 187 EINA_SAFETY_ON_NULL_RETURN_VAL(p, future);
186 188
187 p->promise = promise; 189 p->promise = promise;
188 p->property = strdup(property); 190 p->property = strdup(property);
@@ -193,19 +195,19 @@ _eldbus_model_proxy_efl_model_property_get(Eo *obj EINA_UNUSED,
193 pending = eldbus_proxy_property_get_all(pd->proxy, _eldbus_model_proxy_property_get_all_cb, pd); 195 pending = eldbus_proxy_property_get_all(pd->proxy, _eldbus_model_proxy_property_get_all_cb, pd);
194 pd->pending_list = eina_list_append(pd->pending_list, pending); 196 pd->pending_list = eina_list_append(pd->pending_list, pending);
195 } 197 }
196 return rpromise; 198 return future;
197 } 199 }
198 200
199 Eina_Value* value = eina_hash_find(pd->properties_hash, property); 201 Eina_Value* value = eina_hash_find(pd->properties_hash, property);
200 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(value, promise, EFL_MODEL_ERROR_NOT_FOUND, rpromise); 202 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(value, promise, EFL_MODEL_ERROR_NOT_FOUND, future);
201 203
202 ret = _eldbus_model_proxy_is_property_writeable(pd, property); 204 ret = _eldbus_model_proxy_is_property_writeable(pd, property);
203 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(ret, promise, EFL_MODEL_ERROR_READ_ONLY, rpromise); 205 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(ret, promise, EFL_MODEL_ERROR_READ_ONLY, future);
204 206
205 promise_value = eina_value_new(eina_value_type_get(value)); 207 promise_value = eina_value_new(eina_value_type_get(value));
206 eina_value_copy(value, promise_value); 208 eina_value_copy(value, promise_value);
207 eina_promise_owner_value_set(promise, promise_value, (Eina_Promise_Free_Cb)&eina_value_free); 209 efl_promise_value_set(promise, promise_value, (Eina_Free_Cb)&eina_value_free);
208 return rpromise; 210 return future;
209} 211}
210 212
211static Eo * 213static Eo *
@@ -222,16 +224,16 @@ _eldbus_model_proxy_efl_model_child_del(Eo *obj EINA_UNUSED,
222{ 224{
223} 225}
224 226
225static Eina_Promise* 227static Efl_Future*
226_eldbus_model_proxy_efl_model_children_slice_get(Eo *obj EINA_UNUSED, 228_eldbus_model_proxy_efl_model_children_slice_get(Eo *obj EINA_UNUSED,
227 Eldbus_Model_Proxy_Data *pd, 229 Eldbus_Model_Proxy_Data *pd,
228 unsigned start, 230 unsigned start,
229 unsigned count) 231 unsigned count)
230{ 232{
231 Eina_Bool ret = _eldbus_model_proxy_load(pd); 233 Eina_Bool ret = _eldbus_model_proxy_load(pd);
232 Eina_Promise_Owner *promise = eina_promise_add(); 234 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, obj);
233 Eina_Promise *rpromise = eina_promise_owner_promise_get(promise); 235 Efl_Future *future = efl_promise_future_get(promise);
234 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(ret, promise, EFL_MODEL_ERROR_INIT_FAILED, rpromise); 236 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(ret, promise, EFL_MODEL_ERROR_INIT_FAILED, future);
235 237
236 if (!pd->is_listed) 238 if (!pd->is_listed)
237 { 239 {
@@ -241,18 +243,18 @@ _eldbus_model_proxy_efl_model_children_slice_get(Eo *obj EINA_UNUSED,
241 } 243 }
242 244
243 Eina_Accessor *ac = efl_model_list_slice(pd->children_list, start, count); 245 Eina_Accessor *ac = efl_model_list_slice(pd->children_list, start, count);
244 eina_promise_owner_value_set(promise, ac, (Eina_Promise_Free_Cb)&eina_accessor_free); 246 efl_promise_value_set(promise, ac, (Eina_Free_Cb)&eina_accessor_free);
245 return rpromise; 247 return future;
246} 248}
247 249
248static Eina_Promise* 250static Efl_Future*
249_eldbus_model_proxy_efl_model_children_count_get(Eo *obj EINA_UNUSED, 251_eldbus_model_proxy_efl_model_children_count_get(Eo *obj EINA_UNUSED,
250 Eldbus_Model_Proxy_Data *pd) 252 Eldbus_Model_Proxy_Data *pd)
251{ 253{
252 Eina_Bool ret = _eldbus_model_proxy_load(pd); 254 Eina_Bool ret = _eldbus_model_proxy_load(pd);
253 Eina_Promise_Owner *promise = eina_promise_add(); 255 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, obj);
254 Eina_Promise *rpromise = eina_promise_owner_promise_get(promise); 256 Efl_Future *future = efl_promise_future_get(promise);
255 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(ret, promise, EFL_MODEL_ERROR_INIT_FAILED, rpromise); 257 ELDBUS_MODEL_ON_ERROR_EXIT_PROMISE_SET(ret, promise, EFL_MODEL_ERROR_INIT_FAILED, future);
256 258
257 if (!pd->is_listed) 259 if (!pd->is_listed)
258 { 260 {
@@ -263,8 +265,8 @@ _eldbus_model_proxy_efl_model_children_count_get(Eo *obj EINA_UNUSED,
263 265
264 unsigned int *c = calloc(sizeof(unsigned int), 1); 266 unsigned int *c = calloc(sizeof(unsigned int), 1);
265 *c = eina_list_count(pd->children_list); 267 *c = eina_list_count(pd->children_list);
266 eina_promise_owner_value_set(promise, c, free); 268 efl_promise_value_set(promise, c, free);
267 return eina_promise_owner_promise_get(promise); 269 return future;
268} 270}
269 271
270static void 272static void
@@ -296,7 +298,7 @@ _eldbus_model_proxy_create_methods_children(Eldbus_Model_Proxy_Data *pd)
296 INF("(%p) Creating method child: bus = %s, path = %s, method = %s::%s", 298 INF("(%p) Creating method child: bus = %s, path = %s, method = %s::%s",
297 pd->obj, bus, path, interface_name, method_name); 299 pd->obj, bus, path, interface_name, method_name);
298 300
299 child = efl_add(ELDBUS_MODEL_METHOD_CLASS, NULL, eldbus_model_method_constructor(efl_added, pd->proxy, method)); 301 child = efl_add(ELDBUS_MODEL_METHOD_CLASS, pd->obj, eldbus_model_method_constructor(efl_added, pd->proxy, method));
300 302
301 pd->children_list = eina_list_append(pd->children_list, child); 303 pd->children_list = eina_list_append(pd->children_list, child);
302 } 304 }
@@ -331,7 +333,7 @@ _eldbus_model_proxy_create_signals_children(Eldbus_Model_Proxy_Data *pd)
331 DBG("(%p) Creating signal child: bus = %s, path = %s, signal = %s::%s", 333 DBG("(%p) Creating signal child: bus = %s, path = %s, signal = %s::%s",
332 pd->obj, bus, path, interface_name, signal_name); 334 pd->obj, bus, path, interface_name, signal_name);
333 335
334 child = efl_add(ELDBUS_MODEL_SIGNAL_CLASS, NULL, eldbus_model_signal_constructor(efl_added, pd->proxy, signal)); 336 child = efl_add(ELDBUS_MODEL_SIGNAL_CLASS, pd->obj, eldbus_model_signal_constructor(efl_added, pd->proxy, signal));
335 337
336 pd->children_list = eina_list_append(pd->children_list, child); 338 pd->children_list = eina_list_append(pd->children_list, child);
337 } 339 }
@@ -577,7 +579,7 @@ _eldbus_model_proxy_property_get_all_cb(void *data,
577 _Eldbus_Property_Promise* p; 579 _Eldbus_Property_Promise* p;
578 EINA_LIST_FOREACH(pd->promise_list, i, p) 580 EINA_LIST_FOREACH(pd->promise_list, i, p)
579 { 581 {
580 eina_promise_owner_error_set(p->promise, EFL_MODEL_ERROR_NOT_FOUND); 582 efl_promise_failed_set(p->promise, EFL_MODEL_ERROR_NOT_FOUND);
581 free(p->property); 583 free(p->property);
582 } 584 }
583 eina_list_free(pd->promise_list); 585 eina_list_free(pd->promise_list);
@@ -591,14 +593,14 @@ _eldbus_model_proxy_property_get_all_cb(void *data,
591 Eina_Value* value = eina_hash_find(pd->properties_hash, p->property); 593 Eina_Value* value = eina_hash_find(pd->properties_hash, p->property);
592 if (!value) 594 if (!value)
593 { 595 {
594 eina_promise_owner_error_set(p->promise, EFL_MODEL_ERROR_NOT_FOUND); 596 efl_promise_failed_set(p->promise, EFL_MODEL_ERROR_NOT_FOUND);
595 free(p->property); 597 free(p->property);
596 continue; 598 continue;
597 } 599 }
598 600
599 if (!_eldbus_model_proxy_is_property_readable(pd, p->property)) 601 if (!_eldbus_model_proxy_is_property_readable(pd, p->property))
600 { 602 {
601 eina_promise_owner_error_set(p->promise, EFL_MODEL_ERROR_READ_ONLY); 603 efl_promise_failed_set(p->promise, EFL_MODEL_ERROR_READ_ONLY);
602 free(p->property); 604 free(p->property);
603 continue; 605 continue;
604 } 606 }
@@ -607,7 +609,7 @@ _eldbus_model_proxy_property_get_all_cb(void *data,
607 609
608 promise_value = eina_value_new(eina_value_type_get(value)); 610 promise_value = eina_value_new(eina_value_type_get(value));
609 eina_value_copy(value, promise_value); 611 eina_value_copy(value, promise_value);
610 eina_promise_owner_value_set(p->promise, promise_value, (Eina_Promise_Free_Cb)&eina_value_free); 612 efl_promise_value_set(p->promise, promise_value, (Eina_Free_Cb)&eina_value_free);
611 } 613 }
612 eina_list_free(pd->promise_list); 614 eina_list_free(pd->promise_list);
613 615
@@ -642,7 +644,7 @@ _eldbus_model_proxy_property_set_load_cb(void *data,
642 Eina_Array *changed_properties = _eldbus_model_proxy_property_get_all_load(msg, pd); 644 Eina_Array *changed_properties = _eldbus_model_proxy_property_get_all_load(msg, pd);
643 if (signature == NULL || changed_properties == NULL) 645 if (signature == NULL || changed_properties == NULL)
644 { 646 {
645 eina_promise_owner_error_set(set_data->promise, EFL_MODEL_ERROR_UNKNOWN); 647 efl_promise_failed_set(set_data->promise, EFL_MODEL_ERROR_UNKNOWN);
646 648
647 eina_array_free(changed_properties); 649 eina_array_free(changed_properties);
648 _eldbus_model_proxy_property_set_data_free(set_data); 650 _eldbus_model_proxy_property_set_data_free(set_data);
@@ -672,7 +674,7 @@ _eldbus_model_proxy_property_set_cb(void *data,
672 if (eldbus_message_error_get(msg, &error_name, &error_text)) 674 if (eldbus_message_error_get(msg, &error_name, &error_text))
673 { 675 {
674 ERR("%s: %s", error_name, error_text); 676 ERR("%s: %s", error_name, error_text);
675 eina_promise_owner_error_set(property_set_data->promise, EFL_MODEL_ERROR_UNKNOWN); 677 efl_promise_failed_set(property_set_data->promise, EFL_MODEL_ERROR_UNKNOWN);
676 _eldbus_model_proxy_property_set_data_free(property_set_data); 678 _eldbus_model_proxy_property_set_data_free(property_set_data);
677 return; 679 return;
678 } 680 }
@@ -692,11 +694,11 @@ _eldbus_model_proxy_property_set_cb(void *data,
692 } 694 }
693 promise_value = eina_value_new(eina_value_type_get(prop_value)); 695 promise_value = eina_value_new(eina_value_type_get(prop_value));
694 eina_value_copy(prop_value, promise_value); 696 eina_value_copy(prop_value, promise_value);
695 eina_promise_owner_value_set(property_set_data->promise, promise_value, (Eina_Promise_Free_Cb)&eina_value_free); 697 efl_promise_value_set(property_set_data->promise, promise_value, (Eina_Free_Cb)&eina_value_free);
696 } 698 }
697 else 699 else
698 { 700 {
699 eina_promise_owner_error_set(property_set_data->promise, EFL_MODEL_ERROR_NOT_FOUND); 701 efl_promise_failed_set(property_set_data->promise, EFL_MODEL_ERROR_NOT_FOUND);
700 } 702 }
701 703
702 _eldbus_model_proxy_property_set_data_free(property_set_data); 704 _eldbus_model_proxy_property_set_data_free(property_set_data);
@@ -767,7 +769,7 @@ static Eldbus_Model_Proxy_Property_Set_Data *
767_eldbus_model_proxy_property_set_data_new(Eldbus_Model_Proxy_Data *pd, 769_eldbus_model_proxy_property_set_data_new(Eldbus_Model_Proxy_Data *pd,
768 const char *property, 770 const char *property,
769 const Eina_Value *value, 771 const Eina_Value *value,
770 Eina_Promise_Owner *promise) 772 Efl_Promise *promise)
771{ 773{
772 Eldbus_Model_Proxy_Property_Set_Data *data = calloc(1, sizeof(Eldbus_Model_Proxy_Property_Set_Data)); 774 Eldbus_Model_Proxy_Property_Set_Data *data = calloc(1, sizeof(Eldbus_Model_Proxy_Property_Set_Data));
773 EINA_SAFETY_ON_NULL_RETURN_VAL(data, NULL); 775 EINA_SAFETY_ON_NULL_RETURN_VAL(data, NULL);