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


\begin{DoxyCodeInclude}
\textcolor{comment}{//Compile with:}
\textcolor{comment}{// gcc -o client client.c `pkg-config --cflags --libs eldbus ecore eina`}

\textcolor{preprocessor}{#include "Eldbus.h"}
\textcolor{preprocessor}{#include <Ecore.h>}

\textcolor{preprocessor}{#define BUS "org.Enlightenment"}
\textcolor{preprocessor}{#define PATH "/org/enlightenment"}
\textcolor{preprocessor}{#define INTERFACE "org.enlightenment.Test"}
\textcolor{preprocessor}{#define NTESTS 8}

\textcolor{keyword}{static} \textcolor{keywordtype}{int} \_client\_log\_dom = -1;
\textcolor{preprocessor}{#define ERR(...)      EINA\_LOG\_DOM\_ERR(\_client\_log\_dom, \_\_VA\_ARGS\_\_)}

\textcolor{keyword}{static} \mbox{\hyperlink{group__Eldbus_ga1de8233c3e9240291bb952776810c831}{Eldbus\_Connection}} *conn = NULL;
\textcolor{keyword}{static} \mbox{\hyperlink{group__Ecore__Timer__Group_gaf96ffb609956658ec038e54bd39f46f0}{Ecore\_Timer}} *timeout = NULL;

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_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}})
\{
   printf(\textcolor{stringliteral}{"Alive\(\backslash\)n\(\backslash\)n"});
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_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)
\{
   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *txt;
   \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg, \textcolor{stringliteral}{"s"}, &txt))
     printf(\textcolor{stringliteral}{"%s\(\backslash\)n"}, txt);
\}

\textcolor{preprocessor}{#include <inttypes.h>}

\textcolor{keyword}{static} \textcolor{keyword}{struct }expected
\{
   \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}} b;
   uint8\_t y;
   uint32\_t u;
   int32\_t i;
   int16\_t n;
   \textcolor{keywordtype}{double} d;
   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *s;
\} expected = \{
   .b = \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}},
   .y = 0xAA,
   .u = 0xFFFFFFFF,
   .i = 0xFFFFFFFF,
   .n = 0xFFFF,
   .d = 3.1415926,
   .s = \textcolor{stringliteral}{"test"},
\};

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
test(\textcolor{keywordtype}{void})
\{
   \textcolor{keyword}{static} \textcolor{keywordtype}{int} n = 0;
   n++;
   \textcolor{keywordflow}{if} (n >= NTESTS)
     \{
        printf(\textcolor{stringliteral}{"Passed in all tests\(\backslash\)nExiting...\(\backslash\)n"});
        \mbox{\hyperlink{group__Eldbus__Conneciton_ga1c035aac8b601b416bba11d0d68f80ae}{eldbus\_connection\_unref}}(conn);
        conn = NULL;
        \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();
     \}
   \textcolor{keywordflow}{else}
    printf(\textcolor{stringliteral}{"Passed in %d/%d tests\(\backslash\)n"}, n, NTESTS);
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_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}})
\{
   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *errname, *errmsg;
   \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}} b;

   \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg, &errname, &errmsg))
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"%s %s"}, errname, errmsg);
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg, \textcolor{stringliteral}{"b"}, &b))
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Could not get entry contents"});
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (b != expected.b)
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Bool value doesn't match"});
        \textcolor{keywordflow}{return};
     \}

   test();
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_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}})
\{
   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *errname, *errmsg;
   uint8\_t y;

   \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg, &errname, &errmsg))
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"%s %s"}, errname, errmsg);
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg, \textcolor{stringliteral}{"y"}, &y))
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Could not get entry contents"});
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (y != expected.y)
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Byte value doesn't match expected value"});
        \textcolor{keywordflow}{return};
     \}

   test();
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_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}})
\{
   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *errname, *errmsg;
   \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} u;

   \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg, &errname, &errmsg))
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"%s %s"}, errname, errmsg);
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg, \textcolor{stringliteral}{"u"}, &u))
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Could not get entry contents"});
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (u != expected.u)
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Uint32 value doesn't match expected value"});
        \textcolor{keywordflow}{return};
     \}

   test();
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_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}})
\{
   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *errname, *errmsg;
   int32\_t i;

   \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg, &errname, &errmsg))
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"%s %s"}, errname, errmsg);
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg, \textcolor{stringliteral}{"i"}, &i))
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Could not get entry contents"});
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (i != expected.i)
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Int32 value doesn't match expected value"});
        \textcolor{keywordflow}{return};
     \}

   test();
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_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}})
\{
   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *errname, *errmsg;
   int16\_t n;

   \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg, &errname, &errmsg))
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"%s %s"}, errname, errmsg);
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg, \textcolor{stringliteral}{"n"}, &n))
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Could not get entry contents"});
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (n != expected.n)
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Int16 value doesn't match expected value"});
        \textcolor{keywordflow}{return};
     \}

   test();
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_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}})
\{
   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *errname, *errmsg;
   \textcolor{keywordtype}{double} d;

   \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg, &errname, &errmsg))
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"%s %s"}, errname, errmsg);
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg, \textcolor{stringliteral}{"d"}, &d))
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Could not get entry contents"});
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (d != expected.d)
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Double value doesn't match expected value"});
        \textcolor{keywordflow}{return};
     \}

   test();
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_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}})
\{
   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *errname, *errmsg;
   \textcolor{keywordtype}{char} *s;

   \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg, &errname, &errmsg))
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"%s %s"}, errname, errmsg);
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg, \textcolor{stringliteral}{"s"}, &s))
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Could not get entry contents"});
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(s, expected.s) != 0)
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Uint32 value doesn't match expected value"});
        \textcolor{keywordflow}{return};
     \}

   test();
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_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}})
\{
   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *errname, *errmsg;

   \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg, &errname, &errmsg))
     \{
        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"%s %s"}, errname, errmsg);
        \textcolor{keywordflow}{return};
     \}

   test();
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
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}})
\{
   printf(\textcolor{stringliteral}{"Bus=%s | old=%s | new=%s\(\backslash\)n"}, bus, old\_id, new\_id);
\}

\textcolor{keyword}{static} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}
finish(\textcolor{keywordtype}{void} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})
\{
   \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Timeout\(\backslash\)nSome error happened or server is taking too much time to respond."});
   \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();
   timeout = NULL;
   \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gae0c653baad8836232c0dc27f91f875d6}{ECORE\_CALLBACK\_CANCEL}};
\}

\textcolor{keywordtype}{int}
main(\textcolor{keywordtype}{void})
\{
   \mbox{\hyperlink{group__Eldbus_gab374430ed25089e7c5213767cc637191}{Eldbus\_Object}} *obj;
   \mbox{\hyperlink{group__Eldbus_ga82047f6a5efc1980ae445a898c2ed9c0}{Eldbus\_Proxy}} *proxy;

   \mbox{\hyperlink{group__Eina__Main__Group_gafee4bfc0e509b6ffed6598edf6f4b3de}{eina\_init}}();
   \_client\_log\_dom = \mbox{\hyperlink{group__Eina__Log__Group_ga180f23bcbefbc0588f2f0c7a95bc0319}{eina\_log\_domain\_register}}(\textcolor{stringliteral}{"client"}, EINA\_COLOR\_CYAN);
   \textcolor{keywordflow}{if} (\_client\_log\_dom < 0)
     \{
        \mbox{\hyperlink{group__Eina__Log__Group_ga2e33caeeeb6051526c01b7fea4d6c91b}{EINA\_LOG\_ERR}}(\textcolor{stringliteral}{"Unable to create 'client' log domain"});
        \textcolor{keywordflow}{goto} exit\_eina;
     \}

   \mbox{\hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\_init}}();
   \mbox{\hyperlink{group__Eldbus__Core_gadd7c8b8a43b5dd590f7fd06166288754}{eldbus\_init}}();

   conn = \mbox{\hyperlink{group__Eldbus__Conneciton_ga203ec794fc0c7e1bddce4eb18b628c04}{eldbus\_connection\_get}}(ELDBUS\_CONNECTION\_TYPE\_SESSION);

   obj = \mbox{\hyperlink{group__Eldbus__Object__Mapper_ga067d5c8eba2590fb58e7dc39de87d203}{eldbus\_object\_get}}(conn, BUS, PATH);
   proxy = \mbox{\hyperlink{group__Eldbus__Proxy_ga58b8d61188435800e1e866ab3fdc7090}{eldbus\_proxy\_get}}(obj, INTERFACE);
   \mbox{\hyperlink{group__Eldbus__Proxy_ga74be21757ba7ff8d43909652c389cf2c}{eldbus\_proxy\_signal\_handler\_add}}(proxy, \textcolor{stringliteral}{"Alive"}, \_on\_alive, NULL);
   \mbox{\hyperlink{group__Eldbus__Proxy_ga74be21757ba7ff8d43909652c389cf2c}{eldbus\_proxy\_signal\_handler\_add}}(proxy, \textcolor{stringliteral}{"Hello"}, \_on\_hello, NULL);

   \mbox{\hyperlink{group__Eldbus__Proxy_ga0eaac8e928bd7605855bf61d97eea37c}{eldbus\_proxy\_call}}(proxy, \textcolor{stringliteral}{"SendBool"}, \_on\_send\_bool, NULL, -1, \textcolor{stringliteral}{"b"},
                    expected.b);
   \mbox{\hyperlink{group__Eldbus__Proxy_ga0eaac8e928bd7605855bf61d97eea37c}{eldbus\_proxy\_call}}(proxy, \textcolor{stringliteral}{"SendByte"}, \_on\_send\_byte, NULL, -1, \textcolor{stringliteral}{"y"},
                    expected.y);
   \mbox{\hyperlink{group__Eldbus__Proxy_ga0eaac8e928bd7605855bf61d97eea37c}{eldbus\_proxy\_call}}(proxy, \textcolor{stringliteral}{"SendUint32"}, \_on\_send\_uint32, NULL, -1, \textcolor{stringliteral}{"u"},
                    expected.u);
   \mbox{\hyperlink{group__Eldbus__Proxy_ga0eaac8e928bd7605855bf61d97eea37c}{eldbus\_proxy\_call}}(proxy, \textcolor{stringliteral}{"SendInt32"}, \_on\_send\_int32, NULL, -1, \textcolor{stringliteral}{"i"},
                    expected.i);
   \mbox{\hyperlink{group__Eldbus__Proxy_ga0eaac8e928bd7605855bf61d97eea37c}{eldbus\_proxy\_call}}(proxy, \textcolor{stringliteral}{"SendInt16"}, \_on\_send\_int16, NULL, -1, \textcolor{stringliteral}{"n"},
                    expected.n);
   \mbox{\hyperlink{group__Eldbus__Proxy_ga0eaac8e928bd7605855bf61d97eea37c}{eldbus\_proxy\_call}}(proxy, \textcolor{stringliteral}{"SendDouble"}, \_on\_send\_double, NULL, -1, \textcolor{stringliteral}{"d"},
                    expected.d);
   \mbox{\hyperlink{group__Eldbus__Proxy_ga0eaac8e928bd7605855bf61d97eea37c}{eldbus\_proxy\_call}}(proxy, \textcolor{stringliteral}{"SendString"}, \_on\_send\_string, NULL, -1, \textcolor{stringliteral}{"s"},
                    expected.s);
   \mbox{\hyperlink{group__Eldbus__Proxy_ga0eaac8e928bd7605855bf61d97eea37c}{eldbus\_proxy\_call}}(proxy, \textcolor{stringliteral}{"AsyncTest"}, \_on\_async\_test, NULL, -1, \textcolor{stringliteral}{""});

   \mbox{\hyperlink{group__Eldbus__Basic_gaf405114e35fec59c14cef2203e9debd5}{eldbus\_name\_owner\_changed\_callback\_add}}(conn, BUS, 
      on\_name\_owner\_changed,
                                         conn, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});
   timeout = \mbox{\hyperlink{group__Ecore__Timer__Group_ga7b9cb9d24ecebfdbb957436e2e669402}{ecore\_timer\_add}}(30, finish, NULL);

   \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}}();

   \textcolor{keywordflow}{if} (timeout)
      \mbox{\hyperlink{group__Ecore__Timer__Group_gaba2b599c7aabe3ab664dc3d47f62a33a}{ecore\_timer\_del}}(timeout);
   \textcolor{keywordflow}{if} (conn)
      \mbox{\hyperlink{group__Eldbus__Conneciton_ga1c035aac8b601b416bba11d0d68f80ae}{eldbus\_connection\_unref}}(conn);

   \mbox{\hyperlink{group__Eldbus__Core_ga255ee3e090da6704d009ee74ba9d8a79}{eldbus\_shutdown}}();
   \mbox{\hyperlink{group__Ecore__Init__Group_ga768298b932f18d7e7593a447493e5cde}{ecore\_shutdown}}();

   \mbox{\hyperlink{group__Eina__Log__Group_ga5646cbbdd46053c1f45bcab974f94ee6}{eina\_log\_domain\_unregister}}(\_client\_log\_dom);
exit\_eina:
   \mbox{\hyperlink{group__Eina__Main__Group_ga2c8b4020427108a30c44707af22c99d3}{eina\_shutdown}}();

   \textcolor{keywordflow}{return} 0;
\}
\end{DoxyCodeInclude}
 