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


This function helps when manipulating a file asynchronously.  


\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
EIO\+\_\+\+API \mbox{\hyperlink{group__Eio_ga1145f009745ecb4d9f6a01a9bc5a9ac0}{Eio\+\_\+\+File}} $\ast$ \mbox{\hyperlink{group__Eio__Map_ga4d514ff9d54f5ec4a292bc129d7a9962}{eio\+\_\+file\+\_\+open}} (const char $\ast$name, \mbox{\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 Asynchronously open a file. \end{DoxyCompactList}\item 
EIO\+\_\+\+API \mbox{\hyperlink{group__Eio_ga1145f009745ecb4d9f6a01a9bc5a9ac0}{Eio\+\_\+\+File}} $\ast$ \mbox{\hyperlink{group__Eio__Map_gad00ade176103f75a434f53eeaf4ad9d6}{eio\+\_\+file\+\_\+close}} (\mbox{\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 Asynchronously close a file. \end{DoxyCompactList}\item 
EIO\+\_\+\+API \mbox{\hyperlink{group__Eio_ga1145f009745ecb4d9f6a01a9bc5a9ac0}{Eio\+\_\+\+File}} $\ast$ \mbox{\hyperlink{group__Eio__Map_gab40731438087bf6f07e591ed35bfe71b}{eio\+\_\+file\+\_\+map\+\_\+all}} (\mbox{\hyperlink{group__Eina__File__Group_ga20697123547cbc937c6c9dd845af0403}{Eina\+\_\+\+File}} $\ast$f, \mbox{\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 Asynchronously map a file in memory. \end{DoxyCompactList}\item 
EIO\+\_\+\+API \mbox{\hyperlink{group__Eio_ga1145f009745ecb4d9f6a01a9bc5a9ac0}{Eio\+\_\+\+File}} $\ast$ \mbox{\hyperlink{group__Eio__Map_ga674b031edd04ffd2e630593487b53910}{eio\+\_\+file\+\_\+map\+\_\+new}} (\mbox{\hyperlink{group__Eina__File__Group_ga20697123547cbc937c6c9dd845af0403}{Eina\+\_\+\+File}} $\ast$f, \mbox{\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 Asynchronously map a part of a file in memory. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This function helps when manipulating a file asynchronously. 

These set of functions work on top of Eina\+\_\+\+File and Ecore\+\_\+\+Thread to do basic operations on a file, like opening, closing and mapping a file to memory. 

\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Eio__Map_ga4d514ff9d54f5ec4a292bc129d7a9962}\label{group__Eio__Map_ga4d514ff9d54f5ec4a292bc129d7a9962}} 
\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}}
\doxysubsubsection{\texorpdfstring{eio\_file\_open()}{eio\_file\_open()}}
{\footnotesize\ttfamily EIO\+\_\+\+API \mbox{\hyperlink{group__Eio_ga1145f009745ecb4d9f6a01a9bc5a9ac0}{Eio\+\_\+\+File}} $\ast$ eio\+\_\+file\+\_\+open (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name,  }\item[{\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}}}]{shared,  }\item[{Eio\+\_\+\+Open\+\_\+\+Cb}]{open\+\_\+cb,  }\item[{Eio\+\_\+\+Error\+\_\+\+Cb}]{error\+\_\+cb,  }\item[{const void $\ast$}]{data }\end{DoxyParamCaption})}



Asynchronously open a file. 


\begin{DoxyParams}{Parameters}
{\em name} & The file to open. \\
\hline
{\em shared} & If it\textquotesingle{}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\textquotesingle{}t be opened. \\
\hline
{\em data} & Unmodified user data passed to callbacks \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the file if successful or NULL otherwise. 
\end{DoxyReturn}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}, and \mbox{\hyperlink{group__Eina__Stringshare__Group_ga4e3ce40744291c1fb8574e26883c0bf2}{eina\+\_\+stringshare\+\_\+add()}}.

\mbox{\Hypertarget{group__Eio__Map_gad00ade176103f75a434f53eeaf4ad9d6}\label{group__Eio__Map_gad00ade176103f75a434f53eeaf4ad9d6}} 
\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}}
\doxysubsubsection{\texorpdfstring{eio\_file\_close()}{eio\_file\_close()}}
{\footnotesize\ttfamily EIO\+\_\+\+API \mbox{\hyperlink{group__Eio_ga1145f009745ecb4d9f6a01a9bc5a9ac0}{Eio\+\_\+\+File}} $\ast$ eio\+\_\+file\+\_\+close (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__File__Group_ga20697123547cbc937c6c9dd845af0403}{Eina\+\_\+\+File}} $\ast$}]{f,  }\item[{Eio\+\_\+\+Done\+\_\+\+Cb}]{done\+\_\+cb,  }\item[{Eio\+\_\+\+Error\+\_\+\+Cb}]{error\+\_\+cb,  }\item[{const void $\ast$}]{data }\end{DoxyParamCaption})}



Asynchronously 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\textquotesingle{}t be closed. \\
\hline
{\em data} & Unmodified user data passed to callbacks \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the file if successful or NULL otherwise. 
\end{DoxyReturn}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}.

\mbox{\Hypertarget{group__Eio__Map_gab40731438087bf6f07e591ed35bfe71b}\label{group__Eio__Map_gab40731438087bf6f07e591ed35bfe71b}} 
\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}}
\doxysubsubsection{\texorpdfstring{eio\_file\_map\_all()}{eio\_file\_map\_all()}}
{\footnotesize\ttfamily EIO\+\_\+\+API \mbox{\hyperlink{group__Eio_ga1145f009745ecb4d9f6a01a9bc5a9ac0}{Eio\+\_\+\+File}} $\ast$ eio\+\_\+file\+\_\+map\+\_\+all (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__File__Group_ga20697123547cbc937c6c9dd845af0403}{Eina\+\_\+\+File}} $\ast$}]{f,  }\item[{\mbox{\hyperlink{group__Eina__File__Group_ga2788825dfdd797282112148f2f65ec7a}{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})}



Asynchronously 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\textquotesingle{}t be mapped. \\
\hline
{\em data} & Unmodified user data passed to callbacks \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the file if successful or NULL otherwise.
\end{DoxyReturn}
The container of the Eio\+\_\+\+File is the Eina\+\_\+\+File. 

References \mbox{\hyperlink{group__Eina__File__Group_ga2f57057d1d66e6392a832674a69c1278}{eina\+\_\+file\+\_\+size\+\_\+get()}}, and \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}.

\mbox{\Hypertarget{group__Eio__Map_ga674b031edd04ffd2e630593487b53910}\label{group__Eio__Map_ga674b031edd04ffd2e630593487b53910}} 
\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}}
\doxysubsubsection{\texorpdfstring{eio\_file\_map\_new()}{eio\_file\_map\_new()}}
{\footnotesize\ttfamily EIO\+\_\+\+API \mbox{\hyperlink{group__Eio_ga1145f009745ecb4d9f6a01a9bc5a9ac0}{Eio\+\_\+\+File}} $\ast$ eio\+\_\+file\+\_\+map\+\_\+new (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__File__Group_ga20697123547cbc937c6c9dd845af0403}{Eina\+\_\+\+File}} $\ast$}]{f,  }\item[{\mbox{\hyperlink{group__Eina__File__Group_ga2788825dfdd797282112148f2f65ec7a}{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})}



Asynchronously 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\textquotesingle{}t be mapped. \\
\hline
{\em data} & Unmodified user data passed to callbacks \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the file if successful or NULL otherwise.
\end{DoxyReturn}
The container of the Eio\+\_\+\+File is the Eina\+\_\+\+File. 

References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}.

