\hypertarget{group__Eina__Future}{}\doxysection{Eina Futures}
\label{group__Eina__Future}\index{Eina Futures@{Eina Futures}}


Methods and structures dealing with \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}}.  


\doxysubsection*{Modules}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Eina__Future__Callbacks}{Eina Future Callbacks}}
\begin{DoxyCompactList}\small\item\em Methods and structures dealing with \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} callbacks. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{struct__Eina__Future__Race__Result}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Race\+\_\+\+Result}}
\begin{DoxyCompactList}\small\item\em The struct that is used to store the race result. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}}
\begin{DoxyCompactList}\small\item\em An opaque structure representing a callback to be called when a promise is fulfilled. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{struct__Eina__Future__Desc}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc}}
\begin{DoxyCompactList}\small\item\em A struct used to define a callback and data for a future. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}~((void $\ast$)(unsigned long)-\/1)
\begin{DoxyCompactList}\small\item\em Used by \mbox{\hyperlink{group__Eina__Future_ga13d85b5282b02260407c103690b2b3f4}{eina\+\_\+promise\+\_\+race\+\_\+array()}} and \mbox{\hyperlink{group__Eina__Future_ga17094a3e3dc964ef33313106041dc4e0}{eina\+\_\+promise\+\_\+all\+\_\+array()}} and friends to flag the end of the array. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_gac0bf547a87e9bea1e589e8a6e13576e7}{eina\+\_\+promise\+\_\+race}}(...)~\mbox{\hyperlink{group__Eina__Future_ga13d85b5282b02260407c103690b2b3f4}{eina\+\_\+promise\+\_\+race\+\_\+array}}((\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga13d85b5282b02260407c103690b2b3f4}{eina\+\_\+promise\+\_\+race\+\_\+array()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga6a39aa29dad9e9ba9038908758f20c32}{eina\+\_\+future\+\_\+race}}(...)~\mbox{\hyperlink{group__Eina__Future_ga2c63774e66100dc5f4b91f88f0efc5f1}{eina\+\_\+future\+\_\+race\+\_\+array}}((\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga2c63774e66100dc5f4b91f88f0efc5f1}{eina\+\_\+future\+\_\+race\+\_\+array()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga70fb993acf2af507103c0c161412767e}{eina\+\_\+future\+\_\+all}}(...)~\mbox{\hyperlink{group__Eina__Future_ga8838591bc2163cac63ba6a5180a63091}{eina\+\_\+future\+\_\+all\+\_\+array}}((\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga8838591bc2163cac63ba6a5180a63091}{eina\+\_\+future\+\_\+all\+\_\+array()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_gaeffefb72180f300a69bfd3036a16c317}{eina\+\_\+promise\+\_\+all}}(...)~\mbox{\hyperlink{group__Eina__Future_ga17094a3e3dc964ef33313106041dc4e0}{eina\+\_\+promise\+\_\+all\+\_\+array}}((\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga17094a3e3dc964ef33313106041dc4e0}{eina\+\_\+promise\+\_\+all\+\_\+array()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy}}(...)~\mbox{\hyperlink{group__Eina__Future_gaacfe9df476304cd36069907863bf12cc}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc}}((\mbox{\hyperlink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_gaacfe9df476304cd36069907863bf12cc}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain}}(\+\_\+prev, ...)~\mbox{\hyperlink{group__Eina__Future_ga5517a17a841d31ad46acf9285a709bbc}{eina\+\_\+future\+\_\+chain\+\_\+array}}(\+\_\+prev, (\mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}}\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \{.cb = NULL, .data = NULL\}\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga5517a17a841d31ad46acf9285a709bbc}{eina\+\_\+future\+\_\+chain\+\_\+array()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then}}(\+\_\+prev, ...)~\mbox{\hyperlink{group__Eina__Future_gae4c1896c7eb8b40933c7b0640c881f33}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc}}(\+\_\+prev, (\mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_gae4c1896c7eb8b40933c7b0640c881f33}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga32414cc629c2b989984394daef6f560b}{eina\+\_\+future\+\_\+cb\+\_\+console}}(...)~\mbox{\hyperlink{group__Eina__Future_gac26cdc858d6252e812b731907de744e9}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc}}((\mbox{\hyperlink{group__Eina__Future__Callbacks_gaf5fa825519a3d7f8e084aba309316bc4}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Console\+\_\+\+Desc}})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_gac26cdc858d6252e812b731907de744e9}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga14896937e5ae72ac066518d8fe4e483d}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+dbg}}(\+\_\+prefix,  \+\_\+suffix)
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga91cba9ac4306b0dee948dd3a0b10a893}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+crit}}(\+\_\+prefix,  \+\_\+suffix)
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_gade1a19f673ac90442409aba274ff0884}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+err}}(\+\_\+prefix,  \+\_\+suffix)
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_gaf3f9d1b140fa23528a74f09e78fadb09}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+info}}(\+\_\+prefix,  \+\_\+suffix)
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga8ed87813808c62045569f4e09868dbe8}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+warn}}(\+\_\+prefix,  \+\_\+suffix)
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}{eina\+\_\+future\+\_\+then\+\_\+easy}}(\+\_\+prev, ...)~\mbox{\hyperlink{group__Eina__Future_gae4c1896c7eb8b40933c7b0640c881f33}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc}}(\+\_\+prev, \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy}}(\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+))
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}} and \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga51f933135f14e6e0183af7366aa351d3}{eina\+\_\+future\+\_\+chain\+\_\+easy}}(\+\_\+prev, ...)~\mbox{\hyperlink{group__Eina__Future_ga6b072f800c651b9cdee2aebb788bf7b5}{eina\+\_\+future\+\_\+chain\+\_\+easy\+\_\+array}}(\+\_\+prev, (\mbox{\hyperlink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}}\mbox{[}$\,$\mbox{]}) \{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \{NULL, NULL, NULL, NULL, NULL\}\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}} and \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy()}}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}\label{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}} 
typedef struct \mbox{\hyperlink{struct__Eina__Future__Desc}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc}} \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}}
\begin{DoxyCompactList}\small\item\em Convenience wrapper over \mbox{\hyperlink{struct__Eina__Future__Desc}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc}}. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Future_gab8f5f0beeb1f80b16e0d58575859fe21}\label{group__Eina__Future_gab8f5f0beeb1f80b16e0d58575859fe21}} 
typedef struct \mbox{\hyperlink{struct__Eina__Future__Race__Result}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Race\+\_\+\+Result}} \mbox{\hyperlink{group__Eina__Future_gab8f5f0beeb1f80b16e0d58575859fe21}{Eina\+\_\+\+Future\+\_\+\+Race\+\_\+\+Result}}
\begin{DoxyCompactList}\small\item\em Convenience wrapper over \mbox{\hyperlink{struct__Eina__Future__Race__Result}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Race\+\_\+\+Result}}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{group__Eina__Future_ga6d7a6889b5f1a9fca02f868c484148e7}{eina\+\_\+future\+\_\+cancel}} (\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$f)
\begin{DoxyCompactList}\small\item\em Cancels a future. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eina__Future_ga1266302bb353457961d5dba13a3d617c}{eina\+\_\+future\+\_\+desc\+\_\+flush}} (\mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} $\ast$desc)
\begin{DoxyCompactList}\small\item\em Flushes an \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}}. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eina__Future_gabaea3180b463fb87c07b9cbb1fd72f27}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+desc\+\_\+flush}} (\mbox{\hyperlink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}} $\ast$desc)
\begin{DoxyCompactList}\small\item\em Flushes an \mbox{\hyperlink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} \mbox{\hyperlink{group__Eina__Future_ga6151e485fad1e3623c365d11e319d7da}{eina\+\_\+promise\+\_\+as\+\_\+value}} (\mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}} $\ast$p)
\begin{DoxyCompactList}\small\item\em Creates a new \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} from a promise. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} \mbox{\hyperlink{group__Eina__Future_ga6b3b9b94ed2b8d324fe8053a1ff8b926}{eina\+\_\+future\+\_\+as\+\_\+value}} (\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$f)
\begin{DoxyCompactList}\small\item\em Creates an \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} from a future. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$ \mbox{\hyperlink{group__Eina__Future_gaf4fee59b5faafd33965969ac35377cee}{eina\+\_\+future\+\_\+new}} (\mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}} $\ast$p)
\begin{DoxyCompactList}\small\item\em Creates a new future. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$ \mbox{\hyperlink{group__Eina__Future_gad2e4b9d0ff885ccc38cd2319d05a7274}{eina\+\_\+future\+\_\+resolved}} (\mbox{\hyperlink{group__Eina__Future__Callbacks_ga190fb0e75b86d093db85b05abfd21ebd}{Eina\+\_\+\+Future\+\_\+\+Scheduler}} $\ast$scheduler, \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} value)
\begin{DoxyCompactList}\small\item\em Creates a new future that is already resolved to a value. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$ \mbox{\hyperlink{group__Eina__Future_ga5b6ad41fa54f3705a987305d18dc3640}{eina\+\_\+future\+\_\+rejected}} (\mbox{\hyperlink{group__Eina__Future__Callbacks_ga190fb0e75b86d093db85b05abfd21ebd}{Eina\+\_\+\+Future\+\_\+\+Scheduler}} $\ast$scheduler, \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} err)
\begin{DoxyCompactList}\small\item\em Creates a new future that is already rejected to a specified error. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$ \mbox{\hyperlink{group__Eina__Future_gae4c1896c7eb8b40933c7b0640c881f33}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc}} (\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$prev, const \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} desc)
\begin{DoxyCompactList}\small\item\em Register an \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} to be used when the future is resolved/rejected. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} \mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc}} (const \mbox{\hyperlink{group__Eina__Future__Callbacks_ga6d17eda361b40db4ebaf034a993a03fe}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc}} desc)
\begin{DoxyCompactList}\small\item\em Creates an Eina\+\_\+\+Future\+\_\+\+Desc that will log the previous future resolved value. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$ \mbox{\hyperlink{group__Eina__Future_ga5517a17a841d31ad46acf9285a709bbc}{eina\+\_\+future\+\_\+chain\+\_\+array}} (\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$prev, const \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} descs\mbox{[}$\,$\mbox{]})
\begin{DoxyCompactList}\small\item\em Creates a future chain. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$ \mbox{\hyperlink{group__Eina__Future_ga6b072f800c651b9cdee2aebb788bf7b5}{eina\+\_\+future\+\_\+chain\+\_\+easy\+\_\+array}} (\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$prev, const \mbox{\hyperlink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}} descs\mbox{[}$\,$\mbox{]})
\begin{DoxyCompactList}\small\item\em Wrapper around \mbox{\hyperlink{group__Eina__Future_ga5517a17a841d31ad46acf9285a709bbc}{eina\+\_\+future\+\_\+chain\+\_\+array()}} and \mbox{\hyperlink{group__Eina__Future_gaacfe9df476304cd36069907863bf12cc}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()}} \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} \mbox{\hyperlink{group__Eina__Future_gac26cdc858d6252e812b731907de744e9}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc}} (const \mbox{\hyperlink{group__Eina__Future__Callbacks_gaf5fa825519a3d7f8e084aba309316bc4}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Console\+\_\+\+Desc}} desc)
\begin{DoxyCompactList}\small\item\em Creates an \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} that will print the previous future\textquotesingle{}s resolved value. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} \mbox{\hyperlink{group__Eina__Future_gae9e287741f9aa10b83dc33854e5290b6}{eina\+\_\+future\+\_\+cb\+\_\+ignore\+\_\+error}} (\mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} err)
\begin{DoxyCompactList}\small\item\em Returns an \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} that ignores an error. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} \mbox{\hyperlink{group__Eina__Future_gaf122d123c6bef58a2f01dbdefab2b19b}{eina\+\_\+future\+\_\+cb\+\_\+convert\+\_\+to}} (const \mbox{\hyperlink{group__Eina__Value__Group_gaab67ab8bcd0624280c5276044b07e0d2}{Eina\+\_\+\+Value\+\_\+\+Type}} $\ast$type)
\begin{DoxyCompactList}\small\item\em Creates an \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} which will convert the received eina value to a given type. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} \mbox{\hyperlink{group__Eina__Future_gaacfe9df476304cd36069907863bf12cc}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc}} (const \mbox{\hyperlink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}} desc)
\begin{DoxyCompactList}\small\item\em Creates an \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} based on an \mbox{\hyperlink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}} $\ast$ \mbox{\hyperlink{group__Eina__Future_ga17094a3e3dc964ef33313106041dc4e0}{eina\+\_\+promise\+\_\+all\+\_\+array}} (\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$array\mbox{[}$\,$\mbox{]})
\begin{DoxyCompactList}\small\item\em Creates an all promise. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}} $\ast$ \mbox{\hyperlink{group__Eina__Future_ga9e9650a22f52923a868930412ce4175f}{eina\+\_\+promise\+\_\+all\+\_\+iterator}} (\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$iterator)
\begin{DoxyCompactList}\small\item\em Creates an all promise from an iterator. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}} $\ast$ \mbox{\hyperlink{group__Eina__Future_ga13d85b5282b02260407c103690b2b3f4}{eina\+\_\+promise\+\_\+race\+\_\+array}} (\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$array\mbox{[}$\,$\mbox{]})
\begin{DoxyCompactList}\small\item\em Creates a race promise. \end{DoxyCompactList}\item 
static \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$ \mbox{\hyperlink{group__Eina__Future_ga8838591bc2163cac63ba6a5180a63091}{eina\+\_\+future\+\_\+all\+\_\+array}} (\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$array\mbox{[}$\,$\mbox{]})
\begin{DoxyCompactList}\small\item\em Creates a future that will be resolved once all futures from {\ttfamily array} is resolved. \end{DoxyCompactList}\item 
static \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$ \mbox{\hyperlink{group__Eina__Future_ga61a6e122fed95d236ea4170dad293dd3}{eina\+\_\+future\+\_\+all\+\_\+iterator}} (\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$iterator)
\begin{DoxyCompactList}\small\item\em Creates a future that will be resolved once all futures from {\ttfamily iterator} are resolved. \end{DoxyCompactList}\item 
static \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$ \mbox{\hyperlink{group__Eina__Future_ga2c63774e66100dc5f4b91f88f0efc5f1}{eina\+\_\+future\+\_\+race\+\_\+array}} (\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$array\mbox{[}$\,$\mbox{]})
\begin{DoxyCompactList}\small\item\em Creates a future that will be resolved once a future {\ttfamily array} is resolved. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
const \mbox{\hyperlink{group__Eina__Value__Struct__Group_ga69bcc1965b7b57ef713b0370d10f593d}{Eina\+\_\+\+Value\+\_\+\+Struct\+\_\+\+Desc}} $\ast$ \mbox{\hyperlink{group__Eina__Future_ga8b2461685ba3e12305bd69730a83dbcb}{EINA\+\_\+\+PROMISE\+\_\+\+RACE\+\_\+\+STRUCT\+\_\+\+DESC}}
\begin{DoxyCompactList}\small\item\em A pointer to the race struct description, which is used by \mbox{\hyperlink{group__Eina__Future_ga13d85b5282b02260407c103690b2b3f4}{eina\+\_\+promise\+\_\+race\+\_\+array()}}. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Methods and structures dealing with \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}}. 



\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}\label{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}} 
\index{Eina Futures@{Eina Futures}!EINA\_FUTURE\_SENTINEL@{EINA\_FUTURE\_SENTINEL}}
\index{EINA\_FUTURE\_SENTINEL@{EINA\_FUTURE\_SENTINEL}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{EINA\_FUTURE\_SENTINEL}{EINA\_FUTURE\_SENTINEL}}
{\footnotesize\ttfamily \#define EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL~((void $\ast$)(unsigned long)-\/1)}



Used by \mbox{\hyperlink{group__Eina__Future_ga13d85b5282b02260407c103690b2b3f4}{eina\+\_\+promise\+\_\+race\+\_\+array()}} and \mbox{\hyperlink{group__Eina__Future_ga17094a3e3dc964ef33313106041dc4e0}{eina\+\_\+promise\+\_\+all\+\_\+array()}} and friends to flag the end of the array. 

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga13d85b5282b02260407c103690b2b3f4}{eina\+\_\+promise\+\_\+race\+\_\+array()}} 

\mbox{\hyperlink{group__Eina__Future_ga17094a3e3dc964ef33313106041dc4e0}{eina\+\_\+promise\+\_\+all\+\_\+array()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_gac0bf547a87e9bea1e589e8a6e13576e7}\label{group__Eina__Future_gac0bf547a87e9bea1e589e8a6e13576e7}} 
\index{Eina Futures@{Eina Futures}!eina\_promise\_race@{eina\_promise\_race}}
\index{eina\_promise\_race@{eina\_promise\_race}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_promise\_race}{eina\_promise\_race}}
{\footnotesize\ttfamily \#define eina\+\_\+promise\+\_\+race(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_ga13d85b5282b02260407c103690b2b3f4}{eina\+\_\+promise\+\_\+race\+\_\+array}}((\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}\})}



A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga13d85b5282b02260407c103690b2b3f4}{eina\+\_\+promise\+\_\+race\+\_\+array()}}. 

Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{promise = \mbox{\hyperlink{group__Eina__Future_gac0bf547a87e9bea1e589e8a6e13576e7}{eina\_promise\_race}}(future1, future2, future3, future4);}

\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga13d85b5282b02260407c103690b2b3f4}{eina\+\_\+promise\+\_\+race\+\_\+array()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga6a39aa29dad9e9ba9038908758f20c32}\label{group__Eina__Future_ga6a39aa29dad9e9ba9038908758f20c32}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_race@{eina\_future\_race}}
\index{eina\_future\_race@{eina\_future\_race}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_race}{eina\_future\_race}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+race(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_ga2c63774e66100dc5f4b91f88f0efc5f1}{eina\+\_\+future\+\_\+race\+\_\+array}}((\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}\})}



A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga2c63774e66100dc5f4b91f88f0efc5f1}{eina\+\_\+future\+\_\+race\+\_\+array()}}. 

Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{future = \mbox{\hyperlink{group__Eina__Future_ga6a39aa29dad9e9ba9038908758f20c32}{eina\_future\_race}}(future1, future2, future3, future4);}

\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga2c63774e66100dc5f4b91f88f0efc5f1}{eina\+\_\+future\+\_\+race\+\_\+array()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga70fb993acf2af507103c0c161412767e}\label{group__Eina__Future_ga70fb993acf2af507103c0c161412767e}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_all@{eina\_future\_all}}
\index{eina\_future\_all@{eina\_future\_all}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_all}{eina\_future\_all}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+all(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_ga8838591bc2163cac63ba6a5180a63091}{eina\+\_\+future\+\_\+all\+\_\+array}}((\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}\})}



A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga8838591bc2163cac63ba6a5180a63091}{eina\+\_\+future\+\_\+all\+\_\+array()}}. 

Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{future = \mbox{\hyperlink{group__Eina__Future_ga70fb993acf2af507103c0c161412767e}{eina\_future\_all}}(future1, future2, future3, future4);}

\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga8838591bc2163cac63ba6a5180a63091}{eina\+\_\+future\+\_\+all\+\_\+array()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_gaeffefb72180f300a69bfd3036a16c317}\label{group__Eina__Future_gaeffefb72180f300a69bfd3036a16c317}} 
\index{Eina Futures@{Eina Futures}!eina\_promise\_all@{eina\_promise\_all}}
\index{eina\_promise\_all@{eina\_promise\_all}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_promise\_all}{eina\_promise\_all}}
{\footnotesize\ttfamily \#define eina\+\_\+promise\+\_\+all(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_ga17094a3e3dc964ef33313106041dc4e0}{eina\+\_\+promise\+\_\+all\+\_\+array}}((\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}\})}



A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga17094a3e3dc964ef33313106041dc4e0}{eina\+\_\+promise\+\_\+all\+\_\+array()}}. 

Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{promise = \mbox{\hyperlink{group__Eina__Future_gaeffefb72180f300a69bfd3036a16c317}{eina\_promise\_all}}(future1, future2, future3, future4);}

\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga17094a3e3dc964ef33313106041dc4e0}{eina\+\_\+promise\+\_\+all\+\_\+array()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}\label{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_cb\_easy@{eina\_future\_cb\_easy}}
\index{eina\_future\_cb\_easy@{eina\_future\_cb\_easy}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_easy}{eina\_future\_cb\_easy}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+cb\+\_\+easy(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_gaacfe9df476304cd36069907863bf12cc}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc}}((\mbox{\hyperlink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+\})}



A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_gaacfe9df476304cd36069907863bf12cc}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()}}. 

Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{future\_desc = \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\_future\_cb\_easy}}(\_success\_cb, \_error\_cb, \_free\_cb, \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}}, my\_data);}

\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_gaacfe9df476304cd36069907863bf12cc}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}\label{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_chain@{eina\_future\_chain}}
\index{eina\_future\_chain@{eina\_future\_chain}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_chain}{eina\_future\_chain}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+chain(\begin{DoxyParamCaption}\item[{}]{\+\_\+prev,  }\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_ga5517a17a841d31ad46acf9285a709bbc}{eina\+\_\+future\+\_\+chain\+\_\+array}}(\+\_\+prev, (\mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}}\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \{.cb = NULL, .data = NULL\}\})}



A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga5517a17a841d31ad46acf9285a709bbc}{eina\+\_\+future\+\_\+chain\+\_\+array()}}. 

Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{future = \mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\_future\_chain}}(future, \{.cb = \_my\_cb, .data = my\_data\}, \{.cb = \_my\_another\_cb, .data = NULL\});}

\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga5517a17a841d31ad46acf9285a709bbc}{eina\+\_\+future\+\_\+chain\+\_\+array()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}\label{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_then@{eina\_future\_then}}
\index{eina\_future\_then@{eina\_future\_then}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_then}{eina\_future\_then}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+then(\begin{DoxyParamCaption}\item[{}]{\+\_\+prev,  }\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_gae4c1896c7eb8b40933c7b0640c881f33}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc}}(\+\_\+prev, (\mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+\})}



A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_gae4c1896c7eb8b40933c7b0640c881f33}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()}}. 

Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{future = \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\_future\_then}}(future, \_my\_cb, my\_data);}

\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_gae4c1896c7eb8b40933c7b0640c881f33}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()}} 

\mbox{\hyperlink{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}{eina\+\_\+future\+\_\+then\+\_\+easy()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga32414cc629c2b989984394daef6f560b}\label{group__Eina__Future_ga32414cc629c2b989984394daef6f560b}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_cb\_console@{eina\_future\_cb\_console}}
\index{eina\_future\_cb\_console@{eina\_future\_cb\_console}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_console}{eina\_future\_cb\_console}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+cb\+\_\+console(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_gac26cdc858d6252e812b731907de744e9}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc}}((\mbox{\hyperlink{group__Eina__Future__Callbacks_gaf5fa825519a3d7f8e084aba309316bc4}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Console\+\_\+\+Desc}})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+\})}



A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_gac26cdc858d6252e812b731907de744e9}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc()}}. 

Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{desc = \mbox{\hyperlink{group__Eina__Future_ga32414cc629c2b989984394daef6f560b}{eina\_future\_cb\_console}}(.prefix = \textcolor{stringliteral}{"{}prefix"{}}, .suffix = \textcolor{stringliteral}{"{}suffix"{}});}

\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_gac26cdc858d6252e812b731907de744e9}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga14896937e5ae72ac066518d8fe4e483d}\label{group__Eina__Future_ga14896937e5ae72ac066518d8fe4e483d}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_cb\_log\_dbg@{eina\_future\_cb\_log\_dbg}}
\index{eina\_future\_cb\_log\_dbg@{eina\_future\_cb\_log\_dbg}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_log\_dbg}{eina\_future\_cb\_log\_dbg}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+dbg(\begin{DoxyParamCaption}\item[{}]{\+\_\+prefix,  }\item[{}]{\+\_\+suffix }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{  \mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\_future\_cb\_log\_from\_desc}}((\mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc}{Eina\_Future\_Cb\_Log\_Desc}})\{\_prefix, \_suffix, \_\_FILE\_\_, \(\backslash\)}
\DoxyCodeLine{         \_\_func\_\_, \mbox{\hyperlink{group__Eina__Log__Group_gga326699509b2e7578ace7c0a15b4a8c1aafdc5a5cfb78f5e4d5851447ed798af50}{EINA\_LOG\_LEVEL\_DBG}}, \mbox{\hyperlink{group__Eina__Log__Group_ga41d6e3b51ce5f50ef403428776a02626}{EINA\_LOG\_DOMAIN\_DEFAULT}}, \_\_LINE\_\_\})}

\end{DoxyCode}


A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}}. 

This macro will set the following fields of the \mbox{\hyperlink{group__Eina__Future__Callbacks_ga6d17eda361b40db4ebaf034a993a03fe}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc}}\+:

\begin{DoxyItemize}
\item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2b5cdedfc4bcd383d341fc9bb816fb46}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file}}\+: The {\ttfamily \+\_\+\+\_\+\+FILE\+\_\+\+\_\+} function will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ac40ef8a65fbdec71615d6327b588f135}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func}}\+: The {\ttfamily \+\_\+\+\_\+func\+\_\+\+\_\+} macro will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a160bbd8d35b40b00d0ef41d9d283101c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level}}\+: {\ttfamily EINA\+\_\+\+LOG\+\_\+\+LEVEL\+\_\+\+DBG} will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ae20c3c17ec8f6c62b5041d26b6b17b8c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain}}\+: {\ttfamily EINA\+\_\+\+LOG\+\_\+\+DOMAIN\+\_\+\+DEFAULT} will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2cab78b0d653b250d7b68f8ffb848c5a}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::line}}\+: The {\ttfamily \+\_\+\+\_\+\+LINE\+\_\+\+\_\+} macro will be used.\end{DoxyItemize}
Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{desc = \mbox{\hyperlink{group__Eina__Future_ga14896937e5ae72ac066518d8fe4e483d}{eina\_future\_cb\_log\_dbg}}(.prefix = \textcolor{stringliteral}{"{}prefix"{}}, .suffix = \textcolor{stringliteral}{"{}suffix"{}});}

\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga91cba9ac4306b0dee948dd3a0b10a893}\label{group__Eina__Future_ga91cba9ac4306b0dee948dd3a0b10a893}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_cb\_log\_crit@{eina\_future\_cb\_log\_crit}}
\index{eina\_future\_cb\_log\_crit@{eina\_future\_cb\_log\_crit}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_log\_crit}{eina\_future\_cb\_log\_crit}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+crit(\begin{DoxyParamCaption}\item[{}]{\+\_\+prefix,  }\item[{}]{\+\_\+suffix }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{  \mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\_future\_cb\_log\_from\_desc}}((\mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc}{Eina\_Future\_Cb\_Log\_Desc}})\{\_prefix, \_suffix, \_\_FILE\_\_, \(\backslash\)}
\DoxyCodeLine{         \_\_func\_\_, \mbox{\hyperlink{group__Eina__Log__Group_gga326699509b2e7578ace7c0a15b4a8c1aa620ee82716c2c262ad2929823cf24ebd}{EINA\_LOG\_LEVEL\_CRITICAL}}, \mbox{\hyperlink{group__Eina__Log__Group_ga41d6e3b51ce5f50ef403428776a02626}{EINA\_LOG\_DOMAIN\_DEFAULT}}, \_\_LINE\_\_\})}

\end{DoxyCode}


A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}}. 

This macro will set the following fields of the Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+:

\begin{DoxyItemize}
\item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2b5cdedfc4bcd383d341fc9bb816fb46}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file}}\+: The {\bfseries{FILE}} function will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ac40ef8a65fbdec71615d6327b588f135}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func}}\+: The {\bfseries{func}} macro will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a160bbd8d35b40b00d0ef41d9d283101c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level}}\+: EINA\+\_\+\+LOG\+\_\+\+LEVEL\+\_\+\+CRITICAL will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ae20c3c17ec8f6c62b5041d26b6b17b8c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain}}\+: EINA\+\_\+\+LOG\+\_\+\+DOMAIN\+\_\+\+DEFAULT will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2cab78b0d653b250d7b68f8ffb848c5a}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::line}}\+: The {\bfseries{LINE}} macro will be used.\end{DoxyItemize}
Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{desc = \mbox{\hyperlink{group__Eina__Future_ga91cba9ac4306b0dee948dd3a0b10a893}{eina\_future\_cb\_log\_crit}}(.prefix = \textcolor{stringliteral}{"{}prefix"{}}, .suffix = \textcolor{stringliteral}{"{}suffix"{}});}

\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_gade1a19f673ac90442409aba274ff0884}\label{group__Eina__Future_gade1a19f673ac90442409aba274ff0884}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_cb\_log\_err@{eina\_future\_cb\_log\_err}}
\index{eina\_future\_cb\_log\_err@{eina\_future\_cb\_log\_err}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_log\_err}{eina\_future\_cb\_log\_err}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+err(\begin{DoxyParamCaption}\item[{}]{\+\_\+prefix,  }\item[{}]{\+\_\+suffix }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{  \mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\_future\_cb\_log\_from\_desc}}((\mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc}{Eina\_Future\_Cb\_Log\_Desc}})\{\_prefix, \_suffix, \_\_FILE\_\_, \(\backslash\)}
\DoxyCodeLine{         \_\_func\_\_, \mbox{\hyperlink{group__Eina__Log__Group_gga326699509b2e7578ace7c0a15b4a8c1aa8252243003214c2e38a3b228fc85eb80}{EINA\_LOG\_LEVEL\_ERR}}, \mbox{\hyperlink{group__Eina__Log__Group_ga41d6e3b51ce5f50ef403428776a02626}{EINA\_LOG\_DOMAIN\_DEFAULT}}, \_\_LINE\_\_\})}

\end{DoxyCode}


A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}}. 

This macro will set the following fields of the Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+:

\begin{DoxyItemize}
\item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2b5cdedfc4bcd383d341fc9bb816fb46}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file}}\+: The {\bfseries{FILE}} function will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ac40ef8a65fbdec71615d6327b588f135}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func}}\+: The {\bfseries{func}} macro will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a160bbd8d35b40b00d0ef41d9d283101c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level}}\+: EINA\+\_\+\+LOG\+\_\+\+LEVEL\+\_\+\+ERR will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ae20c3c17ec8f6c62b5041d26b6b17b8c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain}}\+: EINA\+\_\+\+LOG\+\_\+\+DOMAIN\+\_\+\+DEFAULT will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2cab78b0d653b250d7b68f8ffb848c5a}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::line}}\+: The {\bfseries{LINE}} macro will be used.\end{DoxyItemize}
Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{desc = \mbox{\hyperlink{group__Eina__Future_gade1a19f673ac90442409aba274ff0884}{eina\_future\_cb\_log\_err}}(.prefix = \textcolor{stringliteral}{"{}prefix"{}}, .suffix = \textcolor{stringliteral}{"{}suffix"{}});}

\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_gaf3f9d1b140fa23528a74f09e78fadb09}\label{group__Eina__Future_gaf3f9d1b140fa23528a74f09e78fadb09}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_cb\_log\_info@{eina\_future\_cb\_log\_info}}
\index{eina\_future\_cb\_log\_info@{eina\_future\_cb\_log\_info}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_log\_info}{eina\_future\_cb\_log\_info}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+info(\begin{DoxyParamCaption}\item[{}]{\+\_\+prefix,  }\item[{}]{\+\_\+suffix }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{  \mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\_future\_cb\_log\_from\_desc}}((\mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc}{Eina\_Future\_Cb\_Log\_Desc}})\{\_prefix, \_suffix, \_\_FILE\_\_, \(\backslash\)}
\DoxyCodeLine{         \_\_func\_\_, \mbox{\hyperlink{group__Eina__Log__Group_gga326699509b2e7578ace7c0a15b4a8c1aa0368139789af856a6ad9bbe4f21d195f}{EINA\_LOG\_LEVEL\_INFO}}, \mbox{\hyperlink{group__Eina__Log__Group_ga41d6e3b51ce5f50ef403428776a02626}{EINA\_LOG\_DOMAIN\_DEFAULT}}, \_\_LINE\_\_\})}

\end{DoxyCode}


A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}}. 

This macro will set the following fields of the Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+:

\begin{DoxyItemize}
\item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2b5cdedfc4bcd383d341fc9bb816fb46}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file}}\+: The {\bfseries{FILE}} function will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ac40ef8a65fbdec71615d6327b588f135}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func}}\+: The {\bfseries{func}} macro will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a160bbd8d35b40b00d0ef41d9d283101c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level}}\+: EINA\+\_\+\+LOG\+\_\+\+LEVEL\+\_\+\+INFO will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ae20c3c17ec8f6c62b5041d26b6b17b8c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain}}\+: EINA\+\_\+\+LOG\+\_\+\+DOMAIN\+\_\+\+DEFAULT will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2cab78b0d653b250d7b68f8ffb848c5a}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::line}}\+: The {\bfseries{LINE}} macro will be used.\end{DoxyItemize}
Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{desc = \mbox{\hyperlink{group__Eina__Future_gaf3f9d1b140fa23528a74f09e78fadb09}{eina\_future\_cb\_log\_info}}(.prefix = \textcolor{stringliteral}{"{}prefix"{}}, .suffix = \textcolor{stringliteral}{"{}suffix"{}});}

\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga8ed87813808c62045569f4e09868dbe8}\label{group__Eina__Future_ga8ed87813808c62045569f4e09868dbe8}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_cb\_log\_warn@{eina\_future\_cb\_log\_warn}}
\index{eina\_future\_cb\_log\_warn@{eina\_future\_cb\_log\_warn}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_log\_warn}{eina\_future\_cb\_log\_warn}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+warn(\begin{DoxyParamCaption}\item[{}]{\+\_\+prefix,  }\item[{}]{\+\_\+suffix }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{  \mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\_future\_cb\_log\_from\_desc}}((\mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc}{Eina\_Future\_Cb\_Log\_Desc}})\{\_prefix, \_suffix, \_\_FILE\_\_, \(\backslash\)}
\DoxyCodeLine{         \_\_func\_\_, \mbox{\hyperlink{group__Eina__Log__Group_gga326699509b2e7578ace7c0a15b4a8c1aae6fda047b87c6d22a23cbb7143dd2fe8}{EINA\_LOG\_LEVEL\_WARN}}, \mbox{\hyperlink{group__Eina__Log__Group_ga41d6e3b51ce5f50ef403428776a02626}{EINA\_LOG\_DOMAIN\_DEFAULT}}, \_\_LINE\_\_\})}

\end{DoxyCode}


A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}}. 

This macro will set the following fields of the Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+:

\begin{DoxyItemize}
\item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2b5cdedfc4bcd383d341fc9bb816fb46}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file}}\+: The {\bfseries{FILE}} function will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ac40ef8a65fbdec71615d6327b588f135}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func}}\+: The {\bfseries{func}} macro will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a160bbd8d35b40b00d0ef41d9d283101c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level}}\+: EINA\+\_\+\+LOG\+\_\+\+LEVEL\+\_\+\+WARN will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ae20c3c17ec8f6c62b5041d26b6b17b8c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain}}\+: EINA\+\_\+\+LOG\+\_\+\+DOMAIN\+\_\+\+DEFAULT will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2cab78b0d653b250d7b68f8ffb848c5a}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::line}}\+: The {\bfseries{LINE}} macro will be used.\end{DoxyItemize}
Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{desc = \mbox{\hyperlink{group__Eina__Future_ga8ed87813808c62045569f4e09868dbe8}{eina\_future\_cb\_log\_warn}}(.prefix = \textcolor{stringliteral}{"{}prefix"{}}, .suffix = \textcolor{stringliteral}{"{}suffix"{}});}

\end{DoxyCode}
 
\begin{DoxyParams}{Parameters}
{\em \+\_\+prefix} & PREFIX \\
\hline
{\em \+\_\+suffix} & SUFFIX \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
SOMETHING 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}\label{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_then\_easy@{eina\_future\_then\_easy}}
\index{eina\_future\_then\_easy@{eina\_future\_then\_easy}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_then\_easy}{eina\_future\_then\_easy}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+then\+\_\+easy(\begin{DoxyParamCaption}\item[{}]{\+\_\+prev,  }\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_gae4c1896c7eb8b40933c7b0640c881f33}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc}}(\+\_\+prev, \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy}}(\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+))}



A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}} and \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy()}}. 

Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{f = \mbox{\hyperlink{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}{eina\_future\_then\_easy}}(f, .success = \_success\_cb, .success\_type = \mbox{\hyperlink{group__Eina__Value__Group_ga959961fb03cd94a84ab469245c543732}{EINA\_VALUE\_TYPE\_DOUBLE}}, .data = NULL, );}

\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_gae4c1896c7eb8b40933c7b0640c881f33}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()}} 

eina\+\_\+future\+\_\+easy() 

\mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}} 

\mbox{\hyperlink{group__Eina__Future_gaacfe9df476304cd36069907863bf12cc}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga51f933135f14e6e0183af7366aa351d3}\label{group__Eina__Future_ga51f933135f14e6e0183af7366aa351d3}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_chain\_easy@{eina\_future\_chain\_easy}}
\index{eina\_future\_chain\_easy@{eina\_future\_chain\_easy}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_chain\_easy}{eina\_future\_chain\_easy}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+chain\+\_\+easy(\begin{DoxyParamCaption}\item[{}]{\+\_\+prev,  }\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_ga6b072f800c651b9cdee2aebb788bf7b5}{eina\+\_\+future\+\_\+chain\+\_\+easy\+\_\+array}}(\+\_\+prev, (\mbox{\hyperlink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}}\mbox{[}$\,$\mbox{]}) \{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \{NULL, NULL, NULL, NULL, NULL\}\})}



A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}} and \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy()}}. 

Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{f = \mbox{\hyperlink{group__Eina__Future_ga51f933135f14e6e0183af7366aa351d3}{eina\_future\_chain\_easy}}(f, \{.success = \_success\_cb, .success\_type = \mbox{\hyperlink{group__Eina__Value__Group_ga959961fb03cd94a84ab469245c543732}{EINA\_VALUE\_TYPE\_DOUBLE}}, .data = NULL\},}
\DoxyCodeLine{                              \{ .success = \_success2\_cb \}, \{.error = error\_cb\});}

\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga5517a17a841d31ad46acf9285a709bbc}{eina\+\_\+future\+\_\+chain\+\_\+array()}} 

eina\+\_\+future\+\_\+easy() 

\mbox{\hyperlink{group__Eina__Future_ga6b072f800c651b9cdee2aebb788bf7b5}{eina\+\_\+future\+\_\+chain\+\_\+easy\+\_\+array()}} 

\mbox{\hyperlink{group__Eina__Future_gaacfe9df476304cd36069907863bf12cc}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Eina__Future_ga6d7a6889b5f1a9fca02f868c484148e7}\label{group__Eina__Future_ga6d7a6889b5f1a9fca02f868c484148e7}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_cancel@{eina\_future\_cancel}}
\index{eina\_future\_cancel@{eina\_future\_cancel}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cancel()}{eina\_future\_cancel()}}
{\footnotesize\ttfamily void eina\+\_\+future\+\_\+cancel (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$}]{f }\end{DoxyParamCaption})}



Cancels a future. 

This function will cancel the whole future chain immediately (it will not be schedule to the next mainloop pass) and it will also cancel the promise linked against it. The \mbox{\hyperlink{group__Eina__Future__Callbacks_ga43d2d4c20a2f7aee2a25ada34a9cc675}{Eina\+\_\+\+Future\+\_\+\+Cb}} will be called with an \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} typed as \mbox{\hyperlink{group__Eina__Value__Group_gace284ef9f3063e831b66f04638c7f465}{EINA\+\_\+\+VALUE\+\_\+\+TYPE\+\_\+\+ERROR}}, with its value set to {\ttfamily ECANCELED} 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em f} & The future to cancel. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__Eina__Future_ga1266302bb353457961d5dba13a3d617c}\label{group__Eina__Future_ga1266302bb353457961d5dba13a3d617c}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_desc\_flush@{eina\_future\_desc\_flush}}
\index{eina\_future\_desc\_flush@{eina\_future\_desc\_flush}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_desc\_flush()}{eina\_future\_desc\_flush()}}
{\footnotesize\ttfamily void eina\+\_\+future\+\_\+desc\+\_\+flush (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} $\ast$}]{desc }\end{DoxyParamCaption})}



Flushes an \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}}. 

This function is mainly used by bindings to flush an \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}}. It will call the \mbox{\hyperlink{group__Eina__Future__Callbacks_ga43d2d4c20a2f7aee2a25ada34a9cc675}{Eina\+\_\+\+Future\+\_\+\+Cb}} with {\ttfamily ENOMEM} and zero the {\ttfamily desc} contents.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em desc} & The \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} to flush, if {\ttfamily NULL} this is a noop. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__Eina__Future_gabaea3180b463fb87c07b9cbb1fd72f27}\label{group__Eina__Future_gabaea3180b463fb87c07b9cbb1fd72f27}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_cb\_easy\_desc\_flush@{eina\_future\_cb\_easy\_desc\_flush}}
\index{eina\_future\_cb\_easy\_desc\_flush@{eina\_future\_cb\_easy\_desc\_flush}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_easy\_desc\_flush()}{eina\_future\_cb\_easy\_desc\_flush()}}
{\footnotesize\ttfamily void eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+desc\+\_\+flush (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}} $\ast$}]{desc }\end{DoxyParamCaption})}



Flushes an \mbox{\hyperlink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}}. 

This function is mainly used by bindings to flush an \mbox{\hyperlink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}}. It will call the \mbox{\hyperlink{group__Eina__Future__Callbacks_ga88b867eea465fb367d4974d9cf8d3866}{Eina\+\_\+\+Future\+\_\+\+Error\+\_\+\+Cb}} with {\ttfamily ENOMEM}, the \mbox{\hyperlink{group__Eina__Future__Callbacks_ga3e4a9200b8e67906bf1b1514bc0d93ff}{Eina\+\_\+\+Future\+\_\+\+Free\+\_\+\+Cb}} and zero the {\ttfamily desc} contents.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em desc} & The \mbox{\hyperlink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}} to flush, if {\ttfamily NULL} this is a noop. \\
\hline
\end{DoxyParams}


References \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::data, eina\+\_\+value\+\_\+flush(), \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::error, and \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::free.

\mbox{\Hypertarget{group__Eina__Future_ga6151e485fad1e3623c365d11e319d7da}\label{group__Eina__Future_ga6151e485fad1e3623c365d11e319d7da}} 
\index{Eina Futures@{Eina Futures}!eina\_promise\_as\_value@{eina\_promise\_as\_value}}
\index{eina\_promise\_as\_value@{eina\_promise\_as\_value}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_promise\_as\_value()}{eina\_promise\_as\_value()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} eina\+\_\+promise\+\_\+as\+\_\+value (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}} $\ast$}]{p }\end{DoxyParamCaption})}



Creates a new \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} from a promise. 

This function creates a new \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} that will store an \mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}} in it. This function is useful for dealing with promises inside an \mbox{\hyperlink{group__Eina__Future__Callbacks_ga43d2d4c20a2f7aee2a25ada34a9cc675}{Eina\+\_\+\+Future\+\_\+\+Cb}}. By returning a promise inside the \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} the whole chain will wait until the promise is resolved in order to continue its execution. Example\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}}}
\DoxyCodeLine{\_file\_data\_ready(\textcolor{keyword}{const} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \textcolor{keyword}{const} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}} v, \textcolor{keyword}{const} \mbox{\hyperlink{structEina__Future}{Eina\_Future}} *dead \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *file\_data;}
\DoxyCodeLine{   \mbox{\hyperlink{structEina__Promise}{Eina\_Promise}} *p;}
\DoxyCodeLine{   \textcolor{comment}{// It was not possible to fetch the file size.}}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (v.type == \mbox{\hyperlink{group__Eina__Value__Group_ga28f6fb160baf3068e7c67ffba0a29c20}{EINA\_VALUE\_TYPE\_ERROR}})}
\DoxyCodeLine{   \{}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\_Error}} err;}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&err);}
\DoxyCodeLine{      fprintf(stderr, \textcolor{stringliteral}{"{}Could not get the file data. Reason: \%s\(\backslash\)n"{}}, \mbox{\hyperlink{group__Eina__Error__Group_ga54953b3f118ad981cb27ef3ac3d77b17}{eina\_error\_msg\_get}}(err));}
\DoxyCodeLine{      \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();}
\DoxyCodeLine{      \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{   \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (v.type != \mbox{\hyperlink{group__Eina__Value__Group_ga916f76c8d5ffd4c3ee3c322a54efd0b7}{EINA\_VALUE\_TYPE\_STRING}})}
\DoxyCodeLine{   \{}
\DoxyCodeLine{     fprintf(stderr, \textcolor{stringliteral}{"{}Expecting type '\%s' -\/ received '\%s'\(\backslash\)n"{}}, \mbox{\hyperlink{group__Eina__Value__Group_ga916f76c8d5ffd4c3ee3c322a54efd0b7}{EINA\_VALUE\_TYPE\_STRING}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}}, v.type-\/>name);}
\DoxyCodeLine{     \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();}
\DoxyCodeLine{     \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{   \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&file\_data);}
\DoxyCodeLine{   \textcolor{comment}{// count\_words will count the words in the background and resolve the promise once it is over...}}
\DoxyCodeLine{   p = count\_words(file\_data);}
\DoxyCodeLine{   \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Future_ga6151e485fad1e3623c365d11e319d7da}{eina\_promise\_as\_value}}(p);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}}}
\DoxyCodeLine{\_word\_count\_ready(\textcolor{keyword}{const} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \textcolor{keyword}{const} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}} v, \textcolor{keyword}{const} \mbox{\hyperlink{structEina__Future}{Eina\_Future}} *dead \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{comment}{// The \_word\_count\_ready will only be called once count\_words() resolves/rejects the promise returned by \_file\_data\_ready()}}
\DoxyCodeLine{   \textcolor{keywordtype}{int} count;}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (v.type == \mbox{\hyperlink{group__Eina__Value__Group_ga28f6fb160baf3068e7c67ffba0a29c20}{EINA\_VALUE\_TYPE\_ERROR}})}
\DoxyCodeLine{   \{}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\_Error}} err;}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&err);}
\DoxyCodeLine{      fprintf(stderr, \textcolor{stringliteral}{"{}Could not count the file words. Reason: \%s\(\backslash\)n"{}}, \mbox{\hyperlink{group__Eina__Error__Group_ga54953b3f118ad981cb27ef3ac3d77b17}{eina\_error\_msg\_get}}(err));}
\DoxyCodeLine{      \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();}
\DoxyCodeLine{      \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{   \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (v.type != \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}})}
\DoxyCodeLine{   \{}
\DoxyCodeLine{     fprintf(stderr, \textcolor{stringliteral}{"{}Expecting type '\%s' -\/ received '\%s'\(\backslash\)n"{}}, \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}}, v.type-\/>name);}
\DoxyCodeLine{     \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();}
\DoxyCodeLine{     \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{   \}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&count);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}File word count \%d\(\backslash\)n"{}}, count);}
\DoxyCodeLine{   \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void}}
\DoxyCodeLine{file\_operation(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{structEina__Future}{Eina\_Future}} *f = get\_file\_data(\textcolor{stringliteral}{"{}/MyFile.txt"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\_future\_chain}}(f, \{.cb = \_file\_data\_ready, .data = NULL\},}
\DoxyCodeLine{                        \{.cb = \_word\_count\_ready, .data = NULL\});}
\DoxyCodeLine{\}}

\end{DoxyCode}



\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em p} & The promise object to wrap in a value. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
An \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}}. On error the value\textquotesingle{}s type will be {\ttfamily NULL}.
\end{DoxyReturn}
\begin{DoxyNote}{Note}
If an error happens the promise will be CANCELED. 
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga6b3b9b94ed2b8d324fe8053a1ff8b926}{eina\+\_\+future\+\_\+as\+\_\+value()}} 

\mbox{\hyperlink{group__Eina__Promise_ga215b6ba47e18087e2bd99b87312ff393}{eina\+\_\+promise\+\_\+reject()}} 

\mbox{\hyperlink{group__Eina__Promise_gab5d3ac1b6d4e58a1da5d9e14b77f4c97}{eina\+\_\+promise\+\_\+resolve()}} 
\end{DoxySeeAlso}


References DBG, EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+FALSE\+\_\+\+GOTO, EINA\+\_\+\+VALUE\+\_\+\+EMPTY, eina\+\_\+value\+\_\+flush(), eina\+\_\+value\+\_\+pset(), eina\+\_\+value\+\_\+setup(), and EINA\+\_\+\+VALUE\+\_\+\+TYPE\+\_\+\+PROMISE.



Referenced by eina\+\_\+future\+\_\+as\+\_\+value().

\mbox{\Hypertarget{group__Eina__Future_ga6b3b9b94ed2b8d324fe8053a1ff8b926}\label{group__Eina__Future_ga6b3b9b94ed2b8d324fe8053a1ff8b926}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_as\_value@{eina\_future\_as\_value}}
\index{eina\_future\_as\_value@{eina\_future\_as\_value}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_as\_value()}{eina\_future\_as\_value()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} eina\+\_\+future\+\_\+as\+\_\+value (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$}]{f }\end{DoxyParamCaption})}



Creates an \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} from a future. 

This function is used for the same purposes as \mbox{\hyperlink{group__Eina__Future_ga6151e485fad1e3623c365d11e319d7da}{eina\+\_\+promise\+\_\+as\+\_\+value()}}, but receives an \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} instead.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em f} & A future to create a Eina\+\_\+\+Value from. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
An Eina\+\_\+\+Value. On error the value\textquotesingle{}s type will be {\ttfamily NULL}. 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
If an error happens the future {\ttfamily f} will be CANCELED 
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga6151e485fad1e3623c365d11e319d7da}{eina\+\_\+promise\+\_\+as\+\_\+value()}} 
\end{DoxySeeAlso}


References DBG, eina\+\_\+future\+\_\+then, eina\+\_\+promise\+\_\+as\+\_\+value(), eina\+\_\+promise\+\_\+new(), EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO, EINA\+\_\+\+VALUE\+\_\+\+EMPTY, EINA\+\_\+\+VALUE\+\_\+\+TYPE\+\_\+\+PROMISE, and ERR.

\mbox{\Hypertarget{group__Eina__Future_gaf4fee59b5faafd33965969ac35377cee}\label{group__Eina__Future_gaf4fee59b5faafd33965969ac35377cee}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_new@{eina\_future\_new}}
\index{eina\_future\_new@{eina\_future\_new}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_new()}{eina\_future\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}}$\ast$ eina\+\_\+future\+\_\+new (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}} $\ast$}]{p }\end{DoxyParamCaption})}



Creates a new future. 

This function creates a new future and can be used to report that an operation has succeeded or failed using \mbox{\hyperlink{group__Eina__Promise_gab5d3ac1b6d4e58a1da5d9e14b77f4c97}{eina\+\_\+promise\+\_\+resolve()}} or \mbox{\hyperlink{group__Eina__Promise_ga215b6ba47e18087e2bd99b87312ff393}{eina\+\_\+promise\+\_\+reject()}}.

Futures can also be canceled using \mbox{\hyperlink{group__Eina__Future_ga6d7a6889b5f1a9fca02f868c484148e7}{eina\+\_\+future\+\_\+cancel()}}, which will cause the whole chain to be canceled alongside with any pending promise.

\begin{DoxyNote}{Note}
A promise can only have one future attached to it, calling \mbox{\hyperlink{group__Eina__Future_gaf4fee59b5faafd33965969ac35377cee}{eina\+\_\+future\+\_\+new()}} on the same promise twice will result in an error ({\ttfamily NULL} is returned) and the future attached to the promise will be canceled!
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em p} & A promise used to attach a future. May not be {\ttfamily NULL}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The future or {\ttfamily NULL} on error. 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
If an error happens this function will CANCEL the promise. 
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Promise_gae2c735463cbd7321dbff1f9def0a6957}{eina\+\_\+promise\+\_\+new()}} 

\mbox{\hyperlink{group__Eina__Promise_ga215b6ba47e18087e2bd99b87312ff393}{eina\+\_\+promise\+\_\+reject()}} 

\mbox{\hyperlink{group__Eina__Promise_gab5d3ac1b6d4e58a1da5d9e14b77f4c97}{eina\+\_\+promise\+\_\+resolve()}} 

\mbox{\hyperlink{group__Eina__Future_ga6d7a6889b5f1a9fca02f868c484148e7}{eina\+\_\+future\+\_\+cancel()}} 
\end{DoxySeeAlso}


References \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::cb, and EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+TRUE\+\_\+\+GOTO.



Referenced by eina\+\_\+future\+\_\+all\+\_\+array(), eina\+\_\+future\+\_\+all\+\_\+iterator(), eina\+\_\+future\+\_\+race\+\_\+array(), eina\+\_\+future\+\_\+rejected(), and eina\+\_\+future\+\_\+resolved().

\mbox{\Hypertarget{group__Eina__Future_gad2e4b9d0ff885ccc38cd2319d05a7274}\label{group__Eina__Future_gad2e4b9d0ff885ccc38cd2319d05a7274}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_resolved@{eina\_future\_resolved}}
\index{eina\_future\_resolved@{eina\_future\_resolved}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_resolved()}{eina\_future\_resolved()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}}$\ast$ eina\+\_\+future\+\_\+resolved (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Future__Callbacks_ga190fb0e75b86d093db85b05abfd21ebd}{Eina\+\_\+\+Future\+\_\+\+Scheduler}} $\ast$}]{scheduler,  }\item[{\mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}}}]{value }\end{DoxyParamCaption})}



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 given {\ttfamily scheduler} as usual.

This is a helper that behaves the same as \mbox{\hyperlink{group__Eina__Promise_gae2c735463cbd7321dbff1f9def0a6957}{eina\+\_\+promise\+\_\+new()}} followed by \mbox{\hyperlink{group__Eina__Future_gaf4fee59b5faafd33965969ac35377cee}{eina\+\_\+future\+\_\+new()}} and then \mbox{\hyperlink{group__Eina__Promise_gab5d3ac1b6d4e58a1da5d9e14b77f4c97}{eina\+\_\+promise\+\_\+resolve()}}.

Futures can also be canceled using \mbox{\hyperlink{group__Eina__Future_ga6d7a6889b5f1a9fca02f868c484148e7}{eina\+\_\+future\+\_\+cancel()}}, which will cause the whole chain to be canceled alongside with any pending promise.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em scheduler} & The scheduler to use. \\
\hline
\mbox{\texttt{ in}}  & {\em value} & The value to be delivered. Note that the value contents must survive this function scope, that is, do {\bfseries{not}} use stack allocated blobs, arrays, structures or types that keep references to memory you give. Values will be automatically cleaned up using {\ttfamily \mbox{\hyperlink{group__Eina__Value__Value__Group_ga940660709a2862bafac92f47bb721a68}{eina\+\_\+value\+\_\+flush()}}} once they are unused (no more future or futures returned a new value).\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The future or {\ttfamily NULL} on error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Promise_gae2c735463cbd7321dbff1f9def0a6957}{eina\+\_\+promise\+\_\+new()}} 

\mbox{\hyperlink{group__Eina__Future_gaf4fee59b5faafd33965969ac35377cee}{eina\+\_\+future\+\_\+new()}} 

\mbox{\hyperlink{group__Eina__Promise_ga215b6ba47e18087e2bd99b87312ff393}{eina\+\_\+promise\+\_\+reject()}} 

\mbox{\hyperlink{group__Eina__Promise_gab5d3ac1b6d4e58a1da5d9e14b77f4c97}{eina\+\_\+promise\+\_\+resolve()}} 

\mbox{\hyperlink{group__Eina__Future_ga6d7a6889b5f1a9fca02f868c484148e7}{eina\+\_\+future\+\_\+cancel()}} 
\end{DoxySeeAlso}


References eina\+\_\+future\+\_\+new(), eina\+\_\+promise\+\_\+new(), eina\+\_\+promise\+\_\+resolve(), EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO, and eina\+\_\+value\+\_\+flush().

\mbox{\Hypertarget{group__Eina__Future_ga5b6ad41fa54f3705a987305d18dc3640}\label{group__Eina__Future_ga5b6ad41fa54f3705a987305d18dc3640}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_rejected@{eina\_future\_rejected}}
\index{eina\_future\_rejected@{eina\_future\_rejected}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_rejected()}{eina\_future\_rejected()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}}$\ast$ eina\+\_\+future\+\_\+rejected (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Future__Callbacks_ga190fb0e75b86d093db85b05abfd21ebd}{Eina\+\_\+\+Future\+\_\+\+Scheduler}} $\ast$}]{scheduler,  }\item[{\mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}}}]{err }\end{DoxyParamCaption})}



Creates a new future that is already rejected to a specified error. 

This function creates a new future with an already known error, that will be resolved and dispatched by the given {\ttfamily scheduler} as usual.

This is a helper that behaves the same as \mbox{\hyperlink{group__Eina__Promise_gae2c735463cbd7321dbff1f9def0a6957}{eina\+\_\+promise\+\_\+new()}} followed by \mbox{\hyperlink{group__Eina__Future_gaf4fee59b5faafd33965969ac35377cee}{eina\+\_\+future\+\_\+new()}} and then \mbox{\hyperlink{group__Eina__Promise_ga215b6ba47e18087e2bd99b87312ff393}{eina\+\_\+promise\+\_\+reject()}}.

Futures can also be canceled using \mbox{\hyperlink{group__Eina__Future_ga6d7a6889b5f1a9fca02f868c484148e7}{eina\+\_\+future\+\_\+cancel()}}, which will cause the whole chain to be canceled alongside with any pending promise.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em scheduler} & The scheduler to use. \\
\hline
\mbox{\texttt{ in}}  & {\em err} & An \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} value\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The future or {\ttfamily NULL} on error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Promise_gae2c735463cbd7321dbff1f9def0a6957}{eina\+\_\+promise\+\_\+new()}} 

\mbox{\hyperlink{group__Eina__Future_gaf4fee59b5faafd33965969ac35377cee}{eina\+\_\+future\+\_\+new()}} 

\mbox{\hyperlink{group__Eina__Promise_ga215b6ba47e18087e2bd99b87312ff393}{eina\+\_\+promise\+\_\+reject()}} 

\mbox{\hyperlink{group__Eina__Promise_gab5d3ac1b6d4e58a1da5d9e14b77f4c97}{eina\+\_\+promise\+\_\+resolve()}} 

\mbox{\hyperlink{group__Eina__Future_ga6d7a6889b5f1a9fca02f868c484148e7}{eina\+\_\+future\+\_\+cancel()}} 
\end{DoxySeeAlso}


References eina\+\_\+future\+\_\+new(), eina\+\_\+promise\+\_\+new(), eina\+\_\+promise\+\_\+reject(), and EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO.

\mbox{\Hypertarget{group__Eina__Future_gae4c1896c7eb8b40933c7b0640c881f33}\label{group__Eina__Future_gae4c1896c7eb8b40933c7b0640c881f33}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_then\_from\_desc@{eina\_future\_then\_from\_desc}}
\index{eina\_future\_then\_from\_desc@{eina\_future\_then\_from\_desc}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_then\_from\_desc()}{eina\_future\_then\_from\_desc()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}}$\ast$ eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$}]{prev,  }\item[{const \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}}}]{desc }\end{DoxyParamCaption})}



Register an \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} to be used when the future is resolved/rejected. 

With this function a callback and data is attached to the future and then once it\textquotesingle{}s resolved or rejected the callback will be informed.

If during the future creation an error happens this function will return {\ttfamily NULL}, and the \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}} will be called reporting an error ({\ttfamily EINVAL} or {\ttfamily ENOMEM}), so the user has a chance to free \mbox{\hyperlink{struct__Eina__Future__Desc_a3776d82a99776d2b6a96839c6191bc13}{Eina\+\_\+\+Future\+\_\+\+Desc\+::data}}.

In case a future in the chain is canceled, the whole chain will be canceled immediately and the error {\ttfamily ECANCELED} will be reported.

Here\textquotesingle{}s a simple usage of this function.


\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}}}
\DoxyCodeLine{\_file\_ready(\textcolor{keyword}{const} *data, \textcolor{keyword}{const} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}} v, \textcolor{keyword}{const} \mbox{\hyperlink{structEina__Future}{Eina\_Future}} *dead \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Ctx *ctx = data;}
\DoxyCodeLine{   \textcolor{comment}{// It was not possible to fetch the file size.}}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (v.type == \mbox{\hyperlink{group__Eina__Value__Group_ga28f6fb160baf3068e7c67ffba0a29c20}{EINA\_VALUE\_TYPE\_ERROR}})}
\DoxyCodeLine{   \{}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\_Error}} err;}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&err);}
\DoxyCodeLine{      fprintf(stderr, \textcolor{stringliteral}{"{}Could not read the file size. Reason: \%s\(\backslash\)n"{}}, \mbox{\hyperlink{group__Eina__Error__Group_ga54953b3f118ad981cb27ef3ac3d77b17}{eina\_error\_msg\_get}}(err));}
\DoxyCodeLine{      \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();}
\DoxyCodeLine{      \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{   \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (v.type != \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}})}
\DoxyCodeLine{   \{}
\DoxyCodeLine{     fprintf(stderr, \textcolor{stringliteral}{"{}Expecting type '\%s' -\/ received '\%s'\(\backslash\)n"{}}, \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}}, v.type-\/>name);}
\DoxyCodeLine{     \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();}
\DoxyCodeLine{     \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{   \}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&ctx-\/>size);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}File size is \%d bytes\(\backslash\)n"{}}, ctx-\/>size);}
\DoxyCodeLine{   \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void}}
\DoxyCodeLine{file\_operation(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{structEina__Future}{Eina\_Future}} *f = get\_file\_size\_async(\textcolor{stringliteral}{"{}/MyFile.txt"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Future_gae4c1896c7eb8b40933c7b0640c881f33}{eina\_future\_then\_from\_desc}}(f, (\textcolor{keyword}{const} \mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\_Future\_Desc}})\{.cb = \_size\_ready, .data = NULL\});}
\DoxyCodeLine{   \textcolor{comment}{// There's a helper macro called eina\_future\_then() which simplifies the usage.}}
\DoxyCodeLine{   \textcolor{comment}{// The code below has the same effect.}}
\DoxyCodeLine{   \textcolor{comment}{// eina\_future\_then(f, \_size\_ready, NULL);}}
\DoxyCodeLine{\}}

\end{DoxyCode}


Although the code presented at {\ttfamily \+\_\+size\+\_\+ready()} is very simple, most of it is just used to check the \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} type. In order to avoid this type of code the function \mbox{\hyperlink{group__Eina__Future_gaacfe9df476304cd36069907863bf12cc}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()}} was created. Please, check its documentation for more information.

This function can also be used to create a future chain, making it possible to execute the future result in a cascade order. When using a future chain the \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} returned by a \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}} will be delivered to the next \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}} in the chain.

Here\textquotesingle{}s an example\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}}}
\DoxyCodeLine{\_future\_cb1(\textcolor{keyword}{const} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \textcolor{keyword}{const} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}} v)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}} new\_v;}
\DoxyCodeLine{   \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// There's no need to check the Eina\_Value type since we're using eina\_future\_cb\_easy()}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&i);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}File size as int: \%d\(\backslash\)n"{}}, i);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_gab5c6558b1b8be2ad597d71a765cbf5f6}{eina\_value\_setup}}(\&new\_v, \mbox{\hyperlink{group__Eina__Value__Group_ga916f76c8d5ffd4c3ee3c322a54efd0b7}{EINA\_VALUE\_TYPE\_STRING}});}
\DoxyCodeLine{   \textcolor{comment}{// Convert the file size to string}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga86f91748c90652df59e3ef38bf54949d}{eina\_value\_convert}}(\&v, \&new\_v);}
\DoxyCodeLine{   \textcolor{keywordflow}{return} new\_v;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}}}
\DoxyCodeLine{\_future\_cb2(\textcolor{keyword}{const} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \textcolor{keyword}{const} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}} v)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}} new\_v;}
\DoxyCodeLine{   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *file\_size\_str;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// There's no need to check the Eina\_Value type since we're using eina\_future\_cb\_easy()}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&file\_size\_str);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}File size as string: \%s\(\backslash\)n"{}}, file\_size\_str);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_gab5c6558b1b8be2ad597d71a765cbf5f6}{eina\_value\_setup}}(\&new\_v, \mbox{\hyperlink{group__Eina__Value__Group_ga959961fb03cd94a84ab469245c543732}{EINA\_VALUE\_TYPE\_DOUBLE}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga86f91748c90652df59e3ef38bf54949d}{eina\_value\_convert}}(\&v, \&new\_v);}
\DoxyCodeLine{   \textcolor{keywordflow}{return} new\_v;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}}}
\DoxyCodeLine{\_future\_cb3(\textcolor{keyword}{const} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \textcolor{keyword}{const} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}} v)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordtype}{double} d;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{// There's no need to check the Eina\_Value type since we're using eina\_future\_cb\_easy()}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&d);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}File size as double: \%g\(\backslash\)n"{}}, d);}
\DoxyCodeLine{   \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}}}
\DoxyCodeLine{\_future\_err(\textcolor{keywordtype}{void} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\_Error}} err)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{comment}{// This function is called if future result type does not match or another error occurred}}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}} new\_v;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_gab5c6558b1b8be2ad597d71a765cbf5f6}{eina\_value\_setup}}(\&new\_v, \mbox{\hyperlink{group__Eina__Value__Group_ga28f6fb160baf3068e7c67ffba0a29c20}{EINA\_VALUE\_TYPE\_ERROR}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga9a1407c953694c3d6f40ab01ebe9a294}{eina\_value\_set}}(\&new\_v, err);}
\DoxyCodeLine{   fprintf(stderr, \textcolor{stringliteral}{"{}Error during future process. Reason: \%s\(\backslash\)n"{}}, \mbox{\hyperlink{group__Eina__Error__Group_ga54953b3f118ad981cb27ef3ac3d77b17}{eina\_error\_msg\_get}}(err));}
\DoxyCodeLine{   \textcolor{comment}{// Pass the error to the next future in the chain..}}
\DoxyCodeLine{   \textcolor{keywordflow}{return} new\_v;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void} chain(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{  \mbox{\hyperlink{structEina__Future}{Eina\_Future}} *f = get\_file\_size\_async(\textcolor{stringliteral}{"{}/MyFile.txt"{}});}
\DoxyCodeLine{  f = \mbox{\hyperlink{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}{eina\_future\_then\_easy}}(f, .success = \_future\_cb1, .success\_type = \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}});}
\DoxyCodeLine{  \textcolor{comment}{// \_future\_cb2 will be executed after \_future\_cb1()}}
\DoxyCodeLine{  f = \mbox{\hyperlink{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}{eina\_future\_then\_easy}}(f, .success = \_future\_cb2, .success\_type = \mbox{\hyperlink{group__Eina__Value__Group_ga916f76c8d5ffd4c3ee3c322a54efd0b7}{EINA\_VALUE\_TYPE\_STRING}});}
\DoxyCodeLine{  \textcolor{comment}{// \_future\_cb3 will be executed after \_future\_cb2()}}
\DoxyCodeLine{  f = \mbox{\hyperlink{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}{eina\_future\_then\_easy}}(f, .success = \_future\_cb3, .success\_type = \mbox{\hyperlink{group__Eina__Value__Group_ga959961fb03cd94a84ab469245c543732}{EINA\_VALUE\_TYPE\_DOUBLE}});}
\DoxyCodeLine{  \textcolor{comment}{// If an error happens \_future\_err will be called}}
\DoxyCodeLine{  \mbox{\hyperlink{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}{eina\_future\_then\_easy}}(f, .error = \_future\_err);}
\DoxyCodeLine{\}}

\end{DoxyCode}


Although it\textquotesingle{}s possible to create a future chain using \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}} and \mbox{\hyperlink{group__Eina__Future_gae4c1896c7eb8b40933c7b0640c881f33}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()}} there\textquotesingle{}s a function that makes this task much easier, please check \mbox{\hyperlink{group__Eina__Future_ga5517a17a841d31ad46acf9285a709bbc}{eina\+\_\+future\+\_\+chain\+\_\+array()}} for more information. \begin{DoxyNote}{Note}
This example does manual conversion and print, however Eina offers \mbox{\hyperlink{group__Eina__Future_gaf122d123c6bef58a2f01dbdefab2b19b}{eina\+\_\+future\+\_\+cb\+\_\+convert\+\_\+to()}} and \mbox{\hyperlink{group__Eina__Future_gac26cdc858d6252e812b731907de744e9}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc()}} to make those common case easier.
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em prev} & A future to link against \\
\hline
\mbox{\texttt{ in}}  & {\em desc} & A description struct containing the callback and data. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A new future or {\ttfamily NULL} on error. 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
If an error happens the whole future chain will CANCELED and desc.\+cb will be called in order to free desc.\+data. 
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_gaf4fee59b5faafd33965969ac35377cee}{eina\+\_\+future\+\_\+new()}} 

\mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}} 

\mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} 

\mbox{\hyperlink{group__Eina__Future_ga5517a17a841d31ad46acf9285a709bbc}{eina\+\_\+future\+\_\+chain\+\_\+array()}} 

\mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}} 

\mbox{\hyperlink{group__Eina__Future_gac26cdc858d6252e812b731907de744e9}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc()}} 

\mbox{\hyperlink{group__Eina__Future_gaacfe9df476304cd36069907863bf12cc}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()}} 

\mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy()}} 

\mbox{\hyperlink{group__Eina__Future_gaf122d123c6bef58a2f01dbdefab2b19b}{eina\+\_\+future\+\_\+cb\+\_\+convert\+\_\+to()}} 

\mbox{\hyperlink{group__Eina__Future_ga6d7a6889b5f1a9fca02f868c484148e7}{eina\+\_\+future\+\_\+cancel()}} 

\mbox{\hyperlink{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}{eina\+\_\+future\+\_\+then\+\_\+easy()}} 

\mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}


References EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+TRUE\+\_\+\+GOTO.

\mbox{\Hypertarget{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}\label{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_cb\_log\_from\_desc@{eina\_future\_cb\_log\_from\_desc}}
\index{eina\_future\_cb\_log\_from\_desc@{eina\_future\_cb\_log\_from\_desc}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_log\_from\_desc()}{eina\_future\_cb\_log\_from\_desc()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Future__Callbacks_ga6d17eda361b40db4ebaf034a993a03fe}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc}}}]{desc }\end{DoxyParamCaption})}



Creates an Eina\+\_\+\+Future\+\_\+\+Desc that will log the previous future resolved value. 

This function can be used to quickly log the value that an \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}} is returning. The returned value will be passed to the next future in the chain without modifications.

There are some helper macros like \mbox{\hyperlink{group__Eina__Future_ga14896937e5ae72ac066518d8fe4e483d}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+dbg()}} which will automatically fill the following fields\+:

\begin{DoxyItemize}
\item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2b5cdedfc4bcd383d341fc9bb816fb46}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file}}\+: The {\ttfamily \+\_\+\+\_\+\+FILE\+\_\+\+\_\+} function will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ac40ef8a65fbdec71615d6327b588f135}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func}}\+: The {\ttfamily \+\_\+\+\_\+func\+\_\+\+\_\+} macro will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a160bbd8d35b40b00d0ef41d9d283101c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level}}\+: {\ttfamily EINA\+\_\+\+LOG\+\_\+\+LEVEL\+\_\+\+DBG} will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ae20c3c17ec8f6c62b5041d26b6b17b8c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain}}\+: {\ttfamily EINA\+\_\+\+LOG\+\_\+\+DOMAIN\+\_\+\+DEFAULT} will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2cab78b0d653b250d7b68f8ffb848c5a}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::line}}\+: The {\ttfamily \+\_\+\+\_\+\+LINE\+\_\+\+\_\+} macro will be used.\end{DoxyItemize}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em desc} & The description data to be used. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
An \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}}
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future__Callbacks_ga6d17eda361b40db4ebaf034a993a03fe}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc}} 

\mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}} 

\mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}} 

\mbox{\hyperlink{group__Eina__Future_ga14896937e5ae72ac066518d8fe4e483d}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+dbg()}} 

\mbox{\hyperlink{group__Eina__Future_ga91cba9ac4306b0dee948dd3a0b10a893}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+crit()}} 

\mbox{\hyperlink{group__Eina__Future_gade1a19f673ac90442409aba274ff0884}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+err()}} 

\mbox{\hyperlink{group__Eina__Future_gaf3f9d1b140fa23528a74f09e78fadb09}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+info()}} 

\mbox{\hyperlink{group__Eina__Future_ga8ed87813808c62045569f4e09868dbe8}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+warn()}} 

\mbox{\hyperlink{group__Eina__Future_gac26cdc858d6252e812b731907de744e9}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}


References \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain, EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO, \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file, \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func, \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level, \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::line, \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::prefix, and \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::suffix.

\mbox{\Hypertarget{group__Eina__Future_ga5517a17a841d31ad46acf9285a709bbc}\label{group__Eina__Future_ga5517a17a841d31ad46acf9285a709bbc}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_chain\_array@{eina\_future\_chain\_array}}
\index{eina\_future\_chain\_array@{eina\_future\_chain\_array}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_chain\_array()}{eina\_future\_chain\_array()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}}$\ast$ eina\+\_\+future\+\_\+chain\+\_\+array (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$}]{prev,  }\item[{const \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}}}]{descs\mbox{[}$\,$\mbox{]} }\end{DoxyParamCaption})}



Creates a future chain. 

This behaves exactly like \mbox{\hyperlink{group__Eina__Future_gae4c1896c7eb8b40933c7b0640c881f33}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()}}, but makes it easier to create future chains.

If during the future chain creation an error happens this function will return {\ttfamily NULL}, and the \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}} from the {\ttfamily descs} array will be called reporting an error ({\ttfamily EINVAL} or {\ttfamily ENOMEM}), so the user has a chance to free \mbox{\hyperlink{struct__Eina__Future__Desc_a3776d82a99776d2b6a96839c6191bc13}{Eina\+\_\+\+Future\+\_\+\+Desc\+::data}}.

Just like \mbox{\hyperlink{group__Eina__Future_gae4c1896c7eb8b40933c7b0640c881f33}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()}}, the value returned by a \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}} callback will be delivered to the next \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}} in the chain.

In case a future in the chain is canceled, the whole chain will be canceled immediately and the error {\ttfamily ECANCELED} will be reported.

Here\textquotesingle{}s an example\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{// callbacks code....}}
\DoxyCodeLine{}
\DoxyCodeLine{\mbox{\hyperlink{structEina__Future}{Eina\_Future}}* chain(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{  \mbox{\hyperlink{structEina__Future}{Eina\_Future}} *f = get\_file\_size\_async(\textcolor{stringliteral}{"{}/MyFile.txt"{}});}
\DoxyCodeLine{  \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\_future\_chain}}(f, \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\_future\_cb\_easy}}(\_future\_cb1, \_future\_err, NULL, \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}}, NULL),}
\DoxyCodeLine{                              \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\_future\_cb\_easy}}(\_future\_cb2, \_future\_err, NULL, \mbox{\hyperlink{group__Eina__Value__Group_ga916f76c8d5ffd4c3ee3c322a54efd0b7}{EINA\_VALUE\_TYPE\_STRING}}, NULL),}
\DoxyCodeLine{                              \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\_future\_cb\_easy}}(\_future\_cb3, \_future\_err, NULL, \mbox{\hyperlink{group__Eina__Value__Group_ga959961fb03cd94a84ab469245c543732}{EINA\_VALUE\_TYPE\_DOUBLE}}, NULL),}
\DoxyCodeLine{                              \{.cb = \_future\_cb4, .data = NULL \});}
\DoxyCodeLine{\}}

\end{DoxyCode}



\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em prev} & The previous future \\
\hline
\mbox{\texttt{ in}}  & {\em descs} & An array of descriptions. The last element of the array must have the \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}} set to {\ttfamily NULL} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A future or {\ttfamily NULL} on error. 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
If an error happens the whole future chain will CANCELED and desc.\+cb will be called in order to free desc.\+data. 
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_gaf4fee59b5faafd33965969ac35377cee}{eina\+\_\+future\+\_\+new()}} 

\mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}} 

\mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} 

\mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}} 

\mbox{\hyperlink{group__Eina__Future_gae9e287741f9aa10b83dc33854e5290b6}{eina\+\_\+future\+\_\+cb\+\_\+ignore\+\_\+error()}} 

\mbox{\hyperlink{group__Eina__Future_gac26cdc858d6252e812b731907de744e9}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc()}} 

\mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}} 

\mbox{\hyperlink{group__Eina__Future_gaacfe9df476304cd36069907863bf12cc}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()}} 

\mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy()}} 

\mbox{\hyperlink{group__Eina__Future_gae4c1896c7eb8b40933c7b0640c881f33}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()}} 

\mbox{\hyperlink{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}{eina\+\_\+future\+\_\+then\+\_\+easy()}} 

\mbox{\hyperlink{group__Eina__Future_gaf122d123c6bef58a2f01dbdefab2b19b}{eina\+\_\+future\+\_\+cb\+\_\+convert\+\_\+to()}} 
\end{DoxySeeAlso}


References \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::cb, EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO, and EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+TRUE\+\_\+\+GOTO.

\mbox{\Hypertarget{group__Eina__Future_ga6b072f800c651b9cdee2aebb788bf7b5}\label{group__Eina__Future_ga6b072f800c651b9cdee2aebb788bf7b5}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_chain\_easy\_array@{eina\_future\_chain\_easy\_array}}
\index{eina\_future\_chain\_easy\_array@{eina\_future\_chain\_easy\_array}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_chain\_easy\_array()}{eina\_future\_chain\_easy\_array()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}}$\ast$ eina\+\_\+future\+\_\+chain\+\_\+easy\+\_\+array (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$}]{prev,  }\item[{const \mbox{\hyperlink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}}}]{descs\mbox{[}$\,$\mbox{]} }\end{DoxyParamCaption})}



Wrapper around \mbox{\hyperlink{group__Eina__Future_ga5517a17a841d31ad46acf9285a709bbc}{eina\+\_\+future\+\_\+chain\+\_\+array()}} and \mbox{\hyperlink{group__Eina__Future_gaacfe9df476304cd36069907863bf12cc}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()}} 

This functions makes it easier to use \mbox{\hyperlink{group__Eina__Future_ga5517a17a841d31ad46acf9285a709bbc}{eina\+\_\+future\+\_\+chain\+\_\+array()}} with \mbox{\hyperlink{group__Eina__Future_gaacfe9df476304cd36069907863bf12cc}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()}}, check the macro \mbox{\hyperlink{group__Eina__Future_ga51f933135f14e6e0183af7366aa351d3}{eina\+\_\+future\+\_\+chain\+\_\+easy()}} for a syntax sugar.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em prev} & The previous future \\
\hline
\mbox{\texttt{ in}}  & {\em descs} & An array of descriptions. The last element of the array must have the \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}} set to {\ttfamily NULL} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A future or {\ttfamily NULL} on error. 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
If an error happens the whole future chain will CANCELED and desc.\+cb will be called in order to free desc.\+data. 
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga51f933135f14e6e0183af7366aa351d3}{eina\+\_\+future\+\_\+chain\+\_\+easy()}} 

\mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}} 

\mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy()}} 

\mbox{\hyperlink{group__Eina__Future_ga5517a17a841d31ad46acf9285a709bbc}{eina\+\_\+future\+\_\+chain\+\_\+array()}} 

\mbox{\hyperlink{group__Eina__Future_gaacfe9df476304cd36069907863bf12cc}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}


References eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc(), EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO, EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+TRUE\+\_\+\+GOTO, eina\+\_\+value\+\_\+flush(), \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::error, \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::free, \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::success, and \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::success\+\_\+type.

\mbox{\Hypertarget{group__Eina__Future_gac26cdc858d6252e812b731907de744e9}\label{group__Eina__Future_gac26cdc858d6252e812b731907de744e9}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_cb\_console\_from\_desc@{eina\_future\_cb\_console\_from\_desc}}
\index{eina\_future\_cb\_console\_from\_desc@{eina\_future\_cb\_console\_from\_desc}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_console\_from\_desc()}{eina\_future\_cb\_console\_from\_desc()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Future__Callbacks_gaf5fa825519a3d7f8e084aba309316bc4}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Console\+\_\+\+Desc}}}]{desc }\end{DoxyParamCaption})}



Creates an \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} that will print the previous future\textquotesingle{}s resolved value. 

This function can be used to quickly inspect the value that an \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}} is returning. The returned value will be passed to the next future in the chain without modifications.

There\textquotesingle{}s also a helper macro called \mbox{\hyperlink{group__Eina__Future_ga32414cc629c2b989984394daef6f560b}{eina\+\_\+future\+\_\+cb\+\_\+console()}} which makes this function easier to use.

Example\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\_future\_chain}}(a\_future, \{.cb = cb1, .data = NULL\},}
\DoxyCodeLine{                            \textcolor{comment}{//Inspect the cb1 value and pass to cb2 without modifications}}
\DoxyCodeLine{                            \mbox{\hyperlink{group__Eina__Future_ga32414cc629c2b989984394daef6f560b}{eina\_future\_cb\_console}}(\textcolor{stringliteral}{"{}cb1 value:"{}}),}
\DoxyCodeLine{                            \{.cb = cb2, .data = NULL\},}
\DoxyCodeLine{                            \textcolor{comment}{//Inspect the cb2 value}}
\DoxyCodeLine{                            \mbox{\hyperlink{group__Eina__Future_ga32414cc629c2b989984394daef6f560b}{eina\_future\_cb\_console}}(\textcolor{stringliteral}{"{}cb2 value:"{}}, \textcolor{stringliteral}{"{} cb2 value suffix\(\backslash\)n"{}}))}

\end{DoxyCode}



\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em desc} & Description object with contextual information. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
An \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}}
\end{DoxyReturn}
The description object, {\ttfamily desc}, can (optionally) include a prefix, suffix, filename and function name. If these are {\ttfamily NULL}, empty strings (\char`\"{}\char`\"{}) are used instead. If {\ttfamily desc-\/$>$suffix} is provided, the \textquotesingle{}\textbackslash{}n\textquotesingle{} should be provided to ensure the printed string ends with a line feed.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}} 

\mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} 

\mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}} 

\mbox{\hyperlink{group__Eina__Future_gaacfe9df476304cd36069907863bf12cc}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()}} 

\mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy()}} 

\mbox{\hyperlink{group__Eina__Future_gae4c1896c7eb8b40933c7b0640c881f33}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()}} 

\mbox{\hyperlink{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}{eina\+\_\+future\+\_\+then\+\_\+easy()}} 

\mbox{\hyperlink{group__Eina__Future_ga32414cc629c2b989984394daef6f560b}{eina\+\_\+future\+\_\+cb\+\_\+console()}} 

\mbox{\hyperlink{group__Eina__Future_gae9e287741f9aa10b83dc33854e5290b6}{eina\+\_\+future\+\_\+cb\+\_\+ignore\+\_\+error()}} 

\mbox{\hyperlink{group__Eina__Future_ga92d96ceed9cc6af49bc35c31704c31a1}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}


References \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::cb, \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::data, EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO, \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Console\+\_\+\+Desc\+::prefix, and \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Console\+\_\+\+Desc\+::suffix.

\mbox{\Hypertarget{group__Eina__Future_gae9e287741f9aa10b83dc33854e5290b6}\label{group__Eina__Future_gae9e287741f9aa10b83dc33854e5290b6}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_cb\_ignore\_error@{eina\_future\_cb\_ignore\_error}}
\index{eina\_future\_cb\_ignore\_error@{eina\_future\_cb\_ignore\_error}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_ignore\_error()}{eina\_future\_cb\_ignore\_error()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} eina\+\_\+future\+\_\+cb\+\_\+ignore\+\_\+error (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}}}]{err }\end{DoxyParamCaption})}



Returns an \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} that ignores an error. 

This function may be used if one wants to ignore an error. If the specified error happens an \mbox{\hyperlink{group__Eina__Value__Group_ga06540fbaf4a53dd90133deb813d4f102}{EINA\+\_\+\+VALUE\+\_\+\+EMPTY}} will be delivered to the next future in the chain.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em err} & The error to be ignored. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A future descriptor to be used with \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}} or \mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}} 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eina__Future_gaf122d123c6bef58a2f01dbdefab2b19b}\label{group__Eina__Future_gaf122d123c6bef58a2f01dbdefab2b19b}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_cb\_convert\_to@{eina\_future\_cb\_convert\_to}}
\index{eina\_future\_cb\_convert\_to@{eina\_future\_cb\_convert\_to}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_convert\_to()}{eina\_future\_cb\_convert\_to()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} eina\+\_\+future\+\_\+cb\+\_\+convert\+\_\+to (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Value__Group_gaab67ab8bcd0624280c5276044b07e0d2}{Eina\+\_\+\+Value\+\_\+\+Type}} $\ast$}]{type }\end{DoxyParamCaption})}



Creates an \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} which will convert the received eina value to a given type. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em type} & The \mbox{\hyperlink{group__Eina__Value__Group_gaab67ab8bcd0624280c5276044b07e0d2}{Eina\+\_\+\+Value\+\_\+\+Type}} to convert to. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
An \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}} 

\mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} 

\mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}} 

\mbox{\hyperlink{group__Eina__Future_gaacfe9df476304cd36069907863bf12cc}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()}} 

\mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy()}} 

\mbox{\hyperlink{group__Eina__Future_gae4c1896c7eb8b40933c7b0640c881f33}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()}} 

\mbox{\hyperlink{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}{eina\+\_\+future\+\_\+then\+\_\+easy()}} 
\end{DoxySeeAlso}


References \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::cb.

\mbox{\Hypertarget{group__Eina__Future_gaacfe9df476304cd36069907863bf12cc}\label{group__Eina__Future_gaacfe9df476304cd36069907863bf12cc}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_cb\_easy\_from\_desc@{eina\_future\_cb\_easy\_from\_desc}}
\index{eina\_future\_cb\_easy\_from\_desc@{eina\_future\_cb\_easy\_from\_desc}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_easy\_from\_desc()}{eina\_future\_cb\_easy\_from\_desc()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}}}]{desc }\end{DoxyParamCaption})}



Creates an \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}} based on an \mbox{\hyperlink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}}. 

This function aims to be used in conjunction with \mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}}, \mbox{\hyperlink{group__Eina__Future_gae4c1896c7eb8b40933c7b0640c881f33}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()}} and friends and its main objective is to simplify error handling and \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} type checks. It uses three callbacks to inform the user about the future\textquotesingle{}s result and life cycle. They are\+:

\begin{DoxyItemize}
\item \mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc_a15ec41c953419c10745fb2738fd311d5}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::success}}\+: This callback is called when the future execution was successful, that is, no errors occurred and the result type matches \mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc_a5112a2ccff7f8b1c48c242763a948d05}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::success\+\_\+type}}. In case \mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc_a5112a2ccff7f8b1c48c242763a948d05}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::success\+\_\+type}} is {\ttfamily NULL}, this function will only be called if the future did not report an error. The value returned by this function will be propagated to the next future in the chain (if any).\end{DoxyItemize}
\begin{DoxyItemize}
\item \mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc_af785ac4390997ecbdf13e89aa4840c34}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::error}}\+: This callback is called when the future result is an error or \mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc_a5112a2ccff7f8b1c48c242763a948d05}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::success\+\_\+type}} does not match the future result type. The value returned by this function will be propagated to the next future in the chain (if any).\end{DoxyItemize}
\begin{DoxyItemize}
\item \mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc_a9ae635f5d45413527f77755a19abb77e}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::free}}\+: Called after the future was freed and any resources allocated must be freed at this point. This callback is always called.\end{DoxyItemize}
Check the example below for a sample usage\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}}}
\DoxyCodeLine{\_file\_size\_ok(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}} v)}
\DoxyCodeLine{\{}
\DoxyCodeLine{  Ctx *ctx = data;}
\DoxyCodeLine{  \textcolor{comment}{// Since an Eina\_Future\_Cb\_Easy\_Desc::success\_type was provided, there's no need to check the value type}}
\DoxyCodeLine{  \textcolor{keywordtype}{int} s;}
\DoxyCodeLine{  \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&s);}
\DoxyCodeLine{  printf(\textcolor{stringliteral}{"{}File size is \%d bytes\(\backslash\)n"{}}, s);}
\DoxyCodeLine{  ctx-\/>file\_size = s;}
\DoxyCodeLine{  \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}}}
\DoxyCodeLine{\_file\_size\_err(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\_Error}} err)}
\DoxyCodeLine{\{}
\DoxyCodeLine{  fprintf(stderr, \textcolor{stringliteral}{"{}Could not read the file size. Reason: \%s\(\backslash\)n"{}}, \mbox{\hyperlink{group__Eina__Error__Group_ga54953b3f118ad981cb27ef3ac3d77b17}{eina\_error\_msg\_get}}(err));}
\DoxyCodeLine{  \textcolor{comment}{// Stop propagating the error.}}
\DoxyCodeLine{  \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Value__Group_ga06540fbaf4a53dd90133deb813d4f102}{EINA\_VALUE\_EMPTY}};}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_future\_freed(\textcolor{keywordtype}{void} *data, \textcolor{keyword}{const} \mbox{\hyperlink{structEina__Future}{Eina\_Future}} dead)}
\DoxyCodeLine{\{}
\DoxyCodeLine{  Ctx *ctx = data;}
\DoxyCodeLine{  printf(\textcolor{stringliteral}{"{}Future \%p deleted\(\backslash\)n"{}}, dead);}
\DoxyCodeLine{  ctx-\/>file\_size\_handler\_cb(ctx-\/>file\_size);}
\DoxyCodeLine{  free(ctx);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void} do\_work(File\_Size\_Handler\_Cb cb)}
\DoxyCodeLine{\{}
\DoxyCodeLine{  Ctx *ctx = malloc(\textcolor{keyword}{sizeof}(Ctx));}
\DoxyCodeLine{  ctx-\/>f = get\_file\_size(\textcolor{stringliteral}{"{}/tmp/todo.txt"{}});}
\DoxyCodeLine{  ctx-\/>file\_size = -\/1;}
\DoxyCodeLine{  ctx-\/>file\_size\_handler\_cb = cb;}
\DoxyCodeLine{  \mbox{\hyperlink{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}{eina\_future\_then\_easy}}(f, \_file\_size\_ok, \_file\_size\_err, \_future\_freed, \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}}, ctx);}
\DoxyCodeLine{\}}

\end{DoxyCode}



\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em desc} & The easy callback\textquotesingle{}s description. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
An \mbox{\hyperlink{group__Eina__Future_ga594ef24c23e9670a708e794c9be27c3c}{Eina\+\_\+\+Future\+\_\+\+Desc}}
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}} 

\mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}} 

\mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy()}} 
\end{DoxySeeAlso}


References EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO.



Referenced by eina\+\_\+future\+\_\+chain\+\_\+easy\+\_\+array().

\mbox{\Hypertarget{group__Eina__Future_ga17094a3e3dc964ef33313106041dc4e0}\label{group__Eina__Future_ga17094a3e3dc964ef33313106041dc4e0}} 
\index{Eina Futures@{Eina Futures}!eina\_promise\_all\_array@{eina\_promise\_all\_array}}
\index{eina\_promise\_all\_array@{eina\_promise\_all\_array}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_promise\_all\_array()}{eina\_promise\_all\_array()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}}$\ast$ eina\+\_\+promise\+\_\+all\+\_\+array (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$}]{array\mbox{[}$\,$\mbox{]} }\end{DoxyParamCaption})}



Creates an all promise. 

Creates a promise that is resolved once all the futures from the {\ttfamily array} are resolved. The promise is resolved with an \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} type array which contains \mbox{\hyperlink{group__Eina__Value__Group_ga15d6ee1f21da49ffdb27dab70d1959ff}{EINA\+\_\+\+VALUE\+\_\+\+TYPE\+\_\+\+VALUE}} elements. The result array is ordered according to the {\ttfamily array} argument. Example\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\_get\_operation\_name\_by\_index(\textcolor{keywordtype}{int} idx)}
\DoxyCodeLine{\{}
\DoxyCodeLine{  \textcolor{keywordflow}{switch} (idx)}
\DoxyCodeLine{  \{}
\DoxyCodeLine{     \textcolor{keywordflow}{case} 0: \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}Get file data"{}};}
\DoxyCodeLine{     \textcolor{keywordflow}{case} 1: \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}Get file size"{}};}
\DoxyCodeLine{     \textcolor{keywordflow}{default}: \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}sum"{}};}
\DoxyCodeLine{  \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}}}
\DoxyCodeLine{\_all\_cb(\textcolor{keyword}{const} \textcolor{keywordtype}{void} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \textcolor{keyword}{const} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}} array, \textcolor{keyword}{const} \mbox{\hyperlink{structEina__Future}{Eina\_Future}} *dead \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\_Error}} err;}
\DoxyCodeLine{   \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} i, len;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (array.\mbox{\hyperlink{struct__Eina__Value_a1fd07b3214c901eec252a786cca47239}{type}} == \mbox{\hyperlink{group__Eina__Value__Group_ga28f6fb160baf3068e7c67ffba0a29c20}{EINA\_VALUE\_TYPE\_ERROR}})}
\DoxyCodeLine{    \{}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&array, \&err);}
\DoxyCodeLine{      fprintf(stderr, \textcolor{stringliteral}{"{}Could not complete all operations. Reason: \%s\(\backslash\)n"{}}, \mbox{\hyperlink{group__Eina__Error__Group_ga54953b3f118ad981cb27ef3ac3d77b17}{eina\_error\_msg\_get}}(err));}
\DoxyCodeLine{      \textcolor{keywordflow}{return} array;}
\DoxyCodeLine{    \}}
\DoxyCodeLine{   len = \mbox{\hyperlink{group__Eina__Value__Array__Group_ga758e2a63aa537f872bdbd07b87ea6115}{eina\_value\_array\_count}}(\&array);}
\DoxyCodeLine{   \textcolor{keywordflow}{for} (i = 0; i < len; i++)}
\DoxyCodeLine{    \{}
\DoxyCodeLine{      \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}} v;}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eina__Value__Array__Group_ga9358dce2404ed0926db502539f8a1318}{eina\_value\_array\_get}}(\&array, i, \&v);}
\DoxyCodeLine{      \textcolor{keywordflow}{if} (v.type == \mbox{\hyperlink{group__Eina__Value__Group_ga28f6fb160baf3068e7c67ffba0a29c20}{EINA\_VALUE\_TYPE\_ERROR}})}
\DoxyCodeLine{       \{}
\DoxyCodeLine{         \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&err);}
\DoxyCodeLine{         fprintf(stderr, \textcolor{stringliteral}{"{}Could not complete operation '\%s'. Reason: \%s\(\backslash\)n"{}}, \_get\_operation\_name\_by\_index(i), \mbox{\hyperlink{group__Eina__Error__Group_ga54953b3f118ad981cb27ef3ac3d77b17}{eina\_error\_msg\_get}}(err));}
\DoxyCodeLine{         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{       \}}
\DoxyCodeLine{      \textcolor{keywordflow}{if} (!i)}
\DoxyCodeLine{       \{}
\DoxyCodeLine{          \textcolor{keyword}{const} \textcolor{keywordtype}{char} *msg;}
\DoxyCodeLine{          \textcolor{keywordflow}{if} (v.type != \mbox{\hyperlink{group__Eina__Value__Group_ga916f76c8d5ffd4c3ee3c322a54efd0b7}{EINA\_VALUE\_TYPE\_STRING}})}
\DoxyCodeLine{          \{}
\DoxyCodeLine{            fprintf(stderr, \textcolor{stringliteral}{"{}Operation \%s expects '\%s' -\/ received '\%s'\(\backslash\)n"{}}, \_get\_operation\_name\_by\_index(i), \mbox{\hyperlink{group__Eina__Value__Group_ga916f76c8d5ffd4c3ee3c322a54efd0b7}{EINA\_VALUE\_TYPE\_STRING}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}}, v.type-\/>name);}
\DoxyCodeLine{            \textcolor{keywordflow}{continue};}
\DoxyCodeLine{          \}}
\DoxyCodeLine{          \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&msg);}
\DoxyCodeLine{          printf(\textcolor{stringliteral}{"{}File content:\%s\(\backslash\)n"{}}, msg);}
\DoxyCodeLine{       \}}
\DoxyCodeLine{      \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (i == 1)}
\DoxyCodeLine{       \{}
\DoxyCodeLine{          \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{          \textcolor{keywordflow}{if} (v.type != \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}})}
\DoxyCodeLine{          \{}
\DoxyCodeLine{            fprintf(stderr, \textcolor{stringliteral}{"{}Operation \%s expects '\%s' -\/ received '\%s'\(\backslash\)n"{}}, \_get\_operation\_name\_by\_index(i), \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}}, v.type-\/>name);}
\DoxyCodeLine{            \textcolor{keywordflow}{continue};}
\DoxyCodeLine{          \}}
\DoxyCodeLine{          \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&i);}
\DoxyCodeLine{          printf(\textcolor{stringliteral}{"{}File size: \%d\(\backslash\)n"{}}, i);}
\DoxyCodeLine{       \}}
\DoxyCodeLine{       \textcolor{keywordflow}{else}}
\DoxyCodeLine{       \{}
\DoxyCodeLine{          \textcolor{keywordtype}{double} p;}
\DoxyCodeLine{          \textcolor{keywordflow}{if} (v.type != \mbox{\hyperlink{group__Eina__Value__Group_ga959961fb03cd94a84ab469245c543732}{EINA\_VALUE\_TYPE\_DOUBLE}})}
\DoxyCodeLine{          \{}
\DoxyCodeLine{            fprintf(stderr, \textcolor{stringliteral}{"{}Operation \%s expects '\%s' -\/ received '\%s'\(\backslash\)n"{}}, \_get\_operation\_name\_by\_index(i), \mbox{\hyperlink{group__Eina__Value__Group_ga959961fb03cd94a84ab469245c543732}{EINA\_VALUE\_TYPE\_DOUBLE}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}}, v.type-\/>name);}
\DoxyCodeLine{            \textcolor{keywordflow}{continue};}
\DoxyCodeLine{          \}}
\DoxyCodeLine{          \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&p);}
\DoxyCodeLine{          printf(\textcolor{stringliteral}{"{}50 places of PI: \%f\(\backslash\)n"{}}, p);}
\DoxyCodeLine{       \}}
\DoxyCodeLine{    \}}
\DoxyCodeLine{   \textcolor{keywordflow}{return} array;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void} func(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{  \mbox{\hyperlink{structEina__Future}{Eina\_Future}} *f1, *f2, *f3, f\_all;}
\DoxyCodeLine{}
\DoxyCodeLine{  f1 = read\_file(\textcolor{stringliteral}{"{}/tmp/todo.txt"{}});}
\DoxyCodeLine{  f2 = get\_file\_size(\textcolor{stringliteral}{"{}/tmp/file.txt"{}});}
\DoxyCodeLine{  \textcolor{comment}{// calculates 50 places of PI}}
\DoxyCodeLine{  f3 = calc\_pi(50);}
\DoxyCodeLine{  f\_all = \mbox{\hyperlink{group__Eina__Future_ga70fb993acf2af507103c0c161412767e}{eina\_future\_all}}(f1, f2, f3);}
\DoxyCodeLine{  \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\_future\_then}}(f\_all, \_all\_cb, NULL);}
\DoxyCodeLine{\}}

\end{DoxyCode}



\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em array} & An array of futures, terminated with \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A promise or {\ttfamily NULL} on error. 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
On error all the futures will be CANCELED. 
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga8838591bc2163cac63ba6a5180a63091}{eina\+\_\+future\+\_\+all\+\_\+array()}} 
\end{DoxySeeAlso}


References eina\+\_\+mempool\+\_\+free(), EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+FALSE\+\_\+\+GOTO, EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO, EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL, eina\+\_\+value\+\_\+array\+\_\+append(), eina\+\_\+value\+\_\+array\+\_\+setup(), eina\+\_\+value\+\_\+flush(), eina\+\_\+value\+\_\+setup(), EINA\+\_\+\+VALUE\+\_\+\+TYPE\+\_\+\+INT, and EINA\+\_\+\+VALUE\+\_\+\+TYPE\+\_\+\+VALUE.



Referenced by eina\+\_\+future\+\_\+all\+\_\+array().

\mbox{\Hypertarget{group__Eina__Future_ga9e9650a22f52923a868930412ce4175f}\label{group__Eina__Future_ga9e9650a22f52923a868930412ce4175f}} 
\index{Eina Futures@{Eina Futures}!eina\_promise\_all\_iterator@{eina\_promise\_all\_iterator}}
\index{eina\_promise\_all\_iterator@{eina\_promise\_all\_iterator}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_promise\_all\_iterator()}{eina\_promise\_all\_iterator()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}}$\ast$ eina\+\_\+promise\+\_\+all\+\_\+iterator (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$}]{iterator }\end{DoxyParamCaption})}



Creates an all promise from an iterator. 

Creates a promise that is resolved once all the futures from the {\ttfamily iterator} are resolved. The promise is resolved with an \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} type array which contains \mbox{\hyperlink{group__Eina__Value__Group_ga15d6ee1f21da49ffdb27dab70d1959ff}{EINA\+\_\+\+VALUE\+\_\+\+TYPE\+\_\+\+VALUE}} elements. The result array is ordered according to the {\ttfamily iterator} order.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em iterator} & An iterator of futures. Will be destroyed after the call. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A promise or {\ttfamily NULL} on error. 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
On error all the futures will be CANCELED. 
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga61a6e122fed95d236ea4170dad293dd3}{eina\+\_\+future\+\_\+all\+\_\+iterator()}} 
\end{DoxySeeAlso}


References eina\+\_\+future\+\_\+then, EINA\+\_\+\+ITERATOR\+\_\+\+FOREACH, eina\+\_\+iterator\+\_\+free(), eina\+\_\+iterator\+\_\+next(), eina\+\_\+mempool\+\_\+free(), eina\+\_\+promise\+\_\+new(), EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+FALSE\+\_\+\+GOTO, EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO, EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL, eina\+\_\+value\+\_\+array\+\_\+append(), eina\+\_\+value\+\_\+array\+\_\+setup(), eina\+\_\+value\+\_\+flush(), eina\+\_\+value\+\_\+setup(), EINA\+\_\+\+VALUE\+\_\+\+TYPE\+\_\+\+INT, and EINA\+\_\+\+VALUE\+\_\+\+TYPE\+\_\+\+VALUE.



Referenced by eina\+\_\+future\+\_\+all\+\_\+iterator().

\mbox{\Hypertarget{group__Eina__Future_ga13d85b5282b02260407c103690b2b3f4}\label{group__Eina__Future_ga13d85b5282b02260407c103690b2b3f4}} 
\index{Eina Futures@{Eina Futures}!eina\_promise\_race\_array@{eina\_promise\_race\_array}}
\index{eina\_promise\_race\_array@{eina\_promise\_race\_array}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_promise\_race\_array()}{eina\_promise\_race\_array()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}}$\ast$ eina\+\_\+promise\+\_\+race\+\_\+array (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$}]{array\mbox{[}$\,$\mbox{]} }\end{DoxyParamCaption})}



Creates a race promise. 

Creates a promise that resolves when a future from the {\ttfamily array} is completed. The remaining futures will be canceled with the error code {\ttfamily ECANCELED}

The resulting value is an \mbox{\hyperlink{group__Eina__Value__Group_ga432befb0e84e2ac9ca7dc6398a96648d}{EINA\+\_\+\+VALUE\+\_\+\+TYPE\+\_\+\+STRUCT}} with two fields\+:

\begin{DoxyItemize}
\item A field named {\ttfamily value} containing an \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} with the result itself. \item A field named {\ttfamily index} containing the index of the completed function relative to the {\ttfamily array}.\end{DoxyItemize}
Example\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\_get\_operation\_name\_by\_index(\textcolor{keywordtype}{int} idx)}
\DoxyCodeLine{\{}
\DoxyCodeLine{  \textcolor{keywordflow}{switch} (idx)}
\DoxyCodeLine{  \{}
\DoxyCodeLine{     \textcolor{keywordflow}{case} 0: \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}Get file data"{}};}
\DoxyCodeLine{     \textcolor{keywordflow}{case} 1: \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}Get file size"{}};}
\DoxyCodeLine{     \textcolor{keywordflow}{default}: \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}sum"{}};}
\DoxyCodeLine{  \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}}}
\DoxyCodeLine{\_race\_cb(\textcolor{keyword}{const} \textcolor{keywordtype}{void} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \textcolor{keyword}{const} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}} v)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}} result;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\_Error}} err;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__Value__Struct}{Eina\_Value\_Struct}} *st;}
\DoxyCodeLine{}
\DoxyCodeLine{    \textcolor{comment}{// No need to check for the 'v' type. eina\_future\_cb\_easy() did that for us.}}
\DoxyCodeLine{    \textcolor{comment}{// However we should check if the struct has the correct description}}
\DoxyCodeLine{    st = eina\_value\_memory\_get(\&v);}
\DoxyCodeLine{    \textcolor{keywordflow}{if} (st-\/>\mbox{\hyperlink{struct__Eina__Value__Struct_a9bb23988e2748e4f6202ce4e4ee4b4a1}{desc}} != \mbox{\hyperlink{group__Eina__Future_ga8b2461685ba3e12305bd69730a83dbcb}{EINA\_PROMISE\_RACE\_STRUCT\_DESC}})}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        fprintf(stderr, \textcolor{stringliteral}{"{}Eina\_Value is not a race struct\(\backslash\)n"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{     \}}
\DoxyCodeLine{    \mbox{\hyperlink{group__Eina__Value__Struct__Group_ga07a7cc420f03a247dffe4d13ce1ad6c5}{eina\_value\_struct\_get}}(\&v, \textcolor{stringliteral}{"{}index"{}}, \&i);}
\DoxyCodeLine{    \textcolor{comment}{// Get the operation result}}
\DoxyCodeLine{    \mbox{\hyperlink{group__Eina__Value__Struct__Group_ga07a7cc420f03a247dffe4d13ce1ad6c5}{eina\_value\_struct\_get}}(\&v, \textcolor{stringliteral}{"{}value"{}}, \&result);}
\DoxyCodeLine{    \textcolor{keywordflow}{if} (!i)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{       \textcolor{keyword}{const} \textcolor{keywordtype}{char} *msg;}
\DoxyCodeLine{       \textcolor{keywordflow}{if} (result.\mbox{\hyperlink{struct__Eina__Value_a1fd07b3214c901eec252a786cca47239}{type}} != \mbox{\hyperlink{group__Eina__Value__Group_ga916f76c8d5ffd4c3ee3c322a54efd0b7}{EINA\_VALUE\_TYPE\_STRING}})}
\DoxyCodeLine{         fprintf(stderr, \textcolor{stringliteral}{"{}Operation \%s expects '\%s' -\/ received '\%s'\(\backslash\)n"{}}, \_get\_operation\_name\_by\_index(i), \mbox{\hyperlink{group__Eina__Value__Group_ga916f76c8d5ffd4c3ee3c322a54efd0b7}{EINA\_VALUE\_TYPE\_STRING}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}}, result.\mbox{\hyperlink{struct__Eina__Value_a1fd07b3214c901eec252a786cca47239}{type}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}});}
\DoxyCodeLine{       \textcolor{keywordflow}{else}}
\DoxyCodeLine{       \{}
\DoxyCodeLine{         \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&result, \&msg);}
\DoxyCodeLine{         printf(\textcolor{stringliteral}{"{}File content:\%s\(\backslash\)n"{}}, msg);}
\DoxyCodeLine{       \}}
\DoxyCodeLine{     \}}
\DoxyCodeLine{    \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (i == 1)}
\DoxyCodeLine{      \{}
\DoxyCodeLine{        \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (result.\mbox{\hyperlink{struct__Eina__Value_a1fd07b3214c901eec252a786cca47239}{type}} != \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}})}
\DoxyCodeLine{          fprintf(stderr, \textcolor{stringliteral}{"{}Operation \%s expects '\%s' -\/ received '\%s'\(\backslash\)n"{}}, \_get\_operation\_name\_by\_index(i), \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}}, v.type-\/>name);}
\DoxyCodeLine{        \textcolor{keywordflow}{else}}
\DoxyCodeLine{        \{}
\DoxyCodeLine{          \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&result, \&i);}
\DoxyCodeLine{          printf(\textcolor{stringliteral}{"{}File size: \%d\(\backslash\)n"{}}, i);}
\DoxyCodeLine{        \}}
\DoxyCodeLine{      \}}
\DoxyCodeLine{     \textcolor{keywordflow}{else}}
\DoxyCodeLine{      \{}
\DoxyCodeLine{        \textcolor{keywordtype}{double} p;}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (result.\mbox{\hyperlink{struct__Eina__Value_a1fd07b3214c901eec252a786cca47239}{type}} != \mbox{\hyperlink{group__Eina__Value__Group_ga959961fb03cd94a84ab469245c543732}{EINA\_VALUE\_TYPE\_DOUBLE}})}
\DoxyCodeLine{           fprintf(stderr, \textcolor{stringliteral}{"{}Operation \%s expects '\%s' -\/ received '\%s'\(\backslash\)n"{}}, \_get\_operation\_name\_by\_index(i), \mbox{\hyperlink{group__Eina__Value__Group_ga959961fb03cd94a84ab469245c543732}{EINA\_VALUE\_TYPE\_DOUBLE}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}}, result.\mbox{\hyperlink{struct__Eina__Value_a1fd07b3214c901eec252a786cca47239}{type}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}});}
\DoxyCodeLine{        \textcolor{keywordflow}{else}}
\DoxyCodeLine{         \{}
\DoxyCodeLine{           \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&result, \&p);}
\DoxyCodeLine{           printf(\textcolor{stringliteral}{"{}50 places of PI: \%f\(\backslash\)n"{}}, p);}
\DoxyCodeLine{         \}}
\DoxyCodeLine{      \}}
\DoxyCodeLine{    \mbox{\hyperlink{group__Eina__Value__Value__Group_ga940660709a2862bafac92f47bb721a68}{eina\_value\_flush}}(\&result);}
\DoxyCodeLine{    \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}}}
\DoxyCodeLine{\_race\_err(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\_Error}} err)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   fprintf(stderr, \textcolor{stringliteral}{"{}Could not complete the race future. Reason: \%s\(\backslash\)n"{}}, \mbox{\hyperlink{group__Eina__Error__Group_ga54953b3f118ad981cb27ef3ac3d77b17}{eina\_error\_msg\_get}}(err));}
\DoxyCodeLine{   \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Value__Group_ga06540fbaf4a53dd90133deb813d4f102}{EINA\_VALUE\_EMPTY}};}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void} func(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{  \textcolor{keyword}{static} \textcolor{keyword}{const} *\mbox{\hyperlink{structEina__Future}{Eina\_Future}}[] = \{NULL, NULL, NULL, NULL\};}
\DoxyCodeLine{  \mbox{\hyperlink{struct__Eina__List}{Eina\_List}} *l = NULL;}
\DoxyCodeLine{}
\DoxyCodeLine{  futures[0] = read\_file(\textcolor{stringliteral}{"{}/tmp/todo.txt"{}});}
\DoxyCodeLine{  futures[1] = get\_file\_size(\textcolor{stringliteral}{"{}/tmp/file.txt"{}});}
\DoxyCodeLine{  \textcolor{comment}{// calculates 50 places of PI}}
\DoxyCodeLine{  futures[2] = calc\_pi(50);}
\DoxyCodeLine{  f\_race = \mbox{\hyperlink{group__Eina__Future_ga2c63774e66100dc5f4b91f88f0efc5f1}{eina\_future\_race\_array}}(futures);}
\DoxyCodeLine{  \mbox{\hyperlink{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}{eina\_future\_then\_easy}}(f\_race, \_race\_cb, \_race\_err, NULL, \mbox{\hyperlink{group__Eina__Value__Group_ga8147143699c5f5a686415090080d3f9e}{EINA\_VALUE\_TYPE\_STRUCT}}, NULL);}
\DoxyCodeLine{\}}

\end{DoxyCode}



\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em array} & An array of futures, terminated by \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A promise or {\ttfamily NULL} on error. 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
On error all the futures will be CANCELED. 
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga2c63774e66100dc5f4b91f88f0efc5f1}{eina\+\_\+future\+\_\+race\+\_\+array()}} 

\mbox{\hyperlink{struct__Eina__Future__Race__Result}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Race\+\_\+\+Result}} 
\end{DoxySeeAlso}


References EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+FALSE\+\_\+\+GOTO, EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO, and EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL.



Referenced by eina\+\_\+future\+\_\+race\+\_\+array().

\mbox{\Hypertarget{group__Eina__Future_ga8838591bc2163cac63ba6a5180a63091}\label{group__Eina__Future_ga8838591bc2163cac63ba6a5180a63091}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_all\_array@{eina\_future\_all\_array}}
\index{eina\_future\_all\_array@{eina\_future\_all\_array}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_all\_array()}{eina\_future\_all\_array()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}}$\ast$ eina\+\_\+future\+\_\+all\+\_\+array (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$}]{array\mbox{[}$\,$\mbox{]} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Creates a future that will be resolved once all futures from {\ttfamily array} is resolved. 

This is a helper over \mbox{\hyperlink{group__Eina__Future_ga17094a3e3dc964ef33313106041dc4e0}{eina\+\_\+promise\+\_\+all\+\_\+array()}}


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em array} & A future array, must be terminated with \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A future. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga17094a3e3dc964ef33313106041dc4e0}{eina\+\_\+promise\+\_\+all\+\_\+array()}} 

\mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}} 
\end{DoxySeeAlso}


References eina\+\_\+future\+\_\+new(), and eina\+\_\+promise\+\_\+all\+\_\+array().

\mbox{\Hypertarget{group__Eina__Future_ga61a6e122fed95d236ea4170dad293dd3}\label{group__Eina__Future_ga61a6e122fed95d236ea4170dad293dd3}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_all\_iterator@{eina\_future\_all\_iterator}}
\index{eina\_future\_all\_iterator@{eina\_future\_all\_iterator}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_all\_iterator()}{eina\_future\_all\_iterator()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}}$\ast$ eina\+\_\+future\+\_\+all\+\_\+iterator (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$}]{iterator }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Creates a future that will be resolved once all futures from {\ttfamily iterator} are resolved. 

This is a helper over \mbox{\hyperlink{group__Eina__Future_ga9e9650a22f52923a868930412ce4175f}{eina\+\_\+promise\+\_\+all\+\_\+iterator()}}


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em iterator} & An iterator containing futures. Will be destroyed on exit of the function. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A future. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga9e9650a22f52923a868930412ce4175f}{eina\+\_\+promise\+\_\+all\+\_\+iterator()}} 
\end{DoxySeeAlso}


References eina\+\_\+future\+\_\+new(), and eina\+\_\+promise\+\_\+all\+\_\+iterator().

\mbox{\Hypertarget{group__Eina__Future_ga2c63774e66100dc5f4b91f88f0efc5f1}\label{group__Eina__Future_ga2c63774e66100dc5f4b91f88f0efc5f1}} 
\index{Eina Futures@{Eina Futures}!eina\_future\_race\_array@{eina\_future\_race\_array}}
\index{eina\_future\_race\_array@{eina\_future\_race\_array}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{eina\_future\_race\_array()}{eina\_future\_race\_array()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}}$\ast$ eina\+\_\+future\+\_\+race\+\_\+array (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$}]{array\mbox{[}$\,$\mbox{]} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Creates a future that will be resolved once a future {\ttfamily array} is resolved. 

This is a helper over \mbox{\hyperlink{group__Eina__Future_ga13d85b5282b02260407c103690b2b3f4}{eina\+\_\+promise\+\_\+race\+\_\+array()}}


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em array} & A future array, must be terminated with \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A future. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga13d85b5282b02260407c103690b2b3f4}{eina\+\_\+promise\+\_\+race\+\_\+array()}} 

\mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}} 
\end{DoxySeeAlso}


References eina\+\_\+future\+\_\+new(), and eina\+\_\+promise\+\_\+race\+\_\+array().



\doxysubsection{Variable Documentation}
\mbox{\Hypertarget{group__Eina__Future_ga8b2461685ba3e12305bd69730a83dbcb}\label{group__Eina__Future_ga8b2461685ba3e12305bd69730a83dbcb}} 
\index{Eina Futures@{Eina Futures}!EINA\_PROMISE\_RACE\_STRUCT\_DESC@{EINA\_PROMISE\_RACE\_STRUCT\_DESC}}
\index{EINA\_PROMISE\_RACE\_STRUCT\_DESC@{EINA\_PROMISE\_RACE\_STRUCT\_DESC}!Eina Futures@{Eina Futures}}
\doxysubsubsection{\texorpdfstring{EINA\_PROMISE\_RACE\_STRUCT\_DESC}{EINA\_PROMISE\_RACE\_STRUCT\_DESC}}
{\footnotesize\ttfamily const \mbox{\hyperlink{group__Eina__Value__Struct__Group_ga69bcc1965b7b57ef713b0370d10f593d}{Eina\+\_\+\+Value\+\_\+\+Struct\+\_\+\+Desc}} $\ast$ EINA\+\_\+\+PROMISE\+\_\+\+RACE\+\_\+\+STRUCT\+\_\+\+DESC\hspace{0.3cm}{\ttfamily [extern]}}



A pointer to the race struct description, which is used by \mbox{\hyperlink{group__Eina__Future_ga13d85b5282b02260407c103690b2b3f4}{eina\+\_\+promise\+\_\+race\+\_\+array()}}. 

This struct contains two members\+: \begin{DoxyItemize}
\item {\ttfamily value\+:} An \mbox{\hyperlink{group__Eina__Value__Group_ga15d6ee1f21da49ffdb27dab70d1959ff}{EINA\+\_\+\+VALUE\+\_\+\+TYPE\+\_\+\+VALUE}} that contains the future result that won the race. \item {\ttfamily index\+:} An \mbox{\hyperlink{group__Eina__Value__Group_gada4982a70f6b1f84e5d80ddf54318630}{EINA\+\_\+\+VALUE\+\_\+\+TYPE\+\_\+\+UINT}} that contains the future index that won the race.\end{DoxyItemize}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga13d85b5282b02260407c103690b2b3f4}{eina\+\_\+promise\+\_\+race\+\_\+array()}} 

\mbox{\hyperlink{struct__Eina__Future__Race__Result}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Race\+\_\+\+Result}} 
\end{DoxySeeAlso}
