aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
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 /src/lib
parentecore: allow for not specifying any static string in Efl.Model.properties.get... (diff)
downloadefl-07e60713fecb48e8a2a94010ec61a8dc7e059611.tar.gz
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
Diffstat (limited to 'src/lib')
-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
}
static Eina_Future *
-_efl_loop_consumer_future_resolved(Eo *obj, Efl_Loop_Consumer_Data *pd EINA_UNUSED,
+_efl_loop_consumer_future_resolved(const Eo *obj, Efl_Loop_Consumer_Data *pd EINA_UNUSED,
Eina_Value result)
{
return eina_future_resolved(efl_loop_future_scheduler_get(obj), result);
}
static Eina_Future *
-_efl_loop_consumer_future_rejected(Eo *obj, Efl_Loop_Consumer_Data *pd EINA_UNUSED,
+_efl_loop_consumer_future_rejected(const Eo *obj, Efl_Loop_Consumer_Data *pd EINA_UNUSED,
Eina_Error error)
{
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)
{
[[An Efl.Loop_Consumer is a class which requires one of the parents to provide
an Efl.Loop interface when performing provider_find. It will enforce this by
- only allowing parents which provide such an interface or NULL.]]
+ only allowing parents which provide such an interface or $NULL.]]
eo_prefix: efl_loop;
methods {
@property loop {
@@ -22,17 +22,36 @@ class Efl.Loop_Consumer (Efl.Object)
loop: Efl.Loop; [[Efl loop]]
}
}
- future_resolved {
+ future_resolved @const {
+ [[Creates a new future that is already resolved to a value.
+
+ This function creates a new future with an already known value,
+ that will be resolved and dispatched by the loop scheduler as
+ usual.
+
+ This is a helper that behaves the same as eina_future_resolved.]]
params {
- result: any_value;
+ result: any_value; [[The value to be delivered.
+
+ Note that the value contents must survive this function scope, that is, do
+ not use stack allocated blobs, arrays, structures or types that keep
+ references to memory you give. Values will be automatically cleaned up using
+ \@ref eina_value_flush() once they are unused (no more future or futures returned a new value)]]
}
- return: future<any_value>;
+ return: future<any_value>; [[The future or $NULL on error.]]
}
- future_rejected {
+ future_rejected @const {
+ [[Creates a new future that is already rejected to a specified error using the @.loop.get.
+
+ This function creates a new future with an already known error,
+ that will be resolved and dispatched by the loop scheduler as
+ usual.
+
+ This is a helper that behaves the same as \@ref eina_future_rejected.]]
params {
- error: Eina.Error;
+ error: Eina.Error; [[An Eina_Error value]]
}
- return: future<Eina.Error>;
+ return: future<Eina.Error>; [[The future or $NULL on error.]]
}
promise_new {
[[Create a new promise with the scheduler coming from the loop provided by this object.