\doxysection{client.\+c}
\hypertarget{client_8c-example}{}\label{client_8c-example}Client to test various call message types against a provided server (\doxylink{server_8c-example}{server.\+c})

Client to test various call message types against a provided server (\doxylink{server_8c-example}{server.\+c})


\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{comment}{//Compile\ with:}}
\DoxyCodeLine{\textcolor{comment}{//\ gcc\ -\/o\ client\ client.c\ \`{}pkg-\/config\ -\/-\/cflags\ -\/-\/libs\ eldbus\ ecore\ eina`}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ "{}Eldbus.h"{}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <Ecore.h>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ BUS\ "{}org.Enlightenment"{}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ PATH\ "{}/org/enlightenment"{}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ INTERFACE\ "{}org.enlightenment.Test"{}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ NTESTS\ 8}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{int}\ \_client\_log\_dom\ =\ -\/1;}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ ERR(...)\ \ \ \ \ \ EINA\_LOG\_DOM\_ERR(\_client\_log\_dom,\ \_\_VA\_ARGS\_\_)}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eldbus_ga1de8233c3e9240291bb952776810c831}{Eldbus\_Connection}}\ *conn\ =\ NULL;}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{group__Ecore__Timer__Group_gaf96ffb609956658ec038e54bd39f46f0}{Ecore\_Timer}}\ *timeout\ =\ NULL;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_alive(\textcolor{keywordtype}{void}\ *context\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},\ \textcolor{keyword}{const}\ \mbox{\hyperlink{group__Eldbus__Core_ga14e8c4d4b96af5fb8bb5c66dc315593a}{Eldbus\_Message}}\ *msg\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}Alive\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_hello(\textcolor{keywordtype}{void}\ *context\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},\ \textcolor{keyword}{const}\ \mbox{\hyperlink{group__Eldbus__Core_ga14e8c4d4b96af5fb8bb5c66dc315593a}{Eldbus\_Message}}\ *msg)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *txt;}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg,\ \textcolor{stringliteral}{"{}s"{}},\ \&txt))}
\DoxyCodeLine{\ \ \ \ \ printf(\textcolor{stringliteral}{"{}\%s\(\backslash\)n"{}},\ txt);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <inttypes.h>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keyword}{struct\ }expected}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}\ b;}
\DoxyCodeLine{\ \ \ uint8\_t\ y;}
\DoxyCodeLine{\ \ \ uint32\_t\ u;}
\DoxyCodeLine{\ \ \ int32\_t\ i;}
\DoxyCodeLine{\ \ \ int16\_t\ n;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{double}\ d;}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *s;}
\DoxyCodeLine{\}\ expected\ =\ \{}
\DoxyCodeLine{\ \ \ .b\ =\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}},}
\DoxyCodeLine{\ \ \ .y\ =\ 0xAA,}
\DoxyCodeLine{\ \ \ .u\ =\ 0xFFFFFFFF,}
\DoxyCodeLine{\ \ \ .i\ =\ 0xFFFFFFFF,}
\DoxyCodeLine{\ \ \ .n\ =\ 0xFFFF,}
\DoxyCodeLine{\ \ \ .d\ =\ 3.1415926,}
\DoxyCodeLine{\ \ \ .s\ =\ \textcolor{stringliteral}{"{}test"{}},}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{test(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{int}\ n\ =\ 0;}
\DoxyCodeLine{\ \ \ n++;}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (n\ >=\ NTESTS)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Passed\ in\ all\ tests\(\backslash\)nExiting...\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Eldbus__Connection_ga1c035aac8b601b416bba11d0d68f80ae}{eldbus\_connection\_unref}}(conn);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ conn\ =\ NULL;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}Passed\ in\ \%d/\%d\ tests\(\backslash\)n"{}},\ n,\ NTESTS);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_send\_bool(\textcolor{keywordtype}{void}\ *data\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},\ \textcolor{keyword}{const}\ \mbox{\hyperlink{group__Eldbus__Core_ga14e8c4d4b96af5fb8bb5c66dc315593a}{Eldbus\_Message}}\ *msg,\ \mbox{\hyperlink{group__Eldbus__Core_ga7a5d4dc070bd925034de6e52c4260be7}{Eldbus\_Pending}}\ *pending\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *errname,\ *errmsg;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}\ b;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg,\ \&errname,\ \&errmsg))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}\%s\ \%s"{}},\ errname,\ errmsg);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg,\ \textcolor{stringliteral}{"{}b"{}},\ \&b))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}Could\ not\ get\ entry\ contents"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (b\ !=\ expected.b)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}Bool\ value\ doesn't\ match"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ test();}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_send\_byte(\textcolor{keywordtype}{void}\ *data\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},\ \textcolor{keyword}{const}\ \mbox{\hyperlink{group__Eldbus__Core_ga14e8c4d4b96af5fb8bb5c66dc315593a}{Eldbus\_Message}}\ *msg,\ \mbox{\hyperlink{group__Eldbus__Core_ga7a5d4dc070bd925034de6e52c4260be7}{Eldbus\_Pending}}\ *pending\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *errname,\ *errmsg;}
\DoxyCodeLine{\ \ \ uint8\_t\ y;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg,\ \&errname,\ \&errmsg))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}\%s\ \%s"{}},\ errname,\ errmsg);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg,\ \textcolor{stringliteral}{"{}y"{}},\ \&y))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}Could\ not\ get\ entry\ contents"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (y\ !=\ expected.y)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}Byte\ value\ doesn't\ match\ expected\ value"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ test();}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_send\_uint32(\textcolor{keywordtype}{void}\ *data\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},\ \textcolor{keyword}{const}\ \mbox{\hyperlink{group__Eldbus__Core_ga14e8c4d4b96af5fb8bb5c66dc315593a}{Eldbus\_Message}}\ *msg,\ \mbox{\hyperlink{group__Eldbus__Core_ga7a5d4dc070bd925034de6e52c4260be7}{Eldbus\_Pending}}\ *pending\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *errname,\ *errmsg;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ u;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg,\ \&errname,\ \&errmsg))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}\%s\ \%s"{}},\ errname,\ errmsg);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg,\ \textcolor{stringliteral}{"{}u"{}},\ \&u))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}Could\ not\ get\ entry\ contents"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (u\ !=\ expected.u)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}Uint32\ value\ doesn't\ match\ expected\ value"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ test();}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_send\_int32(\textcolor{keywordtype}{void}\ *data\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},\ \textcolor{keyword}{const}\ \mbox{\hyperlink{group__Eldbus__Core_ga14e8c4d4b96af5fb8bb5c66dc315593a}{Eldbus\_Message}}\ *msg,\ \mbox{\hyperlink{group__Eldbus__Core_ga7a5d4dc070bd925034de6e52c4260be7}{Eldbus\_Pending}}\ *pending\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *errname,\ *errmsg;}
\DoxyCodeLine{\ \ \ int32\_t\ i;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg,\ \&errname,\ \&errmsg))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}\%s\ \%s"{}},\ errname,\ errmsg);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg,\ \textcolor{stringliteral}{"{}i"{}},\ \&i))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}Could\ not\ get\ entry\ contents"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (i\ !=\ expected.i)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}Int32\ value\ doesn't\ match\ expected\ value"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ test();}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_send\_int16(\textcolor{keywordtype}{void}\ *data\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},\ \textcolor{keyword}{const}\ \mbox{\hyperlink{group__Eldbus__Core_ga14e8c4d4b96af5fb8bb5c66dc315593a}{Eldbus\_Message}}\ *msg,\ \mbox{\hyperlink{group__Eldbus__Core_ga7a5d4dc070bd925034de6e52c4260be7}{Eldbus\_Pending}}\ *pending\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *errname,\ *errmsg;}
\DoxyCodeLine{\ \ \ int16\_t\ n;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg,\ \&errname,\ \&errmsg))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}\%s\ \%s"{}},\ errname,\ errmsg);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg,\ \textcolor{stringliteral}{"{}n"{}},\ \&n))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}Could\ not\ get\ entry\ contents"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (n\ !=\ expected.n)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}Int16\ value\ doesn't\ match\ expected\ value"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ test();}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_send\_double(\textcolor{keywordtype}{void}\ *data\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},\ \textcolor{keyword}{const}\ \mbox{\hyperlink{group__Eldbus__Core_ga14e8c4d4b96af5fb8bb5c66dc315593a}{Eldbus\_Message}}\ *msg,\ \mbox{\hyperlink{group__Eldbus__Core_ga7a5d4dc070bd925034de6e52c4260be7}{Eldbus\_Pending}}\ *pending\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *errname,\ *errmsg;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{double}\ d;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg,\ \&errname,\ \&errmsg))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}\%s\ \%s"{}},\ errname,\ errmsg);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg,\ \textcolor{stringliteral}{"{}d"{}},\ \&d))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}Could\ not\ get\ entry\ contents"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Eina__Tools__Group_ga6bee37244b675b83d6a4f044a7a3d1e8}{EINA\_DBL\_EQ}}(d,\ expected.d))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}Double\ value\ doesn't\ match\ expected\ value"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ test();}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_send\_string(\textcolor{keywordtype}{void}\ *data\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},\ \textcolor{keyword}{const}\ \mbox{\hyperlink{group__Eldbus__Core_ga14e8c4d4b96af5fb8bb5c66dc315593a}{Eldbus\_Message}}\ *msg,\ \mbox{\hyperlink{group__Eldbus__Core_ga7a5d4dc070bd925034de6e52c4260be7}{Eldbus\_Pending}}\ *pending\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *errname,\ *errmsg;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{char}\ *s;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg,\ \&errname,\ \&errmsg))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}\%s\ \%s"{}},\ errname,\ errmsg);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg,\ \textcolor{stringliteral}{"{}s"{}},\ \&s))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}Could\ not\ get\ entry\ contents"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strcmp(s,\ expected.s)\ !=\ 0)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}Uint32\ value\ doesn't\ match\ expected\ value"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ test();}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_async\_test(\textcolor{keywordtype}{void}\ *data\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},\ \textcolor{keyword}{const}\ \mbox{\hyperlink{group__Eldbus__Core_ga14e8c4d4b96af5fb8bb5c66dc315593a}{Eldbus\_Message}}\ *msg,\ \mbox{\hyperlink{group__Eldbus__Core_ga7a5d4dc070bd925034de6e52c4260be7}{Eldbus\_Pending}}\ *pending\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *errname,\ *errmsg;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg,\ \&errname,\ \&errmsg))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ ERR(\textcolor{stringliteral}{"{}\%s\ \%s"{}},\ errname,\ errmsg);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ test();}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{on\_name\_owner\_changed(\textcolor{keywordtype}{void}\ *data\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *bus,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *old\_id,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *new\_id\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}Bus=\%s\ |\ old=\%s\ |\ new=\%s\(\backslash\)n"{}},\ bus,\ old\_id,\ new\_id);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{finish(\textcolor{keywordtype}{void}\ *data\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ ERR(\textcolor{stringliteral}{"{}Timeout\(\backslash\)nSome\ error\ happened\ or\ server\ is\ taking\ too\ much\ time\ to\ respond."{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();}
\DoxyCodeLine{\ \ \ timeout\ =\ NULL;}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gae0c653baad8836232c0dc27f91f875d6}{ECORE\_CALLBACK\_CANCEL}};}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}}
\DoxyCodeLine{main(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus_gab374430ed25089e7c5213767cc637191}{Eldbus\_Object}}\ *obj;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus_ga82047f6a5efc1980ae445a898c2ed9c0}{Eldbus\_Proxy}}\ *proxy;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Main__Group_ga81b8137665b8a4d2cb38ca50017d4c74}{eina\_init}}();}
\DoxyCodeLine{\ \ \ \_client\_log\_dom\ =\ \mbox{\hyperlink{group__Eina__Log__Group_ga79d0a42ab10dd0e7760b33ae33a6aae0}{eina\_log\_domain\_register}}(\textcolor{stringliteral}{"{}client"{}},\ EINA\_COLOR\_CYAN);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\_client\_log\_dom\ <\ 0)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Eina__Log__Group_ga2e33caeeeb6051526c01b7fea4d6c91b}{EINA\_LOG\_ERR}}(\textcolor{stringliteral}{"{}Unable\ to\ create\ 'client'\ log\ domain"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{goto}\ exit\_eina;}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\_init}}();}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Core_gadd7c8b8a43b5dd590f7fd06166288754}{eldbus\_init}}();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ conn\ =\ \mbox{\hyperlink{group__Eldbus__Connection_gac73e69791d7b884af458390b9c30925a}{eldbus\_connection\_get}}(ELDBUS\_CONNECTION\_TYPE\_SESSION);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ obj\ =\ \mbox{\hyperlink{group__Eldbus__Object__Mapper_ga88ed939f56f83494e69a8d34212c202a}{eldbus\_object\_get}}(conn,\ BUS,\ PATH);}
\DoxyCodeLine{\ \ \ proxy\ =\ \mbox{\hyperlink{group__Eldbus__Proxy_ga817e6172d2edc6ca0d932e7de7f9c8a0}{eldbus\_proxy\_get}}(obj,\ INTERFACE);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Proxy_ga3ec2ab94891c39548b44135ebe275b9f}{eldbus\_proxy\_signal\_handler\_add}}(proxy,\ \textcolor{stringliteral}{"{}Alive"{}},\ \_on\_alive,\ NULL);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Proxy_ga3ec2ab94891c39548b44135ebe275b9f}{eldbus\_proxy\_signal\_handler\_add}}(proxy,\ \textcolor{stringliteral}{"{}Hello"{}},\ \_on\_hello,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Proxy_ga60ece4a728aeddb3ba2b30589c329c40}{eldbus\_proxy\_call}}(proxy,\ \textcolor{stringliteral}{"{}SendBool"{}},\ \_on\_send\_bool,\ NULL,\ -\/1,\ \textcolor{stringliteral}{"{}b"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ expected.b);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Proxy_ga60ece4a728aeddb3ba2b30589c329c40}{eldbus\_proxy\_call}}(proxy,\ \textcolor{stringliteral}{"{}SendByte"{}},\ \_on\_send\_byte,\ NULL,\ -\/1,\ \textcolor{stringliteral}{"{}y"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ expected.y);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Proxy_ga60ece4a728aeddb3ba2b30589c329c40}{eldbus\_proxy\_call}}(proxy,\ \textcolor{stringliteral}{"{}SendUint32"{}},\ \_on\_send\_uint32,\ NULL,\ -\/1,\ \textcolor{stringliteral}{"{}u"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ expected.u);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Proxy_ga60ece4a728aeddb3ba2b30589c329c40}{eldbus\_proxy\_call}}(proxy,\ \textcolor{stringliteral}{"{}SendInt32"{}},\ \_on\_send\_int32,\ NULL,\ -\/1,\ \textcolor{stringliteral}{"{}i"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ expected.i);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Proxy_ga60ece4a728aeddb3ba2b30589c329c40}{eldbus\_proxy\_call}}(proxy,\ \textcolor{stringliteral}{"{}SendInt16"{}},\ \_on\_send\_int16,\ NULL,\ -\/1,\ \textcolor{stringliteral}{"{}n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ expected.n);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Proxy_ga60ece4a728aeddb3ba2b30589c329c40}{eldbus\_proxy\_call}}(proxy,\ \textcolor{stringliteral}{"{}SendDouble"{}},\ \_on\_send\_double,\ NULL,\ -\/1,\ \textcolor{stringliteral}{"{}d"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ expected.d);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Proxy_ga60ece4a728aeddb3ba2b30589c329c40}{eldbus\_proxy\_call}}(proxy,\ \textcolor{stringliteral}{"{}SendString"{}},\ \_on\_send\_string,\ NULL,\ -\/1,\ \textcolor{stringliteral}{"{}s"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ expected.s);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Proxy_ga60ece4a728aeddb3ba2b30589c329c40}{eldbus\_proxy\_call}}(proxy,\ \textcolor{stringliteral}{"{}AsyncTest"{}},\ \_on\_async\_test,\ NULL,\ -\/1,\ \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Basic_gaf405114e35fec59c14cef2203e9debd5}{eldbus\_name\_owner\_changed\_callback\_add}}(conn,\ BUS,\ on\_name\_owner\_changed,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ conn,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{\ \ \ timeout\ =\ \mbox{\hyperlink{group__Ecore__Timer__Group_ga926423e464d7ef71105dd822d90e1187}{ecore\_timer\_add}}(30,\ finish,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}}();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (timeout)}
\DoxyCodeLine{\ \ \ \ \ \ \mbox{\hyperlink{group__Ecore__Timer__Group_ga7c118b6a6d232b63a6500e599d2a1b47}{ecore\_timer\_del}}(timeout);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (conn)}
\DoxyCodeLine{\ \ \ \ \ \ \mbox{\hyperlink{group__Eldbus__Connection_ga1c035aac8b601b416bba11d0d68f80ae}{eldbus\_connection\_unref}}(conn);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Core_ga255ee3e090da6704d009ee74ba9d8a79}{eldbus\_shutdown}}();}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Init__Group_ga768298b932f18d7e7593a447493e5cde}{ecore\_shutdown}}();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Log__Group_ga61776fa99e910e2d40f77c688c9bee5a}{eina\_log\_domain\_unregister}}(\_client\_log\_dom);}
\DoxyCodeLine{exit\_eina:}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Main__Group_ga5bf35513199d5220341437c05696285d}{eina\_shutdown}}();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 