\hypertarget{banshee_8c-example}{}\doxysection{banshee.\+c}
Access Banshee music player and send commands to it.


\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{comment}{//Compile with:}}
\DoxyCodeLine{\textcolor{comment}{// gcc -\/o banshee banshee.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.bansheeproject.Banshee"{}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define ENGINE\_PATH "{}/org/bansheeproject/Banshee/PlayerEngine"{}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define CONTROLLER\_PATH "{}/org/bansheeproject/Banshee/PlaybackController"{}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define MPRIS\_PATH "{}/org/mpris/MediaPlayer2"{}}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define ENGINE\_IFACE "{}org.bansheeproject.Banshee.PlayerEngine"{}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define CONTROLLER\_IFACE "{}org.bansheeproject.Banshee.PlaybackController"{}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define MPRIS\_IFACE "{}org.mpris.MediaPlayer2.Playlists"{}}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{group__Eldbus__Core_ga0f4385f3952b6ad56f1966a3ed1b744c}{Eldbus\_Signal\_Handler}} *state\_changed2;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{\_timeout\_application(\textcolor{keywordtype}{void} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}\(\backslash\)n\#\# ecore\_main\_loop\_quit()\(\backslash\)n"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();}
\DoxyCodeLine{   \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{on\_get\_playlists(\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, *struct\_entry;}
\DoxyCodeLine{   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *path, *name, *image;}
\DoxyCodeLine{   \textcolor{keywordtype}{int} i = 0;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga8b89fd35e22beece51443e29fe585935}{EINA\_SAFETY\_ON\_TRUE\_RETURN}}(\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg, NULL, NULL));}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg, \textcolor{stringliteral}{"{}a(oss)"{}}, \&array))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        fprintf(stderr, \textcolor{stringliteral}{"{}Error: could not get entry contents\(\backslash\)n"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}on\_get\_playlists() \(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{   \textcolor{keywordflow}{while} (\mbox{\hyperlink{group__Eldbus__Message__Iter_ga45c7d707ee830ae5be39c17df05af615}{eldbus\_message\_iter\_get\_and\_next}}(array, \textcolor{charliteral}{'r'}, \&struct\_entry))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Eldbus__Message__Iter_gae44918ce0b571a30546219d1d5040da0}{eldbus\_message\_iter\_arguments\_get}}(struct\_entry, \textcolor{stringliteral}{"{}oss"{}}, \&path, \&name, \&image))}
\DoxyCodeLine{          \{}
\DoxyCodeLine{             printf(\textcolor{stringliteral}{"{}error on eldbus\_massage\_iterator\_arguments\_get()"{}});}
\DoxyCodeLine{             \textcolor{keywordflow}{return};}
\DoxyCodeLine{          \}}
\DoxyCodeLine{        i++;}
\DoxyCodeLine{        printf(\textcolor{stringliteral}{"{}\%d -\/ \%s | \%s | \%s\(\backslash\)n"{}}, i, path, name, image);}
\DoxyCodeLine{     \}}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}end of on\_get\_playlists()\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{iterate\_dict(\textcolor{keywordtype}{void} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \textcolor{keyword}{const} \textcolor{keywordtype}{void} *key, \mbox{\hyperlink{group__Eldbus__Core_ga08a70c6651064414e56d75fba2232925}{Eldbus\_Message\_Iter}} *var)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *skey = key;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!strcmp(skey, \textcolor{stringliteral}{"{}PlaylistCount"{}}))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{keywordtype}{unsigned} count;}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Eldbus__Message__Iter_gae44918ce0b571a30546219d1d5040da0}{eldbus\_message\_iter\_arguments\_get}}(var, \textcolor{stringliteral}{"{}u"{}}, \&count))}
\DoxyCodeLine{          printf(\textcolor{stringliteral}{"{}error2\(\backslash\)n"{}});}
\DoxyCodeLine{        printf(\textcolor{stringliteral}{"{}PlaylistCount=\%u\(\backslash\)n"{}}, count);}
\DoxyCodeLine{     \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(skey, \textcolor{stringliteral}{"{}Orderings"{}}))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Eldbus__Core_ga08a70c6651064414e56d75fba2232925}{Eldbus\_Message\_Iter}} *as;}
\DoxyCodeLine{        \textcolor{keyword}{const} \textcolor{keywordtype}{char} *txt;}
\DoxyCodeLine{        printf(\textcolor{stringliteral}{"{}-\/ Orderings\(\backslash\)n"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Eldbus__Message__Iter_gae44918ce0b571a30546219d1d5040da0}{eldbus\_message\_iter\_arguments\_get}}(var, \textcolor{stringliteral}{"{}as"{}}, \&as))}
\DoxyCodeLine{          printf(\textcolor{stringliteral}{"{}error1\(\backslash\)n"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{while} (\mbox{\hyperlink{group__Eldbus__Message__Iter_ga45c7d707ee830ae5be39c17df05af615}{eldbus\_message\_iter\_get\_and\_next}}(as, \textcolor{charliteral}{'s'}, \&txt))}
\DoxyCodeLine{          printf(\textcolor{stringliteral}{"{}\(\backslash\)t\%s\(\backslash\)n"{}}, txt);}
\DoxyCodeLine{     \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{playlist\_get\_all\_cb(\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;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga8b89fd35e22beece51443e29fe585935}{EINA\_SAFETY\_ON\_TRUE\_RETURN}}(\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg, NULL, NULL));}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg, \textcolor{stringliteral}{"{}a\{sv\}"{}}, \&array))}
\DoxyCodeLine{     \mbox{\hyperlink{group__Eldbus__Message__Helpers_ga2b2a85bdad9a8ce06eacb3fe21392360}{eldbus\_message\_iter\_dict\_iterate}}(array, \textcolor{stringliteral}{"{}sv"{}}, iterate\_dict, NULL);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{on\_introspect(\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} *string;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga8b89fd35e22beece51443e29fe585935}{EINA\_SAFETY\_ON\_TRUE\_RETURN}}(\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg, NULL, NULL));}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg, \textcolor{stringliteral}{"{}s"{}}, \&\textcolor{keywordtype}{string}))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        fprintf(stderr, \textcolor{stringliteral}{"{}Error: could not get entry contents\(\backslash\)n"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}on\_introspect() data=\(\backslash\)n\%s\(\backslash\)n\(\backslash\)n"{}}, \textcolor{keywordtype}{string});}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{on\_next\_or\_pause(\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{   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *status = data;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga8b89fd35e22beece51443e29fe585935}{EINA\_SAFETY\_ON\_TRUE\_RETURN}}(\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg, NULL, NULL));}
\DoxyCodeLine{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}\%s\(\backslash\)n"{}}, status);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{on\_state\_changed(\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)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *status;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga8b89fd35e22beece51443e29fe585935}{EINA\_SAFETY\_ON\_TRUE\_RETURN}}(\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg, NULL, NULL));}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg, \textcolor{stringliteral}{"{}s"{}}, \&status))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        fprintf(stderr, \textcolor{stringliteral}{"{}Error: could not get entry contents\(\backslash\)n"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}on\_state\_changed = \%s\(\backslash\)n"{}}, status);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{on\_state\_changed2(\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)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *status;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga8b89fd35e22beece51443e29fe585935}{EINA\_SAFETY\_ON\_TRUE\_RETURN}}(\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg, NULL, NULL));}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg, \textcolor{stringliteral}{"{}s"{}}, \&status))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        fprintf(stderr, \textcolor{stringliteral}{"{}Error: could not get entry contents\(\backslash\)n"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}on\_state\_changed2 = \%s\(\backslash\)n"{}}, status);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__Signal__Handler_ga1b39e54fb712220f3e699d1ca9c6c919}{eldbus\_signal\_handler\_unref}}(state\_changed2);}
\DoxyCodeLine{   state\_changed2 = NULL;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{on\_banshee\_startup(\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)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *bus, *older\_id, *new\_id;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga8b89fd35e22beece51443e29fe585935}{EINA\_SAFETY\_ON\_TRUE\_RETURN}}(\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg, NULL, NULL));}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg, \textcolor{stringliteral}{"{}sss"{}}, \&bus, \&older\_id, \&new\_id))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        printf(\textcolor{stringliteral}{"{}Error getting arguments from NameOwnerChanged"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}banshee started on id=\%s\(\backslash\)n"{}}, new\_id);}
\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} \mbox{\hyperlink{group__Eldbus__Core_ga14e8c4d4b96af5fb8bb5c66dc315593a}{Eldbus\_Message}} *msg)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *bus, *older\_id, *new\_id;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga8b89fd35e22beece51443e29fe585935}{EINA\_SAFETY\_ON\_TRUE\_RETURN}}(\mbox{\hyperlink{group__Eldbus__Message_ga3aeec7d275bef2bb244ed9a045540921}{eldbus\_message\_error\_get}}(msg, NULL, NULL));}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Eldbus__Message_ga7aec6beec8e8a73982c7f43bd1322df8}{eldbus\_message\_arguments\_get}}(msg, \textcolor{stringliteral}{"{}sss"{}}, \&bus, \&older\_id, \&new\_id))}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        printf(\textcolor{stringliteral}{"{}Error getting arguments from NameOwnerChanged"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}bus = \%s older=\%s new=\%s\(\backslash\)n\(\backslash\)n"{}}, bus, older\_id, new\_id);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}}
\DoxyCodeLine{main(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus_ga1de8233c3e9240291bb952776810c831}{Eldbus\_Connection}} *conn;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus_gab374430ed25089e7c5213767cc637191}{Eldbus\_Object}} *engine\_obj, *controller\_obj, *mpris\_obj;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus_ga82047f6a5efc1980ae445a898c2ed9c0}{Eldbus\_Proxy}} *engine, *controler, *playlists;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__Core_ga0f4385f3952b6ad56f1966a3ed1b744c}{Eldbus\_Signal\_Handler}} *sh;}
\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{   engine\_obj = \mbox{\hyperlink{group__Eldbus__Object__Mapper_ga88ed939f56f83494e69a8d34212c202a}{eldbus\_object\_get}}(conn, BUS, ENGINE\_PATH);}
\DoxyCodeLine{   controller\_obj = \mbox{\hyperlink{group__Eldbus__Object__Mapper_ga88ed939f56f83494e69a8d34212c202a}{eldbus\_object\_get}}(conn, BUS, CONTROLLER\_PATH);}
\DoxyCodeLine{   mpris\_obj = \mbox{\hyperlink{group__Eldbus__Object__Mapper_ga88ed939f56f83494e69a8d34212c202a}{eldbus\_object\_get}}(conn, BUS, MPRIS\_PATH);}
\DoxyCodeLine{}
\DoxyCodeLine{   engine = \mbox{\hyperlink{group__Eldbus__Proxy_ga817e6172d2edc6ca0d932e7de7f9c8a0}{eldbus\_proxy\_get}}(engine\_obj, ENGINE\_IFACE);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga4e028a0c5bd5743068c1c3f2302dc0e8}{EINA\_SAFETY\_ON\_NULL\_GOTO}}(engine, end);}
\DoxyCodeLine{   controler = \mbox{\hyperlink{group__Eldbus__Proxy_ga817e6172d2edc6ca0d932e7de7f9c8a0}{eldbus\_proxy\_get}}(controller\_obj, CONTROLLER\_IFACE);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga4e028a0c5bd5743068c1c3f2302dc0e8}{EINA\_SAFETY\_ON\_NULL\_GOTO}}(controler, end);}
\DoxyCodeLine{   playlists = \mbox{\hyperlink{group__Eldbus__Proxy_ga817e6172d2edc6ca0d932e7de7f9c8a0}{eldbus\_proxy\_get}}(mpris\_obj, MPRIS\_IFACE);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga4e028a0c5bd5743068c1c3f2302dc0e8}{EINA\_SAFETY\_ON\_NULL\_GOTO}}(playlists, end);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__FDO__Introspectable_ga407aed3f361cfe97c05eae38c9eef09a}{eldbus\_object\_introspect}}(engine\_obj, on\_introspect, NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__Proxy_ga3ec2ab94891c39548b44135ebe275b9f}{eldbus\_proxy\_signal\_handler\_add}}(engine, \textcolor{stringliteral}{"{}StateChanged"{}}, on\_state\_changed, NULL);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__Proxy_ga60ece4a728aeddb3ba2b30589c329c40}{eldbus\_proxy\_call}}(engine, \textcolor{stringliteral}{"{}Pause"{}}, on\_next\_or\_pause, \textcolor{stringliteral}{"{}Pause"{}}, -\/1, \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__Proxy_ga60ece4a728aeddb3ba2b30589c329c40}{eldbus\_proxy\_call}}(controler, \textcolor{stringliteral}{"{}Next"{}}, on\_next\_or\_pause, \textcolor{stringliteral}{"{}Next"{}}, -\/1, \textcolor{stringliteral}{"{}b"{}}, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__FDO__Properties_ga8814a37d04f441d4d0021de1bb58cec3}{eldbus\_proxy\_property\_get\_all}}(playlists, playlist\_get\_all\_cb, NULL);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__Proxy_ga60ece4a728aeddb3ba2b30589c329c40}{eldbus\_proxy\_call}}(playlists, \textcolor{stringliteral}{"{}GetPlaylists"{}}, on\_get\_playlists, NULL, -\/1,}
\DoxyCodeLine{                    \textcolor{stringliteral}{"{}uusb"{}}, (\textcolor{keywordtype}{unsigned})0, (\textcolor{keywordtype}{unsigned})30, \textcolor{stringliteral}{"{}asc"{}}, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}});}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__Signal__Handler_gae6f61280a638c20384eb7406dfd57e53}{eldbus\_signal\_handler\_add}}(conn, BUS, ENGINE\_PATH, ENGINE\_IFACE,}
\DoxyCodeLine{                            \textcolor{stringliteral}{"{}StateChanged"{}}, on\_state\_changed, NULL);}
\DoxyCodeLine{   state\_changed2 = \mbox{\hyperlink{group__Eldbus__Signal__Handler_gae6f61280a638c20384eb7406dfd57e53}{eldbus\_signal\_handler\_add}}(conn, BUS, ENGINE\_PATH, ENGINE\_IFACE,}
\DoxyCodeLine{                                             \textcolor{stringliteral}{"{}StateChanged"{}}, on\_state\_changed2, NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{   sh = \mbox{\hyperlink{group__Eldbus__Signal__Handler_gae6f61280a638c20384eb7406dfd57e53}{eldbus\_signal\_handler\_add}}(conn, \mbox{\hyperlink{group__Eldbus__Core_gab97eca2dee4c913fbf5b052be14e9f20}{ELDBUS\_FDO\_BUS}}, \mbox{\hyperlink{group__Eldbus__Core_ga44346df7916869917a3bbb641ba970d2}{ELDBUS\_FDO\_PATH}},}
\DoxyCodeLine{                                 \mbox{\hyperlink{group__Eldbus__Core_gafaf7e367f9a6d5e0e1205e42fed56785}{ELDBUS\_FDO\_INTERFACE}}, \textcolor{stringliteral}{"{}NameOwnerChanged"{}},}
\DoxyCodeLine{                                 on\_name\_owner\_changed, NULL);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__Signal__Handler_ga04f654be8ad8bd3e94cd3f725f2e04a0}{eldbus\_signal\_handler\_match\_extra\_set}}(sh, \textcolor{stringliteral}{"{}arg0"{}}, BUS, NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{   sh = \mbox{\hyperlink{group__Eldbus__Signal__Handler_gae6f61280a638c20384eb7406dfd57e53}{eldbus\_signal\_handler\_add}}(conn, \mbox{\hyperlink{group__Eldbus__Core_gab97eca2dee4c913fbf5b052be14e9f20}{ELDBUS\_FDO\_BUS}}, \mbox{\hyperlink{group__Eldbus__Core_ga44346df7916869917a3bbb641ba970d2}{ELDBUS\_FDO\_PATH}},}
\DoxyCodeLine{                                 \mbox{\hyperlink{group__Eldbus__Core_gafaf7e367f9a6d5e0e1205e42fed56785}{ELDBUS\_FDO\_INTERFACE}}, \textcolor{stringliteral}{"{}NameOwnerChanged"{}},}
\DoxyCodeLine{                                 on\_banshee\_startup, NULL);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eldbus__Signal__Handler_ga04f654be8ad8bd3e94cd3f725f2e04a0}{eldbus\_signal\_handler\_match\_extra\_set}}(sh, \textcolor{stringliteral}{"{}arg0"{}}, BUS, \textcolor{stringliteral}{"{}arg1"{}}, \textcolor{stringliteral}{"{}"{}}, NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Timer__Group_ga926423e464d7ef71105dd822d90e1187}{ecore\_timer\_add}}(50, \_timeout\_application, NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}}();}
\DoxyCodeLine{}
\DoxyCodeLine{end:}
\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}
 