summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBryce Harrington <bryce@osg.samsung.com>2017-11-08 15:20:34 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-11-08 15:20:34 +0900
commit50fba34e6c0e07deada58342c544ad8f1800a46f (patch)
tree76adc660eede42522e074f342c2f5c121b809c8a /src
parente2ad1469a5954b62f1b07ba67abc831485645f04 (diff)
eina: Fix spelling/punctuation errors in documentation (prefix..promise)
Reviewers: cedric, ajwillia.ms Subscribers: jpeg, segfaultxavi Differential Revision: https://phab.enlightenment.org/D5438
Diffstat (limited to 'src')
-rw-r--r--src/lib/eina/eina_prefix.h12
-rw-r--r--src/lib/eina/eina_promise.h135
2 files changed, 74 insertions, 73 deletions
diff --git a/src/lib/eina/eina_prefix.h b/src/lib/eina/eina_prefix.h
index 925342cf35..e0f76d7388 100644
--- a/src/lib/eina/eina_prefix.h
+++ b/src/lib/eina/eina_prefix.h
@@ -46,7 +46,7 @@ typedef struct _Eina_Prefix Eina_Prefix;
46 * that they need to load. A very primitive application ASSUMES a fixed install 46 * that they need to load. A very primitive application ASSUMES a fixed install
47 * location at compile-time, but this disallows the ability to re-locate 47 * location at compile-time, but this disallows the ability to re-locate
48 * the application (or library) somewhere else after compilation (if you run 48 * the application (or library) somewhere else after compilation (if you run
49 * out of space on a given disk, partition etc. for example), or necessitate 49 * out of space on a given disk, partition, etc. for example), or necessitate
50 * the need for having to maintain environment variables for every piece of 50 * the need for having to maintain environment variables for every piece of
51 * software to let it know its location, or have to use large sets of 51 * software to let it know its location, or have to use large sets of
52 * symlinks pointing from the compiled location to the new one. 52 * symlinks pointing from the compiled location to the new one.
@@ -69,7 +69,7 @@ typedef struct _Eina_Prefix Eina_Prefix;
69 * information. It uses the first argument, being the executable itself, 69 * information. It uses the first argument, being the executable itself,
70 * to look in absolute directories, relative paths, and PATH to see if it 70 * to look in absolute directories, relative paths, and PATH to see if it
71 * finds the right executable to determine just where the actual binary is 71 * finds the right executable to determine just where the actual binary is
72 * installed and being run from. If you develop a share library, just pass 72 * installed and being run from. If you develop a shared library, just pass
73 * @c NULL as @a argv0. 73 * @c NULL as @a argv0.
74 * 74 *
75 * @note It would prefer to use the @a symbol function to determine the location as 75 * @note It would prefer to use the @a symbol function to determine the location as
@@ -78,7 +78,7 @@ typedef struct _Eina_Prefix Eina_Prefix;
78 * as this avoids more expensive searches via @a argv0. It uses this 78 * as this avoids more expensive searches via @a argv0. It uses this
79 * symbol if given in preference to @a argv0. 79 * symbol if given in preference to @a argv0.
80 * 80 *
81 * @note The @a envprefix parameter, provides a string prefix to prepend before 81 * @note The @a envprefix parameter provides a string prefix to prepend before
82 * environment variables to allow a fallback to specific environment variables 82 * environment variables to allow a fallback to specific environment variables
83 * to locate the software. For example, if "MYAPP" is provided as the prefix, 83 * to locate the software. For example, if "MYAPP" is provided as the prefix,
84 * then it uses "MYAPP_PREFIX" as a master environment variable to specify 84 * then it uses "MYAPP_PREFIX" as a master environment variable to specify
@@ -99,7 +99,7 @@ typedef struct _Eina_Prefix Eina_Prefix;
99 * example, your app installs a wallpaper image as 99 * example, your app installs a wallpaper image as
100 * /usr/local/share/appname/images/wallpaper.jpg and so to check that this 100 * /usr/local/share/appname/images/wallpaper.jpg and so to check that this
101 * worked, provide "images/wallpaper.jpg" as the @a magicsharefile string 101 * worked, provide "images/wallpaper.jpg" as the @a magicsharefile string
102 * so detection can know if it worked or not. 102 * so detection can know if it worked or not.
103 * 103 *
104 * @note The @a pkg_bin, @a pkg_lib, @a pkg_data, and @a pkg_locale are compile-time 104 * @note The @a pkg_bin, @a pkg_lib, @a pkg_data, and @a pkg_locale are compile-time
105 * strings (the kind standard autoconf/automake define) to be passed in 105 * strings (the kind standard autoconf/automake define) to be passed in
@@ -120,7 +120,7 @@ typedef struct _Eina_Prefix Eina_Prefix;
120 * locale dir is optional. If you don't need it, provide data dir as the 120 * locale dir is optional. If you don't need it, provide data dir as the
121 * locale dir. Also note that the magicsharefile is optional for testing and 121 * locale dir. Also note that the magicsharefile is optional for testing and
122 * ensuring that the prefix check is correct. This file must be installed 122 * ensuring that the prefix check is correct. This file must be installed
123 * in the application data dir (eg /usr/local/share/appname) and be referred 123 * in the application data dir (e.g. /usr/local/share/appname) and be referred
124 * to using a unix-style relative path from that dir, eg directory/filename.png) 124 * to using a unix-style relative path from that dir, eg directory/filename.png)
125 * 125 *
126 * @code 126 * @code
@@ -174,7 +174,7 @@ EAPI void eina_prefix_free(Eina_Prefix *pfx) EINA_ARG_NONNULL(1);
174 * 174 *
175 * @param[in] pfx The prefix object 175 * @param[in] pfx The prefix object
176 * @return The base prefix (eg "/usr/local", "/usr", "/opt/appname" or 176 * @return The base prefix (eg "/usr/local", "/usr", "/opt/appname" or
177 * "/home/user/myapps/appname" etc.) that the software resides in at runtime 177 * "/home/user/myapps/appname", etc.) that the software resides in at runtime
178 * 178 *
179 * @since 1.1.0 179 * @since 1.1.0
180 */ 180 */
diff --git a/src/lib/eina/eina_promise.h b/src/lib/eina/eina_promise.h
index 573c019d6b..44e9aef655 100644
--- a/src/lib/eina/eina_promise.h
+++ b/src/lib/eina/eina_promise.h
@@ -38,13 +38,13 @@ typedef struct _Eina_Future_Cb_Log_Desc Eina_Future_Cb_Log_Desc;
38 * context that called cancel using `ECANCELED` as error. 38 * context that called cancel using `ECANCELED` as error.
39 * 39 *
40 * @li eina_future_then(), eina_future_then_from_desc(), eina_future_chain(), eina_future_chain_array() 40 * @li eina_future_then(), eina_future_then_from_desc(), eina_future_chain(), eina_future_chain_array()
41 * or similar failed due invalid pointer or memory allocation. Then the callback is called from the 41 * or similar failed due to invalid pointer or memory allocation. Then the callback is called from the
42 * failed context using `EINVAL` or `ENOMEM` as errors and @p dead_future will be @c NULL. 42 * failed context using `EINVAL` or `ENOMEM` as errors and @p dead_future will be @c NULL.
43 * 43 *
44 * @param data The data provided by the user 44 * @param data The data provided by the user
45 * 45 *
46 * @param value An Eina_Value which contains the operation result. Before using 46 * @param value An Eina_Value which contains the operation result. Before using
47 * the @p value, its type must be checked in order to avoid errors. This is needed, because 47 * the @p value, its type must be checked in order to avoid errors. This is needed because
48 * if an operation fails the Eina_Value type will be EINA_VALUE_TYPE_ERROR 48 * if an operation fails the Eina_Value type will be EINA_VALUE_TYPE_ERROR
49 * which is a different type than the expected operation result. 49 * which is a different type than the expected operation result.
50 * 50 *
@@ -54,12 +54,12 @@ typedef struct _Eina_Future_Cb_Log_Desc Eina_Future_Cb_Log_Desc;
54 * If there is no need to convert the received value, it's @b recommended 54 * If there is no need to convert the received value, it's @b recommended
55 * to pass-thru @p value argument. If you need to convert to a different type 55 * to pass-thru @p value argument. If you need to convert to a different type
56 * or generate a new value, use @c eina_value_setup() on @b another Eina_Value 56 * or generate a new value, use @c eina_value_setup() on @b another Eina_Value
57 * and return it. By returning an promise Eina_Value (eina_promise_as_value()) the 57 * and return it. By returning a promise Eina_Value (eina_promise_as_value()) the
58 * whole chain will wait until the promise is resolved in 58 * whole chain will wait until the promise is resolved in
59 * order to continue its execution. 59 * order to continue its execution.
60 * Note that the value contents must survive this function scope, 60 * Note that the value contents must survive this function scope,
61 * that is, do @b not use stack allocated blobs, arrays, structures or types that 61 * that is, do @b not use stack allocated blobs, arrays, structures or types that
62 * keeps references to memory you give. Values will be automatically cleaned up 62 * keep references to memory you give. Values will be automatically cleaned up
63 * using @c eina_value_flush() once they are unused (no more future or futures 63 * using @c eina_value_flush() once they are unused (no more future or futures
64 * returned a new value). 64 * returned a new value).
65 * 65 *
@@ -122,7 +122,7 @@ typedef void (*Eina_Future_Scheduler_Cb)(Eina_Future *f, Eina_Value value);
122 * @ingroup eina_promise 122 * @ingroup eina_promise
123 * This struct is used as a bridge between Eina and the future scheduler. 123 * This struct is used as a bridge between Eina and the future scheduler.
124 * By using the functions provided by #_Eina_Future_Scheduler Eina can 124 * By using the functions provided by #_Eina_Future_Scheduler Eina can
125 * schedule futures resolutions, rejections and cancelations to a safe context. 125 * schedule futures resolutions, rejections and cancellations to a safe context.
126 * 126 *
127 * @see eina_promise_new() 127 * @see eina_promise_new()
128 * @see #Eina_Future_Schedule_Entry 128 * @see #Eina_Future_Schedule_Entry
@@ -131,7 +131,7 @@ typedef void (*Eina_Future_Scheduler_Cb)(Eina_Future *f, Eina_Value value);
131struct _Eina_Future_Scheduler { 131struct _Eina_Future_Scheduler {
132 /** 132 /**
133 * Called by @p Eina_Future when a delivery must be scheduled to a safe context. 133 * Called by @p Eina_Future when a delivery must be scheduled to a safe context.
134 * ie: after @p eina_promise_resolve() 134 * i.e.: after @p eina_promise_resolve()
135 * 135 *
136 * @note Must not be @c NULL 136 * @note Must not be @c NULL
137 * 137 *
@@ -144,8 +144,8 @@ struct _Eina_Future_Scheduler {
144 */ 144 */
145 Eina_Future_Schedule_Entry *(*schedule)(Eina_Future_Scheduler *scheduler, Eina_Future_Scheduler_Cb cb, Eina_Future *f, Eina_Value value); 145 Eina_Future_Schedule_Entry *(*schedule)(Eina_Future_Scheduler *scheduler, Eina_Future_Scheduler_Cb cb, Eina_Future *f, Eina_Value value);
146 /** 146 /**
147 * Called by @p Eina_Future when a delivery must be cancelled. 147 * Called by @p Eina_Future when a delivery must be canceled.
148 * ie: after @p eina_future_cancel() 148 * i.e.: after @p eina_future_cancel()
149 * 149 *
150 * @note Must not be @c NULL. 150 * @note Must not be @c NULL.
151 * 151 *
@@ -166,7 +166,7 @@ struct _Eina_Future_Scheduler {
166 * 166 *
167 * It should stop all asynchronous operations or at least mark them to be 167 * It should stop all asynchronous operations or at least mark them to be
168 * discarded instead of resolved. Actually it can't be resolved once 168 * discarded instead of resolved. Actually it can't be resolved once
169 * cancelled since the given pointer @c dead_promise is now invalid. 169 * canceled since the given pointer @c dead_promise is now invalid.
170 * 170 *
171 * @note This callback is @b mandatory for a reason, do not provide an empty 171 * @note This callback is @b mandatory for a reason, do not provide an empty
172 * callback as it'll likely result in memory corruption and invalid access. 172 * callback as it'll likely result in memory corruption and invalid access.
@@ -207,12 +207,12 @@ typedef void (*Eina_Promise_Cancel_Cb) (void *data, const Eina_Promise *dead_pro
207 * If there is no need to convert the received value, it's @b recommended 207 * If there is no need to convert the received value, it's @b recommended
208 * to pass-thru @p value argument. If you need to convert to a different type 208 * to pass-thru @p value argument. If you need to convert to a different type
209 * or generate a new value, use @c eina_value_setup() on @b another Eina_Value 209 * or generate a new value, use @c eina_value_setup() on @b another Eina_Value
210 * and return it. By returning an promise Eina_Value (eina_promise_as_value()) the 210 * and return it. By returning a promise Eina_Value (eina_promise_as_value()) the
211 * whole chain will wait until the promise is resolved in 211 * whole chain will wait until the promise is resolved in
212 * order to continue its execution. 212 * order to continue its execution.
213 * Note that the value contents must survive this function scope, 213 * Note that the value contents must survive this function scope,
214 * that is, do @b not use stack allocated blobs, arrays, structures or types that 214 * that is, do @b not use stack allocated blobs, arrays, structures or types that
215 * keeps references to memory you give. Values will be automatically cleaned up 215 * keep references to memory you give. Values will be automatically cleaned up
216 * using @c eina_value_flush() once they are unused (no more future or futures 216 * using @c eina_value_flush() once they are unused (no more future or futures
217 * returned a new value). 217 * returned a new value).
218 * @see eina_future_cb_easy_from_desc() 218 * @see eina_future_cb_easy_from_desc()
@@ -230,7 +230,7 @@ typedef Eina_Value (*Eina_Future_Success_Cb)(void *data, const Eina_Value value)
230 * occurs during the future process or when #_Eina_Future_Cb_Easy_Desc::success_type 230 * occurs during the future process or when #_Eina_Future_Cb_Easy_Desc::success_type
231 * differs from the future result. 231 * differs from the future result.
232 * On future creation errors and future cancellation this function will be called 232 * On future creation errors and future cancellation this function will be called
233 * from the current context with the following errors respectitally: `EINVAL`, `ENOMEM` and `ECANCELED`. 233 * from the current context with the following errors respectfully: `EINVAL`, `ENOMEM` and `ECANCELED`.
234 * Otherwise this function is called from a safe context. 234 * Otherwise this function is called from a safe context.
235 * 235 *
236 * If it was possible to recover from an error this function should return an empty value 236 * If it was possible to recover from an error this function should return an empty value
@@ -244,12 +244,12 @@ typedef Eina_Value (*Eina_Future_Success_Cb)(void *data, const Eina_Value value)
244 * @return An Eina_Value to pass to the next Eina_Future in the chain (if any). 244 * @return An Eina_Value to pass to the next Eina_Future in the chain (if any).
245 * If you need to convert to a different type or generate a new value, 245 * If you need to convert to a different type or generate a new value,
246 * use @c eina_value_setup() on @b another Eina_Value 246 * use @c eina_value_setup() on @b another Eina_Value
247 * and return it. By returning an promise Eina_Value (eina_promise_as_value()) the 247 * and return it. By returning a promise Eina_Value (eina_promise_as_value()) the
248 * whole chain will wait until the promise is resolved in 248 * whole chain will wait until the promise is resolved in
249 * order to continue its execution. 249 * order to continue its execution.
250 * Note that the value contents must survive this function scope, 250 * Note that the value contents must survive this function scope,
251 * that is, do @b not use stack allocated blobs, arrays, structures or types that 251 * that is, do @b not use stack allocated blobs, arrays, structures or types that
252 * keeps references to memory you give. Values will be automatically cleaned up 252 * keep references to memory you give. Values will be automatically cleaned up
253 * using @c eina_value_flush() once they are unused (no more future or futures 253 * using @c eina_value_flush() once they are unused (no more future or futures
254 * returned a new value). 254 * returned a new value).
255 * @see eina_future_cb_easy_from_desc() 255 * @see eina_future_cb_easy_from_desc()
@@ -460,14 +460,14 @@ struct _Eina_Future_Desc {
460 * Creates a new promise. 460 * Creates a new promise.
461 * 461 *
462 * This function creates a new promise which can be used to create a future 462 * This function creates a new promise which can be used to create a future
463 * using eina_future_new(). Everytime a promise is created a #Eina_Promise_Cancel_Cb 463 * using eina_future_new(). Every time a promise is created a #Eina_Promise_Cancel_Cb
464 * must be provided which is used to free resources that were created. 464 * must be provided which is used to free resources that were created.
465 * 465 *
466 * A promise may be cancelled directly by calling 466 * A promise may be canceled directly by calling
467 * @c eina_future_cancel(eina_future_new(eina_promise_new(...))) 467 * @c eina_future_cancel(eina_future_new(eina_promise_new(...)))
468 * that is, cancelling any future that is chained to receive the results. 468 * that is, cancelling any future that is chained to receive the results.
469 * 469 *
470 * However promises can be cancelled indirectly by other entities. 470 * However promises can be canceled indirectly by other entities.
471 * These other entities will call `eina_future_cancel()` themselves, 471 * These other entities will call `eina_future_cancel()` themselves,
472 * however you may not be aware of that. Some common sources 472 * however you may not be aware of that. Some common sources
473 * of indirect cancellations: 473 * of indirect cancellations:
@@ -475,15 +475,15 @@ struct _Eina_Future_Desc {
475 * @li A subsystem was shutdown, cancelling all pending futures (ie: ecore_shutdown()) 475 * @li A subsystem was shutdown, cancelling all pending futures (ie: ecore_shutdown())
476 * 476 *
477 * @li An EO object was linked to the promise or future, then if the object dies (last reference 477 * @li An EO object was linked to the promise or future, then if the object dies (last reference
478 * is gone), then the pending promises and futures will be cancelled. 478 * is gone), then the pending promises and futures will be canceled.
479 * 479 *
480 * @li Some other entity (library provider or library user) chained and cancelled his future, 480 * @li Some other entity (library provider or library user) chained and canceled his future,
481 * which will result in your future being cancelled. 481 * which will result in your future being canceled.
482 * 482 *
483 * Since a promise may be canceled indirectaly (by code sections that goes beyond your scope) 483 * Since a promise may be canceled indirectaly (by code sections that goes beyond your scope)
484 * you should always provide a cancel callback, even if you think you'll not need it. 484 * you should always provide a cancel callback, even if you think you'll not need it.
485 * 485 *
486 * Below there's a typical example: 486 * Here's a typical example:
487 * 487 *
488 * @code 488 * @code
489 * #include <Ecore.h> 489 * #include <Ecore.h>
@@ -492,7 +492,7 @@ struct _Eina_Future_Desc {
492 * _promise_cancel(void *data, Eina_Promise *p EINA_UNUSED) 492 * _promise_cancel(void *data, Eina_Promise *p EINA_UNUSED)
493 * { 493 * {
494 * Ctx *ctx = data; 494 * Ctx *ctx = data;
495 * //In case the promise is canceled we must stop the timer! 495 * // In case the promise is canceled we must stop the timer!
496 * ecore_timer_del(ctx->timer); 496 * ecore_timer_del(ctx->timer);
497 * free(ctx); 497 * free(ctx);
498 * } 498 * }
@@ -513,9 +513,9 @@ struct _Eina_Future_Desc {
513 * promise_create(Eina_Future_Scheduler *scheduler) 513 * promise_create(Eina_Future_Scheduler *scheduler)
514 * { 514 * {
515 * Ctx *ctx = malloc(sizeof(Ctx)); 515 * Ctx *ctx = malloc(sizeof(Ctx));
516 * //A timer is scheduled in order to resolve the promise 516 * // A timer is scheduled in order to resolve the promise
517 * ctx->timer = ecore_timer_add(122, _promise_resolve, ctx); 517 * ctx->timer = ecore_timer_add(122, _promise_resolve, ctx);
518 * //The _promise_cancel() will be used to clean ctx if the promise is canceled. 518 * // The _promise_cancel() will be used to clean ctx if the promise is canceled.
519 * ctx->p = eina_promise_new(scheduler, _promise_cancel, ctx); 519 * ctx->p = eina_promise_new(scheduler, _promise_cancel, ctx);
520 * return ctx->p; 520 * return ctx->p;
521 * } 521 * }
@@ -563,15 +563,14 @@ EAPI void eina_promise_data_set(Eina_Promise *p, void *data) EINA_ARG_NONNULL(1)
563/** 563/**
564 * Resolves a promise. 564 * Resolves a promise.
565 * 565 *
566 * 566 * This function schedules a resolve event in a
567 * This function schedules an resolve event in a
568 * safe context (main loop or some platform defined safe context), 567 * safe context (main loop or some platform defined safe context),
569 * whenever possible the future callbacks will be dispatched. 568 * whenever possible the future callbacks will be dispatched.
570 * 569 *
571 * @param p A promise to resolve. 570 * @param p A promise to resolve.
572 * @param value The value to be delivered. Note that the value contents must survive this function scope, 571 * @param value The value to be delivered. Note that the value contents must survive this function scope,
573 * that is, do @b not use stack allocated blobs, arrays, structures or types that 572 * that is, do @b not use stack allocated blobs, arrays, structures or types that
574 * keeps references to memory you give. Values will be automatically cleaned up 573 * keep references to memory you give. Values will be automatically cleaned up
575 * using @c eina_value_flush() once they are unused (no more future or futures 574 * using @c eina_value_flush() once they are unused (no more future or futures
576 * returned a new value). 575 * returned a new value).
577 * 576 *
@@ -581,10 +580,11 @@ EAPI void eina_promise_data_set(Eina_Promise *p, void *data) EINA_ARG_NONNULL(1)
581 * @see eina_promise_as_value() 580 * @see eina_promise_as_value()
582 */ 581 */
583EAPI void eina_promise_resolve(Eina_Promise *p, Eina_Value value) EINA_ARG_NONNULL(1); 582EAPI void eina_promise_resolve(Eina_Promise *p, Eina_Value value) EINA_ARG_NONNULL(1);
583
584/** 584/**
585 * Rejects a promise. 585 * Rejects a promise.
586 * 586 *
587 * This function schedules an reject event in a 587 * This function schedules a reject event in a
588 * safe context (main loop or some platform defined safe context), 588 * safe context (main loop or some platform defined safe context),
589 * whenever possible the future callbacks will be dispatched. 589 * whenever possible the future callbacks will be dispatched.
590 * 590 *
@@ -643,7 +643,7 @@ EAPI void eina_future_cb_easy_desc_flush(Eina_Future_Cb_Easy_Desc *desc);
643 * 643 *
644 * This function creates a new Eina_Value that will store a promise 644 * This function creates a new Eina_Value that will store a promise
645 * in it. This function is useful for dealing with promises inside 645 * in it. This function is useful for dealing with promises inside
646 * a #Eina_Future_Cb. By returning an Promise Eina_Value the 646 * a #Eina_Future_Cb. By returning a Promise Eina_Value the
647 * whole chain will wait until the promise is resolved in 647 * whole chain will wait until the promise is resolved in
648 * order to continue its execution. Example: 648 * order to continue its execution. Example:
649 * 649 *
@@ -653,7 +653,7 @@ EAPI void eina_future_cb_easy_desc_flush(Eina_Future_Cb_Easy_Desc *desc);
653 * { 653 * {
654 * const char *file_data; 654 * const char *file_data;
655 * Eina_Promise *p; 655 * Eina_Promise *p;
656 * //It was not possible to fetch the file size. 656 * // It was not possible to fetch the file size.
657 * if (v.type == EINA_VALUE_TYPE_ERROR) 657 * if (v.type == EINA_VALUE_TYPE_ERROR)
658 * { 658 * {
659 * Eina_Error err; 659 * Eina_Error err;
@@ -670,7 +670,7 @@ EAPI void eina_future_cb_easy_desc_flush(Eina_Future_Cb_Easy_Desc *desc);
670 * } 670 * }
671 * 671 *
672 * eina_value_get(&v, &file_data); 672 * eina_value_get(&v, &file_data);
673 * //count_words will count the words in the background and resolve the promise once it is over... 673 * // count_words will count the words in the background and resolve the promise once it is over...
674 * p = count_words(file_data); 674 * p = count_words(file_data);
675 * return eina_promise_as_value(p); 675 * return eina_promise_as_value(p);
676 * } 676 * }
@@ -678,7 +678,7 @@ EAPI void eina_future_cb_easy_desc_flush(Eina_Future_Cb_Easy_Desc *desc);
678 * static Eina_Value 678 * static Eina_Value
679 * _word_count_ready(const *data EINA_UNUSED, const Eina_Value v, const Eina_Future *dead EINA_UNUSED) 679 * _word_count_ready(const *data EINA_UNUSED, const Eina_Value v, const Eina_Future *dead EINA_UNUSED)
680 * { 680 * {
681 * //The _word_count_ready will only be called once count_words() resolves/rejects the promise returned by _file_data_ready() 681 * // The _word_count_ready will only be called once count_words() resolves/rejects the promise returned by _file_data_ready()
682 * int count; 682 * int count;
683 * if (v.type == EINA_VALUE_TYPE_ERROR) 683 * if (v.type == EINA_VALUE_TYPE_ERROR)
684 * { 684 * {
@@ -715,6 +715,7 @@ EAPI void eina_future_cb_easy_desc_flush(Eina_Future_Cb_Easy_Desc *desc);
715 * @see eina_promise_resolve() 715 * @see eina_promise_resolve()
716 */ 716 */
717EAPI Eina_Value eina_promise_as_value(Eina_Promise *p) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; 717EAPI Eina_Value eina_promise_as_value(Eina_Promise *p) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
718
718/** 719/**
719 * Creates an Eina_Value from a future. 720 * Creates an Eina_Value from a future.
720 * 721 *
@@ -736,7 +737,7 @@ EAPI Eina_Value eina_future_as_value(Eina_Future *f)EINA_ARG_NONNULL(1) EINA_WAR
736 * eina_promise_resolve() or eina_promise_reject(). 737 * eina_promise_resolve() or eina_promise_reject().
737 * 738 *
738 * Futures can also be canceled using eina_future_cancel(), which 739 * Futures can also be canceled using eina_future_cancel(), which
739 * will cause the whole chain to be cancelled alongside with any pending promise. 740 * will cause the whole chain to be canceled alongside with any pending promise.
740 * 741 *
741 * @note A promise can only have one future attached to it, calling 742 * @note A promise can only have one future attached to it, calling
742 * eina_future_new() on the same promise twice will 743 * eina_future_new() on the same promise twice will
@@ -764,13 +765,13 @@ EAPI Eina_Future *eina_future_new(Eina_Promise *p) EINA_ARG_NONNULL(1) EINA_WARN
764 * followed by eina_future_new() and then eina_promise_resolve(). 765 * followed by eina_future_new() and then eina_promise_resolve().
765 * 766 *
766 * Futures can also be canceled using eina_future_cancel(), which will 767 * Futures can also be canceled using eina_future_cancel(), which will
767 * cause the whole chain to be cancelled alongside with any pending 768 * cause the whole chain to be canceled alongside with any pending
768 * promise. 769 * promise.
769 * 770 *
770 * @param scheduler The scheduler to use. 771 * @param scheduler The scheduler to use.
771 * @param value The value to be delivered. Note that the value 772 * @param value The value to be delivered. Note that the value
772 * contents must survive this function scope, that is, do @b not use 773 * contents must survive this function scope, that is, do @b not use
773 * stack allocated blobs, arrays, structures or types that keeps 774 * stack allocated blobs, arrays, structures or types that keep
774 * references to memory you give. Values will be automatically cleaned 775 * references to memory you give. Values will be automatically cleaned
775 * up using @c eina_value_flush() once they are unused (no more future 776 * up using @c eina_value_flush() once they are unused (no more future
776 * or futures returned a new value). 777 * or futures returned a new value).
@@ -796,7 +797,7 @@ EAPI Eina_Future *eina_future_resolved(Eina_Future_Scheduler *scheduler, Eina_Va
796 * followed by eina_future_new() and then eina_promise_rejected(). 797 * followed by eina_future_new() and then eina_promise_rejected().
797 * 798 *
798 * Futures can also be canceled using eina_future_cancel(), which will 799 * Futures can also be canceled using eina_future_cancel(), which will
799 * cause the whole chain to be cancelled alongside with any pending 800 * cause the whole chain to be canceled alongside with any pending
800 * promise. 801 * promise.
801 * 802 *
802 * @param scheduler The scheduler to use. 803 * @param scheduler The scheduler to use.
@@ -825,14 +826,14 @@ EAPI Eina_Future *eina_future_rejected(Eina_Future_Scheduler *scheduler, Eina_Er
825 * In case a future in the chain is canceled, the whole chain will be canceled immediately 826 * In case a future in the chain is canceled, the whole chain will be canceled immediately
826 * and the error `ECANCELED` will be reported. 827 * and the error `ECANCELED` will be reported.
827 * 828 *
828 * Below there's a simple usage of this function. 829 * Here's a simple usage of this function.
829 * 830 *
830 * @code 831 * @code
831 * static Eina_Value 832 * static Eina_Value
832 * _file_ready(const *data, const Eina_Value v, const Eina_Future *dead EINA_UNUSED) 833 * _file_ready(const *data, const Eina_Value v, const Eina_Future *dead EINA_UNUSED)
833 * { 834 * {
834 * Ctx *ctx = data; 835 * Ctx *ctx = data;
835 * //It was not possible to fetch the file size. 836 * // It was not possible to fetch the file size.
836 * if (v.type == EINA_VALUE_TYPE_ERROR) 837 * if (v.type == EINA_VALUE_TYPE_ERROR)
837 * { 838 * {
838 * Eina_Error err; 839 * Eina_Error err;
@@ -857,9 +858,9 @@ EAPI Eina_Future *eina_future_rejected(Eina_Future_Scheduler *scheduler, Eina_Er
857 * { 858 * {
858 * Eina_Future *f = get_file_size_async("/MyFile.txt"); 859 * Eina_Future *f = get_file_size_async("/MyFile.txt");
859 * eina_future_then_from_desc(f, (const Eina_Future_Desc){.cb = _size_ready, .data = NULL}); 860 * eina_future_then_from_desc(f, (const Eina_Future_Desc){.cb = _size_ready, .data = NULL});
860 * //There's a helper macro called eina_future_then() which simplifies the usage. 861 * // There's a helper macro called eina_future_then() which simplifies the usage.
861 * //The code below has the same effect. 862 * // The code below has the same effect.
862 * //eina_future_then(f, _size_ready, NULL); 863 * // eina_future_then(f, _size_ready, NULL);
863 * } 864 * }
864 * @endcode 865 * @endcode
865 * 866 *
@@ -881,11 +882,11 @@ EAPI Eina_Future *eina_future_rejected(Eina_Future_Scheduler *scheduler, Eina_Er
881 * Eina_Value new_v; 882 * Eina_Value new_v;
882 * int i; 883 * int i;
883 * 884 *
884 * //There's no need to check the Eina_Value type since we're using eina_future_cb_easy() 885 * // There's no need to check the Eina_Value type since we're using eina_future_cb_easy()
885 * eina_value_get(&v, &i); 886 * eina_value_get(&v, &i);
886 * printf("File size as int: %d\n", i); 887 * printf("File size as int: %d\n", i);
887 * eina_value_setup(&new_v, EINA_VALUE_TYPE_STRING); 888 * eina_value_setup(&new_v, EINA_VALUE_TYPE_STRING);
888 * //Convert the file size to string 889 * // Convert the file size to string
889 * eina_value_convert(&v, &new_v); 890 * eina_value_convert(&v, &new_v);
890 * return new_v; 891 * return new_v;
891 * } 892 * }
@@ -896,7 +897,7 @@ EAPI Eina_Future *eina_future_rejected(Eina_Future_Scheduler *scheduler, Eina_Er
896 * Eina_Value new_v; 897 * Eina_Value new_v;
897 * const char *file_size_str; 898 * const char *file_size_str;
898 * 899 *
899 * //There's no need to check the Eina_Value type since we're using eina_future_cb_easy() 900 * // There's no need to check the Eina_Value type since we're using eina_future_cb_easy()
900 * eina_value_get(&v, &file_size_str); 901 * eina_value_get(&v, &file_size_str);
901 * printf("File size as string: %s\n", file_size_str); 902 * printf("File size as string: %s\n", file_size_str);
902 * eina_value_setup(&new_v, EINA_VALUE_TYPE_DOUBLE); 903 * eina_value_setup(&new_v, EINA_VALUE_TYPE_DOUBLE);
@@ -909,7 +910,7 @@ EAPI Eina_Future *eina_future_rejected(Eina_Future_Scheduler *scheduler, Eina_Er
909 * { 910 * {
910 * double d; 911 * double d;
911 * 912 *
912 * //There's no need to check the Eina_Value type since we're using eina_future_cb_easy() 913 * // There's no need to check the Eina_Value type since we're using eina_future_cb_easy()
913 * eina_value_get(&v, &d); 914 * eina_value_get(&v, &d);
914 * printf("File size as double: %g\n", d); 915 * printf("File size as double: %g\n", d);
915 * return v; 916 * return v;
@@ -918,12 +919,12 @@ EAPI Eina_Future *eina_future_rejected(Eina_Future_Scheduler *scheduler, Eina_Er
918 * static Eina_Value 919 * static Eina_Value
919 * _future_err(void *data EINA_UNUSED, Eina_Error err) 920 * _future_err(void *data EINA_UNUSED, Eina_Error err)
920 * { 921 * {
921 * //This function is called if future result type does not match or another error occurred 922 * // This function is called if future result type does not match or another error occurred
922 * Eina_Value new_v; 923 * Eina_Value new_v;
923 * eina_value_setup(&new_v, EINA_VALUE_TYPE_ERROR); 924 * eina_value_setup(&new_v, EINA_VALUE_TYPE_ERROR);
924 * eina_valuse_set(&new_v, err); 925 * eina_valuse_set(&new_v, err);
925 * fprintf(stderr, "Error during future process. Reason: %s\n", eina_error_msg_get(err)); 926 * fprintf(stderr, "Error during future process. Reason: %s\n", eina_error_msg_get(err));
926 * //Pass the error to the next future in the chain.. 927 * // Pass the error to the next future in the chain..
927 * return new_v; 928 * return new_v;
928 * } 929 * }
929 * 930 *
@@ -932,11 +933,11 @@ EAPI Eina_Future *eina_future_rejected(Eina_Future_Scheduler *scheduler, Eina_Er
932 * { 933 * {
933 * Eina_Future *f = get_file_size_async("/MyFile.txt"); 934 * Eina_Future *f = get_file_size_async("/MyFile.txt");
934 * f = eina_future_then_easy(f, .success = _future_cb1, .success_type = EINA_VALUE_TYPE_INT); 935 * f = eina_future_then_easy(f, .success = _future_cb1, .success_type = EINA_VALUE_TYPE_INT);
935 * //_future_cb2 will be executed after _future_cb1() 936 * // _future_cb2 will be executed after _future_cb1()
936 * f = eina_future_then_easy(f, .success = _future_cb2, .success_type = EINA_VALUE_TYPE_STRING); 937 * f = eina_future_then_easy(f, .success = _future_cb2, .success_type = EINA_VALUE_TYPE_STRING);
937 * //_future_cb2 will be executed after _future_cb2() 938 * // _future_cb2 will be executed after _future_cb2()
938 * f = eina_future_then_easy(f, .success = _future_cb3, .success_type = EINA_VALUE_TYPE_DOUBLE); 939 * f = eina_future_then_easy(f, .success = _future_cb3, .success_type = EINA_VALUE_TYPE_DOUBLE);
939 * //If an error happens _future_err will be called 940 * // If an error happens _future_err will be called
940 * eina_future_then_easy(f, .error = _future_err); 941 * eina_future_then_easy(f, .error = _future_err);
941 * } 942 * }
942 * @endcode 943 * @endcode
@@ -948,7 +949,7 @@ EAPI Eina_Future *eina_future_rejected(Eina_Future_Scheduler *scheduler, Eina_Er
948 * eina_future_cb_convert_to() and eina_future_cb_console_from_desc() and to make those common case easier. 949 * eina_future_cb_convert_to() and eina_future_cb_console_from_desc() and to make those common case easier.
949 * 950 *
950 * @param prev A future to link against 951 * @param prev A future to link against
951 * @param desc A description struct contaning the callback and data. 952 * @param desc A description struct containing the callback and data.
952 * @return A new future or @c NULL on error. 953 * @return A new future or @c NULL on error.
953 * @note If an error happens the whole future chain will CANCELED and 954 * @note If an error happens the whole future chain will CANCELED and
954 * desc.cb will be called in order to free desc.data. 955 * desc.cb will be called in order to free desc.data.
@@ -1003,7 +1004,6 @@ EAPI Eina_Future_Desc eina_future_cb_log_from_desc(const Eina_Future_Cb_Log_Desc
1003/** 1004/**
1004 * Creates a future chain. 1005 * Creates a future chain.
1005 * 1006 *
1006 *
1007 * This behaves exactly like eina_future_then_from_desc(), but makes it easier to create future chains. 1007 * This behaves exactly like eina_future_then_from_desc(), but makes it easier to create future chains.
1008 * 1008 *
1009 * If during the future chain creation an error happens this function will return @c NULL, 1009 * If during the future chain creation an error happens this function will return @c NULL,
@@ -1020,7 +1020,7 @@ EAPI Eina_Future_Desc eina_future_cb_log_from_desc(const Eina_Future_Cb_Log_Desc
1020 * 1020 *
1021 * @code 1021 * @code
1022 * 1022 *
1023 * //callbacks code.... 1023 * // callbacks code....
1024 * 1024 *
1025 * Eina_Future* chain(void) 1025 * Eina_Future* chain(void)
1026 * { 1026 * {
@@ -1054,11 +1054,10 @@ EAPI Eina_Future *eina_future_chain_array(Eina_Future *prev, const Eina_Future_D
1054 1054
1055 1055
1056/** 1056/**
1057 *
1058 * Wrappper around eina_future_chain_array() and eina_future_cb_easy_from_desc() 1057 * Wrappper around eina_future_chain_array() and eina_future_cb_easy_from_desc()
1059 * 1058 *
1060 * This functions makes it easier to use eina_future_chain_array() with eina_future_cb_easy_from_desc(), 1059 * This functions makes it easier to use eina_future_chain_array() with eina_future_cb_easy_from_desc(),
1061 * check the macro eina_future_chain_easy() for an syntax sugar. 1060 * check the macro eina_future_chain_easy() for a syntax sugar.
1062 * 1061 *
1063 * 1062 *
1064 * @param prev The previous future 1063 * @param prev The previous future
@@ -1081,7 +1080,7 @@ EAPI Eina_Future *eina_future_chain_easy_array(Eina_Future *prev, const Eina_Fut
1081 * is returning. The returned value will be passed to the next future in the chain without 1080 * is returning. The returned value will be passed to the next future in the chain without
1082 * modifications. 1081 * modifications.
1083 * 1082 *
1084 * There's also an helper macro called eina_future_cb_console() which makes this 1083 * There's also a helper macro called eina_future_cb_console() which makes this
1085 * fuction easier to use. 1084 * fuction easier to use.
1086 * 1085 *
1087 * Example: 1086 * Example:
@@ -1096,7 +1095,7 @@ EAPI Eina_Future *eina_future_chain_easy_array(Eina_Future *prev, const Eina_Fut
1096 * eina_future_cb_console("cb2 value:", " cb2 value suffix\n")) 1095 * eina_future_cb_console("cb2 value:", " cb2 value suffix\n"))
1097 * @endcode 1096 * @endcode
1098 * 1097 *
1099 * @param prefix A Prefix to print, if @c NULL an empty string ("") is used. 1098 * @param prefix A prefix to print, if @c NULL an empty string ("") is used.
1100 * @param suffix A suffix to print. If @c NULL '\n' will be used. If suffix is provided 1099 * @param suffix A suffix to print. If @c NULL '\n' will be used. If suffix is provided
1101 * the '\n' must be provided by suffix otherwise the printed text will not contain 1100 * the '\n' must be provided by suffix otherwise the printed text will not contain
1102 * a line feed. 1101 * a line feed.
@@ -1117,7 +1116,7 @@ EAPI Eina_Future_Desc eina_future_cb_console_from_desc(const Eina_Future_Cb_Cons
1117/** 1116/**
1118 * Returns a #Eina_Future_Desc that ignores an error. 1117 * Returns a #Eina_Future_Desc that ignores an error.
1119 * 1118 *
1120 * This function may be used if one wants to ignore an error. If the error 1119 * This function may be used if one wants to ignore an error. If the
1121 * specified error happens an EINA_VALUE_EMPTY will be delivered to the 1120 * specified error happens an EINA_VALUE_EMPTY will be delivered to the
1122 * next future in the chain. 1121 * next future in the chain.
1123 * 1122 *
@@ -1151,7 +1150,7 @@ EAPI Eina_Future_Desc eina_future_cb_convert_to(const Eina_Value_Type *type);
1151 * result and life cycle. They are: 1150 * result and life cycle. They are:
1152 * 1151 *
1153 * @li #Eina_Future_Cb_Easy_Desc::success: This callback is called when 1152 * @li #Eina_Future_Cb_Easy_Desc::success: This callback is called when
1154 * the future execution was successful, this is, no errors occurred and 1153 * the future execution was successful, that is, no errors occurred and
1155 * the result type matches #Eina_Future_Cb_Easy_Desc::success_type. In case 1154 * the result type matches #Eina_Future_Cb_Easy_Desc::success_type. In case
1156 * #Eina_Future_Cb_Easy_Desc::success_type is @c NULL, this function will 1155 * #Eina_Future_Cb_Easy_Desc::success_type is @c NULL, this function will
1157 * only be called if the future did not report an error. The value returned 1156 * only be called if the future did not report an error. The value returned
@@ -1172,7 +1171,7 @@ EAPI Eina_Future_Desc eina_future_cb_convert_to(const Eina_Value_Type *type);
1172 * _file_size_ok(void *data, Eina_Value v) 1171 * _file_size_ok(void *data, Eina_Value v)
1173 * { 1172 * {
1174 * Ctx *ctx = data; 1173 * Ctx *ctx = data;
1175 * //Since an Eina_Future_Cb_Easy_Desc::success_type was provided, there's no need to check the value type 1174 * // Since an Eina_Future_Cb_Easy_Desc::success_type was provided, there's no need to check the value type
1176 * int s; 1175 * int s;
1177 * eina_value_get(&v, &s); 1176 * eina_value_get(&v, &s);
1178 * printf("File size is %d bytes\n", s); 1177 * printf("File size is %d bytes\n", s);
@@ -1184,7 +1183,7 @@ EAPI Eina_Future_Desc eina_future_cb_convert_to(const Eina_Value_Type *type);
1184 * _file_size_err(void *data, Eina_Error err) 1183 * _file_size_err(void *data, Eina_Error err)
1185 * { 1184 * {
1186 * fprintf(stderr, "Could not read the file size. Reason: %s\n", eina_error_msg_get(err)); 1185 * fprintf(stderr, "Could not read the file size. Reason: %s\n", eina_error_msg_get(err));
1187 * //Stop propagating the error. 1186 * // Stop propagating the error.
1188 * return EINA_VALUE_EMPTY; 1187 * return EINA_VALUE_EMPTY;
1189 * } 1188 * }
1190 * 1189 *
@@ -1214,6 +1213,7 @@ EAPI Eina_Future_Desc eina_future_cb_convert_to(const Eina_Value_Type *type);
1214 * @see eina_future_cb_easy() 1213 * @see eina_future_cb_easy()
1215 */ 1214 */
1216EAPI Eina_Future_Desc eina_future_cb_easy_from_desc(const Eina_Future_Cb_Easy_Desc desc) EINA_WARN_UNUSED_RESULT; 1215EAPI Eina_Future_Desc eina_future_cb_easy_from_desc(const Eina_Future_Cb_Easy_Desc desc) EINA_WARN_UNUSED_RESULT;
1216
1217/** 1217/**
1218 * Creates an all promise. 1218 * Creates an all promise.
1219 * 1219 *
@@ -1302,7 +1302,7 @@ EAPI Eina_Future_Desc eina_future_cb_easy_from_desc(const Eina_Future_Cb_Easy_De
1302 * 1302 *
1303 * f1 = read_file("/tmp/todo.txt"); 1303 * f1 = read_file("/tmp/todo.txt");
1304 * f2 = get_file_size("/tmp/file.txt"); 1304 * f2 = get_file_size("/tmp/file.txt");
1305 * //calculates 50 places of PI 1305 * // calculates 50 places of PI
1306 * f3 = calc_pi(50); 1306 * f3 = calc_pi(50);
1307 * f_all = eina_future_all(f1, f2, f3); 1307 * f_all = eina_future_all(f1, f2, f3);
1308 * eina_future_then(f_all, _all_cb, NULL); 1308 * eina_future_then(f_all, _all_cb, NULL);
@@ -1352,8 +1352,8 @@ EAPI Eina_Promise *eina_promise_all_array(Eina_Future *array[]) EINA_ARG_NONNULL
1352 * Eina_Error err; 1352 * Eina_Error err;
1353 * Eina_Value_Struct *st; 1353 * Eina_Value_Struct *st;
1354 * 1354 *
1355 * //No need to check for the 'v' type. eina_future_cb_easy() did that for us, 1355 * // No need to check for the 'v' type. eina_future_cb_easy() did that for us.
1356 * //However we should check if the struct has the correct description 1356 * // However we should check if the struct has the correct description
1357 * st = eina_value_memory_get(&v); 1357 * st = eina_value_memory_get(&v);
1358 * if (st->desc != EINA_PROMISE_RACE_STRUCT_DESC) 1358 * if (st->desc != EINA_PROMISE_RACE_STRUCT_DESC)
1359 * { 1359 * {
@@ -1361,7 +1361,7 @@ EAPI Eina_Promise *eina_promise_all_array(Eina_Future *array[]) EINA_ARG_NONNULL
1361 * return v; 1361 * return v;
1362 * } 1362 * }
1363 * eina_value_struct_get(&v, "index", &i); 1363 * eina_value_struct_get(&v, "index", &i);
1364 * //Get the operation result 1364 * // Get the operation result
1365 * eina_value_struct_get(&v, "value", &result); 1365 * eina_value_struct_get(&v, "value", &result);
1366 * if (!i) 1366 * if (!i)
1367 * { 1367 * {
@@ -1414,7 +1414,7 @@ EAPI Eina_Promise *eina_promise_all_array(Eina_Future *array[]) EINA_ARG_NONNULL
1414 * 1414 *
1415 * futures[0] = read_file("/tmp/todo.txt"); 1415 * futures[0] = read_file("/tmp/todo.txt");
1416 * futures[1] = get_file_size("/tmp/file.txt"); 1416 * futures[1] = get_file_size("/tmp/file.txt");
1417 * //calculates 50 places of PI 1417 * // calculates 50 places of PI
1418 * futures[2] = calc_pi(50); 1418 * futures[2] = calc_pi(50);
1419 * f_race = eina_future_race_array(futures); 1419 * f_race = eina_future_race_array(futures);
1420 * eina_future_then_easy(f_race, _race_cb, _race_err, NULL, EINA_VALUE_TYPE_STRUCT, NULL); 1420 * eina_future_then_easy(f_race, _race_cb, _race_err, NULL, EINA_VALUE_TYPE_STRUCT, NULL);
@@ -1676,7 +1676,6 @@ eina_future_race_array(Eina_Future *array[])
1676 * @li #Eina_Future_Cb_Log_Desc::domain: EINA_LOG_DOMAIN_DEFAULT will be used. 1676 * @li #Eina_Future_Cb_Log_Desc::domain: EINA_LOG_DOMAIN_DEFAULT will be used.
1677 * @li #Eina_Future_Cb_Log_Desc::line: The __LINE__ macro will be used. 1677 * @li #Eina_Future_Cb_Log_Desc::line: The __LINE__ macro will be used.
1678 * 1678 *
1679 *
1680 * Usage: 1679 * Usage:
1681 * @code 1680 * @code
1682 * desc = eina_future_cb_log_info(.prefix = "prefix", .suffix = "suffix"); 1681 * desc = eina_future_cb_log_info(.prefix = "prefix", .suffix = "suffix");
@@ -1710,6 +1709,7 @@ eina_future_race_array(Eina_Future *array[])
1710 1709
1711/** 1710/**
1712 * A syntatic sugar over eina_future_then() and eina_future_cb_easy(). 1711 * A syntatic sugar over eina_future_then() and eina_future_cb_easy().
1712 *
1713 * Usage: 1713 * Usage:
1714 * @code 1714 * @code
1715 * f = eina_future_then_easy(f, .success = _success_cb, .success_type = EINA_VALUE_TYPE_DOUBLE, .data = NULL, ); 1715 * f = eina_future_then_easy(f, .success = _success_cb, .success_type = EINA_VALUE_TYPE_DOUBLE, .data = NULL, );
@@ -1723,6 +1723,7 @@ eina_future_race_array(Eina_Future *array[])
1723 1723
1724/** 1724/**
1725 * A syntatic sugar over eina_future_chain() and eina_future_cb_easy(). 1725 * A syntatic sugar over eina_future_chain() and eina_future_cb_easy().
1726 *
1726 * Usage: 1727 * Usage:
1727 * @code 1728 * @code
1728 * f = eina_future_chain_easy(f, {.success = _success_cb, .success_type = EINA_VALUE_TYPE_DOUBLE, .data = NULL}, 1729 * f = eina_future_chain_easy(f, {.success = _success_cb, .success_type = EINA_VALUE_TYPE_DOUBLE, .data = NULL},