\hypertarget{group__Ecore__Con__Lib__Group}{}\doxysection{Ecore Connection Library Functions}
\label{group__Ecore__Con__Lib__Group}\index{Ecore Connection Library Functions@{Ecore Connection Library Functions}}


Utility functions that set up and shut down the Ecore Connection library.  


\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Ecore__Con__Lib__Group_ga9fcf024da9857192f9405c12cb6a90d9}\label{group__Ecore__Con__Lib__Group_ga9fcf024da9857192f9405c12cb6a90d9}} 
typedef void($\ast$ {\bfseries Ecore\+\_\+\+Con\+\_\+\+Dns\+\_\+\+Cb}) (const char $\ast$canonname, const char $\ast$ip, struct sockaddr $\ast$addr, int addrlen, void $\ast$data)
\begin{DoxyCompactList}\small\item\em A callback type for use with \mbox{\hyperlink{group__Ecore__Con__Lib__Group_ga25b58526055fd5bfa3166e6fe182b0fb}{ecore\+\_\+con\+\_\+lookup}}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
ECORE\+\_\+\+CON\+\_\+\+API int \mbox{\hyperlink{group__Ecore__Con__Lib__Group_ga8a20f47372627a03e86a8705a6f8a82d}{ecore\+\_\+con\+\_\+init}} (void)
\begin{DoxyCompactList}\small\item\em Initializes the Ecore\+\_\+\+Con library. \end{DoxyCompactList}\item 
ECORE\+\_\+\+CON\+\_\+\+API int \mbox{\hyperlink{group__Ecore__Con__Lib__Group_ga0e5e01c67f7135e16db0e8f17d087d99}{ecore\+\_\+con\+\_\+shutdown}} (void)
\begin{DoxyCompactList}\small\item\em Shuts down the Ecore\+\_\+\+Con library. \end{DoxyCompactList}\item 
ECORE\+\_\+\+CON\+\_\+\+API \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Ecore__Con__Lib__Group_ga25b58526055fd5bfa3166e6fe182b0fb}{ecore\+\_\+con\+\_\+lookup}} (const char $\ast$name, \mbox{\hyperlink{group__Ecore__Con__Lib__Group_ga9fcf024da9857192f9405c12cb6a90d9}{Ecore\+\_\+\+Con\+\_\+\+Dns\+\_\+\+Cb}} done\+\_\+cb, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Do an asynchronous DNS lookup. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Utility functions that set up and shut down the Ecore Connection library. 

There\textquotesingle{}s also \mbox{\hyperlink{group__Ecore__Con__Lib__Group_ga25b58526055fd5bfa3166e6fe182b0fb}{ecore\+\_\+con\+\_\+lookup()}} that can be used to make simple asynchronous DNS lookups.

A simple example of how to use these functions\+: \begin{DoxyItemize}
\item \mbox{\hyperlink{ecore_con_lookup_example_c}{Ecore\+\_\+\+Con -\/ DNS lookup}} \end{DoxyItemize}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Ecore__Con__Lib__Group_ga8a20f47372627a03e86a8705a6f8a82d}\label{group__Ecore__Con__Lib__Group_ga8a20f47372627a03e86a8705a6f8a82d}} 
\index{Ecore Connection Library Functions@{Ecore Connection Library Functions}!ecore\_con\_init@{ecore\_con\_init}}
\index{ecore\_con\_init@{ecore\_con\_init}!Ecore Connection Library Functions@{Ecore Connection Library Functions}}
\doxysubsubsection{\texorpdfstring{ecore\_con\_init()}{ecore\_con\_init()}}
{\footnotesize\ttfamily ECORE\+\_\+\+CON\+\_\+\+API int ecore\+\_\+con\+\_\+init (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Initializes the Ecore\+\_\+\+Con library. 

\begin{DoxyReturn}{Returns}
Number of times the library has been initialised without being shut down.
\end{DoxyReturn}
\begin{DoxyNote}{Note}
This function already calls \mbox{\hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\+\_\+init()}} internally, so you don\textquotesingle{}t need to call it explicitly. 
\end{DoxyNote}


References \mbox{\hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\+\_\+init()}}, \mbox{\hyperlink{group__Ecore__Init__Group_ga768298b932f18d7e7593a447493e5cde}{ecore\+\_\+shutdown()}}, \mbox{\hyperlink{group__Eina__Main__Group_ga81b8137665b8a4d2cb38ca50017d4c74}{eina\+\_\+init()}}, \mbox{\hyperlink{group__Eina__Log__Group_ga79d0a42ab10dd0e7760b33ae33a6aae0}{eina\+\_\+log\+\_\+domain\+\_\+register()}}, \mbox{\hyperlink{group__Eina__Log__Group_ga2e33caeeeb6051526c01b7fea4d6c91b}{EINA\+\_\+\+LOG\+\_\+\+ERR}}, \mbox{\hyperlink{group__Eina__Log__Group_ga079e9de9602815a6de0d5188b65c07a2}{EINA\+\_\+\+LOG\+\_\+\+STATE\+\_\+\+INIT}}, \mbox{\hyperlink{group__Eina__Log__Group_gga125f3b55502884020a1546d0575ae052adcc235504e74cbd641635c0af36e9d47}{EINA\+\_\+\+LOG\+\_\+\+STATE\+\_\+\+STOP}}, \mbox{\hyperlink{group__Eina__Log__Group_gaceb7074e48242643ec8d3d664a32801e}{eina\+\_\+log\+\_\+timing()}}, \mbox{\hyperlink{group__Eina__Main__Group_ga5bf35513199d5220341437c05696285d}{eina\+\_\+shutdown()}}, \mbox{\hyperlink{group__Evil__Main__Group_gafb1a41bef00cfbdd4bd96b09c59fafa8}{evil\+\_\+init()}}, and \mbox{\hyperlink{group__Evil__Main__Group_gad0f2f35a4504173b4ff420b91686e5b3}{evil\+\_\+shutdown()}}.



Referenced by \mbox{\hyperlink{group__Ecore__Con__Url__Group_ga96388997453269f58bde7873811af6d5}{ecore\+\_\+con\+\_\+url\+\_\+init()}}, \mbox{\hyperlink{group__Ecore__IPC__Group_gade1baa6a3e79dd7c9bd6244dad0e6571}{ecore\+\_\+ipc\+\_\+init()}}, and \mbox{\hyperlink{group__Elm__General_ga9cecc48846d90478f79176d4b279a60b}{elm\+\_\+quicklaunch\+\_\+sub\+\_\+init()}}.

\mbox{\Hypertarget{group__Ecore__Con__Lib__Group_ga0e5e01c67f7135e16db0e8f17d087d99}\label{group__Ecore__Con__Lib__Group_ga0e5e01c67f7135e16db0e8f17d087d99}} 
\index{Ecore Connection Library Functions@{Ecore Connection Library Functions}!ecore\_con\_shutdown@{ecore\_con\_shutdown}}
\index{ecore\_con\_shutdown@{ecore\_con\_shutdown}!Ecore Connection Library Functions@{Ecore Connection Library Functions}}
\doxysubsubsection{\texorpdfstring{ecore\_con\_shutdown()}{ecore\_con\_shutdown()}}
{\footnotesize\ttfamily ECORE\+\_\+\+CON\+\_\+\+API int ecore\+\_\+con\+\_\+shutdown (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Shuts down the Ecore\+\_\+\+Con library. 

\begin{DoxyReturn}{Returns}
Number of times the library has been initialised without being shut down. 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
This function already calls \mbox{\hyperlink{group__Ecore__Init__Group_ga768298b932f18d7e7593a447493e5cde}{ecore\+\_\+shutdown()}} internally, so you don\textquotesingle{}t need to call it explicitly unless you called \mbox{\hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\+\_\+init()}} explicitly too. 
\end{DoxyNote}


References \mbox{\hyperlink{group__Ecore__Init__Group_ga768298b932f18d7e7593a447493e5cde}{ecore\+\_\+shutdown()}}, \mbox{\hyperlink{group__Eina__Log__Group_ga61776fa99e910e2d40f77c688c9bee5a}{eina\+\_\+log\+\_\+domain\+\_\+unregister()}}, \mbox{\hyperlink{group__Eina__Log__Group_ga527ad9352599d503a53bf834868d3461}{EINA\+\_\+\+LOG\+\_\+\+STATE\+\_\+\+SHUTDOWN}}, \mbox{\hyperlink{group__Eina__Log__Group_gga125f3b55502884020a1546d0575ae052a42e956e3a69ea29632f7e9d27a269903}{EINA\+\_\+\+LOG\+\_\+\+STATE\+\_\+\+START}}, \mbox{\hyperlink{group__Eina__Log__Group_gaceb7074e48242643ec8d3d664a32801e}{eina\+\_\+log\+\_\+timing()}}, \mbox{\hyperlink{group__Eina__Main__Group_ga5bf35513199d5220341437c05696285d}{eina\+\_\+shutdown()}}, \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}, and \mbox{\hyperlink{group__Evil__Main__Group_gad0f2f35a4504173b4ff420b91686e5b3}{evil\+\_\+shutdown()}}.



Referenced by \mbox{\hyperlink{group__Ecore__Con__Url__Group_ga96388997453269f58bde7873811af6d5}{ecore\+\_\+con\+\_\+url\+\_\+init()}}, \mbox{\hyperlink{group__Ecore__Con__Url__Group_gaabcdae26e4a474dc5b9c43f60e4d00d4}{ecore\+\_\+con\+\_\+url\+\_\+shutdown()}}, \mbox{\hyperlink{group__Elm__General_ga9cecc48846d90478f79176d4b279a60b}{elm\+\_\+quicklaunch\+\_\+sub\+\_\+init()}}, and \mbox{\hyperlink{group__Elm__General_ga1c5b30a97472e994d2344f39595d07db}{elm\+\_\+quicklaunch\+\_\+sub\+\_\+shutdown()}}.

\mbox{\Hypertarget{group__Ecore__Con__Lib__Group_ga25b58526055fd5bfa3166e6fe182b0fb}\label{group__Ecore__Con__Lib__Group_ga25b58526055fd5bfa3166e6fe182b0fb}} 
\index{Ecore Connection Library Functions@{Ecore Connection Library Functions}!ecore\_con\_lookup@{ecore\_con\_lookup}}
\index{ecore\_con\_lookup@{ecore\_con\_lookup}!Ecore Connection Library Functions@{Ecore Connection Library Functions}}
\doxysubsubsection{\texorpdfstring{ecore\_con\_lookup()}{ecore\_con\_lookup()}}
{\footnotesize\ttfamily ECORE\+\_\+\+CON\+\_\+\+API \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} ecore\+\_\+con\+\_\+lookup (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name,  }\item[{\mbox{\hyperlink{group__Ecore__Con__Lib__Group_ga9fcf024da9857192f9405c12cb6a90d9}{Ecore\+\_\+\+Con\+\_\+\+Dns\+\_\+\+Cb}}}]{done\+\_\+cb,  }\item[{const void $\ast$}]{data }\end{DoxyParamCaption})}



Do an asynchronous DNS lookup. 

This function performs a DNS lookup on the hostname specified by name, then calls done\+\_\+cb with the result and the data given as parameter. The result will be given to the done\+\_\+cb as follows\+:

canonname -\/ the canonical name of the address, ip -\/ the resolved ip address, addr -\/ a pointer to the socket address, addrlen -\/ the length of the socket address, in bytes, data -\/ the data pointer given as parameter.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em name} & IP address or server name to translate. \\
\hline
\mbox{\texttt{ in}}  & {\em done\+\_\+cb} & Callback to notify when done. \\
\hline
\mbox{\texttt{ in}}  & {\em data} & User data to be given to done\+\_\+cb.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily true} if the request did not fail to be set up, {\ttfamily false} otherwise. 
\end{DoxyReturn}
\begin{Desc}
\item[Examples]\par
\mbox{\hyperlink{ecore_con_lookup_example_8c-example}{ecore\+\_\+con\+\_\+lookup\+\_\+example.\+c}}.\end{Desc}


References \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}}, \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\+\_\+list\+\_\+append()}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga4e028a0c5bd5743068c1c3f2302dc0e8}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+GOTO}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga1dbe0d7e3c6b10f4bd49a2a132d73269}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+TRUE\+\_\+\+RETURN\+\_\+\+VAL}}, and \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}.

