\hypertarget{group__Eina__Future}{}\doxysection{Eina\+\_\+\+Future}
\label{group__Eina__Future}\index{Eina\_Future@{Eina\_Future}}


Cancels a future.  


\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{struct__Eina__Future__Race__Result}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Race\+\_\+\+Result}}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{E\+I\+N\+A\+\_\+\+F\+U\+T\+U\+R\+E\+\_\+\+S\+E\+N\+T\+I\+N\+EL}}~((void $\ast$)(unsigned long)-\/1)
\begin{DoxyCompactList}\small\item\em Used by \mbox{\hyperlink{group__Eina__Future_ga3edff86abbf1045c6ad9a9db6e6ec339}{eina\+\_\+promise\+\_\+race\+\_\+array()}} and \mbox{\hyperlink{group__Eina__Future_ga6ccbe5f596fb8dccc444e6de681e47a0}{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_ga3edff86abbf1045c6ad9a9db6e6ec339}{eina\+\_\+promise\+\_\+race\+\_\+array}}((Eina\+\_\+\+Future $\ast$\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{E\+I\+N\+A\+\_\+\+F\+U\+T\+U\+R\+E\+\_\+\+S\+E\+N\+T\+I\+N\+EL}}\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga3edff86abbf1045c6ad9a9db6e6ec339}{eina\+\_\+promise\+\_\+race\+\_\+array()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga6a39aa29dad9e9ba9038908758f20c32}{eina\+\_\+future\+\_\+race}}(...)~\mbox{\hyperlink{group__Eina__Future_ga2c63774e66100dc5f4b91f88f0efc5f1}{eina\+\_\+future\+\_\+race\+\_\+array}}((Eina\+\_\+\+Future $\ast$\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{E\+I\+N\+A\+\_\+\+F\+U\+T\+U\+R\+E\+\_\+\+S\+E\+N\+T\+I\+N\+EL}}\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga2c63774e66100dc5f4b91f88f0efc5f1}{eina\+\_\+future\+\_\+race\+\_\+array()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga70fb993acf2af507103c0c161412767e}{eina\+\_\+future\+\_\+all}}(...)~\mbox{\hyperlink{group__Eina__Future_ga8838591bc2163cac63ba6a5180a63091}{eina\+\_\+future\+\_\+all\+\_\+array}}((Eina\+\_\+\+Future $\ast$\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{E\+I\+N\+A\+\_\+\+F\+U\+T\+U\+R\+E\+\_\+\+S\+E\+N\+T\+I\+N\+EL}}\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga8838591bc2163cac63ba6a5180a63091}{eina\+\_\+future\+\_\+all\+\_\+array()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_gaeffefb72180f300a69bfd3036a16c317}{eina\+\_\+promise\+\_\+all}}(...)~\mbox{\hyperlink{group__Eina__Future_ga6ccbe5f596fb8dccc444e6de681e47a0}{eina\+\_\+promise\+\_\+all\+\_\+array}}((Eina\+\_\+\+Future $\ast$\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{E\+I\+N\+A\+\_\+\+F\+U\+T\+U\+R\+E\+\_\+\+S\+E\+N\+T\+I\+N\+EL}}\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga6ccbe5f596fb8dccc444e6de681e47a0}{eina\+\_\+promise\+\_\+all\+\_\+array()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy}}(...)~\mbox{\hyperlink{group__Eina__Future_gaad0c23b540f1424301d2609a35ef8eac}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc}}((\mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}})\{\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_gaad0c23b540f1424301d2609a35ef8eac}{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_ga74c9d6017478584a85b8e3914083c728}{eina\+\_\+future\+\_\+chain\+\_\+array}}(\+\_\+prev, (\mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}}\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+, \{.cb = N\+U\+LL, .data = N\+U\+LL\}\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga74c9d6017478584a85b8e3914083c728}{eina\+\_\+future\+\_\+chain\+\_\+array()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then}}(\+\_\+prev, ...)~\mbox{\hyperlink{group__Eina__Future_ga20c3b066d8c3418891e71a0d0c5103ea}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc}}(\+\_\+prev, (\mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}})\{\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga20c3b066d8c3418891e71a0d0c5103ea}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga32414cc629c2b989984394daef6f560b}{eina\+\_\+future\+\_\+cb\+\_\+console}}(...)~\mbox{\hyperlink{group__Eina__Future_ga068c74621a75ee8e1862b57565a50106}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc}}((\mbox{\hyperlink{struct__Eina__Future__Cb__Console__Desc}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Console\+\_\+\+Desc}})\{\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga068c74621a75ee8e1862b57565a50106}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga14896937e5ae72ac066518d8fe4e483d}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+dbg}}(\+\_\+prefix,  \+\_\+suffix)
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga9b9ab27d34a567e47b34a888d8fb6fa2}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga91cba9ac4306b0dee948dd3a0b10a893}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+crit}}(\+\_\+prefix,  \+\_\+suffix)
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga9b9ab27d34a567e47b34a888d8fb6fa2}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_gade1a19f673ac90442409aba274ff0884}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+err}}(\+\_\+prefix,  \+\_\+suffix)
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga9b9ab27d34a567e47b34a888d8fb6fa2}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_gaf3f9d1b140fa23528a74f09e78fadb09}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+info}}(\+\_\+prefix,  \+\_\+suffix)
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga9b9ab27d34a567e47b34a888d8fb6fa2}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga8ed87813808c62045569f4e09868dbe8}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+warn}}(\+\_\+prefix,  \+\_\+suffix)
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga9b9ab27d34a567e47b34a888d8fb6fa2}{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_ga20c3b066d8c3418891e71a0d0c5103ea}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc}}(\+\_\+prev, \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy}}(\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+))
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}} and \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy()}}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Future_ga51f933135f14e6e0183af7366aa351d3}{eina\+\_\+future\+\_\+chain\+\_\+easy}}(\+\_\+prev, ...)~\mbox{\hyperlink{group__Eina__Future_ga90dcf8961d7a44fa59861953f18ffafa}{eina\+\_\+future\+\_\+chain\+\_\+easy\+\_\+array}}(\+\_\+prev, (\mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}}\mbox{[}$\,$\mbox{]}) \{\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+, \{N\+U\+LL, N\+U\+LL, N\+U\+LL, N\+U\+LL, N\+U\+LL\}\})
\begin{DoxyCompactList}\small\item\em A syntactic sugar over \mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}} and \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy()}}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eina__Future_gabb092b87dd917006a4591a6cd5536b8a}\label{group__Eina__Future_gabb092b87dd917006a4591a6cd5536b8a}} 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} void {\bfseries eina\+\_\+future\+\_\+cancel} (Eina\+\_\+\+Future $\ast$f)
\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} void \mbox{\hyperlink{group__Eina__Future_ga5336419ed02f1d9abbe7734779d3dbd3}{eina\+\_\+future\+\_\+desc\+\_\+flush}} (\mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}} $\ast$desc)
\begin{DoxyCompactList}\small\item\em Flushes an \#\+Eina\+\_\+\+Future\+\_\+\+Desc. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} void \mbox{\hyperlink{group__Eina__Future_ga9d52be047b2d5eb3140c54ea228d078b}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+desc\+\_\+flush}} (\mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}} $\ast$desc)
\begin{DoxyCompactList}\small\item\em Flushes an \#\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} \mbox{\hyperlink{group__Eina__Future_ga02fdf9a0ba1a47431606ee8c16f1a914}{eina\+\_\+promise\+\_\+as\+\_\+value}} (Eina\+\_\+\+Promise $\ast$p)
\begin{DoxyCompactList}\small\item\em Creates a new Eina\+\_\+\+Value from a promise. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} \mbox{\hyperlink{group__Eina__Future_gaacfa57469fcd9467f14a529e7b72887b}{eina\+\_\+future\+\_\+as\+\_\+value}} (Eina\+\_\+\+Future $\ast$f)
\begin{DoxyCompactList}\small\item\em Creates an Eina\+\_\+\+Value from a future. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} Eina\+\_\+\+Future $\ast$ \mbox{\hyperlink{group__Eina__Future_ga4ae0bbfdefe911b043e0ae5b4d030e7e}{eina\+\_\+future\+\_\+new}} (Eina\+\_\+\+Promise $\ast$p)
\begin{DoxyCompactList}\small\item\em Creates a new future. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} Eina\+\_\+\+Future $\ast$ \mbox{\hyperlink{group__Eina__Future_ga333ff19929c6dfb4c2c115ccf783d3f0}{eina\+\_\+future\+\_\+resolved}} (\mbox{\hyperlink{struct__Eina__Future__Scheduler}{Eina\+\_\+\+Future\+\_\+\+Scheduler}} $\ast$scheduler, \mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} value)
\begin{DoxyCompactList}\small\item\em Creates a new future that is already resolved to a value. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} Eina\+\_\+\+Future $\ast$ \mbox{\hyperlink{group__Eina__Future_gad7be8977f169a05d73563df1690d25b2}{eina\+\_\+future\+\_\+rejected}} (\mbox{\hyperlink{struct__Eina__Future__Scheduler}{Eina\+\_\+\+Future\+\_\+\+Scheduler}} $\ast$scheduler, \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} err)
\begin{DoxyCompactList}\small\item\em Creates a new future that is already rejected to a specified error. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} Eina\+\_\+\+Future $\ast$ \mbox{\hyperlink{group__Eina__Future_ga20c3b066d8c3418891e71a0d0c5103ea}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc}} (Eina\+\_\+\+Future $\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 resolve/rejected. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}} \mbox{\hyperlink{group__Eina__Future_ga9b9ab27d34a567e47b34a888d8fb6fa2}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc}} (const \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc}{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__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} Eina\+\_\+\+Future $\ast$ \mbox{\hyperlink{group__Eina__Future_ga74c9d6017478584a85b8e3914083c728}{eina\+\_\+future\+\_\+chain\+\_\+array}} (Eina\+\_\+\+Future $\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__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} Eina\+\_\+\+Future $\ast$ \mbox{\hyperlink{group__Eina__Future_ga90dcf8961d7a44fa59861953f18ffafa}{eina\+\_\+future\+\_\+chain\+\_\+easy\+\_\+array}} (Eina\+\_\+\+Future $\ast$prev, const \mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}} descs\mbox{[}$\,$\mbox{]})
\begin{DoxyCompactList}\small\item\em Wrapper around \mbox{\hyperlink{group__Eina__Future_ga74c9d6017478584a85b8e3914083c728}{eina\+\_\+future\+\_\+chain\+\_\+array()}} and \mbox{\hyperlink{group__Eina__Future_gaad0c23b540f1424301d2609a35ef8eac}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()}} \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}} \mbox{\hyperlink{group__Eina__Future_ga068c74621a75ee8e1862b57565a50106}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc}} (const \mbox{\hyperlink{struct__Eina__Future__Cb__Console__Desc}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Console\+\_\+\+Desc}} desc)
\begin{DoxyCompactList}\small\item\em Creates an Eina\+\_\+\+Future\+\_\+\+Desc that will print the previous future resolved value. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}} \mbox{\hyperlink{group__Eina__Future_ga706f9f0e5c6fc1d1b5e066d6c1f48eda}{eina\+\_\+future\+\_\+cb\+\_\+ignore\+\_\+error}} (\mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} err)
\begin{DoxyCompactList}\small\item\em Returns a \#\+Eina\+\_\+\+Future\+\_\+\+Desc that ignores an error. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}} \mbox{\hyperlink{group__Eina__Future_gade0da31ea96e8461ec403f7492240041}{eina\+\_\+future\+\_\+cb\+\_\+convert\+\_\+to}} (const \mbox{\hyperlink{group__Eina__Value__Group_gaab67ab8bcd0624280c5276044b07e0d2}{Eina\+\_\+\+Value\+\_\+\+Type}} $\ast$type)
\begin{DoxyCompactList}\small\item\em Creates an \#\+Eina\+\_\+\+Future\+\_\+\+Desc which will convert the the received eina value to a given type. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}} \mbox{\hyperlink{group__Eina__Future_gaad0c23b540f1424301d2609a35ef8eac}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc}} (const \mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}} desc)
\begin{DoxyCompactList}\small\item\em Creates an \#\+Eina\+\_\+\+Future\+\_\+\+Desc based on a \#\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} Eina\+\_\+\+Promise $\ast$ \mbox{\hyperlink{group__Eina__Future_ga6ccbe5f596fb8dccc444e6de681e47a0}{eina\+\_\+promise\+\_\+all\+\_\+array}} (Eina\+\_\+\+Future $\ast$array\mbox{[}$\,$\mbox{]})
\begin{DoxyCompactList}\small\item\em Creates an all promise. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} Eina\+\_\+\+Promise $\ast$ \mbox{\hyperlink{group__Eina__Future_ga3edff86abbf1045c6ad9a9db6e6ec339}{eina\+\_\+promise\+\_\+race\+\_\+array}} (Eina\+\_\+\+Future $\ast$array\mbox{[}$\,$\mbox{]})
\begin{DoxyCompactList}\small\item\em Creates a race promise. \end{DoxyCompactList}\item 
static Eina\+\_\+\+Future $\ast$ \mbox{\hyperlink{group__Eina__Future_ga8838591bc2163cac63ba6a5180a63091}{eina\+\_\+future\+\_\+all\+\_\+array}} (Eina\+\_\+\+Future $\ast$array\mbox{[}$\,$\mbox{]})
\begin{DoxyCompactList}\small\item\em Creates a future that will be resolved once all futures from {\ttfamily array} is resolved. \end{DoxyCompactList}\item 
static Eina\+\_\+\+Future $\ast$ \mbox{\hyperlink{group__Eina__Future_ga2c63774e66100dc5f4b91f88f0efc5f1}{eina\+\_\+future\+\_\+race\+\_\+array}} (Eina\+\_\+\+Future $\ast$array\mbox{[}$\,$\mbox{]})
\begin{DoxyCompactList}\small\item\em Creates a future that will be resolved once a future {\ttfamily array} is resolved. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
const \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{group__Eina__Value__Struct__Group_ga69bcc1965b7b57ef713b0370d10f593d}{Eina\+\_\+\+Value\+\_\+\+Struct\+\_\+\+Desc}} $\ast$ \mbox{\hyperlink{group__Eina__Future_gaf28b0de9e4b3dbcf38cd114d0c1b82e2}{E\+I\+N\+A\+\_\+\+P\+R\+O\+M\+I\+S\+E\+\_\+\+R\+A\+C\+E\+\_\+\+S\+T\+R\+U\+C\+T\+\_\+\+D\+E\+SC}}
\item 
const \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{group__Eina__Value__Struct__Group_ga69bcc1965b7b57ef713b0370d10f593d}{Eina\+\_\+\+Value\+\_\+\+Struct\+\_\+\+Desc}} $\ast$ \mbox{\hyperlink{group__Eina__Future_ga8bf7d696d1a904a74bd5f9504a3c3d9f}{E\+I\+N\+A\+\_\+\+P\+R\+O\+M\+I\+S\+E\+\_\+\+R\+A\+C\+E\+\_\+\+S\+T\+R\+U\+C\+T\+\_\+\+D\+E\+SC}} = \&R\+A\+C\+E\+\_\+\+S\+T\+R\+U\+C\+T\+\_\+\+D\+E\+SC
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
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 Eina\+\_\+\+Future\+\_\+\+Cb will be called with an Eina\+\_\+\+Value typed as \mbox{\hyperlink{group__Eina__Value__Group_gafb778d4e5353abc9df922a4b309fe35a}{E\+I\+N\+A\+\_\+\+V\+A\+L\+U\+E\+\_\+\+T\+Y\+P\+E\+\_\+\+E\+R\+R\+OR}}, which its value will be E\+C\+A\+N\+C\+E\+L\+ED 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em f} & The future to cancel. \\
\hline
\end{DoxyParams}


\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}\label{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}} 
\index{Eina\_Future@{Eina\_Future}!EINA\_FUTURE\_SENTINEL@{EINA\_FUTURE\_SENTINEL}}
\index{EINA\_FUTURE\_SENTINEL@{EINA\_FUTURE\_SENTINEL}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{EINA\_FUTURE\_SENTINEL}{EINA\_FUTURE\_SENTINEL}}
{\footnotesize\ttfamily \#define E\+I\+N\+A\+\_\+\+F\+U\+T\+U\+R\+E\+\_\+\+S\+E\+N\+T\+I\+N\+EL~((void $\ast$)(unsigned long)-\/1)}



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

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

\mbox{\hyperlink{group__Eina__Future_ga6ccbe5f596fb8dccc444e6de681e47a0}{eina\+\_\+promise\+\_\+all\+\_\+array()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_gac0bf547a87e9bea1e589e8a6e13576e7}\label{group__Eina__Future_gac0bf547a87e9bea1e589e8a6e13576e7}} 
\index{Eina\_Future@{Eina\_Future}!eina\_promise\_race@{eina\_promise\_race}}
\index{eina\_promise\_race@{eina\_promise\_race}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_promise\_race}{eina\_promise\_race}}
{\footnotesize\ttfamily \#define eina\+\_\+promise\+\_\+race(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_ga3edff86abbf1045c6ad9a9db6e6ec339}{eina\+\_\+promise\+\_\+race\+\_\+array}}((Eina\+\_\+\+Future $\ast$\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{E\+I\+N\+A\+\_\+\+F\+U\+T\+U\+R\+E\+\_\+\+S\+E\+N\+T\+I\+N\+EL}}\})}



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

Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{promise = \mbox{\hyperlink{group__Eina__Future_gac0bf547a87e9bea1e589e8a6e13576e7}{eina\_promise\_race}}(future1, future2, future3, future4);}
\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga3edff86abbf1045c6ad9a9db6e6ec339}{eina\+\_\+promise\+\_\+race\+\_\+array()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga6a39aa29dad9e9ba9038908758f20c32}\label{group__Eina__Future_ga6a39aa29dad9e9ba9038908758f20c32}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_race@{eina\_future\_race}}
\index{eina\_future\_race@{eina\_future\_race}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_race}{eina\_future\_race}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+race(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_ga2c63774e66100dc5f4b91f88f0efc5f1}{eina\+\_\+future\+\_\+race\+\_\+array}}((Eina\+\_\+\+Future $\ast$\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{E\+I\+N\+A\+\_\+\+F\+U\+T\+U\+R\+E\+\_\+\+S\+E\+N\+T\+I\+N\+EL}}\})}



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

Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{future = \mbox{\hyperlink{group__Eina__Future_ga6a39aa29dad9e9ba9038908758f20c32}{eina\_future\_race}}(future1, future2, future3, future4);}
\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga2c63774e66100dc5f4b91f88f0efc5f1}{eina\+\_\+future\+\_\+race\+\_\+array()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga70fb993acf2af507103c0c161412767e}\label{group__Eina__Future_ga70fb993acf2af507103c0c161412767e}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_all@{eina\_future\_all}}
\index{eina\_future\_all@{eina\_future\_all}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_all}{eina\_future\_all}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+all(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_ga8838591bc2163cac63ba6a5180a63091}{eina\+\_\+future\+\_\+all\+\_\+array}}((Eina\+\_\+\+Future $\ast$\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{E\+I\+N\+A\+\_\+\+F\+U\+T\+U\+R\+E\+\_\+\+S\+E\+N\+T\+I\+N\+EL}}\})}



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

Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{future = \mbox{\hyperlink{group__Eina__Future_ga70fb993acf2af507103c0c161412767e}{eina\_future\_all}}(future1, future2, future3, future4);}
\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga8838591bc2163cac63ba6a5180a63091}{eina\+\_\+future\+\_\+all\+\_\+array()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_gaeffefb72180f300a69bfd3036a16c317}\label{group__Eina__Future_gaeffefb72180f300a69bfd3036a16c317}} 
\index{Eina\_Future@{Eina\_Future}!eina\_promise\_all@{eina\_promise\_all}}
\index{eina\_promise\_all@{eina\_promise\_all}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_promise\_all}{eina\_promise\_all}}
{\footnotesize\ttfamily \#define eina\+\_\+promise\+\_\+all(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_ga6ccbe5f596fb8dccc444e6de681e47a0}{eina\+\_\+promise\+\_\+all\+\_\+array}}((Eina\+\_\+\+Future $\ast$\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+, \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{E\+I\+N\+A\+\_\+\+F\+U\+T\+U\+R\+E\+\_\+\+S\+E\+N\+T\+I\+N\+EL}}\})}



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

Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{promise = \mbox{\hyperlink{group__Eina__Future_gaeffefb72180f300a69bfd3036a16c317}{eina\_promise\_all}}(future1, future2, future3, future4);}
\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga6ccbe5f596fb8dccc444e6de681e47a0}{eina\+\_\+promise\+\_\+all\+\_\+array()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}\label{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_cb\_easy@{eina\_future\_cb\_easy}}
\index{eina\_future\_cb\_easy@{eina\_future\_cb\_easy}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_easy}{eina\_future\_cb\_easy}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+cb\+\_\+easy(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_gaad0c23b540f1424301d2609a35ef8eac}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc}}((\mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}})\{\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+\})}



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

Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{future\_desc = \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\_future\_cb\_easy}}(\_success\_cb, \_error\_cb, \_free\_cb, \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}}, my\_data);}
\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_gaad0c23b540f1424301d2609a35ef8eac}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}\label{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_chain@{eina\_future\_chain}}
\index{eina\_future\_chain@{eina\_future\_chain}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_chain}{eina\_future\_chain}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+chain(\begin{DoxyParamCaption}\item[{}]{\+\_\+prev,  }\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_ga74c9d6017478584a85b8e3914083c728}{eina\+\_\+future\+\_\+chain\+\_\+array}}(\+\_\+prev, (\mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}}\mbox{[}$\,$\mbox{]})\{\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+, \{.cb = N\+U\+LL, .data = N\+U\+LL\}\})}



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

Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{future = \mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\_future\_chain}}(future, \{.cb = \_my\_cb, .data = my\_data\}, \{.cb = \_my\_another\_cb, .data = NULL\});}
\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga74c9d6017478584a85b8e3914083c728}{eina\+\_\+future\+\_\+chain\+\_\+array()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}\label{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_then@{eina\_future\_then}}
\index{eina\_future\_then@{eina\_future\_then}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_then}{eina\_future\_then}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+then(\begin{DoxyParamCaption}\item[{}]{\+\_\+prev,  }\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_ga20c3b066d8c3418891e71a0d0c5103ea}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc}}(\+\_\+prev, (\mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}})\{\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+\})}



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

Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{future = \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\_future\_then}}(future, \_my\_cb, my\_data);}
\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga20c3b066d8c3418891e71a0d0c5103ea}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()}} 

\mbox{\hyperlink{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}{eina\+\_\+future\+\_\+then\+\_\+easy()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga32414cc629c2b989984394daef6f560b}\label{group__Eina__Future_ga32414cc629c2b989984394daef6f560b}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_cb\_console@{eina\_future\_cb\_console}}
\index{eina\_future\_cb\_console@{eina\_future\_cb\_console}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_console}{eina\_future\_cb\_console}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+cb\+\_\+console(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_ga068c74621a75ee8e1862b57565a50106}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc}}((\mbox{\hyperlink{struct__Eina__Future__Cb__Console__Desc}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Console\+\_\+\+Desc}})\{\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+\})}



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

Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{desc = \mbox{\hyperlink{group__Eina__Future_ga32414cc629c2b989984394daef6f560b}{eina\_future\_cb\_console}}(.prefix = \textcolor{stringliteral}{"prefix"}, .suffix = \textcolor{stringliteral}{"suffix"});}
\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga068c74621a75ee8e1862b57565a50106}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga14896937e5ae72ac066518d8fe4e483d}\label{group__Eina__Future_ga14896937e5ae72ac066518d8fe4e483d}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_cb\_log\_dbg@{eina\_future\_cb\_log\_dbg}}
\index{eina\_future\_cb\_log\_dbg@{eina\_future\_cb\_log\_dbg}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_log\_dbg}{eina\_future\_cb\_log\_dbg}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+dbg(\begin{DoxyParamCaption}\item[{}]{\+\_\+prefix,  }\item[{}]{\+\_\+suffix }\end{DoxyParamCaption})}

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

\end{DoxyCode}


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

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

\begin{DoxyItemize}
\item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2b5cdedfc4bcd383d341fc9bb816fb46}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file}}\+: The {\bfseries{F\+I\+LE}} function will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ac40ef8a65fbdec71615d6327b588f135}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func}}\+: The {\bfseries{F\+U\+N\+C\+T\+I\+ON}} macro will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a160bbd8d35b40b00d0ef41d9d283101c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level}}\+: E\+I\+N\+A\+\_\+\+L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+D\+BG will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ae20c3c17ec8f6c62b5041d26b6b17b8c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain}}\+: E\+I\+N\+A\+\_\+\+L\+O\+G\+\_\+\+D\+O\+M\+A\+I\+N\+\_\+\+D\+E\+F\+A\+U\+LT will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2cab78b0d653b250d7b68f8ffb848c5a}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::line}}\+: The {\bfseries{L\+I\+NE}} macro will be used.\end{DoxyItemize}
Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{desc = \mbox{\hyperlink{group__Eina__Future_ga14896937e5ae72ac066518d8fe4e483d}{eina\_future\_cb\_log\_dbg}}(.prefix = \textcolor{stringliteral}{"prefix"}, .suffix = \textcolor{stringliteral}{"suffix"});}
\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga9b9ab27d34a567e47b34a888d8fb6fa2}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga91cba9ac4306b0dee948dd3a0b10a893}\label{group__Eina__Future_ga91cba9ac4306b0dee948dd3a0b10a893}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_cb\_log\_crit@{eina\_future\_cb\_log\_crit}}
\index{eina\_future\_cb\_log\_crit@{eina\_future\_cb\_log\_crit}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_log\_crit}{eina\_future\_cb\_log\_crit}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+crit(\begin{DoxyParamCaption}\item[{}]{\+\_\+prefix,  }\item[{}]{\+\_\+suffix }\end{DoxyParamCaption})}

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

\end{DoxyCode}


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

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

\begin{DoxyItemize}
\item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2b5cdedfc4bcd383d341fc9bb816fb46}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file}}\+: The {\bfseries{F\+I\+LE}} function will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ac40ef8a65fbdec71615d6327b588f135}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func}}\+: The {\bfseries{F\+U\+N\+C\+T\+I\+ON}} macro will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a160bbd8d35b40b00d0ef41d9d283101c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level}}\+: E\+I\+N\+A\+\_\+\+L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+C\+R\+I\+T\+I\+C\+AL will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ae20c3c17ec8f6c62b5041d26b6b17b8c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain}}\+: E\+I\+N\+A\+\_\+\+L\+O\+G\+\_\+\+D\+O\+M\+A\+I\+N\+\_\+\+D\+E\+F\+A\+U\+LT will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2cab78b0d653b250d7b68f8ffb848c5a}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::line}}\+: The {\bfseries{L\+I\+NE}} macro will be used.\end{DoxyItemize}
Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{desc = \mbox{\hyperlink{group__Eina__Future_ga91cba9ac4306b0dee948dd3a0b10a893}{eina\_future\_cb\_log\_crit}}(.prefix = \textcolor{stringliteral}{"prefix"}, .suffix = \textcolor{stringliteral}{"suffix"});}
\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga9b9ab27d34a567e47b34a888d8fb6fa2}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_gade1a19f673ac90442409aba274ff0884}\label{group__Eina__Future_gade1a19f673ac90442409aba274ff0884}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_cb\_log\_err@{eina\_future\_cb\_log\_err}}
\index{eina\_future\_cb\_log\_err@{eina\_future\_cb\_log\_err}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_log\_err}{eina\_future\_cb\_log\_err}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+err(\begin{DoxyParamCaption}\item[{}]{\+\_\+prefix,  }\item[{}]{\+\_\+suffix }\end{DoxyParamCaption})}

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

\end{DoxyCode}


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

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

\begin{DoxyItemize}
\item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2b5cdedfc4bcd383d341fc9bb816fb46}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file}}\+: The {\bfseries{F\+I\+LE}} function will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ac40ef8a65fbdec71615d6327b588f135}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func}}\+: The {\bfseries{F\+U\+N\+C\+T\+I\+ON}} macro will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a160bbd8d35b40b00d0ef41d9d283101c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level}}\+: E\+I\+N\+A\+\_\+\+L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+E\+RR will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ae20c3c17ec8f6c62b5041d26b6b17b8c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain}}\+: E\+I\+N\+A\+\_\+\+L\+O\+G\+\_\+\+D\+O\+M\+A\+I\+N\+\_\+\+D\+E\+F\+A\+U\+LT will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2cab78b0d653b250d7b68f8ffb848c5a}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::line}}\+: The {\bfseries{L\+I\+NE}} macro will be used.\end{DoxyItemize}
Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{desc = \mbox{\hyperlink{group__Eina__Future_gade1a19f673ac90442409aba274ff0884}{eina\_future\_cb\_log\_err}}(.prefix = \textcolor{stringliteral}{"prefix"}, .suffix = \textcolor{stringliteral}{"suffix"});}
\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga9b9ab27d34a567e47b34a888d8fb6fa2}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_gaf3f9d1b140fa23528a74f09e78fadb09}\label{group__Eina__Future_gaf3f9d1b140fa23528a74f09e78fadb09}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_cb\_log\_info@{eina\_future\_cb\_log\_info}}
\index{eina\_future\_cb\_log\_info@{eina\_future\_cb\_log\_info}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_log\_info}{eina\_future\_cb\_log\_info}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+info(\begin{DoxyParamCaption}\item[{}]{\+\_\+prefix,  }\item[{}]{\+\_\+suffix }\end{DoxyParamCaption})}

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

\end{DoxyCode}


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

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

\begin{DoxyItemize}
\item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2b5cdedfc4bcd383d341fc9bb816fb46}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file}}\+: The {\bfseries{F\+I\+LE}} function will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ac40ef8a65fbdec71615d6327b588f135}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func}}\+: The {\bfseries{F\+U\+N\+C\+T\+I\+ON}} macro will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a160bbd8d35b40b00d0ef41d9d283101c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level}}\+: E\+I\+N\+A\+\_\+\+L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+I\+N\+FO will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ae20c3c17ec8f6c62b5041d26b6b17b8c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain}}\+: E\+I\+N\+A\+\_\+\+L\+O\+G\+\_\+\+D\+O\+M\+A\+I\+N\+\_\+\+D\+E\+F\+A\+U\+LT will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2cab78b0d653b250d7b68f8ffb848c5a}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::line}}\+: The {\bfseries{L\+I\+NE}} macro will be used.\end{DoxyItemize}
Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{desc = \mbox{\hyperlink{group__Eina__Future_gaf3f9d1b140fa23528a74f09e78fadb09}{eina\_future\_cb\_log\_info}}(.prefix = \textcolor{stringliteral}{"prefix"}, .suffix = \textcolor{stringliteral}{"suffix"});}
\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga9b9ab27d34a567e47b34a888d8fb6fa2}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga8ed87813808c62045569f4e09868dbe8}\label{group__Eina__Future_ga8ed87813808c62045569f4e09868dbe8}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_cb\_log\_warn@{eina\_future\_cb\_log\_warn}}
\index{eina\_future\_cb\_log\_warn@{eina\_future\_cb\_log\_warn}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_log\_warn}{eina\_future\_cb\_log\_warn}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+warn(\begin{DoxyParamCaption}\item[{}]{\+\_\+prefix,  }\item[{}]{\+\_\+suffix }\end{DoxyParamCaption})}

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

\end{DoxyCode}


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

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

\begin{DoxyItemize}
\item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2b5cdedfc4bcd383d341fc9bb816fb46}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file}}\+: The {\bfseries{F\+I\+LE}} function will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ac40ef8a65fbdec71615d6327b588f135}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func}}\+: The {\bfseries{F\+U\+N\+C\+T\+I\+ON}} macro will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a160bbd8d35b40b00d0ef41d9d283101c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level}}\+: E\+I\+N\+A\+\_\+\+L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+W\+A\+RN will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ae20c3c17ec8f6c62b5041d26b6b17b8c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain}}\+: E\+I\+N\+A\+\_\+\+L\+O\+G\+\_\+\+D\+O\+M\+A\+I\+N\+\_\+\+D\+E\+F\+A\+U\+LT will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2cab78b0d653b250d7b68f8ffb848c5a}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::line}}\+: The {\bfseries{L\+I\+NE}} 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{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga9b9ab27d34a567e47b34a888d8fb6fa2}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}\label{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_then\_easy@{eina\_future\_then\_easy}}
\index{eina\_future\_then\_easy@{eina\_future\_then\_easy}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_then\_easy}{eina\_future\_then\_easy}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+then\+\_\+easy(\begin{DoxyParamCaption}\item[{}]{\+\_\+prev,  }\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_ga20c3b066d8c3418891e71a0d0c5103ea}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc}}(\+\_\+prev, \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy}}(\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+))}



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

Usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{f = \mbox{\hyperlink{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}{eina\_future\_then\_easy}}(f, .success = \_success\_cb, .success\_type = \mbox{\hyperlink{group__Eina__Value__Group_ga959961fb03cd94a84ab469245c543732}{EINA\_VALUE\_TYPE\_DOUBLE}}, .data = NULL, );}
\end{DoxyCode}
 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga20c3b066d8c3418891e71a0d0c5103ea}{eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc()}} 

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

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

\mbox{\hyperlink{group__Eina__Future_gaad0c23b540f1424301d2609a35ef8eac}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga51f933135f14e6e0183af7366aa351d3}\label{group__Eina__Future_ga51f933135f14e6e0183af7366aa351d3}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_chain\_easy@{eina\_future\_chain\_easy}}
\index{eina\_future\_chain\_easy@{eina\_future\_chain\_easy}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_chain\_easy}{eina\_future\_chain\_easy}}
{\footnotesize\ttfamily \#define eina\+\_\+future\+\_\+chain\+\_\+easy(\begin{DoxyParamCaption}\item[{}]{\+\_\+prev,  }\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__Future_ga90dcf8961d7a44fa59861953f18ffafa}{eina\+\_\+future\+\_\+chain\+\_\+easy\+\_\+array}}(\+\_\+prev, (\mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}}\mbox{[}$\,$\mbox{]}) \{\+\_\+\+\_\+\+V\+A\+\_\+\+A\+R\+G\+S\+\_\+\+\_\+, \{N\+U\+LL, N\+U\+LL, N\+U\+LL, N\+U\+LL, N\+U\+LL\}\})}



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

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

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

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

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


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Eina__Future_ga5336419ed02f1d9abbe7734779d3dbd3}\label{group__Eina__Future_ga5336419ed02f1d9abbe7734779d3dbd3}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_desc\_flush@{eina\_future\_desc\_flush}}
\index{eina\_future\_desc\_flush@{eina\_future\_desc\_flush}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_desc\_flush()}{eina\_future\_desc\_flush()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} void eina\+\_\+future\+\_\+desc\+\_\+flush (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}} $\ast$}]{desc }\end{DoxyParamCaption})}



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

This function is mainly used by bindings to flush a \#\+Eina\+\_\+\+Future\+\_\+\+Desc. It will call the \mbox{\hyperlink{group__Eina__Promise_gad3a38a209f2112fbe1eb111e0d3ff939}{Eina\+\_\+\+Future\+\_\+\+Cb}} with {\ttfamily E\+N\+O\+M\+EM} and zero the {\ttfamily desc} contents.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em desc} & The \#\+Eina\+\_\+\+Future\+\_\+\+Desc to flush, if {\ttfamily N\+U\+LL} this is a noop. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__Eina__Future_ga9d52be047b2d5eb3140c54ea228d078b}\label{group__Eina__Future_ga9d52be047b2d5eb3140c54ea228d078b}} 
\index{Eina\_Future@{Eina\_Future}!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\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_easy\_desc\_flush()}{eina\_future\_cb\_easy\_desc\_flush()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} void eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+desc\+\_\+flush (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}} $\ast$}]{desc }\end{DoxyParamCaption})}



Flushes an \#\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc. 

This function is mainly used by bindings to flush a \#\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc. It will call the \mbox{\hyperlink{group__Eina__Promise_gaa851e400869a2ca7b072d348175bd83f}{Eina\+\_\+\+Future\+\_\+\+Error\+\_\+\+Cb}} with {\ttfamily E\+N\+O\+M\+EM}, the \mbox{\hyperlink{group__Eina__Promise_ga8d3d898f0c73827404fc2e258767a6c7}{Eina\+\_\+\+Future\+\_\+\+Free\+\_\+\+Cb}} and zero the {\ttfamily desc} contents.


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


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

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



Creates a new Eina\+\_\+\+Value from a promise. 

This function creates a new Eina\+\_\+\+Value that will store a promise in it. This function is useful for dealing with promises inside a \mbox{\hyperlink{group__Eina__Promise_gad3a38a209f2112fbe1eb111e0d3ff939}{Eina\+\_\+\+Future\+\_\+\+Cb}}. By returning a Promise 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} Eina\_Future *dead \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *file\_data;}
\DoxyCodeLine{   Eina\_Promise *p;}
\DoxyCodeLine{   \textcolor{comment}{// It was not possible to fetch the file size.}}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (v.type == \mbox{\hyperlink{group__Eina__Value__Group_ga28f6fb160baf3068e7c67ffba0a29c20}{EINA\_VALUE\_TYPE\_ERROR}})}
\DoxyCodeLine{   \{}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\_Error}} err;}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&err);}
\DoxyCodeLine{      fprintf(stderr, \textcolor{stringliteral}{"Could not get the file data. Reason: \%s\(\backslash\)n"}, \mbox{\hyperlink{group__Eina__Error__Group_ga627fd3d4e0e928c6c0c79e3b9faa48e8}{eina\_error\_msg\_get}}(err));}
\DoxyCodeLine{      \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();}
\DoxyCodeLine{      \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{   \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (v.type != \mbox{\hyperlink{group__Eina__Value__Group_ga916f76c8d5ffd4c3ee3c322a54efd0b7}{EINA\_VALUE\_TYPE\_STRING}})}
\DoxyCodeLine{   \{}
\DoxyCodeLine{     fprintf(stderr, \textcolor{stringliteral}{"Expecting type '\%s' -\/ received '\%s'\(\backslash\)n"}, \mbox{\hyperlink{group__Eina__Value__Group_ga916f76c8d5ffd4c3ee3c322a54efd0b7}{EINA\_VALUE\_TYPE\_STRING}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}}, v.type-\/>name);}
\DoxyCodeLine{     \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();}
\DoxyCodeLine{     \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{   \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&file\_data);}
\DoxyCodeLine{   \textcolor{comment}{// count\_words will count the words in the background and resolve the promise once it is over...}}
\DoxyCodeLine{   p = count\_words(file\_data);}
\DoxyCodeLine{   \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Future_ga02fdf9a0ba1a47431606ee8c16f1a914}{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} Eina\_Future *dead \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{comment}{// The \_word\_count\_ready will only be called once count\_words() resolves/rejects the promise returned by \_file\_data\_ready()}}
\DoxyCodeLine{   \textcolor{keywordtype}{int} count;}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (v.type == \mbox{\hyperlink{group__Eina__Value__Group_ga28f6fb160baf3068e7c67ffba0a29c20}{EINA\_VALUE\_TYPE\_ERROR}})}
\DoxyCodeLine{   \{}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\_Error}} err;}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&err);}
\DoxyCodeLine{      fprintf(stderr, \textcolor{stringliteral}{"Could not count the file words. Reason: \%s\(\backslash\)n"}, \mbox{\hyperlink{group__Eina__Error__Group_ga627fd3d4e0e928c6c0c79e3b9faa48e8}{eina\_error\_msg\_get}}(err));}
\DoxyCodeLine{      \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();}
\DoxyCodeLine{      \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{   \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (v.type != \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}})}
\DoxyCodeLine{   \{}
\DoxyCodeLine{     fprintf(stderr, \textcolor{stringliteral}{"Expecting type '\%s' -\/ received '\%s'\(\backslash\)n"}, \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}}, v.type-\/>name);}
\DoxyCodeLine{     \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();}
\DoxyCodeLine{     \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{   \}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&count);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"File word count \%d\(\backslash\)n"}, count);}
\DoxyCodeLine{   \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void}}
\DoxyCodeLine{file\_operation(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   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 obect to create the value from. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
An Eina\+\_\+\+Value. On error the value\textquotesingle{}s type will be {\ttfamily N\+U\+LL}.
\end{DoxyReturn}
\begin{DoxyNote}{Note}
If an error happens the promise will be C\+A\+N\+C\+E\+L\+ED. 
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_gaacfa57469fcd9467f14a529e7b72887b}{eina\+\_\+future\+\_\+as\+\_\+value()}} 

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

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


References D\+BG, E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+F\+A\+L\+S\+E\+\_\+\+G\+O\+TO, E\+I\+N\+A\+\_\+\+V\+A\+L\+U\+E\+\_\+\+E\+M\+P\+TY, eina\+\_\+value\+\_\+flush(), eina\+\_\+value\+\_\+pset(), and eina\+\_\+value\+\_\+setup().

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



Creates an Eina\+\_\+\+Value from a future. 

This function is used for the same purposes as \mbox{\hyperlink{group__Eina__Future_ga02fdf9a0ba1a47431606ee8c16f1a914}{eina\+\_\+promise\+\_\+as\+\_\+value()}}, but receives an 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 N\+U\+LL}. 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
If an error happens the future {\ttfamily f} will be C\+A\+N\+C\+E\+L\+ED 
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga02fdf9a0ba1a47431606ee8c16f1a914}{eina\+\_\+promise\+\_\+as\+\_\+value()}} 
\end{DoxySeeAlso}


References E\+I\+N\+A\+\_\+\+V\+A\+L\+U\+E\+\_\+\+E\+M\+P\+TY.

\mbox{\Hypertarget{group__Eina__Future_ga4ae0bbfdefe911b043e0ae5b4d030e7e}\label{group__Eina__Future_ga4ae0bbfdefe911b043e0ae5b4d030e7e}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_new@{eina\_future\_new}}
\index{eina\_future\_new@{eina\_future\_new}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_new()}{eina\_future\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} Eina\+\_\+\+Future$\ast$ eina\+\_\+future\+\_\+new (\begin{DoxyParamCaption}\item[{Eina\+\_\+\+Promise $\ast$}]{p }\end{DoxyParamCaption})}



Creates a new future. 

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

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

\begin{DoxyNote}{Note}
A promise can only have one future attached to it, calling \mbox{\hyperlink{group__Eina__Future_ga4ae0bbfdefe911b043e0ae5b4d030e7e}{eina\+\_\+future\+\_\+new()}} on the same promise twice will result in an error ({\ttfamily N\+U\+LL} 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 N\+U\+LL}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The future or {\ttfamily N\+U\+LL} on error. 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
If an error happens this function will C\+A\+N\+C\+EL the promise. 
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
eina\+\_\+promise\+\_\+new() 

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

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

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


References \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::cb, and E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+T\+R\+U\+E\+\_\+\+G\+O\+TO.



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

\mbox{\Hypertarget{group__Eina__Future_ga333ff19929c6dfb4c2c115ccf783d3f0}\label{group__Eina__Future_ga333ff19929c6dfb4c2c115ccf783d3f0}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_resolved@{eina\_future\_resolved}}
\index{eina\_future\_resolved@{eina\_future\_resolved}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_resolved()}{eina\_future\_resolved()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} Eina\+\_\+\+Future$\ast$ eina\+\_\+future\+\_\+resolved (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct__Eina__Future__Scheduler}{Eina\+\_\+\+Future\+\_\+\+Scheduler}} $\ast$}]{scheduler,  }\item[{\mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}}}]{value }\end{DoxyParamCaption})}



Creates a new future that is already resolved to a value. 

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

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

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


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

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

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

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

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


References E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+N\+U\+L\+L\+\_\+\+G\+O\+TO.

\mbox{\Hypertarget{group__Eina__Future_gad7be8977f169a05d73563df1690d25b2}\label{group__Eina__Future_gad7be8977f169a05d73563df1690d25b2}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_rejected@{eina\_future\_rejected}}
\index{eina\_future\_rejected@{eina\_future\_rejected}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_rejected()}{eina\_future\_rejected()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} Eina\+\_\+\+Future$\ast$ eina\+\_\+future\+\_\+rejected (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct__Eina__Future__Scheduler}{Eina\+\_\+\+Future\+\_\+\+Scheduler}} $\ast$}]{scheduler,  }\item[{\mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}}}]{err }\end{DoxyParamCaption})}



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

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

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

Futures can also be canceled using 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 Eina\+\_\+\+Error value\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The future or {\ttfamily N\+U\+LL} on error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
eina\+\_\+promise\+\_\+new() 

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

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

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

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


References E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+N\+U\+L\+L\+\_\+\+G\+O\+TO.

\mbox{\Hypertarget{group__Eina__Future_ga20c3b066d8c3418891e71a0d0c5103ea}\label{group__Eina__Future_ga20c3b066d8c3418891e71a0d0c5103ea}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_then\_from\_desc@{eina\_future\_then\_from\_desc}}
\index{eina\_future\_then\_from\_desc@{eina\_future\_then\_from\_desc}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_then\_from\_desc()}{eina\_future\_then\_from\_desc()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} Eina\+\_\+\+Future$\ast$ eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc (\begin{DoxyParamCaption}\item[{Eina\+\_\+\+Future $\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 resolve/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 N\+U\+LL}, and the \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}} will be called reporting an error ({\ttfamily E\+I\+N\+V\+AL} or {\ttfamily E\+N\+O\+M\+EM}), so the user has a chance to free \mbox{\hyperlink{struct__Eina__Future__Desc_a3776d82a99776d2b6a96839c6191bc13}{Eina\+\_\+\+Future\+\_\+\+Desc\+::data}}.

In case a future in the chain is canceled, the whole chain will be canceled immediately and the error {\ttfamily E\+C\+A\+N\+C\+E\+L\+ED} 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} Eina\_Future *dead \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Ctx *ctx = data;}
\DoxyCodeLine{   \textcolor{comment}{// It was not possible to fetch the file size.}}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (v.type == \mbox{\hyperlink{group__Eina__Value__Group_ga28f6fb160baf3068e7c67ffba0a29c20}{EINA\_VALUE\_TYPE\_ERROR}})}
\DoxyCodeLine{   \{}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\_Error}} err;}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&err);}
\DoxyCodeLine{      fprintf(stderr, \textcolor{stringliteral}{"Could not read the file size. Reason: \%s\(\backslash\)n"}, \mbox{\hyperlink{group__Eina__Error__Group_ga627fd3d4e0e928c6c0c79e3b9faa48e8}{eina\_error\_msg\_get}}(err));}
\DoxyCodeLine{      \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();}
\DoxyCodeLine{      \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{   \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (v.type != \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}})}
\DoxyCodeLine{   \{}
\DoxyCodeLine{     fprintf(stderr, \textcolor{stringliteral}{"Expecting type '\%s' -\/ received '\%s'\(\backslash\)n"}, \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}}, v.type-\/>name);}
\DoxyCodeLine{     \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();}
\DoxyCodeLine{     \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{   \}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&ctx-\/>size);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"File size is \%d bytes\(\backslash\)n"}, ctx-\/>size);}
\DoxyCodeLine{   \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void}}
\DoxyCodeLine{file\_operation(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Eina\_Future *f = get\_file\_size\_async(\textcolor{stringliteral}{"/MyFile.txt"});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Future_ga20c3b066d8c3418891e71a0d0c5103ea}{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 Eina\+\_\+\+Value type. In order to avoid this type of code the function \mbox{\hyperlink{group__Eina__Future_gaad0c23b540f1424301d2609a35ef8eac}{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 Eina\+\_\+\+Value returned by a \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}} will be delivered to the next \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}} in the chain.

Here\textquotesingle{}s an example\+:

static Eina\+\_\+\+Value \+\_\+future\+\_\+cb1(const $\ast$data E\+I\+N\+A\+\_\+\+U\+N\+U\+S\+E\+D, const Eina\+\_\+\+Value v) \{ Eina\+\_\+\+Value new\+\_\+v; int i;

// There\textquotesingle{}s no need to check the Eina\+\_\+\+Value type since we\textquotesingle{}re using \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy()}} eina\+\_\+value\+\_\+get(\&v, \&i); printf(\char`\"{}\+File size as int\+: \%d\textbackslash{}n\char`\"{}, i); eina\+\_\+value\+\_\+setup(\&new\+\_\+v, E\+I\+N\+A\+\_\+\+V\+A\+L\+U\+E\+\_\+\+T\+Y\+P\+E\+\_\+\+S\+T\+R\+I\+N\+G); // Convert the file size to string eina\+\_\+value\+\_\+convert(\&v, \&new\+\_\+v); return new\+\_\+v; \}

static Eina\+\_\+\+Value \+\_\+future\+\_\+cb2(const $\ast$data E\+I\+N\+A\+\_\+\+U\+N\+U\+S\+E\+D, const Eina\+\_\+\+Value v) \{ Eina\+\_\+\+Value new\+\_\+v; const char $\ast$file\+\_\+size\+\_\+str;

// There\textquotesingle{}s no need to check the Eina\+\_\+\+Value type since we\textquotesingle{}re using \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy()}} eina\+\_\+value\+\_\+get(\&v, \&file\+\_\+size\+\_\+str); printf(\char`\"{}\+File size as string\+: \%s\textbackslash{}n\char`\"{}, file\+\_\+size\+\_\+str); eina\+\_\+value\+\_\+setup(\&new\+\_\+v, E\+I\+N\+A\+\_\+\+V\+A\+L\+U\+E\+\_\+\+T\+Y\+P\+E\+\_\+\+D\+O\+U\+B\+L\+E); eina\+\_\+value\+\_\+convert(\&v, \&new\+\_\+v); return new\+\_\+v; \}

static Eina\+\_\+\+Value \+\_\+future\+\_\+cb3(const $\ast$data E\+I\+N\+A\+\_\+\+U\+N\+U\+S\+E\+D, const Eina\+\_\+\+Value v) \{ double d;

// There\textquotesingle{}s no need to check the Eina\+\_\+\+Value type since we\textquotesingle{}re using \mbox{\hyperlink{group__Eina__Future_ga57f56d13f3f3bb13651ea3b81b59e8f1}{eina\+\_\+future\+\_\+cb\+\_\+easy()}} eina\+\_\+value\+\_\+get(\&v, \&d); printf(\char`\"{}\+File size as double\+: \%g\textbackslash{}n\char`\"{}, d); return v; \}

static Eina\+\_\+\+Value \+\_\+future\+\_\+err(void $\ast$data E\+I\+N\+A\+\_\+\+U\+N\+U\+S\+E\+D, Eina\+\_\+\+Error err) \{ // This function is called if future result type does not match or another error occurred Eina\+\_\+\+Value new\+\_\+v; eina\+\_\+value\+\_\+setup(\&new\+\_\+v, E\+I\+N\+A\+\_\+\+V\+A\+L\+U\+E\+\_\+\+T\+Y\+P\+E\+\_\+\+E\+R\+R\+O\+R); eina\+\_\+value\+\_\+set(\&new\+\_\+v, err); fprintf(stderr, \char`\"{}\+Error during future process. Reason\+: \%s\textbackslash{}n\char`\"{}, eina\+\_\+error\+\_\+msg\+\_\+get(err)); // Pass the error to the next future in the chain.. return new\+\_\+v; \}


\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordtype}{void} chain(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{  Eina\_Future *f = get\_file\_size\_async(\textcolor{stringliteral}{"/MyFile.txt"});}
\DoxyCodeLine{  f = \mbox{\hyperlink{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}{eina\_future\_then\_easy}}(f, .success = \_future\_cb1, .success\_type = \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}});}
\DoxyCodeLine{  \textcolor{comment}{// \_future\_cb2 will be executed after \_future\_cb1()}}
\DoxyCodeLine{  f = \mbox{\hyperlink{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}{eina\_future\_then\_easy}}(f, .success = \_future\_cb2, .success\_type = \mbox{\hyperlink{group__Eina__Value__Group_ga916f76c8d5ffd4c3ee3c322a54efd0b7}{EINA\_VALUE\_TYPE\_STRING}});}
\DoxyCodeLine{  \textcolor{comment}{// \_future\_cb3 will be executed after \_future\_cb2()}}
\DoxyCodeLine{  f = \mbox{\hyperlink{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}{eina\_future\_then\_easy}}(f, .success = \_future\_cb3, .success\_type = \mbox{\hyperlink{group__Eina__Value__Group_ga959961fb03cd94a84ab469245c543732}{EINA\_VALUE\_TYPE\_DOUBLE}});}
\DoxyCodeLine{  \textcolor{comment}{// If an error happens \_future\_err will be called}}
\DoxyCodeLine{  \mbox{\hyperlink{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}{eina\_future\_then\_easy}}(f, .error = \_future\_err);}
\DoxyCodeLine{\}}
\end{DoxyCode}


Although it\textquotesingle{}s possible to create a future chain using \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}}/eina\+\_\+future\+\_\+then\+\_\+from\+\_\+desc() there\textquotesingle{}s a function that makes this task much easier, please check \mbox{\hyperlink{group__Eina__Future_ga74c9d6017478584a85b8e3914083c728}{eina\+\_\+future\+\_\+chain\+\_\+array()}} for more information. \begin{DoxyNote}{Note}
This example does manual conversion and print, however we offer \mbox{\hyperlink{group__Eina__Future_gade0da31ea96e8461ec403f7492240041}{eina\+\_\+future\+\_\+cb\+\_\+convert\+\_\+to()}} and \mbox{\hyperlink{group__Eina__Future_ga068c74621a75ee8e1862b57565a50106}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc()}} and 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 N\+U\+LL} on error. 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
If an error happens the whole future chain will C\+A\+N\+C\+E\+L\+ED and desc.\+cb will be called in order to free desc.\+data. 
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga4ae0bbfdefe911b043e0ae5b4d030e7e}{eina\+\_\+future\+\_\+new()}} 

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

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

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

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

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

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

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

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

eina\+\_\+future\+\_\+cancel() 

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

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


References E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+T\+R\+U\+E\+\_\+\+G\+O\+TO.



Referenced by efl\+\_\+future\+\_\+chain\+\_\+array().

\mbox{\Hypertarget{group__Eina__Future_ga9b9ab27d34a567e47b34a888d8fb6fa2}\label{group__Eina__Future_ga9b9ab27d34a567e47b34a888d8fb6fa2}} 
\index{Eina\_Future@{Eina\_Future}!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\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_log\_from\_desc()}{eina\_future\_cb\_log\_from\_desc()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}} eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc}}}]{desc }\end{DoxyParamCaption})}



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

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

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

\begin{DoxyItemize}
\item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2b5cdedfc4bcd383d341fc9bb816fb46}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file}}\+: The {\bfseries{F\+I\+LE}} function will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ac40ef8a65fbdec71615d6327b588f135}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func}}\+: The {\bfseries{F\+U\+N\+C\+T\+I\+ON}} macro will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a160bbd8d35b40b00d0ef41d9d283101c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level}}\+: E\+I\+N\+A\+\_\+\+L\+O\+G\+\_\+\+L\+E\+V\+E\+L\+\_\+\+D\+BG will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_ae20c3c17ec8f6c62b5041d26b6b17b8c}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain}}\+: E\+I\+N\+A\+\_\+\+L\+O\+G\+\_\+\+D\+O\+M\+A\+I\+N\+\_\+\+D\+E\+F\+A\+U\+LT will be used. \item \mbox{\hyperlink{struct__Eina__Future__Cb__Log__Desc_a2cab78b0d653b250d7b68f8ffb848c5a}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::line}}\+: The {\bfseries{L\+I\+NE}} 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}
\#\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc 

\mbox{\hyperlink{group__Eo_ga89d1c057ebd629be48e56c46fb69d426}{efl\+\_\+future\+\_\+then()}} 

\mbox{\hyperlink{group__Eo_gae7a670d93ca8018f237dbfb91c67f100}{efl\+\_\+future\+\_\+chain()}} 

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

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

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

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

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

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


References \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::domain, E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+N\+U\+L\+L\+\_\+\+G\+O\+TO, \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::file, \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::func, \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::level, \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::line, \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::prefix, and \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Log\+\_\+\+Desc\+::suffix.

\mbox{\Hypertarget{group__Eina__Future_ga74c9d6017478584a85b8e3914083c728}\label{group__Eina__Future_ga74c9d6017478584a85b8e3914083c728}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_chain\_array@{eina\_future\_chain\_array}}
\index{eina\_future\_chain\_array@{eina\_future\_chain\_array}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_chain\_array()}{eina\_future\_chain\_array()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} Eina\+\_\+\+Future$\ast$ eina\+\_\+future\+\_\+chain\+\_\+array (\begin{DoxyParamCaption}\item[{Eina\+\_\+\+Future $\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 \mbox{\hyperlink{group__Eina__Future_ga20c3b066d8c3418891e71a0d0c5103ea}{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 N\+U\+LL}, and the \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}} from the {\ttfamily descs} array will be called reporting an error ({\ttfamily E\+I\+N\+V\+AL} or {\ttfamily E\+N\+O\+M\+EM}), so the user has a chance to free \mbox{\hyperlink{struct__Eina__Future__Desc_a3776d82a99776d2b6a96839c6191bc13}{Eina\+\_\+\+Future\+\_\+\+Desc\+::data}}.

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

In case a future in the chain is canceled, the whole chain will be canceled immediately and the error {\ttfamily E\+C\+A\+N\+C\+E\+L\+ED} will be reported.

Here\textquotesingle{}s an example\+:


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



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

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

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

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

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

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

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

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

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

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

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

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


References \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::cb, E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+N\+U\+L\+L\+\_\+\+G\+O\+TO, and E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+T\+R\+U\+E\+\_\+\+G\+O\+TO.

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



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

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


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

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

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

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

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


References eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc(), E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+N\+U\+L\+L\+\_\+\+G\+O\+TO, E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+T\+R\+U\+E\+\_\+\+G\+O\+TO, eina\+\_\+value\+\_\+flush(), \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::error, \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::free, \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::success, and \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc\+::success\+\_\+type.

\mbox{\Hypertarget{group__Eina__Future_ga068c74621a75ee8e1862b57565a50106}\label{group__Eina__Future_ga068c74621a75ee8e1862b57565a50106}} 
\index{Eina\_Future@{Eina\_Future}!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\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_console\_from\_desc()}{eina\_future\_cb\_console\_from\_desc()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}} eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{struct__Eina__Future__Cb__Console__Desc}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Console\+\_\+\+Desc}}}]{desc }\end{DoxyParamCaption})}



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

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

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

Example\+:


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



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

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

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

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

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

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

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

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

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

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

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


References \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::cb, \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::data, E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+N\+U\+L\+L\+\_\+\+G\+O\+TO, \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Console\+\_\+\+Desc\+::prefix, and \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Console\+\_\+\+Desc\+::suffix.

\mbox{\Hypertarget{group__Eina__Future_ga706f9f0e5c6fc1d1b5e066d6c1f48eda}\label{group__Eina__Future_ga706f9f0e5c6fc1d1b5e066d6c1f48eda}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_cb\_ignore\_error@{eina\_future\_cb\_ignore\_error}}
\index{eina\_future\_cb\_ignore\_error@{eina\_future\_cb\_ignore\_error}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_ignore\_error()}{eina\_future\_cb\_ignore\_error()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \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 a \#\+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 E\+I\+N\+A\+\_\+\+V\+A\+L\+U\+E\+\_\+\+E\+M\+P\+TY will be delivered to the next future in the chain.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em err} & The error to be ignored. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A future descriptor to be used with \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}} or \mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}} 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eina__Future_gade0da31ea96e8461ec403f7492240041}\label{group__Eina__Future_gade0da31ea96e8461ec403f7492240041}} 
\index{Eina\_Future@{Eina\_Future}!eina\_future\_cb\_convert\_to@{eina\_future\_cb\_convert\_to}}
\index{eina\_future\_cb\_convert\_to@{eina\_future\_cb\_convert\_to}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_convert\_to()}{eina\_future\_cb\_convert\_to()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \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}} $\ast$}]{type }\end{DoxyParamCaption})}



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


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

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

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

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

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

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

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


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

\mbox{\Hypertarget{group__Eina__Future_gaad0c23b540f1424301d2609a35ef8eac}\label{group__Eina__Future_gaad0c23b540f1424301d2609a35ef8eac}} 
\index{Eina\_Future@{Eina\_Future}!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\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_future\_cb\_easy\_from\_desc()}{eina\_future\_cb\_easy\_from\_desc()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{struct__Eina__Future__Desc}{Eina\+\_\+\+Future\+\_\+\+Desc}} eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{struct__Eina__Future__Cb__Easy__Desc}{Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc}}}]{desc }\end{DoxyParamCaption})}



Creates an \#\+Eina\+\_\+\+Future\+\_\+\+Desc based on a \#\+Eina\+\_\+\+Future\+\_\+\+Cb\+\_\+\+Easy\+\_\+\+Desc. 

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

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


\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}}}
\DoxyCodeLine{\_file\_size\_ok(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}} v)}
\DoxyCodeLine{\{}
\DoxyCodeLine{  Ctx *ctx = data;}
\DoxyCodeLine{  \textcolor{comment}{// Since an Eina\_Future\_Cb\_Easy\_Desc::success\_type was provided, there's no need to check the value type}}
\DoxyCodeLine{  \textcolor{keywordtype}{int} s;}
\DoxyCodeLine{  \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&s);}
\DoxyCodeLine{  printf(\textcolor{stringliteral}{"File size is \%d bytes\(\backslash\)n"}, s);}
\DoxyCodeLine{  ctx-\/>file\_size = s;}
\DoxyCodeLine{  \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}}}
\DoxyCodeLine{\_file\_size\_err(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\_Error}} err)}
\DoxyCodeLine{\{}
\DoxyCodeLine{  fprintf(stderr, \textcolor{stringliteral}{"Could not read the file size. Reason: \%s\(\backslash\)n"}, \mbox{\hyperlink{group__Eina__Error__Group_ga627fd3d4e0e928c6c0c79e3b9faa48e8}{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} 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{@code}
\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}
\mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}} 

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

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


References E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+N\+U\+L\+L\+\_\+\+G\+O\+TO.



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

\mbox{\Hypertarget{group__Eina__Future_ga6ccbe5f596fb8dccc444e6de681e47a0}\label{group__Eina__Future_ga6ccbe5f596fb8dccc444e6de681e47a0}} 
\index{Eina\_Future@{Eina\_Future}!eina\_promise\_all\_array@{eina\_promise\_all\_array}}
\index{eina\_promise\_all\_array@{eina\_promise\_all\_array}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_promise\_all\_array()}{eina\_promise\_all\_array()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} Eina\+\_\+\+Promise$\ast$ eina\+\_\+promise\+\_\+all\+\_\+array (\begin{DoxyParamCaption}\item[{Eina\+\_\+\+Future $\ast$}]{array\mbox{[}$\,$\mbox{]} }\end{DoxyParamCaption})}



Creates an all promise. 

Creates a promise that is resolved once all the futures from the {\ttfamily array} are resolved. The promise is resolved with an Eina\+\_\+\+Value type array which contains E\+I\+N\+A\+\_\+\+V\+A\+L\+U\+E\+\_\+\+T\+Y\+P\+E\+\_\+\+V\+A\+L\+UE 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} Eina\_Future *dead \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\_Error}} err;}
\DoxyCodeLine{   \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} i, len;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (array.\mbox{\hyperlink{struct__Eina__Value_a1fd07b3214c901eec252a786cca47239}{type}} == \mbox{\hyperlink{group__Eina__Value__Group_ga28f6fb160baf3068e7c67ffba0a29c20}{EINA\_VALUE\_TYPE\_ERROR}})}
\DoxyCodeLine{    \{}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&array, \&err);}
\DoxyCodeLine{      fprintf(stderr, \textcolor{stringliteral}{"Could not complete all operations. Reason: \%s\(\backslash\)n"}, \mbox{\hyperlink{group__Eina__Error__Group_ga627fd3d4e0e928c6c0c79e3b9faa48e8}{eina\_error\_msg\_get}}(err));}
\DoxyCodeLine{      \textcolor{keywordflow}{return} array;}
\DoxyCodeLine{    \}}
\DoxyCodeLine{   len = \mbox{\hyperlink{group__Eina__Value__Array__Group_ga758e2a63aa537f872bdbd07b87ea6115}{eina\_value\_array\_count}}(\&array);}
\DoxyCodeLine{   \textcolor{keywordflow}{for} (i = 0; i < len; i++)}
\DoxyCodeLine{    \{}
\DoxyCodeLine{      \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}} v;}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eina__Value__Array__Group_ga9358dce2404ed0926db502539f8a1318}{eina\_value\_array\_get}}(\&array, i, \&v);}
\DoxyCodeLine{      \textcolor{keywordflow}{if} (v.type == \mbox{\hyperlink{group__Eina__Value__Group_ga28f6fb160baf3068e7c67ffba0a29c20}{EINA\_VALUE\_TYPE\_ERROR}})}
\DoxyCodeLine{       \{}
\DoxyCodeLine{         \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&err);}
\DoxyCodeLine{         fprintf(stderr, \textcolor{stringliteral}{"Could not complete operation '\%s'. Reason: \%s\(\backslash\)n"}, \_get\_operation\_name\_by\_index(i), \mbox{\hyperlink{group__Eina__Error__Group_ga627fd3d4e0e928c6c0c79e3b9faa48e8}{eina\_error\_msg\_get}}(err));}
\DoxyCodeLine{         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{       \}}
\DoxyCodeLine{      \textcolor{keywordflow}{if} (!i)}
\DoxyCodeLine{       \{}
\DoxyCodeLine{          \textcolor{keyword}{const} \textcolor{keywordtype}{char} *msg;}
\DoxyCodeLine{          \textcolor{keywordflow}{if} (v.type != \mbox{\hyperlink{group__Eina__Value__Group_ga916f76c8d5ffd4c3ee3c322a54efd0b7}{EINA\_VALUE\_TYPE\_STRING}})}
\DoxyCodeLine{          \{}
\DoxyCodeLine{            fprintf(stderr, \textcolor{stringliteral}{"Operation \%s expects '\%s' -\/ received '\%s'\(\backslash\)n"}, \_get\_operation\_name\_by\_index(i), \mbox{\hyperlink{group__Eina__Value__Group_ga916f76c8d5ffd4c3ee3c322a54efd0b7}{EINA\_VALUE\_TYPE\_STRING}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}}, v.type-\/>name);}
\DoxyCodeLine{            \textcolor{keywordflow}{continue};}
\DoxyCodeLine{          \}}
\DoxyCodeLine{          \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&msg);}
\DoxyCodeLine{          printf(\textcolor{stringliteral}{"File content:\%s\(\backslash\)n"}, msg);}
\DoxyCodeLine{       \}}
\DoxyCodeLine{      \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (i == 1)}
\DoxyCodeLine{       \{}
\DoxyCodeLine{          \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{          \textcolor{keywordflow}{if} (v.type != \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}})}
\DoxyCodeLine{          \{}
\DoxyCodeLine{            fprintf(stderr, \textcolor{stringliteral}{"Operation \%s expects '\%s' -\/ received '\%s'\(\backslash\)n"}, \_get\_operation\_name\_by\_index(i), \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}}, v.type-\/>name);}
\DoxyCodeLine{            \textcolor{keywordflow}{continue};}
\DoxyCodeLine{          \}}
\DoxyCodeLine{          \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&i);}
\DoxyCodeLine{          printf(\textcolor{stringliteral}{"File size: \%d\(\backslash\)n"}, i);}
\DoxyCodeLine{       \}}
\DoxyCodeLine{       \textcolor{keywordflow}{else}}
\DoxyCodeLine{       \{}
\DoxyCodeLine{          \textcolor{keywordtype}{double} p;}
\DoxyCodeLine{          \textcolor{keywordflow}{if} (v.type != \mbox{\hyperlink{group__Eina__Value__Group_ga959961fb03cd94a84ab469245c543732}{EINA\_VALUE\_TYPE\_DOUBLE}})}
\DoxyCodeLine{          \{}
\DoxyCodeLine{            fprintf(stderr, \textcolor{stringliteral}{"Operation \%s expects '\%s' -\/ received '\%s'\(\backslash\)n"}, \_get\_operation\_name\_by\_index(i), \mbox{\hyperlink{group__Eina__Value__Group_ga959961fb03cd94a84ab469245c543732}{EINA\_VALUE\_TYPE\_DOUBLE}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}}, v.type-\/>name);}
\DoxyCodeLine{            \textcolor{keywordflow}{continue};}
\DoxyCodeLine{          \}}
\DoxyCodeLine{          \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&v, \&p);}
\DoxyCodeLine{          printf(\textcolor{stringliteral}{"50 places of PI: \%f\(\backslash\)n"}, p);}
\DoxyCodeLine{       \}}
\DoxyCodeLine{    \}}
\DoxyCodeLine{   \textcolor{keywordflow}{return} array;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void} func(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{  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, {\ttfamily \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{E\+I\+N\+A\+\_\+\+F\+U\+T\+U\+R\+E\+\_\+\+S\+E\+N\+T\+I\+N\+EL}}} terminated. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A promise or {\ttfamily N\+U\+LL} on error. 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
On error all the futures will be C\+A\+N\+C\+E\+L\+ED. 
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga8838591bc2163cac63ba6a5180a63091}{eina\+\_\+future\+\_\+all\+\_\+array()}} 
\end{DoxySeeAlso}


References eina\+\_\+mempool\+\_\+free(), E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+F\+A\+L\+S\+E\+\_\+\+G\+O\+TO, E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+N\+U\+L\+L\+\_\+\+G\+O\+TO, E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+N\+U\+L\+L\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+V\+AL, eina\+\_\+value\+\_\+array\+\_\+append(), eina\+\_\+value\+\_\+array\+\_\+setup(), eina\+\_\+value\+\_\+flush(), eina\+\_\+value\+\_\+setup(), E\+I\+N\+A\+\_\+\+V\+A\+L\+U\+E\+\_\+\+T\+Y\+P\+E\+\_\+\+I\+NT, and E\+I\+N\+A\+\_\+\+V\+A\+L\+U\+E\+\_\+\+T\+Y\+P\+E\+\_\+\+V\+A\+L\+UE.



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

\mbox{\Hypertarget{group__Eina__Future_ga3edff86abbf1045c6ad9a9db6e6ec339}\label{group__Eina__Future_ga3edff86abbf1045c6ad9a9db6e6ec339}} 
\index{Eina\_Future@{Eina\_Future}!eina\_promise\_race\_array@{eina\_promise\_race\_array}}
\index{eina\_promise\_race\_array@{eina\_promise\_race\_array}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{eina\_promise\_race\_array()}{eina\_promise\_race\_array()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} Eina\+\_\+\+Promise$\ast$ eina\+\_\+promise\+\_\+race\+\_\+array (\begin{DoxyParamCaption}\item[{Eina\+\_\+\+Future $\ast$}]{array\mbox{[}$\,$\mbox{]} }\end{DoxyParamCaption})}



Creates a race promise. 

Creates a promise that resolves when a future from the {\ttfamily array} is completed. The remaining futures will be canceled with the error code {\ttfamily E\+C\+A\+N\+C\+E\+L\+ED}

The resulting value is an E\+I\+N\+A\+\_\+\+V\+A\+L\+U\+E\+\_\+\+T\+Y\+P\+E\+\_\+\+S\+T\+R\+U\+CT with two fields\+:

\begin{DoxyItemize}
\item A field named \char`\"{}value\char`\"{} which contains an Eina\+\_\+\+Value with the result itself. \item A field named \char`\"{}index\char`\"{} which is an int that contains 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_ga8bf7d696d1a904a74bd5f9504a3c3d9f}{EINA\_PROMISE\_RACE\_STRUCT\_DESC}})}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        fprintf(stderr, \textcolor{stringliteral}{"Eina\_Value is not a race struct\(\backslash\)n"});}
\DoxyCodeLine{        \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{     \}}
\DoxyCodeLine{    \mbox{\hyperlink{group__Eina__Value__Struct__Group_ga07a7cc420f03a247dffe4d13ce1ad6c5}{eina\_value\_struct\_get}}(\&v, \textcolor{stringliteral}{"index"}, \&i);}
\DoxyCodeLine{    \textcolor{comment}{// Get the operation result}}
\DoxyCodeLine{    \mbox{\hyperlink{group__Eina__Value__Struct__Group_ga07a7cc420f03a247dffe4d13ce1ad6c5}{eina\_value\_struct\_get}}(\&v, \textcolor{stringliteral}{"value"}, \&result);}
\DoxyCodeLine{    \textcolor{keywordflow}{if} (!i)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{       \textcolor{keyword}{const} \textcolor{keywordtype}{char} *msg;}
\DoxyCodeLine{       \textcolor{keywordflow}{if} (result.\mbox{\hyperlink{struct__Eina__Value_a1fd07b3214c901eec252a786cca47239}{type}} != \mbox{\hyperlink{group__Eina__Value__Group_ga916f76c8d5ffd4c3ee3c322a54efd0b7}{EINA\_VALUE\_TYPE\_STRING}})}
\DoxyCodeLine{         fprintf(stderr, \textcolor{stringliteral}{"Operation \%s expects '\%s' -\/ received '\%s'\(\backslash\)n"}, \_get\_operation\_name\_by\_index(i), \mbox{\hyperlink{group__Eina__Value__Group_ga916f76c8d5ffd4c3ee3c322a54efd0b7}{EINA\_VALUE\_TYPE\_STRING}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}}, result.\mbox{\hyperlink{struct__Eina__Value_a1fd07b3214c901eec252a786cca47239}{type}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}});}
\DoxyCodeLine{       \textcolor{keywordflow}{else}}
\DoxyCodeLine{       \{}
\DoxyCodeLine{         \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&result, \&msg);}
\DoxyCodeLine{         printf(\textcolor{stringliteral}{"File content:\%s\(\backslash\)n"}, msg);}
\DoxyCodeLine{       \}}
\DoxyCodeLine{     \}}
\DoxyCodeLine{    \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (i == 1)}
\DoxyCodeLine{      \{}
\DoxyCodeLine{        \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (result.\mbox{\hyperlink{struct__Eina__Value_a1fd07b3214c901eec252a786cca47239}{type}} != \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}})}
\DoxyCodeLine{          fprintf(stderr, \textcolor{stringliteral}{"Operation \%s expects '\%s' -\/ received '\%s'\(\backslash\)n"}, \_get\_operation\_name\_by\_index(i), \mbox{\hyperlink{group__Eina__Value__Group_ga17974fd9ab773a3efefd591ffde58f77}{EINA\_VALUE\_TYPE\_INT}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}}, v.type-\/>name);}
\DoxyCodeLine{        \textcolor{keywordflow}{else}}
\DoxyCodeLine{        \{}
\DoxyCodeLine{          \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&result, \&i);}
\DoxyCodeLine{          printf(\textcolor{stringliteral}{"File size: \%d\(\backslash\)n"}, i);}
\DoxyCodeLine{        \}}
\DoxyCodeLine{      \}}
\DoxyCodeLine{     \textcolor{keywordflow}{else}}
\DoxyCodeLine{      \{}
\DoxyCodeLine{        \textcolor{keywordtype}{double} p;}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (result.\mbox{\hyperlink{struct__Eina__Value_a1fd07b3214c901eec252a786cca47239}{type}} != \mbox{\hyperlink{group__Eina__Value__Group_ga959961fb03cd94a84ab469245c543732}{EINA\_VALUE\_TYPE\_DOUBLE}})}
\DoxyCodeLine{           fprintf(stderr, \textcolor{stringliteral}{"Operation \%s expects '\%s' -\/ received '\%s'\(\backslash\)n"}, \_get\_operation\_name\_by\_index(i), \mbox{\hyperlink{group__Eina__Value__Group_ga959961fb03cd94a84ab469245c543732}{EINA\_VALUE\_TYPE\_DOUBLE}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}}, result.\mbox{\hyperlink{struct__Eina__Value_a1fd07b3214c901eec252a786cca47239}{type}}-\/>\mbox{\hyperlink{struct__Eina__Value__Type_ada10b4da2ce18ea23e10dc048f470af0}{name}});}
\DoxyCodeLine{        \textcolor{keywordflow}{else}}
\DoxyCodeLine{         \{}
\DoxyCodeLine{           \mbox{\hyperlink{group__Eina__Value__Value__Group_ga6f088fe6c6127d808cdf214b355cbdeb}{eina\_value\_get}}(\&result, \&p);}
\DoxyCodeLine{           printf(\textcolor{stringliteral}{"50 places of PI: \%f\(\backslash\)n"}, p);}
\DoxyCodeLine{         \}}
\DoxyCodeLine{      \}}
\DoxyCodeLine{    \mbox{\hyperlink{group__Eina__Value__Value__Group_ga940660709a2862bafac92f47bb721a68}{eina\_value\_flush}}(\&result);}
\DoxyCodeLine{    \textcolor{keywordflow}{return} v;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}}}
\DoxyCodeLine{\_race\_err(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\_Error}} err)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   fprintf(stderr, \textcolor{stringliteral}{"Could not complete the race future. Reason: \%s\(\backslash\)n"}, \mbox{\hyperlink{group__Eina__Error__Group_ga627fd3d4e0e928c6c0c79e3b9faa48e8}{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} *Eina\_Future[] = \{NULL, NULL, NULL, NULL\};}
\DoxyCodeLine{  \mbox{\hyperlink{struct__Eina__List}{Eina\_List}} *l = NULL;}
\DoxyCodeLine{}
\DoxyCodeLine{  futures[0] = read\_file(\textcolor{stringliteral}{"/tmp/todo.txt"});}
\DoxyCodeLine{  futures[1] = get\_file\_size(\textcolor{stringliteral}{"/tmp/file.txt"});}
\DoxyCodeLine{  \textcolor{comment}{// calculates 50 places of PI}}
\DoxyCodeLine{  futures[2] = calc\_pi(50);}
\DoxyCodeLine{  f\_race = \mbox{\hyperlink{group__Eina__Future_ga2c63774e66100dc5f4b91f88f0efc5f1}{eina\_future\_race\_array}}(futures);}
\DoxyCodeLine{  \mbox{\hyperlink{group__Eina__Future_ga1125fb075daa2ac3548ee4a55d69190c}{eina\_future\_then\_easy}}(f\_race, \_race\_cb, \_race\_err, NULL, \mbox{\hyperlink{group__Eina__Value__Group_ga8147143699c5f5a686415090080d3f9e}{EINA\_VALUE\_TYPE\_STRUCT}}, NULL);}
\DoxyCodeLine{\}}
\end{DoxyCode}



\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em array} & An array of futures, {\ttfamily \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{E\+I\+N\+A\+\_\+\+F\+U\+T\+U\+R\+E\+\_\+\+S\+E\+N\+T\+I\+N\+EL}}} terminated. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A promise or {\ttfamily N\+U\+LL} on error. 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
On error all the futures will be C\+A\+N\+C\+E\+L\+ED. 
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga2c63774e66100dc5f4b91f88f0efc5f1}{eina\+\_\+future\+\_\+race\+\_\+array()}} 

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


References E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+F\+A\+L\+S\+E\+\_\+\+G\+O\+TO, E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+N\+U\+L\+L\+\_\+\+G\+O\+TO, and E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+N\+U\+L\+L\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+V\+AL.



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

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



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

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


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em array} & A future array, must be terminated with \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{E\+I\+N\+A\+\_\+\+F\+U\+T\+U\+R\+E\+\_\+\+S\+E\+N\+T\+I\+N\+EL}} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A future. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga6ccbe5f596fb8dccc444e6de681e47a0}{eina\+\_\+promise\+\_\+all\+\_\+array()}} 

\mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{E\+I\+N\+A\+\_\+\+F\+U\+T\+U\+R\+E\+\_\+\+S\+E\+N\+T\+I\+N\+EL}} 
\end{DoxySeeAlso}


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

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



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

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


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em array} & A future array, must be terminated with \mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{E\+I\+N\+A\+\_\+\+F\+U\+T\+U\+R\+E\+\_\+\+S\+E\+N\+T\+I\+N\+EL}} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A future. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga3edff86abbf1045c6ad9a9db6e6ec339}{eina\+\_\+promise\+\_\+race\+\_\+array()}} 

\mbox{\hyperlink{group__Eina__Future_ga1161af18cd7714ab7fd40da2afa39164}{E\+I\+N\+A\+\_\+\+F\+U\+T\+U\+R\+E\+\_\+\+S\+E\+N\+T\+I\+N\+EL}} 
\end{DoxySeeAlso}


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



\doxysubsection{Variable Documentation}
\mbox{\Hypertarget{group__Eina__Future_gaf28b0de9e4b3dbcf38cd114d0c1b82e2}\label{group__Eina__Future_gaf28b0de9e4b3dbcf38cd114d0c1b82e2}} 
\index{Eina\_Future@{Eina\_Future}!EINA\_PROMISE\_RACE\_STRUCT\_DESC@{EINA\_PROMISE\_RACE\_STRUCT\_DESC}}
\index{EINA\_PROMISE\_RACE\_STRUCT\_DESC@{EINA\_PROMISE\_RACE\_STRUCT\_DESC}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{EINA\_PROMISE\_RACE\_STRUCT\_DESC}{EINA\_PROMISE\_RACE\_STRUCT\_DESC}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily const \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{group__Eina__Value__Struct__Group_ga69bcc1965b7b57ef713b0370d10f593d}{Eina\+\_\+\+Value\+\_\+\+Struct\+\_\+\+Desc}}$\ast$ E\+I\+N\+A\+\_\+\+P\+R\+O\+M\+I\+S\+E\+\_\+\+R\+A\+C\+E\+\_\+\+S\+T\+R\+U\+C\+T\+\_\+\+D\+E\+SC}

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

This struct contains two members\+: \begin{DoxyItemize}
\item value An E\+I\+N\+A\+\_\+\+V\+A\+L\+U\+E\+\_\+\+T\+Y\+P\+E\+\_\+\+V\+A\+L\+UE that contains the future result that wont the race. \item index An E\+I\+N\+A\+\_\+\+V\+A\+L\+U\+E\+\_\+\+T\+Y\+P\+E\+\_\+\+U\+I\+NT that contains the future index that won the race.\end{DoxyItemize}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga3edff86abbf1045c6ad9a9db6e6ec339}{eina\+\_\+promise\+\_\+race\+\_\+array()}} 

\mbox{\hyperlink{struct__Eina__Future__Race__Result}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Race\+\_\+\+Result}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Future_ga8bf7d696d1a904a74bd5f9504a3c3d9f}\label{group__Eina__Future_ga8bf7d696d1a904a74bd5f9504a3c3d9f}} 
\index{Eina\_Future@{Eina\_Future}!EINA\_PROMISE\_RACE\_STRUCT\_DESC@{EINA\_PROMISE\_RACE\_STRUCT\_DESC}}
\index{EINA\_PROMISE\_RACE\_STRUCT\_DESC@{EINA\_PROMISE\_RACE\_STRUCT\_DESC}!Eina\_Future@{Eina\_Future}}
\doxysubsubsection{\texorpdfstring{EINA\_PROMISE\_RACE\_STRUCT\_DESC}{EINA\_PROMISE\_RACE\_STRUCT\_DESC}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily E\+I\+N\+A\+\_\+\+P\+R\+O\+M\+I\+S\+E\+\_\+\+R\+A\+C\+E\+\_\+\+S\+T\+R\+U\+C\+T\+\_\+\+D\+E\+SC = \&R\+A\+C\+E\+\_\+\+S\+T\+R\+U\+C\+T\+\_\+\+D\+E\+SC}

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

This struct contains two members\+: \begin{DoxyItemize}
\item value An E\+I\+N\+A\+\_\+\+V\+A\+L\+U\+E\+\_\+\+T\+Y\+P\+E\+\_\+\+V\+A\+L\+UE that contains the future result that wont the race. \item index An E\+I\+N\+A\+\_\+\+V\+A\+L\+U\+E\+\_\+\+T\+Y\+P\+E\+\_\+\+U\+I\+NT that contains the future index that won the race.\end{DoxyItemize}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga3edff86abbf1045c6ad9a9db6e6ec339}{eina\+\_\+promise\+\_\+race\+\_\+array()}} 

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