\hypertarget{group__Eldbus__Conneciton}{\section{Connection}
\label{group__Eldbus__Conneciton}\index{Connection@{Connection}}
}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Eldbus__Conneciton_gade3e628de8a66ad92d0791d993d9e0d3}{\#define {\bfseries E\-L\-D\-B\-U\-S\-\_\-\-T\-I\-M\-E\-O\-U\-T\-\_\-\-I\-N\-F\-I\-N\-I\-T\-E}~((int) 0x7fffffff)}\label{group__Eldbus__Conneciton_gade3e628de8a66ad92d0791d993d9e0d3}

\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Eldbus__Conneciton_gab4b3bb53f5c3d4359ac776c0a1876afc}{typedef void($\ast$ {\bfseries Eldbus\-\_\-\-Connection\-\_\-\-Event\-\_\-\-Cb} )(void $\ast$data, \hyperlink{group__Eldbus__Core_ga5f0557a7e65ed263fcc1678874b8f7e7}{Eldbus\-\_\-\-Connection} $\ast$conn, void $\ast$event\-\_\-info)}\label{group__Eldbus__Conneciton_gab4b3bb53f5c3d4359ac776c0a1876afc}

\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{group__Eldbus__Conneciton_ga96d3b961928850a93a8ab18ba3b2a14b}{Eldbus\-\_\-\-Connection\-\_\-\-Type} \{ \\*
\hyperlink{group__Eldbus__Conneciton_gga96d3b961928850a93a8ab18ba3b2a14ba3ef6f1bb011dcce46485dcea4029871c}{E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-U\-N\-K\-N\-O\-W\-N} = 0, 
\\*
{\bfseries E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-S\-E\-S\-S\-I\-O\-N}, 
\\*
{\bfseries E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-S\-Y\-S\-T\-E\-M}, 
\\*
{\bfseries E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-S\-T\-A\-R\-T\-E\-R}, 
\\*
{\bfseries E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-A\-D\-D\-R\-E\-S\-S}, 
\\*
\hyperlink{group__Eldbus__Conneciton_gga96d3b961928850a93a8ab18ba3b2a14baa29913f72c3c5e7b789e64cdb44c2e3f}{E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-L\-A\-S\-T}
 \}
\item 
enum \hyperlink{group__Eldbus__Conneciton_ga30dc901a63a70ea39c293e1070b7baae}{Eldbus\-\_\-\-Connection\-\_\-\-Event\-\_\-\-Type} \{ \\*
{\bfseries E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-E\-V\-E\-N\-T\-\_\-\-D\-E\-L}, 
\\*
{\bfseries E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-E\-V\-E\-N\-T\-\_\-\-D\-I\-S\-C\-O\-N\-N\-E\-C\-T\-E\-D}, 
\\*
\hyperlink{group__Eldbus__Conneciton_gga30dc901a63a70ea39c293e1070b7baaea7c976018cfff8e3fe5d1366b76e4f3da}{E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-E\-V\-E\-N\-T\-\_\-\-L\-A\-S\-T}
 \}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Eldbus__Core_ga5f0557a7e65ed263fcc1678874b8f7e7}{Eldbus\-\_\-\-Connection} $\ast$ \hyperlink{group__Eldbus__Conneciton_ga203ec794fc0c7e1bddce4eb18b628c04}{eldbus\-\_\-connection\-\_\-get} (\hyperlink{group__Eldbus__Conneciton_ga96d3b961928850a93a8ab18ba3b2a14b}{Eldbus\-\_\-\-Connection\-\_\-\-Type} type)
\begin{DoxyCompactList}\small\item\em Establish a connection to bus and integrate it with the ecore main loop. \end{DoxyCompactList}\item 
\hyperlink{group__Eldbus__Core_ga5f0557a7e65ed263fcc1678874b8f7e7}{Eldbus\-\_\-\-Connection} $\ast$ \hyperlink{group__Eldbus__Conneciton_ga182ef2e5fc99983b0122b1da0ea842b0}{eldbus\-\_\-private\-\_\-connection\-\_\-get} (\hyperlink{group__Eldbus__Conneciton_ga96d3b961928850a93a8ab18ba3b2a14b}{Eldbus\-\_\-\-Connection\-\_\-\-Type} type)
\begin{DoxyCompactList}\small\item\em Always create and establish a new connection to bus and integrate it with the ecore main loop. \end{DoxyCompactList}\item 
\hyperlink{group__Eldbus__Core_ga5f0557a7e65ed263fcc1678874b8f7e7}{Eldbus\-\_\-\-Connection} $\ast$ \hyperlink{group__Eldbus__Conneciton_ga7e244d68506ffe635774e55c6d03ab69}{eldbus\-\_\-address\-\_\-connection\-\_\-get} (const char $\ast$address)
\begin{DoxyCompactList}\small\item\em Establish a connection to bus and integrate it with the ecore main loop. \end{DoxyCompactList}\item 
\hyperlink{group__Eldbus__Core_ga5f0557a7e65ed263fcc1678874b8f7e7}{Eldbus\-\_\-\-Connection} $\ast$ \hyperlink{group__Eldbus__Conneciton_gabc61af0bc3dd0964cd0ca1d9cc3d62f4}{eldbus\-\_\-private\-\_\-address\-\_\-connection\-\_\-get} (const char $\ast$address)
\begin{DoxyCompactList}\small\item\em Always create and establish a new connection to bus and integrate it with the ecore main loop. \end{DoxyCompactList}\item 
\hyperlink{group__Eldbus__Core_ga5f0557a7e65ed263fcc1678874b8f7e7}{Eldbus\-\_\-\-Connection} $\ast$ \hyperlink{group__Eldbus__Conneciton_gaef5a01de909c35d4ba3311ed4440c19a}{eldbus\-\_\-connection\-\_\-ref} (\hyperlink{group__Eldbus__Core_ga5f0557a7e65ed263fcc1678874b8f7e7}{Eldbus\-\_\-\-Connection} $\ast$conn)
\begin{DoxyCompactList}\small\item\em Increment connection reference count. \end{DoxyCompactList}\item 
void \hyperlink{group__Eldbus__Conneciton_ga1c035aac8b601b416bba11d0d68f80ae}{eldbus\-\_\-connection\-\_\-unref} (\hyperlink{group__Eldbus__Core_ga5f0557a7e65ed263fcc1678874b8f7e7}{Eldbus\-\_\-\-Connection} $\ast$conn)
\begin{DoxyCompactList}\small\item\em Decrement connection reference count. \end{DoxyCompactList}\item 
void \hyperlink{group__Eldbus__Conneciton_ga874b0b096f5d260ba1560120f80ee31e}{eldbus\-\_\-connection\-\_\-free\-\_\-cb\-\_\-add} (\hyperlink{group__Eldbus__Core_ga5f0557a7e65ed263fcc1678874b8f7e7}{Eldbus\-\_\-\-Connection} $\ast$conn, Eldbus\-\_\-\-Free\-\_\-\-Cb cb, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Add a callback function to be called when connection is freed. \end{DoxyCompactList}\item 
\hypertarget{group__Eldbus__Conneciton_ga58345e6a16fe319d0e4c2a7dd6698c75}{void \hyperlink{group__Eldbus__Conneciton_ga58345e6a16fe319d0e4c2a7dd6698c75}{eldbus\-\_\-connection\-\_\-free\-\_\-cb\-\_\-del} (\hyperlink{group__Eldbus__Core_ga5f0557a7e65ed263fcc1678874b8f7e7}{Eldbus\-\_\-\-Connection} $\ast$conn, Eldbus\-\_\-\-Free\-\_\-\-Cb cb, const void $\ast$data)}\label{group__Eldbus__Conneciton_ga58345e6a16fe319d0e4c2a7dd6698c75}

\begin{DoxyCompactList}\small\item\em Remove callback registered in \hyperlink{group__Eldbus__Conneciton_ga874b0b096f5d260ba1560120f80ee31e}{eldbus\-\_\-connection\-\_\-free\-\_\-cb\-\_\-add()}. \end{DoxyCompactList}\item 
void \hyperlink{group__Eldbus__Conneciton_gab6f681544b210e5ab730968722cdd2f9}{eldbus\-\_\-connection\-\_\-data\-\_\-set} (\hyperlink{group__Eldbus__Core_ga5f0557a7e65ed263fcc1678874b8f7e7}{Eldbus\-\_\-\-Connection} $\ast$conn, const char $\ast$key, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Set an attached data pointer to an object with a given string key. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{group__Eldbus__Conneciton_gae105d74f20e5502ce7e30f0f54652ff3}{eldbus\-\_\-connection\-\_\-data\-\_\-get} (const \hyperlink{group__Eldbus__Core_ga5f0557a7e65ed263fcc1678874b8f7e7}{Eldbus\-\_\-\-Connection} $\ast$conn, const char $\ast$key)
\begin{DoxyCompactList}\small\item\em Get data stored in connection. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{group__Eldbus__Conneciton_ga99fc191ceee65794bc63fc6cf1bb1522}{eldbus\-\_\-connection\-\_\-data\-\_\-del} (\hyperlink{group__Eldbus__Core_ga5f0557a7e65ed263fcc1678874b8f7e7}{Eldbus\-\_\-\-Connection} $\ast$conn, const char $\ast$key)
\begin{DoxyCompactList}\small\item\em Del data stored in connection. \end{DoxyCompactList}\item 
\hypertarget{group__Eldbus__Conneciton_ga1ddabae0241a4eb37ac6281ae831b19e}{void \hyperlink{group__Eldbus__Conneciton_ga1ddabae0241a4eb37ac6281ae831b19e}{eldbus\-\_\-connection\-\_\-event\-\_\-callback\-\_\-add} (\hyperlink{group__Eldbus__Core_ga5f0557a7e65ed263fcc1678874b8f7e7}{Eldbus\-\_\-\-Connection} $\ast$conn, \hyperlink{group__Eldbus__Conneciton_ga30dc901a63a70ea39c293e1070b7baae}{Eldbus\-\_\-\-Connection\-\_\-\-Event\-\_\-\-Type} type, Eldbus\-\_\-\-Connection\-\_\-\-Event\-\_\-\-Cb cb, const void $\ast$cb\-\_\-data)}\label{group__Eldbus__Conneciton_ga1ddabae0241a4eb37ac6281ae831b19e}

\begin{DoxyCompactList}\small\item\em Add a callback function to be called when an event occurs of the type passed. \end{DoxyCompactList}\item 
\hypertarget{group__Eldbus__Conneciton_ga118e1c20600b6bdbc9d6471a2089b267}{void \hyperlink{group__Eldbus__Conneciton_ga118e1c20600b6bdbc9d6471a2089b267}{eldbus\-\_\-connection\-\_\-event\-\_\-callback\-\_\-del} (\hyperlink{group__Eldbus__Core_ga5f0557a7e65ed263fcc1678874b8f7e7}{Eldbus\-\_\-\-Connection} $\ast$conn, \hyperlink{group__Eldbus__Conneciton_ga30dc901a63a70ea39c293e1070b7baae}{Eldbus\-\_\-\-Connection\-\_\-\-Event\-\_\-\-Type} type, Eldbus\-\_\-\-Connection\-\_\-\-Event\-\_\-\-Cb cb, const void $\ast$cb\-\_\-data)}\label{group__Eldbus__Conneciton_ga118e1c20600b6bdbc9d6471a2089b267}

\begin{DoxyCompactList}\small\item\em Remove callback registered in \hyperlink{group__Eldbus__Conneciton_ga1ddabae0241a4eb37ac6281ae831b19e}{eldbus\-\_\-connection\-\_\-event\-\_\-callback\-\_\-add()}. \end{DoxyCompactList}\item 
\hyperlink{group__Eldbus__Core_ga7a5d4dc070bd925034de6e52c4260be7}{Eldbus\-\_\-\-Pending} $\ast$ \hyperlink{group__Eldbus__Conneciton_ga6f68ce1504eece1d7e54fa08804d7b85}{eldbus\-\_\-connection\-\_\-send} (\hyperlink{group__Eldbus__Core_ga5f0557a7e65ed263fcc1678874b8f7e7}{Eldbus\-\_\-\-Connection} $\ast$conn, \hyperlink{group__Eldbus__Core_ga14e8c4d4b96af5fb8bb5c66dc315593a}{Eldbus\-\_\-\-Message} $\ast$msg, Eldbus\-\_\-\-Message\-\_\-\-Cb cb, const void $\ast$cb\-\_\-data, double timeout)
\begin{DoxyCompactList}\small\item\em Send a message. \end{DoxyCompactList}\item 
const char $\ast$ \hyperlink{group__Eldbus__Conneciton_ga584e6faee9938ebe494ed4f88d056b2b}{eldbus\-\_\-connection\-\_\-unique\-\_\-name\-\_\-get} (\hyperlink{group__Eldbus__Core_ga5f0557a7e65ed263fcc1678874b8f7e7}{Eldbus\-\_\-\-Connection} $\ast$conn)
\begin{DoxyCompactList}\small\item\em Gets unique name assigned by the message bus. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}


\subsection{Enumeration Type Documentation}
\hypertarget{group__Eldbus__Conneciton_ga96d3b961928850a93a8ab18ba3b2a14b}{\index{Connection@{Connection}!Eldbus\-\_\-\-Connection\-\_\-\-Type@{Eldbus\-\_\-\-Connection\-\_\-\-Type}}
\index{Eldbus\-\_\-\-Connection\-\_\-\-Type@{Eldbus\-\_\-\-Connection\-\_\-\-Type}!Connection@{Connection}}
\subsubsection[{Eldbus\-\_\-\-Connection\-\_\-\-Type}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf Eldbus\-\_\-\-Connection\-\_\-\-Type}}}\label{group__Eldbus__Conneciton_ga96d3b961928850a93a8ab18ba3b2a14b}
\begin{Desc}
\item[Enumerator]\par
\begin{description}
\index{E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-U\-N\-K\-N\-O\-W\-N@{E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-U\-N\-K\-N\-O\-W\-N}!Connection@{Connection}}\index{Connection@{Connection}!E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-U\-N\-K\-N\-O\-W\-N@{E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-U\-N\-K\-N\-O\-W\-N}}\item[{\em 
\hypertarget{group__Eldbus__Conneciton_gga96d3b961928850a93a8ab18ba3b2a14ba3ef6f1bb011dcce46485dcea4029871c}{E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-U\-N\-K\-N\-O\-W\-N}\label{group__Eldbus__Conneciton_gga96d3b961928850a93a8ab18ba3b2a14ba3ef6f1bb011dcce46485dcea4029871c}
}]sentinel, not a real type \index{E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-L\-A\-S\-T@{E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-L\-A\-S\-T}!Connection@{Connection}}\index{Connection@{Connection}!E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-L\-A\-S\-T@{E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-L\-A\-S\-T}}\item[{\em 
\hypertarget{group__Eldbus__Conneciton_gga96d3b961928850a93a8ab18ba3b2a14baa29913f72c3c5e7b789e64cdb44c2e3f}{E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-L\-A\-S\-T}\label{group__Eldbus__Conneciton_gga96d3b961928850a93a8ab18ba3b2a14baa29913f72c3c5e7b789e64cdb44c2e3f}
}]sentinel, not a real type \end{description}
\end{Desc}
\hypertarget{group__Eldbus__Conneciton_ga30dc901a63a70ea39c293e1070b7baae}{\index{Connection@{Connection}!Eldbus\-\_\-\-Connection\-\_\-\-Event\-\_\-\-Type@{Eldbus\-\_\-\-Connection\-\_\-\-Event\-\_\-\-Type}}
\index{Eldbus\-\_\-\-Connection\-\_\-\-Event\-\_\-\-Type@{Eldbus\-\_\-\-Connection\-\_\-\-Event\-\_\-\-Type}!Connection@{Connection}}
\subsubsection[{Eldbus\-\_\-\-Connection\-\_\-\-Event\-\_\-\-Type}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf Eldbus\-\_\-\-Connection\-\_\-\-Event\-\_\-\-Type}}}\label{group__Eldbus__Conneciton_ga30dc901a63a70ea39c293e1070b7baae}
\begin{Desc}
\item[Enumerator]\par
\begin{description}
\index{E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-E\-V\-E\-N\-T\-\_\-\-L\-A\-S\-T@{E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-E\-V\-E\-N\-T\-\_\-\-L\-A\-S\-T}!Connection@{Connection}}\index{Connection@{Connection}!E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-E\-V\-E\-N\-T\-\_\-\-L\-A\-S\-T@{E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-E\-V\-E\-N\-T\-\_\-\-L\-A\-S\-T}}\item[{\em 
\hypertarget{group__Eldbus__Conneciton_gga30dc901a63a70ea39c293e1070b7baaea7c976018cfff8e3fe5d1366b76e4f3da}{E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-E\-V\-E\-N\-T\-\_\-\-L\-A\-S\-T}\label{group__Eldbus__Conneciton_gga30dc901a63a70ea39c293e1070b7baaea7c976018cfff8e3fe5d1366b76e4f3da}
}]sentinel, not a real event type \end{description}
\end{Desc}


\subsection{Function Documentation}
\hypertarget{group__Eldbus__Conneciton_ga203ec794fc0c7e1bddce4eb18b628c04}{\index{Connection@{Connection}!eldbus\-\_\-connection\-\_\-get@{eldbus\-\_\-connection\-\_\-get}}
\index{eldbus\-\_\-connection\-\_\-get@{eldbus\-\_\-connection\-\_\-get}!Connection@{Connection}}
\subsubsection[{eldbus\-\_\-connection\-\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eldbus\-\_\-\-Connection}$\ast$ eldbus\-\_\-connection\-\_\-get (
\begin{DoxyParamCaption}
\item[{{\bf Eldbus\-\_\-\-Connection\-\_\-\-Type}}]{type}
\end{DoxyParamCaption}
)}}\label{group__Eldbus__Conneciton_ga203ec794fc0c7e1bddce4eb18b628c04}


Establish a connection to bus and integrate it with the ecore main loop. 

If a connection of given type was already created before, its reference counter is incremented and the connection is returned.


\begin{DoxyParams}{Parameters}
{\em type} & type of connection e.\-g E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-S\-E\-S\-S\-I\-O\-N, E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-S\-Y\-S\-T\-E\-M or E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-S\-T\-A\-R\-T\-E\-R\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
connection with bus 
\end{DoxyReturn}
\begin{Desc}
\item[Examples\-: ]\par
\hyperlink{banshee_8c-example}{banshee.\-c}, \hyperlink{client_8c-example}{client.\-c}, \hyperlink{complex-types-client-eina-value_8c-example}{complex-\/types-\/client-\/eina-\/value.\-c}, \hyperlink{complex-types-server_8c-example}{complex-\/types-\/server.\-c}, \hyperlink{complex-types_8c-example}{complex-\/types.\-c}, \hyperlink{connman-list-services_8c-example}{connman-\/list-\/services.\-c}, \hyperlink{ofono-dial_8c-example}{ofono-\/dial.\-c}, \hyperlink{server_8c-example}{server.\-c}, and \hyperlink{simple-signal-emit_8c-example}{simple-\/signal-\/emit.\-c}.\end{Desc}


References eldbus\-\_\-connection\-\_\-ref().



Referenced by ethumb\-\_\-client\-\_\-connect().

\hypertarget{group__Eldbus__Conneciton_ga182ef2e5fc99983b0122b1da0ea842b0}{\index{Connection@{Connection}!eldbus\-\_\-private\-\_\-connection\-\_\-get@{eldbus\-\_\-private\-\_\-connection\-\_\-get}}
\index{eldbus\-\_\-private\-\_\-connection\-\_\-get@{eldbus\-\_\-private\-\_\-connection\-\_\-get}!Connection@{Connection}}
\subsubsection[{eldbus\-\_\-private\-\_\-connection\-\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eldbus\-\_\-\-Connection}$\ast$ eldbus\-\_\-private\-\_\-connection\-\_\-get (
\begin{DoxyParamCaption}
\item[{{\bf Eldbus\-\_\-\-Connection\-\_\-\-Type}}]{type}
\end{DoxyParamCaption}
)}}\label{group__Eldbus__Conneciton_ga182ef2e5fc99983b0122b1da0ea842b0}


Always create and establish a new connection to bus and integrate it with the ecore main loop. 

Differently from \hyperlink{group__Eldbus__Conneciton_ga203ec794fc0c7e1bddce4eb18b628c04}{eldbus\-\_\-connection\-\_\-get()}, this function guarantees to create a new connection to the D-\/\-Bus daemon and the connection is not shared by any means.


\begin{DoxyParams}{Parameters}
{\em type} & type of connection e.\-g E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-S\-E\-S\-S\-I\-O\-N, E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-S\-Y\-S\-T\-E\-M or E\-L\-D\-B\-U\-S\-\_\-\-C\-O\-N\-N\-E\-C\-T\-I\-O\-N\-\_\-\-T\-Y\-P\-E\-\_\-\-S\-T\-A\-R\-T\-E\-R\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
connection with bus 
\end{DoxyReturn}
\hypertarget{group__Eldbus__Conneciton_ga7e244d68506ffe635774e55c6d03ab69}{\index{Connection@{Connection}!eldbus\-\_\-address\-\_\-connection\-\_\-get@{eldbus\-\_\-address\-\_\-connection\-\_\-get}}
\index{eldbus\-\_\-address\-\_\-connection\-\_\-get@{eldbus\-\_\-address\-\_\-connection\-\_\-get}!Connection@{Connection}}
\subsubsection[{eldbus\-\_\-address\-\_\-connection\-\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eldbus\-\_\-\-Connection}$\ast$ eldbus\-\_\-address\-\_\-connection\-\_\-get (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{address}
\end{DoxyParamCaption}
)}}\label{group__Eldbus__Conneciton_ga7e244d68506ffe635774e55c6d03ab69}


Establish a connection to bus and integrate it with the ecore main loop. 

If a connection of given type was already created before, its reference counter is incremented and the connection is returned.


\begin{DoxyParams}{Parameters}
{\em address} & the address which will be passed to dbus\-\_\-connection\-\_\-open()\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
connection with bus 
\end{DoxyReturn}


References eina\-\_\-hash\-\_\-add(), eina\-\_\-hash\-\_\-find(), eina\-\_\-hash\-\_\-string\-\_\-small\-\_\-new(), and eldbus\-\_\-connection\-\_\-ref().

\hypertarget{group__Eldbus__Conneciton_gabc61af0bc3dd0964cd0ca1d9cc3d62f4}{\index{Connection@{Connection}!eldbus\-\_\-private\-\_\-address\-\_\-connection\-\_\-get@{eldbus\-\_\-private\-\_\-address\-\_\-connection\-\_\-get}}
\index{eldbus\-\_\-private\-\_\-address\-\_\-connection\-\_\-get@{eldbus\-\_\-private\-\_\-address\-\_\-connection\-\_\-get}!Connection@{Connection}}
\subsubsection[{eldbus\-\_\-private\-\_\-address\-\_\-connection\-\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eldbus\-\_\-\-Connection}$\ast$ eldbus\-\_\-private\-\_\-address\-\_\-connection\-\_\-get (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{address}
\end{DoxyParamCaption}
)}}\label{group__Eldbus__Conneciton_gabc61af0bc3dd0964cd0ca1d9cc3d62f4}


Always create and establish a new connection to bus and integrate it with the ecore main loop. 

Differently from \hyperlink{group__Eldbus__Conneciton_ga203ec794fc0c7e1bddce4eb18b628c04}{eldbus\-\_\-connection\-\_\-get()}, this function guarantees to create a new connection to the D-\/\-Bus daemon and the connection is not shared by any means.


\begin{DoxyParams}{Parameters}
{\em address} & the address which will be passed to dbus\-\_\-connection\-\_\-open\-\_\-private()\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
connection with bus 
\end{DoxyReturn}
\hypertarget{group__Eldbus__Conneciton_gaef5a01de909c35d4ba3311ed4440c19a}{\index{Connection@{Connection}!eldbus\-\_\-connection\-\_\-ref@{eldbus\-\_\-connection\-\_\-ref}}
\index{eldbus\-\_\-connection\-\_\-ref@{eldbus\-\_\-connection\-\_\-ref}!Connection@{Connection}}
\subsubsection[{eldbus\-\_\-connection\-\_\-ref}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eldbus\-\_\-\-Connection}$\ast$ eldbus\-\_\-connection\-\_\-ref (
\begin{DoxyParamCaption}
\item[{{\bf Eldbus\-\_\-\-Connection} $\ast$}]{conn}
\end{DoxyParamCaption}
)}}\label{group__Eldbus__Conneciton_gaef5a01de909c35d4ba3311ed4440c19a}


Increment connection reference count. 


\begin{DoxyParams}{Parameters}
{\em conn} & The given Eldbus\-\_\-\-Connection object to reference \\
\hline
\end{DoxyParams}


Referenced by eldbus\-\_\-address\-\_\-connection\-\_\-get(), and eldbus\-\_\-connection\-\_\-get().

\hypertarget{group__Eldbus__Conneciton_ga1c035aac8b601b416bba11d0d68f80ae}{\index{Connection@{Connection}!eldbus\-\_\-connection\-\_\-unref@{eldbus\-\_\-connection\-\_\-unref}}
\index{eldbus\-\_\-connection\-\_\-unref@{eldbus\-\_\-connection\-\_\-unref}!Connection@{Connection}}
\subsubsection[{eldbus\-\_\-connection\-\_\-unref}]{\setlength{\rightskip}{0pt plus 5cm}void eldbus\-\_\-connection\-\_\-unref (
\begin{DoxyParamCaption}
\item[{{\bf Eldbus\-\_\-\-Connection} $\ast$}]{conn}
\end{DoxyParamCaption}
)}}\label{group__Eldbus__Conneciton_ga1c035aac8b601b416bba11d0d68f80ae}


Decrement connection reference count. 

If reference count reaches 0, the connection to bus will be dropped and all its children will be invalidated. \begin{Desc}
\item[Examples\-: ]\par
\hyperlink{banshee_8c-example}{banshee.\-c}, \hyperlink{client_8c-example}{client.\-c}, \hyperlink{complex-types-client-eina-value_8c-example}{complex-\/types-\/client-\/eina-\/value.\-c}, \hyperlink{complex-types-server_8c-example}{complex-\/types-\/server.\-c}, \hyperlink{complex-types_8c-example}{complex-\/types.\-c}, \hyperlink{connman-list-services_8c-example}{connman-\/list-\/services.\-c}, \hyperlink{ofono-dial_8c-example}{ofono-\/dial.\-c}, \hyperlink{server_8c-example}{server.\-c}, and \hyperlink{simple-signal-emit_8c-example}{simple-\/signal-\/emit.\-c}.\end{Desc}
\hypertarget{group__Eldbus__Conneciton_ga874b0b096f5d260ba1560120f80ee31e}{\index{Connection@{Connection}!eldbus\-\_\-connection\-\_\-free\-\_\-cb\-\_\-add@{eldbus\-\_\-connection\-\_\-free\-\_\-cb\-\_\-add}}
\index{eldbus\-\_\-connection\-\_\-free\-\_\-cb\-\_\-add@{eldbus\-\_\-connection\-\_\-free\-\_\-cb\-\_\-add}!Connection@{Connection}}
\subsubsection[{eldbus\-\_\-connection\-\_\-free\-\_\-cb\-\_\-add}]{\setlength{\rightskip}{0pt plus 5cm}void eldbus\-\_\-connection\-\_\-free\-\_\-cb\-\_\-add (
\begin{DoxyParamCaption}
\item[{{\bf Eldbus\-\_\-\-Connection} $\ast$}]{conn, }
\item[{Eldbus\-\_\-\-Free\-\_\-\-Cb}]{cb, }
\item[{const void $\ast$}]{data}
\end{DoxyParamCaption}
)}}\label{group__Eldbus__Conneciton_ga874b0b096f5d260ba1560120f80ee31e}


Add a callback function to be called when connection is freed. 


\begin{DoxyParams}{Parameters}
{\em conn} & The connection object to add the callback to. \\
\hline
{\em cb} & callback to be called \\
\hline
{\em data} & data passed to callback \\
\hline
\end{DoxyParams}


Referenced by eldbus\-\_\-object\-\_\-get(), and eldbus\-\_\-signal\-\_\-handler\-\_\-add().

\hypertarget{group__Eldbus__Conneciton_gab6f681544b210e5ab730968722cdd2f9}{\index{Connection@{Connection}!eldbus\-\_\-connection\-\_\-data\-\_\-set@{eldbus\-\_\-connection\-\_\-data\-\_\-set}}
\index{eldbus\-\_\-connection\-\_\-data\-\_\-set@{eldbus\-\_\-connection\-\_\-data\-\_\-set}!Connection@{Connection}}
\subsubsection[{eldbus\-\_\-connection\-\_\-data\-\_\-set}]{\setlength{\rightskip}{0pt plus 5cm}void eldbus\-\_\-connection\-\_\-data\-\_\-set (
\begin{DoxyParamCaption}
\item[{{\bf Eldbus\-\_\-\-Connection} $\ast$}]{conn, }
\item[{const char $\ast$}]{key, }
\item[{const void $\ast$}]{data}
\end{DoxyParamCaption}
)}}\label{group__Eldbus__Conneciton_gab6f681544b210e5ab730968722cdd2f9}


Set an attached data pointer to an object with a given string key. 


\begin{DoxyParams}{Parameters}
{\em conn} & The connection object to store data to \\
\hline
{\em key} & to identify data \\
\hline
{\em data} & data that will be stored \\
\hline
\end{DoxyParams}
\hypertarget{group__Eldbus__Conneciton_gae105d74f20e5502ce7e30f0f54652ff3}{\index{Connection@{Connection}!eldbus\-\_\-connection\-\_\-data\-\_\-get@{eldbus\-\_\-connection\-\_\-data\-\_\-get}}
\index{eldbus\-\_\-connection\-\_\-data\-\_\-get@{eldbus\-\_\-connection\-\_\-data\-\_\-get}!Connection@{Connection}}
\subsubsection[{eldbus\-\_\-connection\-\_\-data\-\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ eldbus\-\_\-connection\-\_\-data\-\_\-get (
\begin{DoxyParamCaption}
\item[{const {\bf Eldbus\-\_\-\-Connection} $\ast$}]{conn, }
\item[{const char $\ast$}]{key}
\end{DoxyParamCaption}
)}}\label{group__Eldbus__Conneciton_gae105d74f20e5502ce7e30f0f54652ff3}


Get data stored in connection. 


\begin{DoxyParams}{Parameters}
{\em conn} & connection where data is stored \\
\hline
{\em key} & key that identifies data\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to data if found otherwise N\-U\-L\-L 
\end{DoxyReturn}
\hypertarget{group__Eldbus__Conneciton_ga99fc191ceee65794bc63fc6cf1bb1522}{\index{Connection@{Connection}!eldbus\-\_\-connection\-\_\-data\-\_\-del@{eldbus\-\_\-connection\-\_\-data\-\_\-del}}
\index{eldbus\-\_\-connection\-\_\-data\-\_\-del@{eldbus\-\_\-connection\-\_\-data\-\_\-del}!Connection@{Connection}}
\subsubsection[{eldbus\-\_\-connection\-\_\-data\-\_\-del}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ eldbus\-\_\-connection\-\_\-data\-\_\-del (
\begin{DoxyParamCaption}
\item[{{\bf Eldbus\-\_\-\-Connection} $\ast$}]{conn, }
\item[{const char $\ast$}]{key}
\end{DoxyParamCaption}
)}}\label{group__Eldbus__Conneciton_ga99fc191ceee65794bc63fc6cf1bb1522}


Del data stored in connection. 


\begin{DoxyParams}{Parameters}
{\em conn} & connection where data is stored \\
\hline
{\em key} & that identifies data\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to data if found otherwise N\-U\-L\-L 
\end{DoxyReturn}
\hypertarget{group__Eldbus__Conneciton_ga6f68ce1504eece1d7e54fa08804d7b85}{\index{Connection@{Connection}!eldbus\-\_\-connection\-\_\-send@{eldbus\-\_\-connection\-\_\-send}}
\index{eldbus\-\_\-connection\-\_\-send@{eldbus\-\_\-connection\-\_\-send}!Connection@{Connection}}
\subsubsection[{eldbus\-\_\-connection\-\_\-send}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eldbus\-\_\-\-Pending}$\ast$ eldbus\-\_\-connection\-\_\-send (
\begin{DoxyParamCaption}
\item[{{\bf Eldbus\-\_\-\-Connection} $\ast$}]{conn, }
\item[{{\bf Eldbus\-\_\-\-Message} $\ast$}]{msg, }
\item[{Eldbus\-\_\-\-Message\-\_\-\-Cb}]{cb, }
\item[{const void $\ast$}]{cb\-\_\-data, }
\item[{double}]{timeout}
\end{DoxyParamCaption}
)}}\label{group__Eldbus__Conneciton_ga6f68ce1504eece1d7e54fa08804d7b85}


Send a message. 


\begin{DoxyParams}{Parameters}
{\em conn} & the connection where the message will be sent \\
\hline
{\em msg} & message that will be sent \\
\hline
{\em cb} & if msg is a method call a callback should be passed to be executed when a response arrives \\
\hline
{\em cb\-\_\-data} & data passed to callback \\
\hline
{\em timeout} & timeout in milliseconds, -\/1 to use default internal value or E\-L\-D\-B\-U\-S\-\_\-\-T\-I\-M\-E\-O\-U\-T\-\_\-\-I\-N\-F\-I\-N\-I\-T\-E for no timeout \\
\hline
\end{DoxyParams}
\begin{Desc}
\item[Examples\-: ]\par
\hyperlink{server_8c-example}{server.\-c}.\end{Desc}


References eldbus\-\_\-pending\-\_\-free\-\_\-cb\-\_\-add().

\hypertarget{group__Eldbus__Conneciton_ga584e6faee9938ebe494ed4f88d056b2b}{\index{Connection@{Connection}!eldbus\-\_\-connection\-\_\-unique\-\_\-name\-\_\-get@{eldbus\-\_\-connection\-\_\-unique\-\_\-name\-\_\-get}}
\index{eldbus\-\_\-connection\-\_\-unique\-\_\-name\-\_\-get@{eldbus\-\_\-connection\-\_\-unique\-\_\-name\-\_\-get}!Connection@{Connection}}
\subsubsection[{eldbus\-\_\-connection\-\_\-unique\-\_\-name\-\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ eldbus\-\_\-connection\-\_\-unique\-\_\-name\-\_\-get (
\begin{DoxyParamCaption}
\item[{{\bf Eldbus\-\_\-\-Connection} $\ast$}]{conn}
\end{DoxyParamCaption}
)}}\label{group__Eldbus__Conneciton_ga584e6faee9938ebe494ed4f88d056b2b}


Gets unique name assigned by the message bus. 


\begin{DoxyParams}{Parameters}
{\em conn} & connection object to get unique name from.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to unique name string or N\-U\-L\-L or error. Returned value remains valid until connection is free. 
\end{DoxyReturn}
