\hypertarget{group__Eina__Debug}{}\doxysection{Eina\+\_\+\+Debug}
\label{group__Eina__Debug}\index{Eina\_Debug@{Eina\_Debug}}
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structEina__Debug__Packet__Header}{Eina\+\_\+\+Debug\+\_\+\+Packet\+\_\+\+Header}}
\item 
struct \mbox{\hyperlink{structEina__Debug__Opcode}{Eina\+\_\+\+Debug\+\_\+\+Opcode}}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{group__Eina__Debug_ga8a72425573fe98102a418f3ea65f1939}{E\+I\+N\+A\+\_\+\+D\+E\+B\+U\+G\+\_\+\+O\+P\+C\+O\+D\+E\+S\+\_\+\+A\+R\+R\+A\+Y\+\_\+\+D\+E\+F\+I\+NE}}(Name, ...)
\begin{DoxyCompactList}\small\item\em Helper for creating global opcodes arrays. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \+\_\+\+Eina\+\_\+\+Debug\+\_\+\+Session \mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}}
\item 
typedef \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}}($\ast$ \mbox{\hyperlink{group__Eina__Debug_ga857d65e32b5d99c56ad20728b05bdb05}{Eina\+\_\+\+Debug\+\_\+\+Cb}}) (\mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}} $\ast$session, int srcid, void $\ast$buffer, int size)
\item 
typedef void($\ast$ \mbox{\hyperlink{group__Eina__Debug_ga3571a4841c694609742ef812120d6a1c}{Eina\+\_\+\+Debug\+\_\+\+Opcode\+\_\+\+Status\+\_\+\+Cb}}) (void $\ast$data, \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} status)
\item 
typedef \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}}($\ast$ \mbox{\hyperlink{group__Eina__Debug_ga4ccdf065f99fc2332b619b52afdb49ef}{Eina\+\_\+\+Debug\+\_\+\+Dispatch\+\_\+\+Cb}}) (\mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}} $\ast$session, void $\ast$buffer)
\item 
typedef \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}}($\ast$ \mbox{\hyperlink{group__Eina__Debug_gadbb22359fcdc0d00425cafdaf651a73d}{Eina\+\_\+\+Debug\+\_\+\+Timer\+\_\+\+Cb}}) (void $\ast$)
\item 
\mbox{\Hypertarget{group__Eina__Debug_gad0726b99bd9ff73f0792151f601fc293}\label{group__Eina__Debug_gad0726b99bd9ff73f0792151f601fc293}} 
typedef struct \+\_\+\+Eina\+\_\+\+Debug\+\_\+\+Timer {\bfseries Eina\+\_\+\+Debug\+\_\+\+Timer}
\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \{ \newline
\mbox{\hyperlink{group__Eina__Debug_gga425be5f49e9c31d8d13d53190a3e7bc2ace4e586e98795fe6c3a0becad3e2006d}{E\+I\+N\+A\+\_\+\+D\+E\+B\+U\+G\+\_\+\+O\+P\+C\+O\+D\+E\+\_\+\+I\+N\+V\+A\+L\+ID}} = -\/1, 
\newline
\mbox{\hyperlink{group__Eina__Debug_gga425be5f49e9c31d8d13d53190a3e7bc2aa7711ebebe15c281fdc075d0b1b6219a}{E\+I\+N\+A\+\_\+\+D\+E\+B\+U\+G\+\_\+\+O\+P\+C\+O\+D\+E\+\_\+\+R\+E\+G\+I\+S\+T\+ER}} = 0, 
\newline
\mbox{\hyperlink{group__Eina__Debug_gga425be5f49e9c31d8d13d53190a3e7bc2a710a7588cde0ebc8607b9dd549cab295}{E\+I\+N\+A\+\_\+\+D\+E\+B\+U\+G\+\_\+\+O\+P\+C\+O\+D\+E\+\_\+\+H\+E\+L\+LO}} = 1
 \}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{group__Eina__Debug_ga73289633d16f237732384cbb6f9686f9}{eina\+\_\+debug\+\_\+disable}} (void)
\begin{DoxyCompactList}\small\item\em Disable debugging. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}} $\ast$ \mbox{\hyperlink{group__Eina__Debug_ga07c90419f5ba69ca61ae7fe925b444bf}{eina\+\_\+debug\+\_\+local\+\_\+connect}} (\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} is\+\_\+master)
\begin{DoxyCompactList}\small\item\em Connect to the local daemon. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}} $\ast$ \mbox{\hyperlink{group__Eina__Debug_ga61d16f29ccca14099c654c9e845a3774}{eina\+\_\+debug\+\_\+remote\+\_\+connect}} (int port)
\begin{DoxyCompactList}\small\item\em Connect to remote daemon. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eina__Debug_ga257384b709ccf04f8c08e75368748267}{eina\+\_\+debug\+\_\+session\+\_\+terminate}} (\mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}} $\ast$session)
\begin{DoxyCompactList}\small\item\em Terminate the session. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eina__Debug_gaf3eec429b75e32d6e890f9129bebe52e}{eina\+\_\+debug\+\_\+session\+\_\+dispatch\+\_\+override}} (\mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}} $\ast$session, \mbox{\hyperlink{group__Eina__Debug_ga4ccdf065f99fc2332b619b52afdb49ef}{Eina\+\_\+\+Debug\+\_\+\+Dispatch\+\_\+\+Cb}} disp\+\_\+cb)
\begin{DoxyCompactList}\small\item\em Override the dispatcher of a specific session. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Debug_ga4ccdf065f99fc2332b619b52afdb49ef}{Eina\+\_\+\+Debug\+\_\+\+Dispatch\+\_\+\+Cb}} \mbox{\hyperlink{group__Eina__Debug_ga75a028b3cd115b88b1aacaa958a1d1f5}{eina\+\_\+debug\+\_\+session\+\_\+dispatch\+\_\+get}} (\mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}} $\ast$session)
\begin{DoxyCompactList}\small\item\em Get the dispatcher of a specific session. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Debug_ga49461e5fc673f803b1156193b3c657bf}{eina\+\_\+debug\+\_\+dispatch}} (\mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}} $\ast$session, void $\ast$buffer)
\begin{DoxyCompactList}\small\item\em Dispatch a given packet according to its header. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eina__Debug_gafcdfc9351c4de9525d576cd6387011f8}{eina\+\_\+debug\+\_\+session\+\_\+data\+\_\+set}} (\mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}} $\ast$session, void $\ast$data)
\begin{DoxyCompactList}\small\item\em Set data to a session. \end{DoxyCompactList}\item 
void $\ast$ \mbox{\hyperlink{group__Eina__Debug_gadec74ce3c25f189ecbf7e042218a3466}{eina\+\_\+debug\+\_\+session\+\_\+data\+\_\+get}} (\mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}} $\ast$session)
\begin{DoxyCompactList}\small\item\em Get the data attached to a session. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eina__Debug_gac79162697099273258c44a62f21ab0eb}{eina\+\_\+debug\+\_\+opcodes\+\_\+register}} (\mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}} $\ast$session, const \mbox{\hyperlink{structEina__Debug__Opcode}{Eina\+\_\+\+Debug\+\_\+\+Opcode}} ops\mbox{[}$\,$\mbox{]}, \mbox{\hyperlink{group__Eina__Debug_ga3571a4841c694609742ef812120d6a1c}{Eina\+\_\+\+Debug\+\_\+\+Opcode\+\_\+\+Status\+\_\+\+Cb}} status\+\_\+cb, void $\ast$status\+\_\+data)
\begin{DoxyCompactList}\small\item\em Register opcodes to a session. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__Eina__Debug_ga3f2f6b754d2e7a9725db8aacb903614c}{eina\+\_\+debug\+\_\+session\+\_\+send}} (\mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}} $\ast$session, int dest\+\_\+id, int op, void $\ast$data, int size)
\begin{DoxyCompactList}\small\item\em Send a packet to the given destination. \end{DoxyCompactList}\item 
Eina\+\_\+\+Debug\+\_\+\+Timer $\ast$ \mbox{\hyperlink{group__Eina__Debug_ga598ccef4b322c5be6314b4303f7f4390}{eina\+\_\+debug\+\_\+timer\+\_\+add}} (unsigned int timeout\+\_\+ms, \mbox{\hyperlink{group__Eina__Debug_gadbb22359fcdc0d00425cafdaf651a73d}{Eina\+\_\+\+Debug\+\_\+\+Timer\+\_\+\+Cb}} cb, void $\ast$data)
\begin{DoxyCompactList}\small\item\em Add a timer. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eina__Debug_gabe7b6d41ddc43e596ee24d1a78102274}{eina\+\_\+debug\+\_\+timer\+\_\+del}} (Eina\+\_\+\+Debug\+\_\+\+Timer $\ast$timer)
\begin{DoxyCompactList}\small\item\em Delete a timer. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eina__Debug_gaa71886b098bcd085d946529c74ab3a13}{eina\+\_\+debug\+\_\+fork\+\_\+reset}} (void)
\begin{DoxyCompactList}\small\item\em Reset the eina debug system after forking. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}


\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{group__Eina__Debug_ga8a72425573fe98102a418f3ea65f1939}\label{group__Eina__Debug_ga8a72425573fe98102a418f3ea65f1939}} 
\index{Eina\_Debug@{Eina\_Debug}!EINA\_DEBUG\_OPCODES\_ARRAY\_DEFINE@{EINA\_DEBUG\_OPCODES\_ARRAY\_DEFINE}}
\index{EINA\_DEBUG\_OPCODES\_ARRAY\_DEFINE@{EINA\_DEBUG\_OPCODES\_ARRAY\_DEFINE}!Eina\_Debug@{Eina\_Debug}}
\doxysubsubsection{\texorpdfstring{EINA\_DEBUG\_OPCODES\_ARRAY\_DEFINE}{EINA\_DEBUG\_OPCODES\_ARRAY\_DEFINE}}
{\footnotesize\ttfamily \#define E\+I\+N\+A\+\_\+\+D\+E\+B\+U\+G\+\_\+\+O\+P\+C\+O\+D\+E\+S\+\_\+\+A\+R\+R\+A\+Y\+\_\+\+D\+E\+F\+I\+NE(\begin{DoxyParamCaption}\item[{}]{Name,  }\item[{}]{... }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{structEina__Debug__Opcode}{Eina\_Debug\_Opcode}} *                                      \(\backslash\)}
\DoxyCodeLine{  Name(\textcolor{keywordtype}{void})                                                            \(\backslash\)}
\DoxyCodeLine{  \{                                                                     \(\backslash\)}
\DoxyCodeLine{     Eina\_Debug\_Opcode tmp[] = \{ \_\_VA\_ARGS\_\_ \}; \(\backslash\)}
\DoxyCodeLine{     static \mbox{\hyperlink{structEina__Debug__Opcode}{Eina\_Debug\_Opcode}} \textcolor{keyword}{internal}[\mbox{\hyperlink{group__Eina__Types__Group_ga7c1b6f81660b4e30516169e9e7d3261c}{EINA\_C\_ARRAY\_LENGTH}}(tmp) + 1] = \(\backslash\)}
\DoxyCodeLine{       \{ \{ 0, 0, 0 \} \};         \(\backslash\)}
\DoxyCodeLine{     if (\textcolor{keyword}{internal}[0].opcode\_name == NULL)                                      \(\backslash\)}
\DoxyCodeLine{       \{                                                                \(\backslash\)}
\DoxyCodeLine{          memcpy(\textcolor{keyword}{internal}, tmp, \textcolor{keyword}{sizeof}(tmp)); \(\backslash\)}
\DoxyCodeLine{       \}                                                                \(\backslash\)}
\DoxyCodeLine{     return \textcolor{keyword}{internal};                                                   \(\backslash\)}
\DoxyCodeLine{  \}}

\end{DoxyCode}


Helper for creating global opcodes arrays. 

The problem is on windows where you can\textquotesingle{}t declare a static array with external symbols in it, because the addresses are only known at runtime. 

\doxysubsection{Typedef Documentation}
\mbox{\Hypertarget{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}\label{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}} 
\index{Eina\_Debug@{Eina\_Debug}!Eina\_Debug\_Session@{Eina\_Debug\_Session}}
\index{Eina\_Debug\_Session@{Eina\_Debug\_Session}!Eina\_Debug@{Eina\_Debug}}
\doxysubsubsection{\texorpdfstring{Eina\_Debug\_Session}{Eina\_Debug\_Session}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}}}

A handle used to interact with the debug daemon. It contains all the information related to this connection and needed to send/receive/dispatch/... \mbox{\Hypertarget{group__Eina__Debug_ga857d65e32b5d99c56ad20728b05bdb05}\label{group__Eina__Debug_ga857d65e32b5d99c56ad20728b05bdb05}} 
\index{Eina\_Debug@{Eina\_Debug}!Eina\_Debug\_Cb@{Eina\_Debug\_Cb}}
\index{Eina\_Debug\_Cb@{Eina\_Debug\_Cb}!Eina\_Debug@{Eina\_Debug}}
\doxysubsubsection{\texorpdfstring{Eina\_Debug\_Cb}{Eina\_Debug\_Cb}}
{\footnotesize\ttfamily Eina\+\_\+\+Debug\+\_\+\+Cb}

A callback invoked when a specific packet is received.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em session} & the session \\
\hline
\mbox{\texttt{ in}}  & {\em srcid} & the source id \\
\hline
\mbox{\texttt{ in}}  & {\em buffer} & the packet payload data. It doesn\textquotesingle{}t contain any transport information. \\
\hline
\mbox{\texttt{ in}}  & {\em size} & the packet payload size\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
True on success, false if the connection seems compromised. 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eina__Debug_ga3571a4841c694609742ef812120d6a1c}\label{group__Eina__Debug_ga3571a4841c694609742ef812120d6a1c}} 
\index{Eina\_Debug@{Eina\_Debug}!Eina\_Debug\_Opcode\_Status\_Cb@{Eina\_Debug\_Opcode\_Status\_Cb}}
\index{Eina\_Debug\_Opcode\_Status\_Cb@{Eina\_Debug\_Opcode\_Status\_Cb}!Eina\_Debug@{Eina\_Debug}}
\doxysubsubsection{\texorpdfstring{Eina\_Debug\_Opcode\_Status\_Cb}{Eina\_Debug\_Opcode\_Status\_Cb}}
{\footnotesize\ttfamily Eina\+\_\+\+Debug\+\_\+\+Opcode\+\_\+\+Status\+\_\+\+Cb}

When the opcodes ids are retrieved, this callback is invoked with a true status. When a disconnection to the daemon is happening, the opcodes ids are set as invalid and this callback is invoked with a false status. The upper layer should not try to send more requests until a new connection is established.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em data} & data pointer given when registering opcodes \\
\hline
\mbox{\texttt{ in}}  & {\em status} & E\+I\+N\+A\+\_\+\+T\+R\+UE if opcodes have been received from the daemon, E\+I\+N\+A\+\_\+\+F\+A\+L\+SE otherwise. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__Eina__Debug_ga4ccdf065f99fc2332b619b52afdb49ef}\label{group__Eina__Debug_ga4ccdf065f99fc2332b619b52afdb49ef}} 
\index{Eina\_Debug@{Eina\_Debug}!Eina\_Debug\_Dispatch\_Cb@{Eina\_Debug\_Dispatch\_Cb}}
\index{Eina\_Debug\_Dispatch\_Cb@{Eina\_Debug\_Dispatch\_Cb}!Eina\_Debug@{Eina\_Debug}}
\doxysubsubsection{\texorpdfstring{Eina\_Debug\_Dispatch\_Cb}{Eina\_Debug\_Dispatch\_Cb}}
{\footnotesize\ttfamily Eina\+\_\+\+Debug\+\_\+\+Dispatch\+\_\+\+Cb}

Dispatcher callback prototype used to override the default dispatcher of a session.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em session} & the session \\
\hline
\mbox{\texttt{ in}}  & {\em buffer} & the packet received\\
\hline
\end{DoxyParams}
The given packet is the entire data received, including the header.

\begin{DoxyReturn}{Returns}
The return result of the invoked callback. 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eina__Debug_gadbb22359fcdc0d00425cafdaf651a73d}\label{group__Eina__Debug_gadbb22359fcdc0d00425cafdaf651a73d}} 
\index{Eina\_Debug@{Eina\_Debug}!Eina\_Debug\_Timer\_Cb@{Eina\_Debug\_Timer\_Cb}}
\index{Eina\_Debug\_Timer\_Cb@{Eina\_Debug\_Timer\_Cb}!Eina\_Debug@{Eina\_Debug}}
\doxysubsubsection{\texorpdfstring{Eina\_Debug\_Timer\_Cb}{Eina\_Debug\_Timer\_Cb}}
{\footnotesize\ttfamily Eina\+\_\+\+Debug\+\_\+\+Timer\+\_\+\+Cb}

A callback for a timer 

\doxysubsection{Enumeration Type Documentation}
\mbox{\Hypertarget{group__Eina__Debug_ga425be5f49e9c31d8d13d53190a3e7bc2}\label{group__Eina__Debug_ga425be5f49e9c31d8d13d53190a3e7bc2}} 
\doxysubsubsection{\texorpdfstring{anonymous enum}{anonymous enum}}
{\footnotesize\ttfamily anonymous enum}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{EINA\_DEBUG\_OPCODE\_INVALID@{EINA\_DEBUG\_OPCODE\_INVALID}!Eina\_Debug@{Eina\_Debug}}\index{Eina\_Debug@{Eina\_Debug}!EINA\_DEBUG\_OPCODE\_INVALID@{EINA\_DEBUG\_OPCODE\_INVALID}}}\mbox{\Hypertarget{group__Eina__Debug_gga425be5f49e9c31d8d13d53190a3e7bc2ace4e586e98795fe6c3a0becad3e2006d}\label{group__Eina__Debug_gga425be5f49e9c31d8d13d53190a3e7bc2ace4e586e98795fe6c3a0becad3e2006d}} 
E\+I\+N\+A\+\_\+\+D\+E\+B\+U\+G\+\_\+\+O\+P\+C\+O\+D\+E\+\_\+\+I\+N\+V\+A\+L\+ID&Invalid opcode value. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{EINA\_DEBUG\_OPCODE\_REGISTER@{EINA\_DEBUG\_OPCODE\_REGISTER}!Eina\_Debug@{Eina\_Debug}}\index{Eina\_Debug@{Eina\_Debug}!EINA\_DEBUG\_OPCODE\_REGISTER@{EINA\_DEBUG\_OPCODE\_REGISTER}}}\mbox{\Hypertarget{group__Eina__Debug_gga425be5f49e9c31d8d13d53190a3e7bc2aa7711ebebe15c281fdc075d0b1b6219a}\label{group__Eina__Debug_gga425be5f49e9c31d8d13d53190a3e7bc2aa7711ebebe15c281fdc075d0b1b6219a}} 
E\+I\+N\+A\+\_\+\+D\+E\+B\+U\+G\+\_\+\+O\+P\+C\+O\+D\+E\+\_\+\+R\+E\+G\+I\+S\+T\+ER&Opcode used to register other opcodes. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{EINA\_DEBUG\_OPCODE\_HELLO@{EINA\_DEBUG\_OPCODE\_HELLO}!Eina\_Debug@{Eina\_Debug}}\index{Eina\_Debug@{Eina\_Debug}!EINA\_DEBUG\_OPCODE\_HELLO@{EINA\_DEBUG\_OPCODE\_HELLO}}}\mbox{\Hypertarget{group__Eina__Debug_gga425be5f49e9c31d8d13d53190a3e7bc2a710a7588cde0ebc8607b9dd549cab295}\label{group__Eina__Debug_gga425be5f49e9c31d8d13d53190a3e7bc2a710a7588cde0ebc8607b9dd549cab295}} 
E\+I\+N\+A\+\_\+\+D\+E\+B\+U\+G\+\_\+\+O\+P\+C\+O\+D\+E\+\_\+\+H\+E\+L\+LO&Opcode used to send greetings to the daemon. \\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Eina__Debug_ga73289633d16f237732384cbb6f9686f9}\label{group__Eina__Debug_ga73289633d16f237732384cbb6f9686f9}} 
\index{Eina\_Debug@{Eina\_Debug}!eina\_debug\_disable@{eina\_debug\_disable}}
\index{eina\_debug\_disable@{eina\_debug\_disable}!Eina\_Debug@{Eina\_Debug}}
\doxysubsubsection{\texorpdfstring{eina\_debug\_disable()}{eina\_debug\_disable()}}
{\footnotesize\ttfamily void eina\+\_\+debug\+\_\+disable (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Disable debugging. 

Useful for applications that don\textquotesingle{}t want debugging. The debug daemon is one of them. Need to be invoked before eina\+\_\+init. Otherwise it won\textquotesingle{}t have any effect. 

References E\+I\+N\+A\+\_\+\+T\+R\+UE.

\mbox{\Hypertarget{group__Eina__Debug_ga07c90419f5ba69ca61ae7fe925b444bf}\label{group__Eina__Debug_ga07c90419f5ba69ca61ae7fe925b444bf}} 
\index{Eina\_Debug@{Eina\_Debug}!eina\_debug\_local\_connect@{eina\_debug\_local\_connect}}
\index{eina\_debug\_local\_connect@{eina\_debug\_local\_connect}!Eina\_Debug@{Eina\_Debug}}
\doxysubsubsection{\texorpdfstring{eina\_debug\_local\_connect()}{eina\_debug\_local\_connect()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}}$\ast$ eina\+\_\+debug\+\_\+local\+\_\+connect (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}}}]{is\+\_\+master }\end{DoxyParamCaption})}



Connect to the local daemon. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em is\+\_\+master} & true if the application is a debugger. E\+I\+N\+A\+\_\+\+F\+A\+L\+SE otherwise.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The session on success or N\+U\+LL otherwise. 
\end{DoxyReturn}


References eina\+\_\+debug\+\_\+remote\+\_\+connect(), and fcntl().

\mbox{\Hypertarget{group__Eina__Debug_ga61d16f29ccca14099c654c9e845a3774}\label{group__Eina__Debug_ga61d16f29ccca14099c654c9e845a3774}} 
\index{Eina\_Debug@{Eina\_Debug}!eina\_debug\_remote\_connect@{eina\_debug\_remote\_connect}}
\index{eina\_debug\_remote\_connect@{eina\_debug\_remote\_connect}!Eina\_Debug@{Eina\_Debug}}
\doxysubsubsection{\texorpdfstring{eina\_debug\_remote\_connect()}{eina\_debug\_remote\_connect()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}}$\ast$ eina\+\_\+debug\+\_\+remote\+\_\+connect (\begin{DoxyParamCaption}\item[{int}]{port }\end{DoxyParamCaption})}



Connect to remote daemon. 

This function connects to localhost\+:port.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em port} & the port to connect to\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The session on success or N\+U\+LL otherwise. 
\end{DoxyReturn}


References fcntl().



Referenced by eina\+\_\+debug\+\_\+local\+\_\+connect().

\mbox{\Hypertarget{group__Eina__Debug_ga257384b709ccf04f8c08e75368748267}\label{group__Eina__Debug_ga257384b709ccf04f8c08e75368748267}} 
\index{Eina\_Debug@{Eina\_Debug}!eina\_debug\_session\_terminate@{eina\_debug\_session\_terminate}}
\index{eina\_debug\_session\_terminate@{eina\_debug\_session\_terminate}!Eina\_Debug@{Eina\_Debug}}
\doxysubsubsection{\texorpdfstring{eina\_debug\_session\_terminate()}{eina\_debug\_session\_terminate()}}
{\footnotesize\ttfamily void eina\+\_\+debug\+\_\+session\+\_\+terminate (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}} $\ast$}]{session }\end{DoxyParamCaption})}



Terminate the session. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em session} & the session to terminate \\
\hline
\end{DoxyParams}


References eina\+\_\+lock\+\_\+release(), and eina\+\_\+lock\+\_\+take().

\mbox{\Hypertarget{group__Eina__Debug_gaf3eec429b75e32d6e890f9129bebe52e}\label{group__Eina__Debug_gaf3eec429b75e32d6e890f9129bebe52e}} 
\index{Eina\_Debug@{Eina\_Debug}!eina\_debug\_session\_dispatch\_override@{eina\_debug\_session\_dispatch\_override}}
\index{eina\_debug\_session\_dispatch\_override@{eina\_debug\_session\_dispatch\_override}!Eina\_Debug@{Eina\_Debug}}
\doxysubsubsection{\texorpdfstring{eina\_debug\_session\_dispatch\_override()}{eina\_debug\_session\_dispatch\_override()}}
{\footnotesize\ttfamily void eina\+\_\+debug\+\_\+session\+\_\+dispatch\+\_\+override (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}} $\ast$}]{session,  }\item[{\mbox{\hyperlink{group__Eina__Debug_ga4ccdf065f99fc2332b619b52afdb49ef}{Eina\+\_\+\+Debug\+\_\+\+Dispatch\+\_\+\+Cb}}}]{disp\+\_\+cb }\end{DoxyParamCaption})}



Override the dispatcher of a specific session. 

For example, it can be used to forward a packet to the main thread and to use the default dispatcher there. All the packets received in this session will use this dispatcher.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em session} & the session \\
\hline
\mbox{\texttt{ in}}  & {\em disp\+\_\+cb} & the new dispatcher for the given session \\
\hline
\end{DoxyParams}


References eina\+\_\+debug\+\_\+dispatch().

\mbox{\Hypertarget{group__Eina__Debug_ga75a028b3cd115b88b1aacaa958a1d1f5}\label{group__Eina__Debug_ga75a028b3cd115b88b1aacaa958a1d1f5}} 
\index{Eina\_Debug@{Eina\_Debug}!eina\_debug\_session\_dispatch\_get@{eina\_debug\_session\_dispatch\_get}}
\index{eina\_debug\_session\_dispatch\_get@{eina\_debug\_session\_dispatch\_get}!Eina\_Debug@{Eina\_Debug}}
\doxysubsubsection{\texorpdfstring{eina\_debug\_session\_dispatch\_get()}{eina\_debug\_session\_dispatch\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Debug_ga4ccdf065f99fc2332b619b52afdb49ef}{Eina\+\_\+\+Debug\+\_\+\+Dispatch\+\_\+\+Cb}} eina\+\_\+debug\+\_\+session\+\_\+dispatch\+\_\+get (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}} $\ast$}]{session }\end{DoxyParamCaption})}



Get the dispatcher of a specific session. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em session} & the session\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The session dispatcher. 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eina__Debug_ga49461e5fc673f803b1156193b3c657bf}\label{group__Eina__Debug_ga49461e5fc673f803b1156193b3c657bf}} 
\index{Eina\_Debug@{Eina\_Debug}!eina\_debug\_dispatch@{eina\_debug\_dispatch}}
\index{eina\_debug\_dispatch@{eina\_debug\_dispatch}!Eina\_Debug@{Eina\_Debug}}
\doxysubsubsection{\texorpdfstring{eina\_debug\_dispatch()}{eina\_debug\_dispatch()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+debug\+\_\+dispatch (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}} $\ast$}]{session,  }\item[{void $\ast$}]{buffer }\end{DoxyParamCaption})}



Dispatch a given packet according to its header. 

This function checks the header contained in the packet and invokes the correct callback according to the opcode. This is the default dispatcher.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em session} & the session \\
\hline
\mbox{\texttt{ in}}  & {\em buffer} & the packet\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
True on success, false if the connection seems compromised. 
\end{DoxyReturn}


References E\+I\+N\+A\+\_\+\+F\+A\+L\+SE, E\+I\+N\+A\+\_\+\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+CH, E\+I\+N\+A\+\_\+\+T\+R\+UE, Eina\+\_\+\+Debug\+\_\+\+Packet\+\_\+\+Header\+::opcode, and Eina\+\_\+\+Debug\+\_\+\+Packet\+\_\+\+Header\+::size.



Referenced by eina\+\_\+debug\+\_\+session\+\_\+dispatch\+\_\+override().

\mbox{\Hypertarget{group__Eina__Debug_gafcdfc9351c4de9525d576cd6387011f8}\label{group__Eina__Debug_gafcdfc9351c4de9525d576cd6387011f8}} 
\index{Eina\_Debug@{Eina\_Debug}!eina\_debug\_session\_data\_set@{eina\_debug\_session\_data\_set}}
\index{eina\_debug\_session\_data\_set@{eina\_debug\_session\_data\_set}!Eina\_Debug@{Eina\_Debug}}
\doxysubsubsection{\texorpdfstring{eina\_debug\_session\_data\_set()}{eina\_debug\_session\_data\_set()}}
{\footnotesize\ttfamily void eina\+\_\+debug\+\_\+session\+\_\+data\+\_\+set (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}} $\ast$}]{session,  }\item[{void $\ast$}]{data }\end{DoxyParamCaption})}



Set data to a session. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em session} & the session \\
\hline
\mbox{\texttt{ in}}  & {\em data} & the data to set \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__Eina__Debug_gadec74ce3c25f189ecbf7e042218a3466}\label{group__Eina__Debug_gadec74ce3c25f189ecbf7e042218a3466}} 
\index{Eina\_Debug@{Eina\_Debug}!eina\_debug\_session\_data\_get@{eina\_debug\_session\_data\_get}}
\index{eina\_debug\_session\_data\_get@{eina\_debug\_session\_data\_get}!Eina\_Debug@{Eina\_Debug}}
\doxysubsubsection{\texorpdfstring{eina\_debug\_session\_data\_get()}{eina\_debug\_session\_data\_get()}}
{\footnotesize\ttfamily void$\ast$ eina\+\_\+debug\+\_\+session\+\_\+data\+\_\+get (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}} $\ast$}]{session }\end{DoxyParamCaption})}



Get the data attached to a session. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em session} & the session\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The data of the session. 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eina__Debug_gac79162697099273258c44a62f21ab0eb}\label{group__Eina__Debug_gac79162697099273258c44a62f21ab0eb}} 
\index{Eina\_Debug@{Eina\_Debug}!eina\_debug\_opcodes\_register@{eina\_debug\_opcodes\_register}}
\index{eina\_debug\_opcodes\_register@{eina\_debug\_opcodes\_register}!Eina\_Debug@{Eina\_Debug}}
\doxysubsubsection{\texorpdfstring{eina\_debug\_opcodes\_register()}{eina\_debug\_opcodes\_register()}}
{\footnotesize\ttfamily void eina\+\_\+debug\+\_\+opcodes\+\_\+register (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}} $\ast$}]{session,  }\item[{const \mbox{\hyperlink{structEina__Debug__Opcode}{Eina\+\_\+\+Debug\+\_\+\+Opcode}}}]{ops\mbox{[}$\,$\mbox{]},  }\item[{\mbox{\hyperlink{group__Eina__Debug_ga3571a4841c694609742ef812120d6a1c}{Eina\+\_\+\+Debug\+\_\+\+Opcode\+\_\+\+Status\+\_\+\+Cb}}}]{status\+\_\+cb,  }\item[{void $\ast$}]{status\+\_\+data }\end{DoxyParamCaption})}



Register opcodes to a session. 

This function registers opcodes for the given session. If the session is not connected, the request is not sent to the daemon. Otherwise, the request for the opcodes ids is sent. On the reception from the daemon, status\+\_\+cb function is invoked to inform the requester that the opcodes can now be used.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em session} & the session \\
\hline
\mbox{\texttt{ in}}  & {\em ops} & the operations to register \\
\hline
\mbox{\texttt{ in}}  & {\em status\+\_\+cb} & a function to call when the opcodes are received \\
\hline
\mbox{\texttt{ in}}  & {\em status\+\_\+data} & the data to give to status\+\_\+cb \\
\hline
\end{DoxyParams}


References E\+I\+N\+A\+\_\+\+F\+A\+L\+SE, and eina\+\_\+list\+\_\+append().

\mbox{\Hypertarget{group__Eina__Debug_ga3f2f6b754d2e7a9725db8aacb903614c}\label{group__Eina__Debug_ga3f2f6b754d2e7a9725db8aacb903614c}} 
\index{Eina\_Debug@{Eina\_Debug}!eina\_debug\_session\_send@{eina\_debug\_session\_send}}
\index{eina\_debug\_session\_send@{eina\_debug\_session\_send}!Eina\_Debug@{Eina\_Debug}}
\doxysubsubsection{\texorpdfstring{eina\_debug\_session\_send()}{eina\_debug\_session\_send()}}
{\footnotesize\ttfamily int eina\+\_\+debug\+\_\+session\+\_\+send (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Debug_ga527a15ac8d676e71ae80920f09f68eee}{Eina\+\_\+\+Debug\+\_\+\+Session}} $\ast$}]{session,  }\item[{int}]{dest\+\_\+id,  }\item[{int}]{op,  }\item[{void $\ast$}]{data,  }\item[{int}]{size }\end{DoxyParamCaption})}



Send a packet to the given destination. 

The packet will be treated by the debug thread itself.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em session} & the session to use to send the packet \\
\hline
\mbox{\texttt{ in}}  & {\em dest\+\_\+id} & the destination id to send the packet to \\
\hline
\mbox{\texttt{ in}}  & {\em op} & the opcode for this packet \\
\hline
\mbox{\texttt{ in}}  & {\em data} & payload to send \\
\hline
\mbox{\texttt{ in}}  & {\em size} & payload size\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The number of sent bytes. 
\end{DoxyReturn}


References E\+I\+N\+A\+\_\+\+D\+E\+B\+U\+G\+\_\+\+O\+P\+C\+O\+D\+E\+\_\+\+I\+N\+V\+A\+L\+ID, eina\+\_\+spinlock\+\_\+release(), eina\+\_\+spinlock\+\_\+take(), Eina\+\_\+\+Debug\+\_\+\+Packet\+\_\+\+Header\+::opcode, and Eina\+\_\+\+Debug\+\_\+\+Packet\+\_\+\+Header\+::size.

\mbox{\Hypertarget{group__Eina__Debug_ga598ccef4b322c5be6314b4303f7f4390}\label{group__Eina__Debug_ga598ccef4b322c5be6314b4303f7f4390}} 
\index{Eina\_Debug@{Eina\_Debug}!eina\_debug\_timer\_add@{eina\_debug\_timer\_add}}
\index{eina\_debug\_timer\_add@{eina\_debug\_timer\_add}!Eina\_Debug@{Eina\_Debug}}
\doxysubsubsection{\texorpdfstring{eina\_debug\_timer\_add()}{eina\_debug\_timer\_add()}}
{\footnotesize\ttfamily Eina\+\_\+\+Debug\+\_\+\+Timer$\ast$ eina\+\_\+debug\+\_\+timer\+\_\+add (\begin{DoxyParamCaption}\item[{unsigned int}]{timeout\+\_\+ms,  }\item[{\mbox{\hyperlink{group__Eina__Debug_gadbb22359fcdc0d00425cafdaf651a73d}{Eina\+\_\+\+Debug\+\_\+\+Timer\+\_\+\+Cb}}}]{cb,  }\item[{void $\ast$}]{data }\end{DoxyParamCaption})}



Add a timer. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em timeout\+\_\+ms} & timeout in ms \\
\hline
\mbox{\texttt{ in}}  & {\em cb} & callback to call when the timeout is reached \\
\hline
\mbox{\texttt{ in}}  & {\em data} & user data\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The timer handle, N\+U\+LL on error. 
\end{DoxyReturn}


References eina\+\_\+spinlock\+\_\+release(), eina\+\_\+spinlock\+\_\+take(), and E\+I\+N\+A\+\_\+\+T\+R\+UE.

\mbox{\Hypertarget{group__Eina__Debug_gabe7b6d41ddc43e596ee24d1a78102274}\label{group__Eina__Debug_gabe7b6d41ddc43e596ee24d1a78102274}} 
\index{Eina\_Debug@{Eina\_Debug}!eina\_debug\_timer\_del@{eina\_debug\_timer\_del}}
\index{eina\_debug\_timer\_del@{eina\_debug\_timer\_del}!Eina\_Debug@{Eina\_Debug}}
\doxysubsubsection{\texorpdfstring{eina\_debug\_timer\_del()}{eina\_debug\_timer\_del()}}
{\footnotesize\ttfamily void eina\+\_\+debug\+\_\+timer\+\_\+del (\begin{DoxyParamCaption}\item[{Eina\+\_\+\+Debug\+\_\+\+Timer $\ast$}]{timer }\end{DoxyParamCaption})}



Delete a timer. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em timer} & the timer to delete\\
\hline
\end{DoxyParams}
If the timer reaches the end and has not be renewed, trying to delete it will lead to a crash, as it has already been deleted internally. 

References eina\+\_\+list\+\_\+data\+\_\+find\+\_\+list(), eina\+\_\+list\+\_\+remove\+\_\+list(), eina\+\_\+spinlock\+\_\+release(), and eina\+\_\+spinlock\+\_\+take().

\mbox{\Hypertarget{group__Eina__Debug_gaa71886b098bcd085d946529c74ab3a13}\label{group__Eina__Debug_gaa71886b098bcd085d946529c74ab3a13}} 
\index{Eina\_Debug@{Eina\_Debug}!eina\_debug\_fork\_reset@{eina\_debug\_fork\_reset}}
\index{eina\_debug\_fork\_reset@{eina\_debug\_fork\_reset}!Eina\_Debug@{Eina\_Debug}}
\doxysubsubsection{\texorpdfstring{eina\_debug\_fork\_reset()}{eina\_debug\_fork\_reset()}}
{\footnotesize\ttfamily void eina\+\_\+debug\+\_\+fork\+\_\+reset (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Reset the eina debug system after forking. 

Call this any time the application forks \begin{DoxySince}{Since}
1.\+21 
\end{DoxySince}


References E\+I\+N\+A\+\_\+\+F\+A\+L\+SE, and E\+I\+N\+A\+\_\+\+T\+R\+UE.



Referenced by ecore\+\_\+fork\+\_\+reset().

