summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-12-14 12:18:16 -0800
committerCedric BAIL <cedric.bail@free.fr>2019-01-02 13:39:23 -0800
commit07e60713fecb48e8a2a94010ec61a8dc7e059611 (patch)
treef879904859a504516432a9dccca7e666aa6e5f02
parentdf2629a1c92c2847a0b24258691e9bdd994519bf (diff)
ecore: correct object constness and documentation of future_resolved and future_rejected functions.
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D7486
-rw-r--r--src/lib/ecore/efl_loop_consumer.c4
-rw-r--r--src/lib/ecore/efl_loop_consumer.eo33
2 files changed, 28 insertions, 9 deletions
diff --git a/src/lib/ecore/efl_loop_consumer.c b/src/lib/ecore/efl_loop_consumer.c
index d31f4ff043..1c74f9741f 100644
--- a/src/lib/ecore/efl_loop_consumer.c
+++ b/src/lib/ecore/efl_loop_consumer.c
@@ -37,14 +37,14 @@ _efl_loop_consumer_efl_object_parent_set(Eo *obj, Efl_Loop_Consumer_Data *pd EIN
37} 37}
38 38
39static Eina_Future * 39static Eina_Future *
40_efl_loop_consumer_future_resolved(Eo *obj, Efl_Loop_Consumer_Data *pd EINA_UNUSED, 40_efl_loop_consumer_future_resolved(const Eo *obj, Efl_Loop_Consumer_Data *pd EINA_UNUSED,
41 Eina_Value result) 41 Eina_Value result)
42{ 42{
43 return eina_future_resolved(efl_loop_future_scheduler_get(obj), result); 43 return eina_future_resolved(efl_loop_future_scheduler_get(obj), result);
44} 44}
45 45
46static Eina_Future * 46static Eina_Future *
47_efl_loop_consumer_future_rejected(Eo *obj, Efl_Loop_Consumer_Data *pd EINA_UNUSED, 47_efl_loop_consumer_future_rejected(const Eo *obj, Efl_Loop_Consumer_Data *pd EINA_UNUSED,
48 Eina_Error error) 48 Eina_Error error)
49{ 49{
50 return eina_future_rejected(efl_loop_future_scheduler_get(obj), error); 50 return eina_future_rejected(efl_loop_future_scheduler_get(obj), error);
diff --git a/src/lib/ecore/efl_loop_consumer.eo b/src/lib/ecore/efl_loop_consumer.eo
index ed9d351faa..b0228462d7 100644
--- a/src/lib/ecore/efl_loop_consumer.eo
+++ b/src/lib/ecore/efl_loop_consumer.eo
@@ -10,7 +10,7 @@ class Efl.Loop_Consumer (Efl.Object)
10{ 10{
11 [[An Efl.Loop_Consumer is a class which requires one of the parents to provide 11 [[An Efl.Loop_Consumer is a class which requires one of the parents to provide
12 an Efl.Loop interface when performing provider_find. It will enforce this by 12 an Efl.Loop interface when performing provider_find. It will enforce this by
13 only allowing parents which provide such an interface or NULL.]] 13 only allowing parents which provide such an interface or $NULL.]]
14 eo_prefix: efl_loop; 14 eo_prefix: efl_loop;
15 methods { 15 methods {
16 @property loop { 16 @property loop {
@@ -22,17 +22,36 @@ class Efl.Loop_Consumer (Efl.Object)
22 loop: Efl.Loop; [[Efl loop]] 22 loop: Efl.Loop; [[Efl loop]]
23 } 23 }
24 } 24 }
25 future_resolved { 25 future_resolved @const {
26 [[Creates a new future that is already resolved to a value.
27
28 This function creates a new future with an already known value,
29 that will be resolved and dispatched by the loop scheduler as
30 usual.
31
32 This is a helper that behaves the same as eina_future_resolved.]]
26 params { 33 params {
27 result: any_value; 34 result: any_value; [[The value to be delivered.
35
36 Note that the value contents must survive this function scope, that is, do
37 not use stack allocated blobs, arrays, structures or types that keep
38 references to memory you give. Values will be automatically cleaned up using
39 \@ref eina_value_flush() once they are unused (no more future or futures returned a new value)]]
28 } 40 }
29 return: future<any_value>; 41 return: future<any_value>; [[The future or $NULL on error.]]
30 } 42 }
31 future_rejected { 43 future_rejected @const {
44 [[Creates a new future that is already rejected to a specified error using the @.loop.get.
45
46 This function creates a new future with an already known error,
47 that will be resolved and dispatched by the loop scheduler as
48 usual.
49
50 This is a helper that behaves the same as \@ref eina_future_rejected.]]
32 params { 51 params {
33 error: Eina.Error; 52 error: Eina.Error; [[An Eina_Error value]]
34 } 53 }
35 return: future<Eina.Error>; 54 return: future<Eina.Error>; [[The future or $NULL on error.]]
36 } 55 }
37 promise_new { 56 promise_new {
38 [[Create a new promise with the scheduler coming from the loop provided by this object. 57 [[Create a new promise with the scheduler coming from the loop provided by this object.