\doxysubsubsection{Eina Futures}
\hypertarget{group__Eina__Future}{}\label{group__Eina__Future}\index{Eina Futures@{Eina Futures}}
\doxysubsubsubsubsection*{Topics}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Eina__Future__Callbacks}{Eina Future Callbacks}}
\begin{DoxyCompactList}\small\item\em \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{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}
\doxysubsubsubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}~((void \texorpdfstring{$\ast$}{*})(unsigned long)-\/1)
\begin{DoxyCompactList}\small\item\em Used by \doxylink{group__Eina__Future_ga5f61d533ecab8275bb3329e8cc78424a}{eina\+\_\+promise\+\_\+race\+\_\+array()} and \doxylink{group__Eina__Future_ga612daeff4809ac94284e89b25c8eb4ed}{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_ga5f61d533ecab8275bb3329e8cc78424a}{eina\+\_\+promise\+\_\+race\+\_\+array}}((\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*}\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \doxylink{group__Eina__Future_ga5f61d533ecab8275bb3329e8cc78424a}{eina\+\_\+promise\+\_\+race\+\_\+array()}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga6a39aa29dad9e9ba9038908758f20c32}{eina\+\_\+future\+\_\+race}}(...)~\mbox{\hyperlink{group__Eina__Future_ga803faac8b5dc7a858da3e0112fd97d10}{eina\+\_\+future\+\_\+race\+\_\+array}}((\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*}\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \doxylink{group__Eina__Future_ga803faac8b5dc7a858da3e0112fd97d10}{eina\+\_\+future\+\_\+race\+\_\+array()}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga70fb993acf2af507103c0c161412767e}{eina\+\_\+future\+\_\+all}}(...)~\mbox{\hyperlink{group__Eina__Future_ga195007c0a1e4e0d7c5bf3c6f46292c9d}{eina\+\_\+future\+\_\+all\+\_\+array}}((\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*}\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \doxylink{group__Eina__Future_ga195007c0a1e4e0d7c5bf3c6f46292c9d}{eina\+\_\+future\+\_\+all\+\_\+array()}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_gaeffefb72180f300a69bfd3036a16c317}{eina\+\_\+promise\+\_\+all}}(...)~\mbox{\hyperlink{group__Eina__Future_ga612daeff4809ac94284e89b25c8eb4ed}{eina\+\_\+promise\+\_\+all\+\_\+array}}((\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*}\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \doxylink{group__Eina__Future_ga612daeff4809ac94284e89b25c8eb4ed}{eina\+\_\+promise\+\_\+all\+\_\+array()}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy}}(...)~\mbox{\hyperlink{group__Eina__Future_ga8efd2e10698d893468026e1eaf9e5948}{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 \doxylink{group__Eina__Future_ga8efd2e10698d893468026e1eaf9e5948}{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_gaf64b3969ac3a86afe47da820c625a416}{eina\+\_\+future\+\_\+chain\+\_\+array}}(\+\_\+prev, (\mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}}\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \{.cb = NULL, .data = NULL\}\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \doxylink{group__Eina__Future_gaf64b3969ac3a86afe47da820c625a416}{eina\+\_\+future\+\_\+chain\+\_\+array()}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then}}(\+\_\+prev, ...)~\mbox{\hyperlink{group__Eina__Future_ga201dc23d7509f2953e5cd654e8cf601f}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc}}(\+\_\+prev, (\mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \doxylink{group__Eina__Future_ga201dc23d7509f2953e5cd654e8cf601f}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga32414cc629c2b989984394daef6f560b}{eina\+\_\+future\+\_\+cb\+\_\+console}}(...)~\mbox{\hyperlink{group__Eina__Future_ga84c55db821fee59726596580aa4bd827}{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 \doxylink{group__Eina__Future_ga84c55db821fee59726596580aa4bd827}{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 \doxylink{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111}{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 \doxylink{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111}{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 \doxylink{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111}{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 \doxylink{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111}{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 \doxylink{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111}{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_ga201dc23d7509f2953e5cd654e8cf601f}{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 \doxylink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()} and \doxylink{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_ga47581dfd989e38d49918aacf77120a1e}{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 \doxylink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()} and \doxylink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy()}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void \mbox{\hyperlink{group__Eina__Future_ga5462a38eabc060b163d24c9d7395ae3b}{eina\+\_\+future\+\_\+cancel}} (\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*}f)
\begin{DoxyCompactList}\small\item\em Cancels a future. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void \mbox{\hyperlink{group__Eina__Future_ga1e5e3dba94f44ea1d95d7e18936c3c21}{eina\+\_\+future\+\_\+desc\+\_\+flush}} (\mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}} \texorpdfstring{$\ast$}{*}desc)
\begin{DoxyCompactList}\small\item\em Flushes an Eina\+\_\+\+Future\+\_\+\+Desc. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void \mbox{\hyperlink{group__Eina__Future_ga5d5e20d9d68c676cbdecf4ecf58852da}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+desc\+\_\+flush}} (\mbox{\hyperlink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}} \texorpdfstring{$\ast$}{*}desc)
\begin{DoxyCompactList}\small\item\em Flushes an \doxylink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} \mbox{\hyperlink{group__Eina__Future_gab966fb4259f6c1d0f18840e31213a26a}{eina\+\_\+promise\+\_\+as\+\_\+value}} (\mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}} \texorpdfstring{$\ast$}{*}p)
\begin{DoxyCompactList}\small\item\em Creates a new \doxylink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value} from a promise. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} \mbox{\hyperlink{group__Eina__Future_ga59277c714beab7a5231f014d4eed2670}{eina\+\_\+future\+\_\+as\+\_\+value}} (\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*}f)
\begin{DoxyCompactList}\small\item\em Creates an \doxylink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value} from a future. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eina__Future_ga6c6d97b2f3be307cc43364d6f4aade48}{eina\+\_\+future\+\_\+new}} (\mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}} \texorpdfstring{$\ast$}{*}p)
\begin{DoxyCompactList}\small\item\em Creates a new future. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eina__Future_ga9098beb0b805b06856008968a5b7c14a}{eina\+\_\+future\+\_\+resolved}} (\mbox{\hyperlink{group__Eina__Future__Callbacks_ga190fb0e75b86d093db85b05abfd21ebd}{Eina\+\_\+\+Future\+\_\+\+Scheduler}} \texorpdfstring{$\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{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eina__Future_ga5f603578d333ca9f9c435785efa8cdcd}{eina\+\_\+future\+\_\+rejected}} (\mbox{\hyperlink{group__Eina__Future__Callbacks_ga190fb0e75b86d093db85b05abfd21ebd}{Eina\+\_\+\+Future\+\_\+\+Scheduler}} \texorpdfstring{$\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{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eina__Future_ga201dc23d7509f2953e5cd654e8cf601f}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc}} (\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*}prev, const \mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}} desc)
\begin{DoxyCompactList}\small\item\em Register an Eina\+\_\+\+Future\+\_\+\+Desc to be used when the future is resolved/rejected. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}} \mbox{\hyperlink{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111}{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{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eina__Future_gaf64b3969ac3a86afe47da820c625a416}{eina\+\_\+future\+\_\+chain\+\_\+array}} (\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*}prev, const \mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}} descs\mbox{[}$\,$\mbox{]})
\begin{DoxyCompactList}\small\item\em Creates a future chain. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eina__Future_ga47581dfd989e38d49918aacf77120a1e}{eina\+\_\+future\+\_\+chain\+\_\+easy\+\_\+array}} (\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\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 \doxylink{group__Eina__Future_gaf64b3969ac3a86afe47da820c625a416}{eina\+\_\+future\+\_\+chain\+\_\+array()} and \doxylink{group__Eina__Future_ga8efd2e10698d893468026e1eaf9e5948}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()} \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}} \mbox{\hyperlink{group__Eina__Future_ga84c55db821fee59726596580aa4bd827}{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 Eina\+\_\+\+Future\+\_\+\+Desc that will print the previous future\textquotesingle{}s resolved value. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}} \mbox{\hyperlink{group__Eina__Future_ga5acd0341dcde7ed060254fab2c0c18a9}{eina\+\_\+future\+\_\+cb\+\_\+ignore\+\_\+error}} (\mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} err)
\begin{DoxyCompactList}\small\item\em Returns an Eina\+\_\+\+Future\+\_\+\+Desc that ignores an error. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}} \mbox{\hyperlink{group__Eina__Future_ga8937a1545bc81676138a23d25829650b}{eina\+\_\+future\+\_\+cb\+\_\+convert\+\_\+to}} (const \mbox{\hyperlink{group__Eina__Value__Group_gaab67ab8bcd0624280c5276044b07e0d2}{Eina\+\_\+\+Value\+\_\+\+Type}} \texorpdfstring{$\ast$}{*}type)
\begin{DoxyCompactList}\small\item\em Creates an Eina\+\_\+\+Future\+\_\+\+Desc which will convert the received eina value to a given type. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}} \mbox{\hyperlink{group__Eina__Future_ga8efd2e10698d893468026e1eaf9e5948}{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 Eina\+\_\+\+Future\+\_\+\+Desc based on an \doxylink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eina__Future_ga612daeff4809ac94284e89b25c8eb4ed}{eina\+\_\+promise\+\_\+all\+\_\+array}} (\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*}array\mbox{[}$\,$\mbox{]})
\begin{DoxyCompactList}\small\item\em Creates an all promise. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eina__Future_gad86937f4354573d8e13cbe6ec62d0869}{eina\+\_\+promise\+\_\+all\+\_\+iterator}} (\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} \texorpdfstring{$\ast$}{*}iterator)
\begin{DoxyCompactList}\small\item\em Creates an all promise from an iterator. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eina__Future_ga5f61d533ecab8275bb3329e8cc78424a}{eina\+\_\+promise\+\_\+race\+\_\+array}} (\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*}array\mbox{[}$\,$\mbox{]})
\begin{DoxyCompactList}\small\item\em Creates a race promise. \end{DoxyCompactList}\item 
static \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eina__Future_ga195007c0a1e4e0d7c5bf3c6f46292c9d}{eina\+\_\+future\+\_\+all\+\_\+array}} (\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\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}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eina__Future_ga902c11d185a40bd748d30b7d2be94b5d}{eina\+\_\+future\+\_\+all\+\_\+iterator}} (\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} \texorpdfstring{$\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}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eina__Future_ga803faac8b5dc7a858da3e0112fd97d10}{eina\+\_\+future\+\_\+race\+\_\+array}} (\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\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}
\doxysubsubsubsubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} const \mbox{\hyperlink{group__Eina__Value__Struct__Group_ga69bcc1965b7b57ef713b0370d10f593d}{Eina\+\_\+\+Value\+\_\+\+Struct\+\_\+\+Desc}} \texorpdfstring{$\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 \doxylink{group__Eina__Future_ga5f61d533ecab8275bb3329e8cc78424a}{eina\+\_\+promise\+\_\+race\+\_\+array()}. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsubsubsection{Detailed Description}


Methods and structures dealing with \doxylink{structEina__Future}{Eina\+\_\+\+Future} 

\doxysubsubsubsection{Macro Definition Documentation}
\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}}
\doxysubsubsubsubsection{\texorpdfstring{EINA\_FUTURE\_SENTINEL}{EINA\_FUTURE\_SENTINEL}}
{\footnotesize\ttfamily \#define EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL~((void \texorpdfstring{$\ast$}{*})(unsigned long)-\/1)}



Used by \doxylink{group__Eina__Future_ga5f61d533ecab8275bb3329e8cc78424a}{eina\+\_\+promise\+\_\+race\+\_\+array()} and \doxylink{group__Eina__Future_ga612daeff4809ac94284e89b25c8eb4ed}{eina\+\_\+promise\+\_\+all\+\_\+array()} and friends to flag the end of the array. 

\begin{DoxySeeAlso}{See also}
\doxylink{group__Eina__Future_ga5f61d533ecab8275bb3329e8cc78424a}{eina\+\_\+promise\+\_\+race\+\_\+array()} 

\doxylink{group__Eina__Future_ga612daeff4809ac94284e89b25c8eb4ed}{eina\+\_\+promise\+\_\+all\+\_\+array()} 
\end{DoxySeeAlso}
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_promise\_race}{eina\_promise\_race}}
{\footnotesize\ttfamily \#define eina\+\_\+promise\+\_\+race(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_ga5f61d533ecab8275bb3329e8cc78424a}{eina\+\_\+promise\+\_\+race\+\_\+array}}((\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*}\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}\})}



A syntactic sugar over \doxylink{group__Eina__Future_ga5f61d533ecab8275bb3329e8cc78424a}{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}
\doxylink{group__Eina__Future_ga5f61d533ecab8275bb3329e8cc78424a}{eina\+\_\+promise\+\_\+race\+\_\+array()} 
\end{DoxySeeAlso}
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_future\_race}{eina\_future\_race}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+race(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_ga803faac8b5dc7a858da3e0112fd97d10}{eina\+\_\+future\+\_\+race\+\_\+array}}((\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*}\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}\})}



A syntactic sugar over \doxylink{group__Eina__Future_ga803faac8b5dc7a858da3e0112fd97d10}{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}
\doxylink{group__Eina__Future_ga803faac8b5dc7a858da3e0112fd97d10}{eina\+\_\+future\+\_\+race\+\_\+array()} 
\end{DoxySeeAlso}
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_future\_all}{eina\_future\_all}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+all(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_ga195007c0a1e4e0d7c5bf3c6f46292c9d}{eina\+\_\+future\+\_\+all\+\_\+array}}((\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*}\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}\})}



A syntactic sugar over \doxylink{group__Eina__Future_ga195007c0a1e4e0d7c5bf3c6f46292c9d}{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}
\doxylink{group__Eina__Future_ga195007c0a1e4e0d7c5bf3c6f46292c9d}{eina\+\_\+future\+\_\+all\+\_\+array()} 
\end{DoxySeeAlso}
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_promise\_all}{eina\_promise\_all}}
{\footnotesize\ttfamily \#define eina\+\_\+promise\+\_\+all(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_ga612daeff4809ac94284e89b25c8eb4ed}{eina\+\_\+promise\+\_\+all\+\_\+array}}((\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*}\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL}}\})}



A syntactic sugar over \doxylink{group__Eina__Future_ga612daeff4809ac94284e89b25c8eb4ed}{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}
\doxylink{group__Eina__Future_ga612daeff4809ac94284e89b25c8eb4ed}{eina\+\_\+promise\+\_\+all\+\_\+array()} 
\end{DoxySeeAlso}
\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}}
\doxysubsubsubsubsection{\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_ga8efd2e10698d893468026e1eaf9e5948}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc}}((\mbox{\hyperlink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+\})}



A syntactic sugar over \doxylink{group__Eina__Future_ga8efd2e10698d893468026e1eaf9e5948}{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}
\doxylink{group__Eina__Future_ga8efd2e10698d893468026e1eaf9e5948}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()} 
\end{DoxySeeAlso}
\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}}
\doxysubsubsubsubsection{\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_gaf64b3969ac3a86afe47da820c625a416}{eina\+\_\+future\+\_\+chain\+\_\+array}}(\+\_\+prev, (\mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}}\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+, \{.cb = NULL, .data = NULL\}\})}



A syntactic sugar over \doxylink{group__Eina__Future_gaf64b3969ac3a86afe47da820c625a416}{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}
\doxylink{group__Eina__Future_gaf64b3969ac3a86afe47da820c625a416}{eina\+\_\+future\+\_\+chain\+\_\+array()} 
\end{DoxySeeAlso}
\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}}
\doxysubsubsubsubsection{\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_ga201dc23d7509f2953e5cd654e8cf601f}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc}}(\+\_\+prev, (\mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+\})}



A syntactic sugar over \doxylink{group__Eina__Future_ga201dc23d7509f2953e5cd654e8cf601f}{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}
\doxylink{group__Eina__Future_ga201dc23d7509f2953e5cd654e8cf601f}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()} 

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


Referenced by \mbox{\hyperlink{group__Ecore__Con__SSL__Group_ga91cb5d6868be1c3578ce21c7f786de3a}{ecore\+\_\+con\+\_\+ssl\+\_\+client\+\_\+upgrade()}}, \mbox{\hyperlink{group__Eina__Future_ga59277c714beab7a5231f014d4eed2670}{eina\+\_\+future\+\_\+as\+\_\+value()}}, and \mbox{\hyperlink{group__Eina__Future_gad86937f4354573d8e13cbe6ec62d0869}{eina\+\_\+promise\+\_\+all\+\_\+iterator()}}.

\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}}
\doxysubsubsubsubsection{\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_ga84c55db821fee59726596580aa4bd827}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc}}((\mbox{\hyperlink{group__Eina__Future__Callbacks_gaf5fa825519a3d7f8e084aba309316bc4}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Console\+\_\+\+Desc}})\{\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+\})}



A syntactic sugar over \doxylink{group__Eina__Future_ga84c55db821fee59726596580aa4bd827}{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}
\doxylink{group__Eina__Future_ga84c55db821fee59726596580aa4bd827}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc()} 
\end{DoxySeeAlso}
\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}}
\doxysubsubsubsubsection{\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_ga25abdeb653ee9056a33288874d8d7111}{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 \doxylink{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}. 

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

\begin{DoxyItemize}
\item \doxylink{struct__Eina__Future__Cb__Log__Desc_a2b5cdedfc4bcd383d341fc9bb816fb46}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file}\+: The {\ttfamily \+\_\+\+\_\+\+FILE\+\_\+\+\_\+} function will be used. \item \doxylink{struct__Eina__Future__Cb__Log__Desc_ac40ef8a65fbdec71615d6327b588f135}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func}\+: The {\ttfamily \+\_\+\+\_\+func\+\_\+\+\_\+} macro will be used. \item \doxylink{struct__Eina__Future__Cb__Log__Desc_a160bbd8d35b40b00d0ef41d9d283101c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level}\+: {\ttfamily EINA\+\_\+\+LOG\+\_\+\+LEVEL\+\_\+\+DBG} will be used. \item \doxylink{struct__Eina__Future__Cb__Log__Desc_ae20c3c17ec8f6c62b5041d26b6b17b8c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain}\+: {\ttfamily EINA\+\_\+\+LOG\+\_\+\+DOMAIN\+\_\+\+DEFAULT} will be used. \item \doxylink{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}
\doxylink{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()} 
\end{DoxySeeAlso}
\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}}
\doxysubsubsubsubsection{\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_ga25abdeb653ee9056a33288874d8d7111}{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 \doxylink{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}. 

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

\begin{DoxyItemize}
\item \doxylink{struct__Eina__Future__Cb__Log__Desc_a2b5cdedfc4bcd383d341fc9bb816fb46}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file}\+: The {\bfseries{FILE}} function will be used. \item \doxylink{struct__Eina__Future__Cb__Log__Desc_ac40ef8a65fbdec71615d6327b588f135}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func}\+: The {\bfseries{func}} macro will be used. \item \doxylink{struct__Eina__Future__Cb__Log__Desc_a160bbd8d35b40b00d0ef41d9d283101c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level}\+: EINA\+\_\+\+LOG\+\_\+\+LEVEL\+\_\+\+CRITICAL will be used. \item \doxylink{struct__Eina__Future__Cb__Log__Desc_ae20c3c17ec8f6c62b5041d26b6b17b8c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain}\+: EINA\+\_\+\+LOG\+\_\+\+DOMAIN\+\_\+\+DEFAULT will be used. \item \doxylink{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}
\doxylink{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()} 
\end{DoxySeeAlso}
\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}}
\doxysubsubsubsubsection{\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_ga25abdeb653ee9056a33288874d8d7111}{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 \doxylink{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}. 

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

\begin{DoxyItemize}
\item \doxylink{struct__Eina__Future__Cb__Log__Desc_a2b5cdedfc4bcd383d341fc9bb816fb46}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file}\+: The {\bfseries{FILE}} function will be used. \item \doxylink{struct__Eina__Future__Cb__Log__Desc_ac40ef8a65fbdec71615d6327b588f135}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func}\+: The {\bfseries{func}} macro will be used. \item \doxylink{struct__Eina__Future__Cb__Log__Desc_a160bbd8d35b40b00d0ef41d9d283101c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level}\+: EINA\+\_\+\+LOG\+\_\+\+LEVEL\+\_\+\+ERR will be used. \item \doxylink{struct__Eina__Future__Cb__Log__Desc_ae20c3c17ec8f6c62b5041d26b6b17b8c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain}\+: EINA\+\_\+\+LOG\+\_\+\+DOMAIN\+\_\+\+DEFAULT will be used. \item \doxylink{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}
\doxylink{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()} 
\end{DoxySeeAlso}
\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}}
\doxysubsubsubsubsection{\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_ga25abdeb653ee9056a33288874d8d7111}{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 \doxylink{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}. 

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

\begin{DoxyItemize}
\item \doxylink{struct__Eina__Future__Cb__Log__Desc_a2b5cdedfc4bcd383d341fc9bb816fb46}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file}\+: The {\bfseries{FILE}} function will be used. \item \doxylink{struct__Eina__Future__Cb__Log__Desc_ac40ef8a65fbdec71615d6327b588f135}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func}\+: The {\bfseries{func}} macro will be used. \item \doxylink{struct__Eina__Future__Cb__Log__Desc_a160bbd8d35b40b00d0ef41d9d283101c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level}\+: EINA\+\_\+\+LOG\+\_\+\+LEVEL\+\_\+\+INFO will be used. \item \doxylink{struct__Eina__Future__Cb__Log__Desc_ae20c3c17ec8f6c62b5041d26b6b17b8c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain}\+: EINA\+\_\+\+LOG\+\_\+\+DOMAIN\+\_\+\+DEFAULT will be used. \item \doxylink{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}
\doxylink{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()} 
\end{DoxySeeAlso}
\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}}
\doxysubsubsubsubsection{\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_ga25abdeb653ee9056a33288874d8d7111}{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 \doxylink{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}. 

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

\begin{DoxyItemize}
\item \doxylink{struct__Eina__Future__Cb__Log__Desc_a2b5cdedfc4bcd383d341fc9bb816fb46}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file}\+: The {\bfseries{FILE}} function will be used. \item \doxylink{struct__Eina__Future__Cb__Log__Desc_ac40ef8a65fbdec71615d6327b588f135}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func}\+: The {\bfseries{func}} macro will be used. \item \doxylink{struct__Eina__Future__Cb__Log__Desc_a160bbd8d35b40b00d0ef41d9d283101c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level}\+: EINA\+\_\+\+LOG\+\_\+\+LEVEL\+\_\+\+WARN will be used. \item \doxylink{struct__Eina__Future__Cb__Log__Desc_ae20c3c17ec8f6c62b5041d26b6b17b8c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain}\+: EINA\+\_\+\+LOG\+\_\+\+DOMAIN\+\_\+\+DEFAULT will be used. \item \doxylink{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}
\doxylink{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()} 
\end{DoxySeeAlso}
\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}}
\doxysubsubsubsubsection{\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_ga201dc23d7509f2953e5cd654e8cf601f}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc}}(\+\_\+prev, \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy}}(\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+))}



A syntactic sugar over \doxylink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()} and \doxylink{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}
\doxylink{group__Eina__Future_ga201dc23d7509f2953e5cd654e8cf601f}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()} 

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

\doxylink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()} 

\doxylink{group__Eina__Future_ga8efd2e10698d893468026e1eaf9e5948}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()} 
\end{DoxySeeAlso}
\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}}
\doxysubsubsubsubsection{\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_ga47581dfd989e38d49918aacf77120a1e}{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 \doxylink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()} and \doxylink{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}
\doxylink{group__Eina__Future_gaf64b3969ac3a86afe47da820c625a416}{eina\+\_\+future\+\_\+chain\+\_\+array()} 

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

\doxylink{group__Eina__Future_ga47581dfd989e38d49918aacf77120a1e}{eina\+\_\+future\+\_\+chain\+\_\+easy\+\_\+array()} 

\doxylink{group__Eina__Future_ga8efd2e10698d893468026e1eaf9e5948}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()} 
\end{DoxySeeAlso}


\doxysubsubsubsection{Function Documentation}
\Hypertarget{group__Eina__Future_ga5462a38eabc060b163d24c9d7395ae3b}\label{group__Eina__Future_ga5462a38eabc060b163d24c9d7395ae3b} 
\index{Eina Futures@{Eina Futures}!eina\_future\_cancel@{eina\_future\_cancel}}
\index{eina\_future\_cancel@{eina\_future\_cancel}!Eina Futures@{Eina Futures}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_future\_cancel()}{eina\_future\_cancel()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void eina\+\_\+future\+\_\+cancel (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\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 \doxylink{group__Eina__Future__Callbacks_ga43d2d4c20a2f7aee2a25ada34a9cc675}{Eina\+\_\+\+Future\+\_\+\+Cb} will be called with an \doxylink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value} typed as \doxylink{group__Eina__Value__Group_ga28f6fb160baf3068e7c67ffba0a29c20}{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}
\Hypertarget{group__Eina__Future_ga1e5e3dba94f44ea1d95d7e18936c3c21}\label{group__Eina__Future_ga1e5e3dba94f44ea1d95d7e18936c3c21} 
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_future\_desc\_flush()}{eina\_future\_desc\_flush()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void eina\+\_\+future\+\_\+desc\+\_\+flush (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}} \texorpdfstring{$\ast$}{*}}]{desc }\end{DoxyParamCaption})}



Flushes an Eina\+\_\+\+Future\+\_\+\+Desc. 

This function is mainly used by bindings to flush an Eina\+\_\+\+Future\+\_\+\+Desc. It will call the \doxylink{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 Eina\+\_\+\+Future\+\_\+\+Desc to flush, if {\ttfamily NULL} this is a noop. \\
\hline
\end{DoxyParams}
\Hypertarget{group__Eina__Future_ga5d5e20d9d68c676cbdecf4ecf58852da}\label{group__Eina__Future_ga5d5e20d9d68c676cbdecf4ecf58852da} 
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_future\_cb\_easy\_desc\_flush()}{eina\_future\_cb\_easy\_desc\_flush()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+desc\+\_\+flush (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}} \texorpdfstring{$\ast$}{*}}]{desc }\end{DoxyParamCaption})}



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

This function is mainly used by bindings to flush an \doxylink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}. It will call the \doxylink{group__Eina__Future__Callbacks_ga88b867eea465fb367d4974d9cf8d3866}{Eina\+\_\+\+Future\+\_\+\+Error\+\_\+\+Cb} with {\ttfamily ENOMEM}, the \doxylink{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 \doxylink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc} to flush, if {\ttfamily NULL} this is a noop. \\
\hline
\end{DoxyParams}


References \mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc_a5a7e0f4bd6e32f107bf17a05352da0e5}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::data}}, \mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc_af785ac4390997ecbdf13e89aa4840c34}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::error}}, and \mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc_a9ae635f5d45413527f77755a19abb77e}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::free}}.

\Hypertarget{group__Eina__Future_gab966fb4259f6c1d0f18840e31213a26a}\label{group__Eina__Future_gab966fb4259f6c1d0f18840e31213a26a} 
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_promise\_as\_value()}{eina\_promise\_as\_value()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} eina\+\_\+promise\+\_\+as\+\_\+value (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}} \texorpdfstring{$\ast$}{*}}]{p }\end{DoxyParamCaption})}



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

This function creates a new \doxylink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value} that will store an \doxylink{structEina__Promise}{Eina\+\_\+\+Promise} in it. This function is useful for dealing with promises inside an \doxylink{group__Eina__Future__Callbacks_ga43d2d4c20a2f7aee2a25ada34a9cc675}{Eina\+\_\+\+Future\+\_\+\+Cb}. By returning a promise inside the \doxylink{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{\ \ \ \ \ \ 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_gac420af42486bcbb879c4be67eacc6c2a}{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{\ \ \ 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_gab966fb4259f6c1d0f18840e31213a26a}{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{\ \ \ \ \ \ 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_gac420af42486bcbb879c4be67eacc6c2a}{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{\ \ \ 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 \doxylink{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}
\doxylink{group__Eina__Future_ga59277c714beab7a5231f014d4eed2670}{eina\+\_\+future\+\_\+as\+\_\+value()} 

\doxylink{group__Eina__Promise_ga33c04f489c071e795839cbf6e60566ba}{eina\+\_\+promise\+\_\+reject()} 

\doxylink{group__Eina__Promise_ga231f1e09741f0cb0e9ceeef15cf4e4ee}{eina\+\_\+promise\+\_\+resolve()} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gafa24bc421bcbbf70e5512619863fb3fc}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+FALSE\+\_\+\+GOTO}}, \mbox{\hyperlink{group__Eina__Value__Group_ga06540fbaf4a53dd90133deb813d4f102}{EINA\+\_\+\+VALUE\+\_\+\+EMPTY}}, and \mbox{\hyperlink{group__Eina__Promise_ga20f8b1103ee569060834d1dc3ab5f401}{EINA\+\_\+\+VALUE\+\_\+\+TYPE\+\_\+\+PROMISE}}.



Referenced by \mbox{\hyperlink{group__Eina__Future_ga59277c714beab7a5231f014d4eed2670}{eina\+\_\+future\+\_\+as\+\_\+value()}}.

\Hypertarget{group__Eina__Future_ga59277c714beab7a5231f014d4eed2670}\label{group__Eina__Future_ga59277c714beab7a5231f014d4eed2670} 
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_future\_as\_value()}{eina\_future\_as\_value()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} eina\+\_\+future\+\_\+as\+\_\+value (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*}}]{f }\end{DoxyParamCaption})}



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

This function is used for the same purposes as \doxylink{group__Eina__Future_gab966fb4259f6c1d0f18840e31213a26a}{eina\+\_\+promise\+\_\+as\+\_\+value()}, but receives an \doxylink{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}
\doxylink{group__Eina__Future_gab966fb4259f6c1d0f18840e31213a26a}{eina\+\_\+promise\+\_\+as\+\_\+value()} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then}}, \mbox{\hyperlink{group__Eina__Future_gab966fb4259f6c1d0f18840e31213a26a}{eina\+\_\+promise\+\_\+as\+\_\+value()}}, \mbox{\hyperlink{group__Eina__Promise_gaabcdc9f302644a86f2cca80e3a0fb049}{eina\+\_\+promise\+\_\+new()}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga4e028a0c5bd5743068c1c3f2302dc0e8}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO}}, \mbox{\hyperlink{group__Eina__Value__Group_ga06540fbaf4a53dd90133deb813d4f102}{EINA\+\_\+\+VALUE\+\_\+\+EMPTY}}, and \mbox{\hyperlink{group__Eina__Promise_ga20f8b1103ee569060834d1dc3ab5f401}{EINA\+\_\+\+VALUE\+\_\+\+TYPE\+\_\+\+PROMISE}}.

\Hypertarget{group__Eina__Future_ga6c6d97b2f3be307cc43364d6f4aade48}\label{group__Eina__Future_ga6c6d97b2f3be307cc43364d6f4aade48} 
\index{Eina Futures@{Eina Futures}!eina\_future\_new@{eina\_future\_new}}
\index{eina\_future\_new@{eina\_future\_new}!Eina Futures@{Eina Futures}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_future\_new()}{eina\_future\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*} eina\+\_\+future\+\_\+new (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}} \texorpdfstring{$\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 \doxylink{group__Eina__Promise_ga231f1e09741f0cb0e9ceeef15cf4e4ee}{eina\+\_\+promise\+\_\+resolve()} or \doxylink{group__Eina__Promise_ga33c04f489c071e795839cbf6e60566ba}{eina\+\_\+promise\+\_\+reject()}.

Futures can also be canceled using \doxylink{group__Eina__Future_ga5462a38eabc060b163d24c9d7395ae3b}{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 \doxylink{group__Eina__Future_ga6c6d97b2f3be307cc43364d6f4aade48}{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}
\doxylink{group__Eina__Promise_gaabcdc9f302644a86f2cca80e3a0fb049}{eina\+\_\+promise\+\_\+new()} 

\doxylink{group__Eina__Promise_ga33c04f489c071e795839cbf6e60566ba}{eina\+\_\+promise\+\_\+reject()} 

\doxylink{group__Eina__Promise_ga231f1e09741f0cb0e9ceeef15cf4e4ee}{eina\+\_\+promise\+\_\+resolve()} 

\doxylink{group__Eina__Future_ga5462a38eabc060b163d24c9d7395ae3b}{eina\+\_\+future\+\_\+cancel()} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}}, and \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gaa083dd2da7053e9b7b39cdc72326d56d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+TRUE\+\_\+\+GOTO}}.



Referenced by \mbox{\hyperlink{group__Eina__Future_ga195007c0a1e4e0d7c5bf3c6f46292c9d}{eina\+\_\+future\+\_\+all\+\_\+array()}}, \mbox{\hyperlink{group__Eina__Future_ga902c11d185a40bd748d30b7d2be94b5d}{eina\+\_\+future\+\_\+all\+\_\+iterator()}}, \mbox{\hyperlink{group__Eina__Future_ga803faac8b5dc7a858da3e0112fd97d10}{eina\+\_\+future\+\_\+race\+\_\+array()}}, \mbox{\hyperlink{group__Eina__Future_ga5f603578d333ca9f9c435785efa8cdcd}{eina\+\_\+future\+\_\+rejected()}}, and \mbox{\hyperlink{group__Eina__Future_ga9098beb0b805b06856008968a5b7c14a}{eina\+\_\+future\+\_\+resolved()}}.

\Hypertarget{group__Eina__Future_ga9098beb0b805b06856008968a5b7c14a}\label{group__Eina__Future_ga9098beb0b805b06856008968a5b7c14a} 
\index{Eina Futures@{Eina Futures}!eina\_future\_resolved@{eina\_future\_resolved}}
\index{eina\_future\_resolved@{eina\_future\_resolved}!Eina Futures@{Eina Futures}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_future\_resolved()}{eina\_future\_resolved()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*} eina\+\_\+future\+\_\+resolved (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Future__Callbacks_ga190fb0e75b86d093db85b05abfd21ebd}{Eina\+\_\+\+Future\+\_\+\+Scheduler}} \texorpdfstring{$\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 \doxylink{group__Eina__Promise_gaabcdc9f302644a86f2cca80e3a0fb049}{eina\+\_\+promise\+\_\+new()} followed by \doxylink{group__Eina__Future_ga6c6d97b2f3be307cc43364d6f4aade48}{eina\+\_\+future\+\_\+new()} and then \doxylink{group__Eina__Promise_ga231f1e09741f0cb0e9ceeef15cf4e4ee}{eina\+\_\+promise\+\_\+resolve()}.

Futures can also be canceled using \doxylink{group__Eina__Future_ga5462a38eabc060b163d24c9d7395ae3b}{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 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}
\doxylink{group__Eina__Promise_gaabcdc9f302644a86f2cca80e3a0fb049}{eina\+\_\+promise\+\_\+new()} 

\doxylink{group__Eina__Future_ga6c6d97b2f3be307cc43364d6f4aade48}{eina\+\_\+future\+\_\+new()} 

\doxylink{group__Eina__Promise_ga33c04f489c071e795839cbf6e60566ba}{eina\+\_\+promise\+\_\+reject()} 

\doxylink{group__Eina__Promise_ga231f1e09741f0cb0e9ceeef15cf4e4ee}{eina\+\_\+promise\+\_\+resolve()} 

\doxylink{group__Eina__Future_ga5462a38eabc060b163d24c9d7395ae3b}{eina\+\_\+future\+\_\+cancel()} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{group__Eina__Future_ga6c6d97b2f3be307cc43364d6f4aade48}{eina\+\_\+future\+\_\+new()}}, \mbox{\hyperlink{group__Eina__Promise_gaabcdc9f302644a86f2cca80e3a0fb049}{eina\+\_\+promise\+\_\+new()}}, \mbox{\hyperlink{group__Eina__Promise_ga231f1e09741f0cb0e9ceeef15cf4e4ee}{eina\+\_\+promise\+\_\+resolve()}}, and \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga4e028a0c5bd5743068c1c3f2302dc0e8}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO}}.

\Hypertarget{group__Eina__Future_ga5f603578d333ca9f9c435785efa8cdcd}\label{group__Eina__Future_ga5f603578d333ca9f9c435785efa8cdcd} 
\index{Eina Futures@{Eina Futures}!eina\_future\_rejected@{eina\_future\_rejected}}
\index{eina\_future\_rejected@{eina\_future\_rejected}!Eina Futures@{Eina Futures}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_future\_rejected()}{eina\_future\_rejected()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*} eina\+\_\+future\+\_\+rejected (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Future__Callbacks_ga190fb0e75b86d093db85b05abfd21ebd}{Eina\+\_\+\+Future\+\_\+\+Scheduler}} \texorpdfstring{$\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 \doxylink{group__Eina__Promise_gaabcdc9f302644a86f2cca80e3a0fb049}{eina\+\_\+promise\+\_\+new()} followed by \doxylink{group__Eina__Future_ga6c6d97b2f3be307cc43364d6f4aade48}{eina\+\_\+future\+\_\+new()} and then \doxylink{group__Eina__Promise_ga33c04f489c071e795839cbf6e60566ba}{eina\+\_\+promise\+\_\+reject()}.

Futures can also be canceled using \doxylink{group__Eina__Future_ga5462a38eabc060b163d24c9d7395ae3b}{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 \doxylink{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}
\doxylink{group__Eina__Promise_gaabcdc9f302644a86f2cca80e3a0fb049}{eina\+\_\+promise\+\_\+new()} 

\doxylink{group__Eina__Future_ga6c6d97b2f3be307cc43364d6f4aade48}{eina\+\_\+future\+\_\+new()} 

\doxylink{group__Eina__Promise_ga33c04f489c071e795839cbf6e60566ba}{eina\+\_\+promise\+\_\+reject()} 

\doxylink{group__Eina__Promise_ga231f1e09741f0cb0e9ceeef15cf4e4ee}{eina\+\_\+promise\+\_\+resolve()} 

\doxylink{group__Eina__Future_ga5462a38eabc060b163d24c9d7395ae3b}{eina\+\_\+future\+\_\+cancel()} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{group__Eina__Future_ga6c6d97b2f3be307cc43364d6f4aade48}{eina\+\_\+future\+\_\+new()}}, \mbox{\hyperlink{group__Eina__Promise_gaabcdc9f302644a86f2cca80e3a0fb049}{eina\+\_\+promise\+\_\+new()}}, \mbox{\hyperlink{group__Eina__Promise_ga33c04f489c071e795839cbf6e60566ba}{eina\+\_\+promise\+\_\+reject()}}, and \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga4e028a0c5bd5743068c1c3f2302dc0e8}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO}}.

\Hypertarget{group__Eina__Future_ga201dc23d7509f2953e5cd654e8cf601f}\label{group__Eina__Future_ga201dc23d7509f2953e5cd654e8cf601f} 
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_future\_then\_from\_desc()}{eina\_future\_then\_from\_desc()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*} eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*}}]{prev,  }\item[{const \mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}}}]{desc }\end{DoxyParamCaption})}



Register an 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 \doxylink{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 \doxylink{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{\ \ \ \ \ \ 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_gac420af42486bcbb879c4be67eacc6c2a}{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{\ \ \ 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_ga201dc23d7509f2953e5cd654e8cf601f}{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 \doxylink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value} type. In order to avoid this type of code the function \doxylink{group__Eina__Future_ga8efd2e10698d893468026e1eaf9e5948}{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 \doxylink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value} returned by a \doxylink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{Eina\+\_\+\+Future\+\_\+\+Desc\+::cb} will be delivered to the next \doxylink{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{\ \ \ eina\_value\_get(\&v,\ \&i);}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}File\ size\ as\ int:\ \%d\(\backslash\)n"{}},\ i);}
\DoxyCodeLine{\ \ \ 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_gafd6de1bb3ae7aecd804d7da76e3860de}{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{\ \ \ eina\_value\_get(\&v,\ \&file\_size\_str);}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}File\ size\ as\ string:\ \%s\(\backslash\)n"{}},\ file\_size\_str);}
\DoxyCodeLine{\ \ \ eina\_value\_setup(\&new\_v,\ \mbox{\hyperlink{group__Eina__Value__Group_ga959961fb03cd94a84ab469245c543732}{EINA\_VALUE\_TYPE\_DOUBLE}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Value__Value__Group_gafd6de1bb3ae7aecd804d7da76e3860de}{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{\ \ \ 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{\ \ \ eina\_value\_setup(\&new\_v,\ \mbox{\hyperlink{group__Eina__Value__Group_ga28f6fb160baf3068e7c67ffba0a29c20}{EINA\_VALUE\_TYPE\_ERROR}});}
\DoxyCodeLine{\ \ \ 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_gac420af42486bcbb879c4be67eacc6c2a}{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 \doxylink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()} and \doxylink{group__Eina__Future_ga201dc23d7509f2953e5cd654e8cf601f}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()} there\textquotesingle{}s a function that makes this task much easier, please check \doxylink{group__Eina__Future_gaf64b3969ac3a86afe47da820c625a416}{eina\+\_\+future\+\_\+chain\+\_\+array()} for more information. \begin{DoxyNote}{Note}
This example does manual conversion and print, however Eina offers \doxylink{group__Eina__Future_ga8937a1545bc81676138a23d25829650b}{eina\+\_\+future\+\_\+cb\+\_\+convert\+\_\+to()} and \doxylink{group__Eina__Future_ga84c55db821fee59726596580aa4bd827}{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}
\doxylink{group__Eina__Future_ga6c6d97b2f3be307cc43364d6f4aade48}{eina\+\_\+future\+\_\+new()} 

\doxylink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()} 

Eina\+\_\+\+Future\+\_\+\+Desc 

\doxylink{group__Eina__Future_gaf64b3969ac3a86afe47da820c625a416}{eina\+\_\+future\+\_\+chain\+\_\+array()} 

\doxylink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()} 

\doxylink{group__Eina__Future_ga84c55db821fee59726596580aa4bd827}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc()} 

\doxylink{group__Eina__Future_ga8efd2e10698d893468026e1eaf9e5948}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()} 

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

\doxylink{group__Eina__Future_ga8937a1545bc81676138a23d25829650b}{eina\+\_\+future\+\_\+cb\+\_\+convert\+\_\+to()} 

\doxylink{group__Eina__Future_ga5462a38eabc060b163d24c9d7395ae3b}{eina\+\_\+future\+\_\+cancel()} 

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

\doxylink{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gaa083dd2da7053e9b7b39cdc72326d56d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+TRUE\+\_\+\+GOTO}}.

\Hypertarget{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111}\label{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111} 
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_future\_cb\_log\_from\_desc()}{eina\_future\_cb\_log\_from\_desc()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{struct__Eina__Future__Desc}{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 \doxylink{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 \doxylink{group__Eina__Future_ga14896937e5ae72ac066518d8fe4e483d}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+dbg()} which will automatically fill the following fields\+:

\begin{DoxyItemize}
\item \doxylink{struct__Eina__Future__Cb__Log__Desc_a2b5cdedfc4bcd383d341fc9bb816fb46}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file}\+: The {\ttfamily \+\_\+\+\_\+\+FILE\+\_\+\+\_\+} function will be used. \item \doxylink{struct__Eina__Future__Cb__Log__Desc_ac40ef8a65fbdec71615d6327b588f135}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func}\+: The {\ttfamily \+\_\+\+\_\+func\+\_\+\+\_\+} macro will be used. \item \doxylink{struct__Eina__Future__Cb__Log__Desc_a160bbd8d35b40b00d0ef41d9d283101c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level}\+: {\ttfamily EINA\+\_\+\+LOG\+\_\+\+LEVEL\+\_\+\+DBG} will be used. \item \doxylink{struct__Eina__Future__Cb__Log__Desc_ae20c3c17ec8f6c62b5041d26b6b17b8c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain}\+: {\ttfamily EINA\+\_\+\+LOG\+\_\+\+DOMAIN\+\_\+\+DEFAULT} will be used. \item \doxylink{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 Eina\+\_\+\+Future\+\_\+\+Desc
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxylink{group__Eina__Future__Callbacks_ga6d17eda361b40db4ebaf034a993a03fe}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc} 

\doxylink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()} 

\doxylink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()} 

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

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

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

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

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

\doxylink{group__Eina__Future_ga84c55db821fee59726596580aa4bd827}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc()} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ae20c3c17ec8f6c62b5041d26b6b17b8c}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga4e028a0c5bd5743068c1c3f2302dc0e8}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO}}, \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2b5cdedfc4bcd383d341fc9bb816fb46}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file}}, \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ac40ef8a65fbdec71615d6327b588f135}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func}}, \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a160bbd8d35b40b00d0ef41d9d283101c}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level}}, \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2cab78b0d653b250d7b68f8ffb848c5a}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::line}}, \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a3b102d72240fc8fed9eb9529dfc73454}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::prefix}}, and \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ae5a30e373ff8f0bd5b999496c019c2fe}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::suffix}}.

\Hypertarget{group__Eina__Future_gaf64b3969ac3a86afe47da820c625a416}\label{group__Eina__Future_gaf64b3969ac3a86afe47da820c625a416} 
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_future\_chain\_array()}{eina\_future\_chain\_array()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*} eina\+\_\+future\+\_\+chain\+\_\+array (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*}}]{prev,  }\item[{const \mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}}}]{descs\mbox{[}$\,$\mbox{]} }\end{DoxyParamCaption})}



Creates a future chain. 

This behaves exactly like \doxylink{group__Eina__Future_ga201dc23d7509f2953e5cd654e8cf601f}{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 \doxylink{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 \doxylink{struct__Eina__Future__Desc_a3776d82a99776d2b6a96839c6191bc13}{Eina\+\_\+\+Future\+\_\+\+Desc\+::data}.

Just like \doxylink{group__Eina__Future_ga201dc23d7509f2953e5cd654e8cf601f}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()}, the value returned by a \doxylink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{Eina\+\_\+\+Future\+\_\+\+Desc\+::cb} callback will be delivered to the next \doxylink{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 \doxylink{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}
\doxylink{group__Eina__Future_ga6c6d97b2f3be307cc43364d6f4aade48}{eina\+\_\+future\+\_\+new()} 

\doxylink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()} 

Eina\+\_\+\+Future\+\_\+\+Desc 

\doxylink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()} 

\doxylink{group__Eina__Future_ga5acd0341dcde7ed060254fab2c0c18a9}{eina\+\_\+future\+\_\+cb\+\_\+ignore\+\_\+error()} 

\doxylink{group__Eina__Future_ga84c55db821fee59726596580aa4bd827}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc()} 

\doxylink{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()} 

\doxylink{group__Eina__Future_ga8efd2e10698d893468026e1eaf9e5948}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()} 

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

\doxylink{group__Eina__Future_ga201dc23d7509f2953e5cd654e8cf601f}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()} 

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

\doxylink{group__Eina__Future_ga8937a1545bc81676138a23d25829650b}{eina\+\_\+future\+\_\+cb\+\_\+convert\+\_\+to()} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga4e028a0c5bd5743068c1c3f2302dc0e8}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO}}, and \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gaa083dd2da7053e9b7b39cdc72326d56d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+TRUE\+\_\+\+GOTO}}.

\Hypertarget{group__Eina__Future_ga47581dfd989e38d49918aacf77120a1e}\label{group__Eina__Future_ga47581dfd989e38d49918aacf77120a1e} 
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_future\_chain\_easy\_array()}{eina\_future\_chain\_easy\_array()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*} eina\+\_\+future\+\_\+chain\+\_\+easy\+\_\+array (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*}}]{prev,  }\item[{const \mbox{\hyperlink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}}}]{descs\mbox{[}$\,$\mbox{]} }\end{DoxyParamCaption})}



Wrapper around \doxylink{group__Eina__Future_gaf64b3969ac3a86afe47da820c625a416}{eina\+\_\+future\+\_\+chain\+\_\+array()} and \doxylink{group__Eina__Future_ga8efd2e10698d893468026e1eaf9e5948}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()} 

This functions makes it easier to use \doxylink{group__Eina__Future_gaf64b3969ac3a86afe47da820c625a416}{eina\+\_\+future\+\_\+chain\+\_\+array()} with \doxylink{group__Eina__Future_ga8efd2e10698d893468026e1eaf9e5948}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()}, check the macro \doxylink{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 \doxylink{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}
\doxylink{group__Eina__Future_ga51f933135f14e6e0183af7366aa351d3}{eina\+\_\+future\+\_\+chain\+\_\+easy()} 

\doxylink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()} 

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

\doxylink{group__Eina__Future_gaf64b3969ac3a86afe47da820c625a416}{eina\+\_\+future\+\_\+chain\+\_\+array()} 

\doxylink{group__Eina__Future_ga8efd2e10698d893468026e1eaf9e5948}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{group__Eina__Future_ga8efd2e10698d893468026e1eaf9e5948}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga4e028a0c5bd5743068c1c3f2302dc0e8}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gaa083dd2da7053e9b7b39cdc72326d56d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+TRUE\+\_\+\+GOTO}}, \mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc_af785ac4390997ecbdf13e89aa4840c34}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::error}}, \mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc_a9ae635f5d45413527f77755a19abb77e}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::free}}, \mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc_a15ec41c953419c10745fb2738fd311d5}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::success}}, and \mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc_a5112a2ccff7f8b1c48c242763a948d05}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::success\+\_\+type}}.

\Hypertarget{group__Eina__Future_ga84c55db821fee59726596580aa4bd827}\label{group__Eina__Future_ga84c55db821fee59726596580aa4bd827} 
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_future\_cb\_console\_from\_desc()}{eina\_future\_cb\_console\_from\_desc()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{struct__Eina__Future__Desc}{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 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 \doxylink{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 \doxylink{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 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 ("{}"{}) are used instead. If {\ttfamily desc-\/\texorpdfstring{$>$}{>}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}
\doxylink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()} 

Eina\+\_\+\+Future\+\_\+\+Desc 

\doxylink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()} 

\doxylink{group__Eina__Future_ga8efd2e10698d893468026e1eaf9e5948}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()} 

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

\doxylink{group__Eina__Future_ga201dc23d7509f2953e5cd654e8cf601f}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()} 

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

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

\doxylink{group__Eina__Future_ga5acd0341dcde7ed060254fab2c0c18a9}{eina\+\_\+future\+\_\+cb\+\_\+ignore\+\_\+error()} 

\doxylink{group__Eina__Future_ga25abdeb653ee9056a33288874d8d7111}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}}, \mbox{\hyperlink{struct__Eina__Future__Desc_a3776d82a99776d2b6a96839c6191bc13}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::data}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga4e028a0c5bd5743068c1c3f2302dc0e8}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO}}, \mbox{\hyperlink{struct__Eina__Future__Cb__Console__Desc_aa00126c0de56869e56fcf160c0b7cec8}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Console\+\_\+\+Desc\+::prefix}}, and \mbox{\hyperlink{struct__Eina__Future__Cb__Console__Desc_a4cbac748c4362ac8760946c6bf19822b}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Console\+\_\+\+Desc\+::suffix}}.

\Hypertarget{group__Eina__Future_ga5acd0341dcde7ed060254fab2c0c18a9}\label{group__Eina__Future_ga5acd0341dcde7ed060254fab2c0c18a9} 
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_future\_cb\_ignore\_error()}{eina\_future\_cb\_ignore\_error()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{struct__Eina__Future__Desc}{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 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 \doxylink{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 \doxylink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()} or \doxylink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()} 
\end{DoxyReturn}
\Hypertarget{group__Eina__Future_ga8937a1545bc81676138a23d25829650b}\label{group__Eina__Future_ga8937a1545bc81676138a23d25829650b} 
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_future\_cb\_convert\_to()}{eina\_future\_cb\_convert\_to()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}} eina\+\_\+future\+\_\+cb\+\_\+convert\+\_\+to (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Value__Group_gaab67ab8bcd0624280c5276044b07e0d2}{Eina\+\_\+\+Value\+\_\+\+Type}} \texorpdfstring{$\ast$}{*}}]{type }\end{DoxyParamCaption})}



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


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

Eina\+\_\+\+Future\+\_\+\+Desc 

\doxylink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()} 

\doxylink{group__Eina__Future_ga8efd2e10698d893468026e1eaf9e5948}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()} 

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

\doxylink{group__Eina__Future_ga201dc23d7509f2953e5cd654e8cf601f}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()} 

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


References \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}}.

\Hypertarget{group__Eina__Future_ga8efd2e10698d893468026e1eaf9e5948}\label{group__Eina__Future_ga8efd2e10698d893468026e1eaf9e5948} 
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_future\_cb\_easy\_from\_desc()}{eina\_future\_cb\_easy\_from\_desc()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{struct__Eina__Future__Desc}{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 Eina\+\_\+\+Future\+\_\+\+Desc based on an \doxylink{group__Eina__Future__Callbacks_ga2c756a80e0b4a4a39737c5e3a8d0f2e6}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}. 

This function aims to be used in conjunction with \doxylink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}, \doxylink{group__Eina__Future_ga201dc23d7509f2953e5cd654e8cf601f}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()} and friends and its main objective is to simplify error handling and \doxylink{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 \doxylink{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 \doxylink{struct__Eina__Future__Cb__Easy__Desc_a5112a2ccff7f8b1c48c242763a948d05}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::success\+\_\+type}. In case \doxylink{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 \doxylink{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 \doxylink{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 \doxylink{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{\ \ 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_gac420af42486bcbb879c4be67eacc6c2a}{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 Eina\+\_\+\+Future\+\_\+\+Desc
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxylink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()} 

\doxylink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()} 

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


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga4e028a0c5bd5743068c1c3f2302dc0e8}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO}}.



Referenced by \mbox{\hyperlink{group__Eina__Future_ga47581dfd989e38d49918aacf77120a1e}{eina\+\_\+future\+\_\+chain\+\_\+easy\+\_\+array()}}.

\Hypertarget{group__Eina__Future_ga612daeff4809ac94284e89b25c8eb4ed}\label{group__Eina__Future_ga612daeff4809ac94284e89b25c8eb4ed} 
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_promise\_all\_array()}{eina\_promise\_all\_array()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}} \texorpdfstring{$\ast$}{*} eina\+\_\+promise\+\_\+all\+\_\+array (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\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 \doxylink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value} type array which contains \doxylink{group__Eina__Value__Group_gaa2441513063da86622e13f5c7e053005}{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{\ \ \ \ \ \ 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_gac420af42486bcbb879c4be67eacc6c2a}{eina\_error\_msg\_get}}(err));}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{keywordflow}{return}\ array;}
\DoxyCodeLine{\ \ \ \ \}}
\DoxyCodeLine{\ \ \ len\ =\ 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{\ \ \ \ \ \ 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{\ \ \ \ \ \ \ \ \ 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_gac420af42486bcbb879c4be67eacc6c2a}{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{\ \ \ \ \ \ \ \ \ \ 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{\ \ \ \ \ \ \ \ \ \ 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{\ \ \ \ \ \ \ \ \ \ 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 \doxylink{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}
\doxylink{group__Eina__Future_ga195007c0a1e4e0d7c5bf3c6f46292c9d}{eina\+\_\+future\+\_\+all\+\_\+array()} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gafa24bc421bcbbf70e5512619863fb3fc}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+FALSE\+\_\+\+GOTO}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga4e028a0c5bd5743068c1c3f2302dc0e8}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}, \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\+\_\+\+VALUE\+\_\+\+TYPE\+\_\+\+INT}}, and \mbox{\hyperlink{group__Eina__Value__Group_gaa2441513063da86622e13f5c7e053005}{EINA\+\_\+\+VALUE\+\_\+\+TYPE\+\_\+\+VALUE}}.



Referenced by \mbox{\hyperlink{group__Eina__Future_ga195007c0a1e4e0d7c5bf3c6f46292c9d}{eina\+\_\+future\+\_\+all\+\_\+array()}}.

\Hypertarget{group__Eina__Future_gad86937f4354573d8e13cbe6ec62d0869}\label{group__Eina__Future_gad86937f4354573d8e13cbe6ec62d0869} 
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_promise\_all\_iterator()}{eina\_promise\_all\_iterator()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}} \texorpdfstring{$\ast$}{*} eina\+\_\+promise\+\_\+all\+\_\+iterator (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} \texorpdfstring{$\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 \doxylink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value} type array which contains \doxylink{group__Eina__Value__Group_gaa2441513063da86622e13f5c7e053005}{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}
\doxylink{group__Eina__Future_ga902c11d185a40bd748d30b7d2be94b5d}{eina\+\_\+future\+\_\+all\+\_\+iterator()} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then}}, \mbox{\hyperlink{group__Eina__Iterator__Group_gac7314580e18868ef229f5d2814562794}{EINA\+\_\+\+ITERATOR\+\_\+\+FOREACH}}, \mbox{\hyperlink{group__Eina__Iterator__Group_ga50da005e8d26c0a043d0d1c025bc9008}{eina\+\_\+iterator\+\_\+free()}}, \mbox{\hyperlink{group__Eina__Iterator__Group_gad870f9b1d5fb8892cb9623ad0e7f75b2}{eina\+\_\+iterator\+\_\+next()}}, \mbox{\hyperlink{group__Eina__Promise_gaabcdc9f302644a86f2cca80e3a0fb049}{eina\+\_\+promise\+\_\+new()}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gafa24bc421bcbbf70e5512619863fb3fc}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+FALSE\+\_\+\+GOTO}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga4e028a0c5bd5743068c1c3f2302dc0e8}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}, \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\+\_\+\+VALUE\+\_\+\+TYPE\+\_\+\+INT}}, and \mbox{\hyperlink{group__Eina__Value__Group_gaa2441513063da86622e13f5c7e053005}{EINA\+\_\+\+VALUE\+\_\+\+TYPE\+\_\+\+VALUE}}.



Referenced by \mbox{\hyperlink{group__Eina__Future_ga902c11d185a40bd748d30b7d2be94b5d}{eina\+\_\+future\+\_\+all\+\_\+iterator()}}.

\Hypertarget{group__Eina__Future_ga5f61d533ecab8275bb3329e8cc78424a}\label{group__Eina__Future_ga5f61d533ecab8275bb3329e8cc78424a} 
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_promise\_race\_array()}{eina\_promise\_race\_array()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{structEina__Promise}{Eina\+\_\+\+Promise}} \texorpdfstring{$\ast$}{*} eina\+\_\+promise\+\_\+race\+\_\+array (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\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 \doxylink{group__Eina__Value__Group_ga8147143699c5f5a686415090080d3f9e}{EINA\+\_\+\+VALUE\+\_\+\+TYPE\+\_\+\+STRUCT} with two fields\+:

\begin{DoxyItemize}
\item A field named {\ttfamily value} containing an \doxylink{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{\ \ \ \ eina\_value\_struct\_get(\&v,\ \textcolor{stringliteral}{"{}index"{}},\ \&i);}
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Get\ the\ operation\ result}}
\DoxyCodeLine{\ \ \ \ 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{\ \ \ \ \ \ \ \ \ 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{\ \ \ \ \ \ \ \ \ \ 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{\ \ \ \ \ \ \ \ \ \ \ eina\_value\_get(\&result,\ \&p);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}50\ places\ of\ PI:\ \%f\(\backslash\)n"{}},\ p);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ 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_gac420af42486bcbb879c4be67eacc6c2a}{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_ga803faac8b5dc7a858da3e0112fd97d10}{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 \doxylink{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}
\doxylink{group__Eina__Future_ga803faac8b5dc7a858da3e0112fd97d10}{eina\+\_\+future\+\_\+race\+\_\+array()} 

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


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gafa24bc421bcbbf70e5512619863fb3fc}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+FALSE\+\_\+\+GOTO}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga4e028a0c5bd5743068c1c3f2302dc0e8}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO}}, and \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}.



Referenced by \mbox{\hyperlink{group__Eina__Future_ga803faac8b5dc7a858da3e0112fd97d10}{eina\+\_\+future\+\_\+race\+\_\+array()}}.

\Hypertarget{group__Eina__Future_ga195007c0a1e4e0d7c5bf3c6f46292c9d}\label{group__Eina__Future_ga195007c0a1e4e0d7c5bf3c6f46292c9d} 
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_future\_all\_array()}{eina\_future\_all\_array()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*} eina\+\_\+future\+\_\+all\+\_\+array (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\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 \doxylink{group__Eina__Future_ga612daeff4809ac94284e89b25c8eb4ed}{eina\+\_\+promise\+\_\+all\+\_\+array()}


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

\doxylink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{group__Eina__Future_ga6c6d97b2f3be307cc43364d6f4aade48}{eina\+\_\+future\+\_\+new()}}, and \mbox{\hyperlink{group__Eina__Future_ga612daeff4809ac94284e89b25c8eb4ed}{eina\+\_\+promise\+\_\+all\+\_\+array()}}.

\Hypertarget{group__Eina__Future_ga902c11d185a40bd748d30b7d2be94b5d}\label{group__Eina__Future_ga902c11d185a40bd748d30b7d2be94b5d} 
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_future\_all\_iterator()}{eina\_future\_all\_iterator()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*} eina\+\_\+future\+\_\+all\+\_\+iterator (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} \texorpdfstring{$\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 \doxylink{group__Eina__Future_gad86937f4354573d8e13cbe6ec62d0869}{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}
\doxylink{group__Eina__Future_gad86937f4354573d8e13cbe6ec62d0869}{eina\+\_\+promise\+\_\+all\+\_\+iterator()} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{group__Eina__Future_ga6c6d97b2f3be307cc43364d6f4aade48}{eina\+\_\+future\+\_\+new()}}, and \mbox{\hyperlink{group__Eina__Future_gad86937f4354573d8e13cbe6ec62d0869}{eina\+\_\+promise\+\_\+all\+\_\+iterator()}}.

\Hypertarget{group__Eina__Future_ga803faac8b5dc7a858da3e0112fd97d10}\label{group__Eina__Future_ga803faac8b5dc7a858da3e0112fd97d10} 
\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}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_future\_race\_array()}{eina\_future\_race\_array()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\ast$}{*} eina\+\_\+future\+\_\+race\+\_\+array (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} \texorpdfstring{$\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 \doxylink{group__Eina__Future_ga5f61d533ecab8275bb3329e8cc78424a}{eina\+\_\+promise\+\_\+race\+\_\+array()}


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

\doxylink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{EINA\+\_\+\+FUTURE\+\_\+\+SENTINEL} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{group__Eina__Future_ga6c6d97b2f3be307cc43364d6f4aade48}{eina\+\_\+future\+\_\+new()}}, and \mbox{\hyperlink{group__Eina__Future_ga5f61d533ecab8275bb3329e8cc78424a}{eina\+\_\+promise\+\_\+race\+\_\+array()}}.



\doxysubsubsubsection{Variable Documentation}
\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}}
\doxysubsubsubsubsection{\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}} \texorpdfstring{$\ast$}{*} EINA\+\_\+\+PROMISE\+\_\+\+RACE\+\_\+\+STRUCT\+\_\+\+DESC\hspace{0.3cm}{\ttfamily [extern]}}



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

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

\doxylink{struct__Eina__Future__Race__Result}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Race\+\_\+\+Result} 
\end{DoxySeeAlso}
\input{group__Eina__Future__Callbacks}
