\hypertarget{complex-types_8c-example}{}\doxysection{complex-\/types.\+c}
Client to test complex types (arrays, structs, dicts) against a provided server (\mbox{\hyperlink{complex-types-server_8c-example}{complex-\/types-\/server.\+c}})

Client to test complex types (arrays, structs, dicts) against a provided server (\mbox{\hyperlink{complex-types-server_8c-example}{complex-\/types-\/server.\+c}})


\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{comment}{//Compile\ with:}}
\DoxyCodeLine{\textcolor{comment}{//\ gcc\ -\/o\ complex-\/types\ complex-\/types.c\ `pkg-\/config\ -\/-\/cflags\ -\/-\/libs\ eldbus\ ecore`}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ "{}Eldbus.h"{}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <Ecore.h>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ BUS\ "{}com.profusion"{}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ PATH\ "{}/com/profusion/Test"{}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ IFACE\ "{}com.profusion.Test"{}}}
\DoxyCodeLine{}
\DoxyCodeLine{\mbox{\hyperlink{group__Eldbus_ga1de8233c3e9240291bb952776810c831}{Eldbus\_Connection}}\ *conn;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{\_timer1\_cb(\textcolor{keywordtype}{void}\ *data\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}\(\backslash\)nFishing...\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gae0c653baad8836232c0dc27f91f875d6}{ECORE\_CALLBACK\_CANCEL}};}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{on\_plus\_one(\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{keywordtype}{int}\ num2\ =\ 0;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg,\ NULL,\ NULL))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Message\ error\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg,\ \textcolor{stringliteral}{"{}i"{}},\ \&num2))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Error\ getting\ arguments."{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}on\_plus\_one()\ \%d\(\backslash\)n"{}},\ num2);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{set\_property\_resp2(\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;}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *errmsg;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}set\_property\_resp2()\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg,\ \&errname,\ \&errmsg))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Message\ error\ \%s\ -\/\ \%s\(\backslash\)n\(\backslash\)n"{}},\ errname,\ errmsg);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{get\_property\_resp2(\textcolor{keywordtype}{void}\ *data,\ \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{\ \ \ \mbox{\hyperlink{group__Eldbus_ga82047f6a5efc1980ae445a898c2ed9c0}{Eldbus\_Proxy}}\ *proxy\ =\ data;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Core_ga08a70c6651064414e56d75fba2232925}{Eldbus\_Message\_Iter}}\ *variant\ =\ NULL;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{char}\ *type;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{char}\ *resp2;}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *errname;}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *errmsg;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}get\_property\_resp2()\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg,\ \&errname,\ \&errmsg))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Message\ error\ \%s\ -\/\ \%s\(\backslash\)n\(\backslash\)n"{}},\ errname,\ errmsg);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg,\ \textcolor{stringliteral}{"{}v"{}},\ \&variant))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Error\ getting\ arguments."{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ type\ =\ \mbox{\hyperlink{group__Eldbus__Message__Iter_ga7b0584ea114264a729cccf309ae840b8}{eldbus\_message\_iter\_signature\_get}}(variant);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (type[1])}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}It\ is\ a\ complex\ type,\ not\ handle\ yet.\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (type[0]\ !=\ \textcolor{charliteral}{'s'})}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Expected\ type\ is\ string.\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Eldbus__Message__Iter_gae44918ce0b571a30546219d1d5040da0}{eldbus\_message\_iter\_arguments\_get}}(variant,\ \textcolor{stringliteral}{"{}s"{}},\ \&resp2))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}error\ in\ eldbus\_message\_iter\_arguments\_get()\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}resp2=\%s\(\backslash\)n"{}},\ resp2);}
\DoxyCodeLine{\ \ \ free(type);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__FDO__Properties_ga044506d72ae44106a21d6576d64e0a06}{eldbus\_proxy\_property\_set}}(proxy,\ \textcolor{stringliteral}{"{}Resp2"{}},\ \textcolor{stringliteral}{"{}s"{}},\ \&\textcolor{stringliteral}{"{}lalala"{}},\ set\_property\_resp2,\ NULL);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__FDO__Properties_ga044506d72ae44106a21d6576d64e0a06}{eldbus\_proxy\_property\_set}}(proxy,\ \textcolor{stringliteral}{"{}int32"{}},\ \textcolor{stringliteral}{"{}i"{}},\ \ (\textcolor{keywordtype}{void}*)(intptr\_t)99,\ set\_property\_resp2,\ NULL);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{on\_send\_array\_int(\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{\ \ \ \mbox{\hyperlink{group__Eldbus__Core_ga08a70c6651064414e56d75fba2232925}{Eldbus\_Message\_Iter}}\ *array\ =\ NULL;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ num;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}on\_send\_array\_int()\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg,\ NULL,\ NULL))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Message\ error\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg,\ \textcolor{stringliteral}{"{}ai"{}},\ \&array))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Error\ getting\ arguments."{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{while}\ (\mbox{\hyperlink{group__Eldbus__Message__Iter_ga45c7d707ee830ae5be39c17df05af615}{eldbus\_message\_iter\_get\_and\_next}}(array,\ \textcolor{charliteral}{'i'},\ \&num))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}\%d\(\backslash\)n"{}},\ num);}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{on\_send\_array(\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{\ \ \ \mbox{\hyperlink{group__Eldbus__Core_ga08a70c6651064414e56d75fba2232925}{Eldbus\_Message\_Iter}}\ *array\ =\ NULL;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{char}\ *txt\ =\ NULL;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{char}\ *\textcolor{keywordtype}{string}[10];}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ i\ =\ 0;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ z;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}on\_send\_array()\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg,\ NULL,\ NULL))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Message\ error\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg,\ \textcolor{stringliteral}{"{}as"{}},\ \&array))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}Error\ getting\ arguments."{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{while}\ (\mbox{\hyperlink{group__Eldbus__Message__Iter_ga45c7d707ee830ae5be39c17df05af615}{eldbus\_message\_iter\_get\_and\_next}}(array,\ \textcolor{charliteral}{'s'},\ \&txt))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordtype}{string}[i]\ =\ txt;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ i++;}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{for}\ (z\ =\ 0;\ z\ <\ i;\ z++)}
\DoxyCodeLine{\ \ \ \ \ printf(\textcolor{stringliteral}{"{}string\ =\ \%s\(\backslash\)n"{}},\ \textcolor{keywordtype}{string}[z]);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{on\_receive\_array\_with\_size(\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;}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *errmsg;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}on\_receive\_array\_with\_size()\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg,\ \&errname,\ \&errmsg))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}Error:\ \%s\ \%s\(\backslash\)n"{}},\ errname,\ errmsg);}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{on\_send\_variant(\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__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},\ \mbox{\hyperlink{group__Eldbus__Core_ga7a5d4dc070bd925034de6e52c4260be7}{Eldbus\_Pending}}\ *pending\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}on\_send\_variant()\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{on\_receive\_array(\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;}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *errmsg;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}on\_receive\_array()\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg,\ \&errname,\ \&errmsg))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}Error:\ \%s\ \%s\(\backslash\)n"{}},\ errname,\ errmsg);}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}}
\DoxyCodeLine{main(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus_gab374430ed25089e7c5213767cc637191}{Eldbus\_Object}}\ *test2\_obj;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus_ga82047f6a5efc1980ae445a898c2ed9c0}{Eldbus\_Proxy}}\ *test2\_proxy;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Core_ga7a5d4dc070bd925034de6e52c4260be7}{Eldbus\_Pending}}\ *pending;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Core_ga08a70c6651064414e56d75fba2232925}{Eldbus\_Message\_Iter}}\ *iter,\ *array\_of\_string,\ *variant;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Core_ga08a70c6651064414e56d75fba2232925}{Eldbus\_Message\_Iter}}\ *array\_itr,\ *structure;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Core_ga14e8c4d4b96af5fb8bb5c66dc315593a}{Eldbus\_Message}}\ *msg;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ size\_of\_array\ =\ 5;}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *array[5]\ =\ \{\ \textcolor{stringliteral}{"{}aaaa"{}},\ \textcolor{stringliteral}{"{}bbbb"{}},\ \textcolor{stringliteral}{"{}cccc"{}},\ \textcolor{stringliteral}{"{}dddd"{}},\ \textcolor{stringliteral}{"{}eeee"{}}\ \};}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ i;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ plus\_one\ =\ 24;}
\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{\ \ \ test2\_obj\ =\ \mbox{\hyperlink{group__Eldbus__Object__Mapper_ga88ed939f56f83494e69a8d34212c202a}{eldbus\_object\_get}}(conn,\ BUS,\ PATH);}
\DoxyCodeLine{\ \ \ test2\_proxy\ =\ \mbox{\hyperlink{group__Eldbus__Proxy_ga817e6172d2edc6ca0d932e7de7f9c8a0}{eldbus\_proxy\_get}}(test2\_obj,\ IFACE);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ msg\ =\ \mbox{\hyperlink{group__Eldbus__Proxy_gacec54383c19900dc53fd443e4c122c6e}{eldbus\_proxy\_method\_call\_new}}(test2\_proxy,\ \textcolor{stringliteral}{"{}ReceiveArray"{}});}
\DoxyCodeLine{\ \ \ iter\ =\ \mbox{\hyperlink{group__Eldbus__Message__Iter_ga847256246b5c192f076d204c55e7ac11}{eldbus\_message\_iter\_get}}(msg);}
\DoxyCodeLine{\ \ \ array\_of\_string\ =\ \mbox{\hyperlink{group__Eldbus__Message__Iter_ga693607426e8bc5fe31be856c137a4a61}{eldbus\_message\_iter\_container\_new}}(iter,\ \textcolor{charliteral}{'a'},\textcolor{stringliteral}{"{}s"{}});}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!array\_of\_string)\ printf(\textcolor{stringliteral}{"{}array\_of\_string\ ==\ NULL\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{for}\ (i\ =\ 0;\ i\ <\ 5;\ i++)}
\DoxyCodeLine{\ \ \ \ \ \mbox{\hyperlink{group__Eldbus__Message__Iter_gaf3be6a0eb61416b21f21b65c57109b97}{eldbus\_message\_iter\_basic\_append}}(array\_of\_string,\ \textcolor{charliteral}{'s'},\ array[i]);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Message__Iter_ga01840f4c9fb71cbf1c8081cf4e84189c}{eldbus\_message\_iter\_container\_close}}(iter,\ array\_of\_string);}
\DoxyCodeLine{\ \ \ pending\ =\ \mbox{\hyperlink{group__Eldbus__Proxy_gaf026b9b3a74edff4c46d7fbeabe88d0d}{eldbus\_proxy\_send}}(test2\_proxy,\ msg,\ on\_receive\_array,\ NULL,\ -\/1);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!pending)\ printf(\textcolor{stringliteral}{"{}Error\ in\ eldbus\_proxy\_send()\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ msg\ =\ \mbox{\hyperlink{group__Eldbus__Proxy_gacec54383c19900dc53fd443e4c122c6e}{eldbus\_proxy\_method\_call\_new}}(test2\_proxy,\ \textcolor{stringliteral}{"{}ReceiveArrayOfStringIntWithSize"{}});}
\DoxyCodeLine{\ \ \ iter\ =\ \mbox{\hyperlink{group__Eldbus__Message__Iter_ga847256246b5c192f076d204c55e7ac11}{eldbus\_message\_iter\_get}}(msg);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{group__Eldbus__Message__Iter_gae00cddea6435838b7189bcf5ca816332}{eldbus\_message\_iter\_arguments\_append}}(iter,\ \textcolor{stringliteral}{"{}ia(si)"{}},\ size\_of\_array,\ \&array\_of\_string))}
\DoxyCodeLine{\ \ \ \ \ printf(\textcolor{stringliteral}{"{}error\ on\ eldbus\_massage\_iterator\_arguments\_set()\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{for}\ (i\ =\ 0;\ i\ <\ size\_of\_array;\ i++)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Eldbus__Core_ga08a70c6651064414e56d75fba2232925}{Eldbus\_Message\_Iter}}\ *struct\_of\_si;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Eldbus__Message__Iter_gae00cddea6435838b7189bcf5ca816332}{eldbus\_message\_iter\_arguments\_append}}(array\_of\_string,\ \textcolor{stringliteral}{"{}(si)"{}},\ \&struct\_of\_si);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Eldbus__Message__Iter_gae00cddea6435838b7189bcf5ca816332}{eldbus\_message\_iter\_arguments\_append}}(struct\_of\_si,\ \textcolor{stringliteral}{"{}si"{}},\ array[i],\ i);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Eldbus__Message__Iter_ga01840f4c9fb71cbf1c8081cf4e84189c}{eldbus\_message\_iter\_container\_close}}(array\_of\_string,\ struct\_of\_si);}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Message__Iter_ga01840f4c9fb71cbf1c8081cf4e84189c}{eldbus\_message\_iter\_container\_close}}(iter,\ array\_of\_string);}
\DoxyCodeLine{\ \ \ pending\ =\ \mbox{\hyperlink{group__Eldbus__Proxy_gaf026b9b3a74edff4c46d7fbeabe88d0d}{eldbus\_proxy\_send}}(test2\_proxy,\ msg,\ on\_receive\_array\_with\_size,\ NULL,\ -\/1);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ msg\ =\ \mbox{\hyperlink{group__Eldbus__Proxy_gacec54383c19900dc53fd443e4c122c6e}{eldbus\_proxy\_method\_call\_new}}(test2\_proxy,\ \textcolor{stringliteral}{"{}SendVariantData"{}});}
\DoxyCodeLine{\ \ \ iter\ =\ \mbox{\hyperlink{group__Eldbus__Message__Iter_ga847256246b5c192f076d204c55e7ac11}{eldbus\_message\_iter\_get}}(msg);}
\DoxyCodeLine{\ \ \ variant\ =\ \mbox{\hyperlink{group__Eldbus__Message__Iter_ga693607426e8bc5fe31be856c137a4a61}{eldbus\_message\_iter\_container\_new}}(iter,\ \textcolor{charliteral}{'v'},\ \textcolor{stringliteral}{"{}s"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Message__Iter_gaf3be6a0eb61416b21f21b65c57109b97}{eldbus\_message\_iter\_basic\_append}}(variant,\ \textcolor{charliteral}{'s'},\ \textcolor{stringliteral}{"{}test"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Message__Iter_ga01840f4c9fb71cbf1c8081cf4e84189c}{eldbus\_message\_iter\_container\_close}}(iter,\ variant);}
\DoxyCodeLine{\ \ \ pending\ =\ \mbox{\hyperlink{group__Eldbus__Proxy_gaf026b9b3a74edff4c46d7fbeabe88d0d}{eldbus\_proxy\_send}}(test2\_proxy,\ msg,\ on\_send\_variant,\ NULL,\ -\/1);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ msg\ =\ \mbox{\hyperlink{group__Eldbus__Proxy_gacec54383c19900dc53fd443e4c122c6e}{eldbus\_proxy\_method\_call\_new}}(test2\_proxy,\ \textcolor{stringliteral}{"{}DoubleContainner"{}});}
\DoxyCodeLine{\ \ \ iter\ =\ \mbox{\hyperlink{group__Eldbus__Message__Iter_ga847256246b5c192f076d204c55e7ac11}{eldbus\_message\_iter\_get}}(msg);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Message__Iter_gae00cddea6435838b7189bcf5ca816332}{eldbus\_message\_iter\_arguments\_append}}(iter,\ \textcolor{stringliteral}{"{}a(ii)"{}},\ \&array\_itr);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{for}\ (i\ =\ 0;\ i\ <\ 5;\ i++)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Eldbus__Message__Iter_gae00cddea6435838b7189bcf5ca816332}{eldbus\_message\_iter\_arguments\_append}}(array\_itr,\ \textcolor{stringliteral}{"{}(ii)"{}},\ \&structure);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Eldbus__Message__Iter_gae00cddea6435838b7189bcf5ca816332}{eldbus\_message\_iter\_arguments\_append}}(structure,\ \textcolor{stringliteral}{"{}ii"{}},\ i,\ i*i);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Eldbus__Message__Iter_ga01840f4c9fb71cbf1c8081cf4e84189c}{eldbus\_message\_iter\_container\_close}}(array\_itr,\ structure);}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Message__Iter_ga01840f4c9fb71cbf1c8081cf4e84189c}{eldbus\_message\_iter\_container\_close}}(iter,\ array\_itr);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Message__Iter_gae00cddea6435838b7189bcf5ca816332}{eldbus\_message\_iter\_arguments\_append}}(iter,\ \textcolor{stringliteral}{"{}a(ii)"{}},\ \&array\_itr);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{for}\ (i\ =\ 0;\ i\ <\ 7;\ i++)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Eldbus__Message__Iter_gae00cddea6435838b7189bcf5ca816332}{eldbus\_message\_iter\_arguments\_append}}(array\_itr,\ \textcolor{stringliteral}{"{}(ii)"{}},\ \&structure);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Eldbus__Message__Iter_gae00cddea6435838b7189bcf5ca816332}{eldbus\_message\_iter\_arguments\_append}}(structure,\ \textcolor{stringliteral}{"{}ii"{}},\ i,\ i*i*i);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Eldbus__Message__Iter_ga01840f4c9fb71cbf1c8081cf4e84189c}{eldbus\_message\_iter\_container\_close}}(array\_itr,\ structure);}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Message__Iter_ga01840f4c9fb71cbf1c8081cf4e84189c}{eldbus\_message\_iter\_container\_close}}(iter,\ array\_itr);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eldbus__Proxy_gaf026b9b3a74edff4c46d7fbeabe88d0d}{eldbus\_proxy\_send}}(test2\_proxy,\ msg,\ NULL,\ NULL,\ -\/1);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ pending\ =\ \mbox{\hyperlink{group__Eldbus__Proxy_ga60ece4a728aeddb3ba2b30589c329c40}{eldbus\_proxy\_call}}(test2\_proxy,\ \textcolor{stringliteral}{"{}SendArrayInt"{}},\ on\_send\_array\_int,\ NULL,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ -\/1\ ,\ \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ pending\ =\ \mbox{\hyperlink{group__Eldbus__Proxy_ga60ece4a728aeddb3ba2b30589c329c40}{eldbus\_proxy\_call}}(test2\_proxy,\ \textcolor{stringliteral}{"{}SendArray"{}},\ on\_send\_array,\ NULL,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ -\/1\ ,\ \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ pending\ =\ \mbox{\hyperlink{group__Eldbus__Proxy_ga60ece4a728aeddb3ba2b30589c329c40}{eldbus\_proxy\_call}}(test2\_proxy,\ \textcolor{stringliteral}{"{}PlusOne"{}},\ on\_plus\_one,\ NULL,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ -\/1\ ,\ \textcolor{stringliteral}{"{}i"{}},\ plus\_one);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ pending\ =\ \mbox{\hyperlink{group__Eldbus__FDO__Properties_gaeb4666a1c65d8f8e78bfeebc4fd651f2}{eldbus\_proxy\_property\_get}}(test2\_proxy,\ \textcolor{stringliteral}{"{}Resp2"{}},\ get\_property\_resp2,\ test2\_proxy);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Timer__Group_ga926423e464d7ef71105dd822d90e1187}{ecore\_timer\_add}}(10,\ \_timer1\_cb,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}}();}
\DoxyCodeLine{}
\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{\ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 