\hypertarget{group__Eio__Map}{\section{Manipulate an Eina\+\_\+\+File asynchronously}
\label{group__Eio__Map}\index{Manipulate an Eina\+\_\+\+File asynchronously@{Manipulate an Eina\+\_\+\+File asynchronously}}
}


This function help manipulating file asynchronously.  


\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{Eio_8h_a1145f009745ecb4d9f6a01a9bc5a9ac0}{Eio\+\_\+\+File} $\ast$ \hyperlink{group__Eio__Map_ga3288af5437d603d44423d0665a4d0331}{eio\+\_\+file\+\_\+open} (const char $\ast$name, \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} shared, Eio\+\_\+\+Open\+\_\+\+Cb open\+\_\+cb, Eio\+\_\+\+Error\+\_\+\+Cb error\+\_\+cb, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Assynchronously open a file. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{Eio_8h_a1145f009745ecb4d9f6a01a9bc5a9ac0}{Eio\+\_\+\+File} $\ast$ \hyperlink{group__Eio__Map_gae2fc7395404cd2ab19e9dba537d84c4c}{eio\+\_\+file\+\_\+close} (\hyperlink{group__Eina__File__Group_ga20697123547cbc937c6c9dd845af0403}{Eina\+\_\+\+File} $\ast$f, Eio\+\_\+\+Done\+\_\+\+Cb done\+\_\+cb, Eio\+\_\+\+Error\+\_\+\+Cb error\+\_\+cb, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Assynchronously close a file. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{Eio_8h_a1145f009745ecb4d9f6a01a9bc5a9ac0}{Eio\+\_\+\+File} $\ast$ \hyperlink{group__Eio__Map_gacbce3022ff01db4f3247d2037f167f04}{eio\+\_\+file\+\_\+map\+\_\+all} (\hyperlink{group__Eina__File__Group_ga20697123547cbc937c6c9dd845af0403}{Eina\+\_\+\+File} $\ast$f, \hyperlink{group__Eina__File__Group_ga2788825dfdd797282112148f2f65ec7a}{Eina\+\_\+\+File\+\_\+\+Populate} rule, Eio\+\_\+\+Filter\+\_\+\+Map\+\_\+\+Cb filter\+\_\+cb, Eio\+\_\+\+Map\+\_\+\+Cb map\+\_\+cb, Eio\+\_\+\+Error\+\_\+\+Cb error\+\_\+cb, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Assynchronously map a file in memory. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{Eio_8h_a1145f009745ecb4d9f6a01a9bc5a9ac0}{Eio\+\_\+\+File} $\ast$ \hyperlink{group__Eio__Map_gae6939cb44be138be47117c6daca2afb0}{eio\+\_\+file\+\_\+map\+\_\+new} (\hyperlink{group__Eina__File__Group_ga20697123547cbc937c6c9dd845af0403}{Eina\+\_\+\+File} $\ast$f, \hyperlink{group__Eina__File__Group_ga2788825dfdd797282112148f2f65ec7a}{Eina\+\_\+\+File\+\_\+\+Populate} rule, unsigned long int offset, unsigned long int length, Eio\+\_\+\+Filter\+\_\+\+Map\+\_\+\+Cb filter\+\_\+cb, Eio\+\_\+\+Map\+\_\+\+Cb map\+\_\+cb, Eio\+\_\+\+Error\+\_\+\+Cb error\+\_\+cb, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Assynchronously map a part of a file in memory. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
This function help manipulating file asynchronously. 

This set of function work on top of Eina\+\_\+\+File and Ecore\+\_\+\+Thread to do basic operations in a file, like openning, closing and mapping a file to memory. 

\subsection{Function Documentation}
\hypertarget{group__Eio__Map_ga3288af5437d603d44423d0665a4d0331}{\index{Manipulate an Eina\+\_\+\+File asynchronously@{Manipulate an Eina\+\_\+\+File asynchronously}!eio\+\_\+file\+\_\+open@{eio\+\_\+file\+\_\+open}}
\index{eio\+\_\+file\+\_\+open@{eio\+\_\+file\+\_\+open}!Manipulate an Eina\+\_\+\+File asynchronously@{Manipulate an Eina\+\_\+\+File asynchronously}}
\subsubsection[{eio\+\_\+file\+\_\+open}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eio\+\_\+\+File}$\ast$ eio\+\_\+file\+\_\+open (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{name, }
\item[{{\bf Eina\+\_\+\+Bool}}]{shared, }
\item[{Eio\+\_\+\+Open\+\_\+\+Cb}]{open\+\_\+cb, }
\item[{Eio\+\_\+\+Error\+\_\+\+Cb}]{error\+\_\+cb, }
\item[{const void $\ast$}]{data}
\end{DoxyParamCaption}
)}}\label{group__Eio__Map_ga3288af5437d603d44423d0665a4d0331}


Assynchronously open a file. 


\begin{DoxyParams}{Parameters}
{\em name} & The file to open. \\
\hline
{\em shared} & If it's a shared memory file. \\
\hline
{\em open\+\_\+cb} & Callback called in the main loop when the file has been successfully opened. \\
\hline
{\em error\+\_\+cb} & Callback called in the main loop when the file couldn't be opened. \\
\hline
{\em data} & Unmodified user data passed to callbacks \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the file if successfull or N\+U\+L\+L otherwise. 
\end{DoxyReturn}


References eina\+\_\+stringshare\+\_\+add().

\hypertarget{group__Eio__Map_gae2fc7395404cd2ab19e9dba537d84c4c}{\index{Manipulate an Eina\+\_\+\+File asynchronously@{Manipulate an Eina\+\_\+\+File asynchronously}!eio\+\_\+file\+\_\+close@{eio\+\_\+file\+\_\+close}}
\index{eio\+\_\+file\+\_\+close@{eio\+\_\+file\+\_\+close}!Manipulate an Eina\+\_\+\+File asynchronously@{Manipulate an Eina\+\_\+\+File asynchronously}}
\subsubsection[{eio\+\_\+file\+\_\+close}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eio\+\_\+\+File}$\ast$ eio\+\_\+file\+\_\+close (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+File} $\ast$}]{f, }
\item[{Eio\+\_\+\+Done\+\_\+\+Cb}]{done\+\_\+cb, }
\item[{Eio\+\_\+\+Error\+\_\+\+Cb}]{error\+\_\+cb, }
\item[{const void $\ast$}]{data}
\end{DoxyParamCaption}
)}}\label{group__Eio__Map_gae2fc7395404cd2ab19e9dba537d84c4c}


Assynchronously close a file. 


\begin{DoxyParams}{Parameters}
{\em f} & The file to close. \\
\hline
{\em done\+\_\+cb} & Callback called in the main loop when the file has been successfully closed. \\
\hline
{\em error\+\_\+cb} & Callback called in the main loop when the file couldn't be closed. \\
\hline
{\em data} & Unmodified user data passed to callbacks \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the file if successfull or N\+U\+L\+L otherwise. 
\end{DoxyReturn}
\hypertarget{group__Eio__Map_gacbce3022ff01db4f3247d2037f167f04}{\index{Manipulate an Eina\+\_\+\+File asynchronously@{Manipulate an Eina\+\_\+\+File asynchronously}!eio\+\_\+file\+\_\+map\+\_\+all@{eio\+\_\+file\+\_\+map\+\_\+all}}
\index{eio\+\_\+file\+\_\+map\+\_\+all@{eio\+\_\+file\+\_\+map\+\_\+all}!Manipulate an Eina\+\_\+\+File asynchronously@{Manipulate an Eina\+\_\+\+File asynchronously}}
\subsubsection[{eio\+\_\+file\+\_\+map\+\_\+all}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eio\+\_\+\+File}$\ast$ eio\+\_\+file\+\_\+map\+\_\+all (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+File} $\ast$}]{f, }
\item[{{\bf Eina\+\_\+\+File\+\_\+\+Populate}}]{rule, }
\item[{Eio\+\_\+\+Filter\+\_\+\+Map\+\_\+\+Cb}]{filter\+\_\+cb, }
\item[{Eio\+\_\+\+Map\+\_\+\+Cb}]{map\+\_\+cb, }
\item[{Eio\+\_\+\+Error\+\_\+\+Cb}]{error\+\_\+cb, }
\item[{const void $\ast$}]{data}
\end{DoxyParamCaption}
)}}\label{group__Eio__Map_gacbce3022ff01db4f3247d2037f167f04}


Assynchronously map a file in memory. 


\begin{DoxyParams}{Parameters}
{\em f} & The file to map. \\
\hline
{\em rule} & The rule to apply to the map. \\
\hline
{\em filter\+\_\+cb} & Callback called in the thread to validate the content of the map. \\
\hline
{\em map\+\_\+cb} & Callback called in the main loop when the file has been successfully mapped. \\
\hline
{\em error\+\_\+cb} & Callback called in the main loop when the file can't be mapped. \\
\hline
{\em data} & Unmodified user data passed to callbacks \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the file if successfull or N\+U\+L\+L otherwise.
\end{DoxyReturn}
The container of the Eio\+\_\+\+File is the Eina\+\_\+\+File. 

References eina\+\_\+file\+\_\+size\+\_\+get().

\hypertarget{group__Eio__Map_gae6939cb44be138be47117c6daca2afb0}{\index{Manipulate an Eina\+\_\+\+File asynchronously@{Manipulate an Eina\+\_\+\+File asynchronously}!eio\+\_\+file\+\_\+map\+\_\+new@{eio\+\_\+file\+\_\+map\+\_\+new}}
\index{eio\+\_\+file\+\_\+map\+\_\+new@{eio\+\_\+file\+\_\+map\+\_\+new}!Manipulate an Eina\+\_\+\+File asynchronously@{Manipulate an Eina\+\_\+\+File asynchronously}}
\subsubsection[{eio\+\_\+file\+\_\+map\+\_\+new}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eio\+\_\+\+File}$\ast$ eio\+\_\+file\+\_\+map\+\_\+new (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+File} $\ast$}]{f, }
\item[{{\bf Eina\+\_\+\+File\+\_\+\+Populate}}]{rule, }
\item[{unsigned long int}]{offset, }
\item[{unsigned long int}]{length, }
\item[{Eio\+\_\+\+Filter\+\_\+\+Map\+\_\+\+Cb}]{filter\+\_\+cb, }
\item[{Eio\+\_\+\+Map\+\_\+\+Cb}]{map\+\_\+cb, }
\item[{Eio\+\_\+\+Error\+\_\+\+Cb}]{error\+\_\+cb, }
\item[{const void $\ast$}]{data}
\end{DoxyParamCaption}
)}}\label{group__Eio__Map_gae6939cb44be138be47117c6daca2afb0}


Assynchronously map a part of a file in memory. 


\begin{DoxyParams}{Parameters}
{\em f} & The file to map. \\
\hline
{\em rule} & The rule to apply to the map. \\
\hline
{\em offset} & The offset inside the file \\
\hline
{\em length} & The length of the memory to map \\
\hline
{\em filter\+\_\+cb} & Callback called in the thread to validate the content of the map. \\
\hline
{\em map\+\_\+cb} & Callback called in the main loop when the file has been successfully mapped. \\
\hline
{\em error\+\_\+cb} & Callback called in the main loop when the file can't be mapped. \\
\hline
{\em data} & Unmodified user data passed to callbacks \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the file if successfull or N\+U\+L\+L otherwise.
\end{DoxyReturn}
The container of the Eio\+\_\+\+File is the Eina\+\_\+\+File. 