\hypertarget{client_8c-example}{}\doxysection{client.\+c}
Client to test various call message types against a provided server (\mbox{\hyperlink{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__Conneciton_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{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{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{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Could not get entry contents"});}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (b != expected.b)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{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{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{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{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Could not get entry contents"});}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (y != expected.y)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{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{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{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{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Could not get entry contents"});}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (u != expected.u)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{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{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{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{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Could not get entry contents"});}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (i != expected.i)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{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{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{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{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Could not get entry contents"});}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (n != expected.n)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{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{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{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{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Could not get entry contents"});}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (d != expected.d)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{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{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{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{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{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{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{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{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{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{   \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{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_gafee4bfc0e509b6ffed6598edf6f4b3de}{eina\_init}}();}
\DoxyCodeLine{   \_client\_log\_dom = \mbox{\hyperlink{group__Eina__Log__Group_ga180f23bcbefbc0588f2f0c7a95bc0319}{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__Conneciton_ga203ec794fc0c7e1bddce4eb18b628c04}{eldbus\_connection\_get}}(ELDBUS\_CONNECTION\_TYPE\_SESSION);}
\DoxyCodeLine{}
\DoxyCodeLine{   obj = \mbox{\hyperlink{group__Eldbus__Object__Mapper_ga067d5c8eba2590fb58e7dc39de87d203}{eldbus\_object\_get}}(conn, BUS, PATH);}
\DoxyCodeLine{   proxy = \mbox{\hyperlink{group__Eldbus__Proxy_ga58b8d61188435800e1e866ab3fdc7090}{eldbus\_proxy\_get}}(obj, INTERFACE);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__Proxy_ga74be21757ba7ff8d43909652c389cf2c}{eldbus\_proxy\_signal\_handler\_add}}(proxy, \textcolor{stringliteral}{"Alive"}, \_on\_alive, NULL);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__Proxy_ga74be21757ba7ff8d43909652c389cf2c}{eldbus\_proxy\_signal\_handler\_add}}(proxy, \textcolor{stringliteral}{"Hello"}, \_on\_hello, NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__Proxy_ga0eaac8e928bd7605855bf61d97eea37c}{eldbus\_proxy\_call}}(proxy, \textcolor{stringliteral}{"SendBool"}, \_on\_send\_bool, NULL, -\/1, \textcolor{stringliteral}{"b"},}
\DoxyCodeLine{                    expected.b);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__Proxy_ga0eaac8e928bd7605855bf61d97eea37c}{eldbus\_proxy\_call}}(proxy, \textcolor{stringliteral}{"SendByte"}, \_on\_send\_byte, NULL, -\/1, \textcolor{stringliteral}{"y"},}
\DoxyCodeLine{                    expected.y);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__Proxy_ga0eaac8e928bd7605855bf61d97eea37c}{eldbus\_proxy\_call}}(proxy, \textcolor{stringliteral}{"SendUint32"}, \_on\_send\_uint32, NULL, -\/1, \textcolor{stringliteral}{"u"},}
\DoxyCodeLine{                    expected.u);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__Proxy_ga0eaac8e928bd7605855bf61d97eea37c}{eldbus\_proxy\_call}}(proxy, \textcolor{stringliteral}{"SendInt32"}, \_on\_send\_int32, NULL, -\/1, \textcolor{stringliteral}{"i"},}
\DoxyCodeLine{                    expected.i);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__Proxy_ga0eaac8e928bd7605855bf61d97eea37c}{eldbus\_proxy\_call}}(proxy, \textcolor{stringliteral}{"SendInt16"}, \_on\_send\_int16, NULL, -\/1, \textcolor{stringliteral}{"n"},}
\DoxyCodeLine{                    expected.n);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__Proxy_ga0eaac8e928bd7605855bf61d97eea37c}{eldbus\_proxy\_call}}(proxy, \textcolor{stringliteral}{"SendDouble"}, \_on\_send\_double, NULL, -\/1, \textcolor{stringliteral}{"d"},}
\DoxyCodeLine{                    expected.d);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__Proxy_ga0eaac8e928bd7605855bf61d97eea37c}{eldbus\_proxy\_call}}(proxy, \textcolor{stringliteral}{"SendString"}, \_on\_send\_string, NULL, -\/1, \textcolor{stringliteral}{"s"},}
\DoxyCodeLine{                    expected.s);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__Proxy_ga0eaac8e928bd7605855bf61d97eea37c}{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_ga7b9cb9d24ecebfdbb957436e2e669402}{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_gaba2b599c7aabe3ab664dc3d47f62a33a}{ecore\_timer\_del}}(timeout);}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (conn)}
\DoxyCodeLine{      \mbox{\hyperlink{group__Eldbus__Conneciton_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_ga5646cbbdd46053c1f45bcab974f94ee6}{eina\_log\_domain\_unregister}}(\_client\_log\_dom);}
\DoxyCodeLine{exit\_eina:}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Main__Group_ga2c8b4020427108a30c44707af22c99d3}{eina\_shutdown}}();}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\}}
\end{DoxyCodeInclude}
 