\hypertarget{struct__Eina__Future__Desc}{}\doxysection{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc Struct Reference}
\label{struct__Eina__Future__Desc}\index{\_Eina\_Future\_Desc@{\_Eina\_Future\_Desc}}


A struct used to define a callback and data for a future.  


\doxysubsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Eina__Future__Callbacks_ga43d2d4c20a2f7aee2a25ada34a9cc675}{Eina\+\_\+\+Future\+\_\+\+Cb}} \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{cb}}
\begin{DoxyCompactList}\small\item\em Called when the future is resolved or rejected. \end{DoxyCompactList}\item 
const void $\ast$ \mbox{\hyperlink{struct__Eina__Future__Desc_a3776d82a99776d2b6a96839c6191bc13}{data}}
\begin{DoxyCompactList}\small\item\em Context data to {\ttfamily cb}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}} $\ast$$\ast$ \mbox{\hyperlink{struct__Eina__Future__Desc_afdce5683a20c045e4400cbbe7e0da9d4}{storage}}
\begin{DoxyCompactList}\small\item\em The storage will be used by Eina to store a pointer to the created future. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
A struct used to define a callback and data for a future. 

This struct contains a future completion callback and a data to the future completion callback which is used by \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}}, \mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}} and friends to inform the user about the future result. The \mbox{\hyperlink{struct__Eina__Future__Desc_a3776d82a99776d2b6a96839c6191bc13}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::data}} variable should be freed when \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}} is called, otherwise it will leak.

\begin{DoxyNote}{Note}
If \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}}, \mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}} and friends fails to return a valid future (in other words\+: {\ttfamily NULL} is returned) the \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}} will be called report an error like {\ttfamily EINVAL} or {\ttfamily ENOMEM} so \mbox{\hyperlink{struct__Eina__Future__Desc_a3776d82a99776d2b6a96839c6191bc13}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::data}} can be freed.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}} 

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

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

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

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

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

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


\doxysubsection{Field Documentation}
\mbox{\Hypertarget{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}\label{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}} 
\index{\_Eina\_Future\_Desc@{\_Eina\_Future\_Desc}!cb@{cb}}
\index{cb@{cb}!\_Eina\_Future\_Desc@{\_Eina\_Future\_Desc}}
\doxysubsubsection{\texorpdfstring{cb}{cb}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Future__Callbacks_ga43d2d4c20a2f7aee2a25ada34a9cc675}{Eina\+\_\+\+Future\+\_\+\+Cb}} \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}



Called when the future is resolved or rejected. 

Once a future is resolved or rejected this function is called passing the future result to inform the user that the future operation has ended. Normally this function is called from a safe context (main loop or some platform defined safe context), however in case of a future cancellation (\mbox{\hyperlink{group__Eina__Future_ga6d7a6889b5f1a9fca02f868c484148e7}{eina\+\_\+future\+\_\+cancel()}}) or if \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}}, \mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}} and friends fails to create a new future, this function is called from the current context.

Use this function to free {\ttfamily data} if necessary. \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_ga6d7a6889b5f1a9fca02f868c484148e7}{eina\+\_\+future\+\_\+cancel()}} 
\end{DoxySeeAlso}


Referenced by eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc(), eina\+\_\+future\+\_\+cb\+\_\+convert\+\_\+to(), eina\+\_\+future\+\_\+chain\+\_\+array(), and eina\+\_\+future\+\_\+new().

\mbox{\Hypertarget{struct__Eina__Future__Desc_a3776d82a99776d2b6a96839c6191bc13}\label{struct__Eina__Future__Desc_a3776d82a99776d2b6a96839c6191bc13}} 
\index{\_Eina\_Future\_Desc@{\_Eina\_Future\_Desc}!data@{data}}
\index{data@{data}!\_Eina\_Future\_Desc@{\_Eina\_Future\_Desc}}
\doxysubsubsection{\texorpdfstring{data}{data}}
{\footnotesize\ttfamily const void$\ast$ \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::data}



Context data to {\ttfamily cb}. 

The {\ttfamily data} should be freed inside {\ttfamily cb}, otherwise its memory will leak! 

Referenced by eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc().

\mbox{\Hypertarget{struct__Eina__Future__Desc_afdce5683a20c045e4400cbbe7e0da9d4}\label{struct__Eina__Future__Desc_afdce5683a20c045e4400cbbe7e0da9d4}} 
\index{\_Eina\_Future\_Desc@{\_Eina\_Future\_Desc}!storage@{storage}}
\index{storage@{storage}!\_Eina\_Future\_Desc@{\_Eina\_Future\_Desc}}
\doxysubsubsection{\texorpdfstring{storage}{storage}}
{\footnotesize\ttfamily \mbox{\hyperlink{structEina__Future}{Eina\+\_\+\+Future}}$\ast$$\ast$ \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::storage}



The storage will be used by Eina to store a pointer to the created future. 

It can be {\ttfamily NULL}. 