summaryrefslogtreecommitdiff
path: root/src/lib/eo/eo_base_class.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-04-30 15:57:54 -0700
committerCedric BAIL <cedric@osg.samsung.com>2018-05-01 10:39:01 -0700
commitcdbbaede7ea581c55b68c45a614c8b0fea49b347 (patch)
tree42eebb1e4df2dd7ec0502930ca06bec8965de8ec /src/lib/eo/eo_base_class.c
parenta34a733b7b9c4df819391485dd6f99909a0bf3f4 (diff)
efl: remove old Efl_Future, Efl_Promise.
Diffstat (limited to 'src/lib/eo/eo_base_class.c')
-rw-r--r--src/lib/eo/eo_base_class.c34
1 files changed, 1 insertions, 33 deletions
diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index a32bc30..123a542 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -32,7 +32,6 @@ typedef struct
32 Eo *composite_parent; 32 Eo *composite_parent;
33 Eina_Inlist *generic_data; 33 Eina_Inlist *generic_data;
34 Eo ***wrefs; 34 Eo ***wrefs;
35 Eina_List *futures;
36} Efl_Object_Extension; 35} Efl_Object_Extension;
37 36
38typedef struct 37typedef struct
@@ -171,8 +170,7 @@ _efl_object_extension_noneed(Efl_Object_Data *pd)
171 (ext->comment) || 170 (ext->comment) ||
172 (ext->generic_data) || 171 (ext->generic_data) ||
173 (ext->wrefs) || 172 (ext->wrefs) ||
174 (ext->composite_parent) || 173 (ext->composite_parent)) return;
175 (ext->futures)) return;
176 _efl_object_extension_free(pd->ext); 174 _efl_object_extension_free(pd->ext);
177 pd->ext = NULL; 175 pd->ext = NULL;
178} 176}
@@ -2142,8 +2140,6 @@ err_parent_back:
2142 ext->name = NULL; 2140 ext->name = NULL;
2143 eina_stringshare_del(ext->comment); 2141 eina_stringshare_del(ext->comment);
2144 ext->comment = NULL; 2142 ext->comment = NULL;
2145 while (pd->ext && ext->futures)
2146 efl_future_cancel(eina_list_data_get(ext->futures));
2147 _efl_object_extension_noneed(pd); 2143 _efl_object_extension_noneed(pd);
2148 _eo_condtor_done(obj); 2144 _eo_condtor_done(obj);
2149 return; 2145 return;
@@ -2227,33 +2223,6 @@ _efl_object_class_destructor(Efl_Class *klass EINA_UNUSED)
2227 eina_hash_free(_legacy_events_hash); 2223 eina_hash_free(_legacy_events_hash);
2228} 2224}
2229 2225
2230static void
2231_efl_object_future_link_tracking_end(void *data, const Efl_Event *ev)
2232{
2233 Efl_Future *link = ev->object;
2234 Eo *obj = data;
2235 Efl_Object_Data *pd = efl_data_scope_get(obj, EFL_OBJECT_CLASS);
2236 Efl_Object_Extension *ext = _efl_object_extension_need(pd);
2237
2238 ext->futures = eina_list_remove(ext->futures, link);
2239 _efl_object_extension_noneed(pd);
2240}
2241
2242EOAPI EFL_FUNC_BODYV(efl_future_link, Eina_Bool, 0, EFL_FUNC_CALL(link), Efl_Future *link);
2243
2244EOLIAN static Eina_Bool
2245_efl_object_future_link(Eo *obj EINA_UNUSED, Efl_Object_Data *pd, Efl_Future *link)
2246{
2247 Efl_Object_Extension *ext;
2248
2249 if (!link) return EINA_FALSE;
2250
2251 ext = _efl_object_extension_need(pd);
2252
2253 ext->futures = eina_list_append(ext->futures, link);
2254 return !!efl_future_then(link, _efl_object_future_link_tracking_end, _efl_object_future_link_tracking_end, NULL, obj);
2255}
2256
2257#define EFL_OBJECT_EXTRA_OPS \ 2226#define EFL_OBJECT_EXTRA_OPS \
2258 EFL_OBJECT_OP_FUNC(efl_event_callback_priority_add, _efl_object_event_callback_priority_add), \ 2227 EFL_OBJECT_OP_FUNC(efl_event_callback_priority_add, _efl_object_event_callback_priority_add), \
2259 EFL_OBJECT_OP_FUNC(efl_event_callback_del, _efl_object_event_callback_del), \ 2228 EFL_OBJECT_OP_FUNC(efl_event_callback_del, _efl_object_event_callback_del), \
@@ -2262,7 +2231,6 @@ _efl_object_future_link(Eo *obj EINA_UNUSED, Efl_Object_Data *pd, Efl_Future *li
2262 EFL_OBJECT_OP_FUNC(efl_event_callback_call, _efl_object_event_callback_call), \ 2231 EFL_OBJECT_OP_FUNC(efl_event_callback_call, _efl_object_event_callback_call), \
2263 EFL_OBJECT_OP_FUNC(efl_event_callback_legacy_call, _efl_object_event_callback_legacy_call), \ 2232 EFL_OBJECT_OP_FUNC(efl_event_callback_legacy_call, _efl_object_event_callback_legacy_call), \
2264 EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _efl_object_dbg_info_get), \ 2233 EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _efl_object_dbg_info_get), \
2265 EFL_OBJECT_OP_FUNC(efl_future_link, _efl_object_future_link), \
2266 EFL_OBJECT_OP_FUNC(efl_wref_add, _efl_object_wref_add), \ 2234 EFL_OBJECT_OP_FUNC(efl_wref_add, _efl_object_wref_add), \
2267 EFL_OBJECT_OP_FUNC(efl_wref_del, _efl_object_wref_del), \ 2235 EFL_OBJECT_OP_FUNC(efl_wref_del, _efl_object_wref_del), \
2268 EFL_OBJECT_OP_FUNC(efl_key_data_set, _efl_object_key_data_set), \ 2236 EFL_OBJECT_OP_FUNC(efl_key_data_set, _efl_object_key_data_set), \