\hypertarget{group__Ethumb__Client__Basics}{\section{Ethumb Client Basics}
\label{group__Ethumb__Client__Basics}\index{Ethumb Client Basics@{Ethumb Client Basics}}
}


Functions that all users must know of to use Ethumb\+\_\+\+Client.  


\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \+\_\+\+Ethumb\+\_\+\+Client \hyperlink{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}{Ethumb\+\_\+\+Client}
\begin{DoxyCompactList}\small\item\em client handle. \end{DoxyCompactList}\item 
typedef struct \+\_\+\+Ethumb\+\_\+\+Exists \hyperlink{group__Ethumb__Client__Basics_ga6f207317e558e9a273ca60b1c7d1cab2}{Ethumb\+\_\+\+Exists}
\begin{DoxyCompactList}\small\item\em client exists request handle. \end{DoxyCompactList}\item 
typedef void($\ast$ \hyperlink{group__Ethumb__Client__Basics_ga2d8acc1a2c3b4ada63ba8bf22f7815c3}{Ethumb\+\_\+\+Client\+\_\+\+Connect\+\_\+\+Cb} )(void $\ast$data, \hyperlink{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}{Ethumb\+\_\+\+Client} $\ast$client, \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} success)
\begin{DoxyCompactList}\small\item\em reports results of \hyperlink{group__Ethumb__Client__Basics_gae642a2b632953f0dd2d72bcb8ae19377}{ethumb\+\_\+client\+\_\+connect()} \end{DoxyCompactList}\item 
typedef void($\ast$ \hyperlink{group__Ethumb__Client__Basics_gae09bc643b3862544752897c19e7ef739}{Ethumb\+\_\+\+Client\+\_\+\+Die\+\_\+\+Cb} )(void $\ast$data, \hyperlink{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}{Ethumb\+\_\+\+Client} $\ast$client)
\begin{DoxyCompactList}\small\item\em reports server connection ended. \end{DoxyCompactList}\item 
typedef void($\ast$ \hyperlink{group__Ethumb__Client__Basics_gaeabf9cae8c993b41af1cebaca085ffa2}{Ethumb\+\_\+\+Client\+\_\+\+Generate\+\_\+\+Cb} )(void $\ast$data, \hyperlink{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}{Ethumb\+\_\+\+Client} $\ast$client, int id, const char $\ast$file, const char $\ast$key, const char $\ast$thumb\+\_\+path, const char $\ast$thumb\+\_\+key, \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} success)
\begin{DoxyCompactList}\small\item\em reports results of \hyperlink{group__Ethumb__Client__Basics_gaa09f3c82539082042f47196c47ef8251}{ethumb\+\_\+client\+\_\+generate()}. \end{DoxyCompactList}\item 
typedef void($\ast$ \hyperlink{group__Ethumb__Client__Basics_gab500683ca59d896307b375f066a6f696}{Ethumb\+\_\+\+Client\+\_\+\+Thumb\+\_\+\+Exists\+\_\+\+Cb} )(void $\ast$data, \hyperlink{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}{Ethumb\+\_\+\+Client} $\ast$client, \hyperlink{group__Ethumb__Client__Basics_ga6f207317e558e9a273ca60b1c7d1cab2}{Ethumb\+\_\+\+Exists} $\ast$thread, \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} exists)
\begin{DoxyCompactList}\small\item\em report results of \hyperlink{group__Ethumb__Client__Basics_ga77e6ec3b0e2d1c99a524399da6a24012}{ethumb\+\_\+client\+\_\+thumb\+\_\+exists()}. \end{DoxyCompactList}\item 
typedef void($\ast$ \hyperlink{group__Ethumb__Client__Basics_gabe2b0c6ad1b23be128efea1376d21302}{Ethumb\+\_\+\+Client\+\_\+\+Generate\+\_\+\+Cancel\+\_\+\+Cb} )(void $\ast$data, \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} success)
\begin{DoxyCompactList}\small\item\em reports results of \hyperlink{group__Ethumb__Client__Basics_ga55fad34988a1cde2962141e25c5b26c5}{ethumb\+\_\+client\+\_\+generate\+\_\+cancel()} \end{DoxyCompactList}\item 
\hypertarget{group__Ethumb__Client__Basics_gab4872bb8c99674ff412dc557ac5daeae}{typedef void($\ast$ {\bfseries Ethumb\+\_\+\+Client\+\_\+\+Async\+\_\+\+Done\+\_\+\+Cb} )(\hyperlink{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}{Ethumb\+\_\+\+Client} $\ast$ethumbd, const char $\ast$thumb\+\_\+path, const char $\ast$thumb\+\_\+key, void $\ast$data)}\label{group__Ethumb__Client__Basics_gab4872bb8c99674ff412dc557ac5daeae}

\item 
\hypertarget{group__Ethumb__Client__Basics_ga2405d07cc9a79e16a93d214fa1c25d9d}{typedef void($\ast$ {\bfseries Ethumb\+\_\+\+Client\+\_\+\+Async\+\_\+\+Error\+\_\+\+Cb} )(\hyperlink{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}{Ethumb\+\_\+\+Client} $\ast$ethumbd, void $\ast$data)}\label{group__Ethumb__Client__Basics_ga2405d07cc9a79e16a93d214fa1c25d9d}

\item 
\hypertarget{group__Ethumb__Client__Basics_ga52b70260ffc774e8935441d68ccab9d2}{typedef struct \+\_\+\+Ethumb\+\_\+\+Client\+\_\+\+Async {\bfseries Ethumb\+\_\+\+Client\+\_\+\+Async}}\label{group__Ethumb__Client__Basics_ga52b70260ffc774e8935441d68ccab9d2}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} int \hyperlink{group__Ethumb__Client__Basics_ga64c23fe86d0bce53c9eeaacbe4834c7f}{ethumb\+\_\+client\+\_\+init} (void)
\begin{DoxyCompactList}\small\item\em Initialize the Ethumb\+\_\+\+Client library. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} int \hyperlink{group__Ethumb__Client__Basics_ga1e32e798f7465f9f699ff4e66e323381}{ethumb\+\_\+client\+\_\+shutdown} (void)
\begin{DoxyCompactList}\small\item\em Shut down the Ethumb\+\_\+\+Client library. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}{Ethumb\+\_\+\+Client} $\ast$ \hyperlink{group__Ethumb__Client__Basics_gae642a2b632953f0dd2d72bcb8ae19377}{ethumb\+\_\+client\+\_\+connect} (\hyperlink{group__Ethumb__Client__Basics_ga2d8acc1a2c3b4ada63ba8bf22f7815c3}{Ethumb\+\_\+\+Client\+\_\+\+Connect\+\_\+\+Cb} connect\+\_\+cb, const void $\ast$data, \hyperlink{group__Eina__Types__Group_gadbac560ba2bca5c61d97bfbb542018f3}{Eina\+\_\+\+Free\+\_\+\+Cb} free\+\_\+data)
\begin{DoxyCompactList}\small\item\em Connects to Ethumb server and return the client instance. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__Ethumb__Client__Basics_ga23330db7a756b6ba8026b1bb33ce720d}{ethumb\+\_\+client\+\_\+disconnect} (\hyperlink{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}{Ethumb\+\_\+\+Client} $\ast$client)
\begin{DoxyCompactList}\small\item\em Disconnect the client, releasing all client resources. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__Ethumb__Client__Basics_ga453c18b2df77d5cdbaf367587580ae83}{ethumb\+\_\+client\+\_\+on\+\_\+server\+\_\+die\+\_\+callback\+\_\+set} (\hyperlink{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}{Ethumb\+\_\+\+Client} $\ast$client, \hyperlink{group__Ethumb__Client__Basics_gae09bc643b3862544752897c19e7ef739}{Ethumb\+\_\+\+Client\+\_\+\+Die\+\_\+\+Cb} server\+\_\+die\+\_\+cb, const void $\ast$data, \hyperlink{group__Eina__Types__Group_gadbac560ba2bca5c61d97bfbb542018f3}{Eina\+\_\+\+Free\+\_\+\+Cb} free\+\_\+data)
\begin{DoxyCompactList}\small\item\em Sets the callback to report server died. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Ethumb__Client__Basics_gaf1bfc6777a81a1141391f87b0acaadc2}{ethumb\+\_\+client\+\_\+file\+\_\+set} (\hyperlink{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}{Ethumb\+\_\+\+Client} $\ast$client, const char $\ast$path, const char $\ast$key)
\begin{DoxyCompactList}\small\item\em Set source file to be thumbnailed. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__Ethumb__Client__Basics_gace6930ae055ed155f2b161ba5e83b2d8}{ethumb\+\_\+client\+\_\+file\+\_\+get} (\hyperlink{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}{Ethumb\+\_\+\+Client} $\ast$client, const char $\ast$$\ast$path, const char $\ast$$\ast$key)
\begin{DoxyCompactList}\small\item\em Get values set with \hyperlink{group__Ethumb__Client__Basics_gace6930ae055ed155f2b161ba5e83b2d8}{ethumb\+\_\+client\+\_\+file\+\_\+get()} \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__Ethumb__Client__Basics_gab8b830c4744f72d7a4d3a677a6ba7a91}{ethumb\+\_\+client\+\_\+file\+\_\+free} (\hyperlink{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}{Ethumb\+\_\+\+Client} $\ast$client)
\begin{DoxyCompactList}\small\item\em Reset previously set file to {\ttfamily N\+U\+L\+L}. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Ethumb__Client__Basics_ga6f207317e558e9a273ca60b1c7d1cab2}{Ethumb\+\_\+\+Exists} $\ast$ \hyperlink{group__Ethumb__Client__Basics_ga77e6ec3b0e2d1c99a524399da6a24012}{ethumb\+\_\+client\+\_\+thumb\+\_\+exists} (\hyperlink{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}{Ethumb\+\_\+\+Client} $\ast$client, \hyperlink{group__Ethumb__Client__Basics_gab500683ca59d896307b375f066a6f696}{Ethumb\+\_\+\+Client\+\_\+\+Thumb\+\_\+\+Exists\+\_\+\+Cb} exists\+\_\+cb, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Checks whenever file already exists (locally!) \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__Ethumb__Client__Basics_gad96b376ead632e96723ca9f9b0735918}{ethumb\+\_\+client\+\_\+thumb\+\_\+exists\+\_\+cancel} (\hyperlink{group__Ethumb__Client__Basics_ga6f207317e558e9a273ca60b1c7d1cab2}{Ethumb\+\_\+\+Exists} $\ast$exists)
\begin{DoxyCompactList}\small\item\em Cancel an ongoing exists request. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Ethumb__Client__Basics_gae68364004bf3ba3247fab20efc58f146}{ethumb\+\_\+client\+\_\+thumb\+\_\+exists\+\_\+check} (\hyperlink{group__Ethumb__Client__Basics_ga6f207317e558e9a273ca60b1c7d1cab2}{Ethumb\+\_\+\+Exists} $\ast$exists)
\begin{DoxyCompactList}\small\item\em Check if an exists request was cancelled. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} int \hyperlink{group__Ethumb__Client__Basics_gaa09f3c82539082042f47196c47ef8251}{ethumb\+\_\+client\+\_\+generate} (\hyperlink{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}{Ethumb\+\_\+\+Client} $\ast$client, \hyperlink{group__Ethumb__Client__Basics_gaeabf9cae8c993b41af1cebaca085ffa2}{Ethumb\+\_\+\+Client\+\_\+\+Generate\+\_\+\+Cb} generated\+\_\+cb, const void $\ast$data, \hyperlink{group__Eina__Types__Group_gadbac560ba2bca5c61d97bfbb542018f3}{Eina\+\_\+\+Free\+\_\+\+Cb} free\+\_\+data)
\begin{DoxyCompactList}\small\item\em Ask server to generate thumbnail. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__Ethumb__Client__Basics_ga55fad34988a1cde2962141e25c5b26c5}{ethumb\+\_\+client\+\_\+generate\+\_\+cancel} (\hyperlink{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}{Ethumb\+\_\+\+Client} $\ast$client, int id, \hyperlink{group__Ethumb__Client__Basics_gabe2b0c6ad1b23be128efea1376d21302}{Ethumb\+\_\+\+Client\+\_\+\+Generate\+\_\+\+Cancel\+\_\+\+Cb} cancel\+\_\+cb, const void $\ast$data, \hyperlink{group__Eina__Types__Group_gadbac560ba2bca5c61d97bfbb542018f3}{Eina\+\_\+\+Free\+\_\+\+Cb} free\+\_\+data)
\begin{DoxyCompactList}\small\item\em Ask server to cancel generation of thumbnail. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__Ethumb__Client__Basics_ga37569c3c40b5e0f30d48db23acf4a344}{ethumb\+\_\+client\+\_\+generate\+\_\+cancel\+\_\+all} (\hyperlink{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}{Ethumb\+\_\+\+Client} $\ast$client)
\begin{DoxyCompactList}\small\item\em Ask server to cancel generation of all thumbnails. \end{DoxyCompactList}\item 
\hypertarget{group__Ethumb__Client__Basics_ga2377bf1b1412abdaad4424bf1f6fdce2}{\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} Ethumb\+\_\+\+Client\+\_\+\+Async $\ast$ {\bfseries ethumb\+\_\+client\+\_\+thumb\+\_\+async\+\_\+get} (\hyperlink{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}{Ethumb\+\_\+\+Client} $\ast$client, Ethumb\+\_\+\+Client\+\_\+\+Async\+\_\+\+Done\+\_\+\+Cb done, Ethumb\+\_\+\+Client\+\_\+\+Async\+\_\+\+Error\+\_\+\+Cb error, const void $\ast$data)}\label{group__Ethumb__Client__Basics_ga2377bf1b1412abdaad4424bf1f6fdce2}

\item 
\hypertarget{group__Ethumb__Client__Basics_gaf736900e2af182569e91cac8e6ff8576}{\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void {\bfseries ethumb\+\_\+client\+\_\+thumb\+\_\+async\+\_\+cancel} (\hyperlink{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}{Ethumb\+\_\+\+Client} $\ast$client, Ethumb\+\_\+\+Client\+\_\+\+Async $\ast$request)}\label{group__Ethumb__Client__Basics_gaf736900e2af182569e91cac8e6ff8576}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Functions that all users must know of to use Ethumb\+\_\+\+Client. 



\subsection{Typedef Documentation}
\hypertarget{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}{\index{Ethumb Client Basics@{Ethumb Client Basics}!Ethumb\+\_\+\+Client@{Ethumb\+\_\+\+Client}}
\index{Ethumb\+\_\+\+Client@{Ethumb\+\_\+\+Client}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{Ethumb\+\_\+\+Client}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct \+\_\+\+Ethumb\+\_\+\+Client {\bf Ethumb\+\_\+\+Client}}}\label{group__Ethumb__Client__Basics_ga45f606a35f4811ecfe1a6db9c8f5e814}


client handle. 

The client handle is created by \hyperlink{group__Ethumb__Client__Basics_gae642a2b632953f0dd2d72bcb8ae19377}{ethumb\+\_\+client\+\_\+connect()} and destroyed by \hyperlink{group__Ethumb__Client__Basics_ga23330db7a756b6ba8026b1bb33ce720d}{ethumb\+\_\+client\+\_\+disconnect()}. The connection and requests are asynchronous and callbacks should be used to report both success and failure of calls. \hypertarget{group__Ethumb__Client__Basics_ga6f207317e558e9a273ca60b1c7d1cab2}{\index{Ethumb Client Basics@{Ethumb Client Basics}!Ethumb\+\_\+\+Exists@{Ethumb\+\_\+\+Exists}}
\index{Ethumb\+\_\+\+Exists@{Ethumb\+\_\+\+Exists}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{Ethumb\+\_\+\+Exists}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct \+\_\+\+Ethumb\+\_\+\+Exists {\bf Ethumb\+\_\+\+Exists}}}\label{group__Ethumb__Client__Basics_ga6f207317e558e9a273ca60b1c7d1cab2}


client exists request handle. 

The exists request handle is created by \hyperlink{group__Ethumb__Client__Basics_ga77e6ec3b0e2d1c99a524399da6a24012}{ethumb\+\_\+client\+\_\+thumb\+\_\+exists()}, automatically destroyed when it end and cancelled when requested by \hyperlink{group__Ethumb__Client__Basics_gad96b376ead632e96723ca9f9b0735918}{ethumb\+\_\+client\+\_\+thumb\+\_\+exists\+\_\+cancel()}. \hypertarget{group__Ethumb__Client__Basics_ga2d8acc1a2c3b4ada63ba8bf22f7815c3}{\index{Ethumb Client Basics@{Ethumb Client Basics}!Ethumb\+\_\+\+Client\+\_\+\+Connect\+\_\+\+Cb@{Ethumb\+\_\+\+Client\+\_\+\+Connect\+\_\+\+Cb}}
\index{Ethumb\+\_\+\+Client\+\_\+\+Connect\+\_\+\+Cb@{Ethumb\+\_\+\+Client\+\_\+\+Connect\+\_\+\+Cb}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{Ethumb\+\_\+\+Client\+\_\+\+Connect\+\_\+\+Cb}]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$ Ethumb\+\_\+\+Client\+\_\+\+Connect\+\_\+\+Cb)(void $\ast$data, {\bf Ethumb\+\_\+\+Client} $\ast$client, {\bf Eina\+\_\+\+Bool} success)}}\label{group__Ethumb__Client__Basics_ga2d8acc1a2c3b4ada63ba8bf22f7815c3}


reports results of \hyperlink{group__Ethumb__Client__Basics_gae642a2b632953f0dd2d72bcb8ae19377}{ethumb\+\_\+client\+\_\+connect()} 


\begin{DoxyParams}{Parameters}
{\em data} & extra context given to \hyperlink{group__Ethumb__Client__Basics_gae642a2b632953f0dd2d72bcb8ae19377}{ethumb\+\_\+client\+\_\+connect()}. \\
\hline
{\em client} & handle of the current connection to server. \\
\hline
{\em success} & {\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if connected or {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} if it was not possible. \\
\hline
\end{DoxyParams}
\hypertarget{group__Ethumb__Client__Basics_gae09bc643b3862544752897c19e7ef739}{\index{Ethumb Client Basics@{Ethumb Client Basics}!Ethumb\+\_\+\+Client\+\_\+\+Die\+\_\+\+Cb@{Ethumb\+\_\+\+Client\+\_\+\+Die\+\_\+\+Cb}}
\index{Ethumb\+\_\+\+Client\+\_\+\+Die\+\_\+\+Cb@{Ethumb\+\_\+\+Client\+\_\+\+Die\+\_\+\+Cb}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{Ethumb\+\_\+\+Client\+\_\+\+Die\+\_\+\+Cb}]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$ Ethumb\+\_\+\+Client\+\_\+\+Die\+\_\+\+Cb)(void $\ast$data, {\bf Ethumb\+\_\+\+Client} $\ast$client)}}\label{group__Ethumb__Client__Basics_gae09bc643b3862544752897c19e7ef739}


reports server connection ended. 

Functions of this type may be called if they are set with \hyperlink{group__Ethumb__Client__Basics_ga453c18b2df77d5cdbaf367587580ae83}{ethumb\+\_\+client\+\_\+on\+\_\+server\+\_\+die\+\_\+callback\+\_\+set()}.


\begin{DoxyParams}{Parameters}
{\em data} & extra context given to \hyperlink{group__Ethumb__Client__Basics_ga453c18b2df77d5cdbaf367587580ae83}{ethumb\+\_\+client\+\_\+on\+\_\+server\+\_\+die\+\_\+callback\+\_\+set()}. \\
\hline
{\em client} & handle of the current connection to server. \\
\hline
\end{DoxyParams}
\hypertarget{group__Ethumb__Client__Basics_gaeabf9cae8c993b41af1cebaca085ffa2}{\index{Ethumb Client Basics@{Ethumb Client Basics}!Ethumb\+\_\+\+Client\+\_\+\+Generate\+\_\+\+Cb@{Ethumb\+\_\+\+Client\+\_\+\+Generate\+\_\+\+Cb}}
\index{Ethumb\+\_\+\+Client\+\_\+\+Generate\+\_\+\+Cb@{Ethumb\+\_\+\+Client\+\_\+\+Generate\+\_\+\+Cb}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{Ethumb\+\_\+\+Client\+\_\+\+Generate\+\_\+\+Cb}]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$ Ethumb\+\_\+\+Client\+\_\+\+Generate\+\_\+\+Cb)(void $\ast$data, {\bf Ethumb\+\_\+\+Client} $\ast$client, int id, const char $\ast$file, const char $\ast$key, const char $\ast$thumb\+\_\+path, const char $\ast$thumb\+\_\+key, {\bf Eina\+\_\+\+Bool} success)}}\label{group__Ethumb__Client__Basics_gaeabf9cae8c993b41af1cebaca085ffa2}


reports results of \hyperlink{group__Ethumb__Client__Basics_gaa09f3c82539082042f47196c47ef8251}{ethumb\+\_\+client\+\_\+generate()}. 


\begin{DoxyParams}{Parameters}
{\em data} & extra context given to \hyperlink{group__Ethumb__Client__Basics_gaa09f3c82539082042f47196c47ef8251}{ethumb\+\_\+client\+\_\+generate()}. \\
\hline
{\em client} & handle of the current connection to server. \\
\hline
{\em id} & identifier returned by \hyperlink{group__Ethumb__Client__Basics_gaa09f3c82539082042f47196c47ef8251}{ethumb\+\_\+client\+\_\+generate()}. \\
\hline
{\em file} & path set with \hyperlink{group__Ethumb__Client__Basics_gaf1bfc6777a81a1141391f87b0acaadc2}{ethumb\+\_\+client\+\_\+file\+\_\+set()}. \\
\hline
{\em key} & value set with \hyperlink{group__Ethumb__Client__Basics_gaf1bfc6777a81a1141391f87b0acaadc2}{ethumb\+\_\+client\+\_\+file\+\_\+set()} or {\ttfamily N\+U\+L\+L}. \\
\hline
{\em thumb\+\_\+path} & where thumbnail was stored, either set with \hyperlink{group__Ethumb__Client__Setup_ga4fb204bd694dbb066fe5dbb15632dd91}{ethumb\+\_\+client\+\_\+thumb\+\_\+path\+\_\+set()} or automatically calculated using parameters. \\
\hline
{\em thumb\+\_\+key} & key inside thumb\+\_\+path where thumbnail was stored or {\ttfamily N\+U\+L\+L}. \\
\hline
{\em success} & {\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if generated or {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} on errors. \\
\hline
\end{DoxyParams}
\hypertarget{group__Ethumb__Client__Basics_gab500683ca59d896307b375f066a6f696}{\index{Ethumb Client Basics@{Ethumb Client Basics}!Ethumb\+\_\+\+Client\+\_\+\+Thumb\+\_\+\+Exists\+\_\+\+Cb@{Ethumb\+\_\+\+Client\+\_\+\+Thumb\+\_\+\+Exists\+\_\+\+Cb}}
\index{Ethumb\+\_\+\+Client\+\_\+\+Thumb\+\_\+\+Exists\+\_\+\+Cb@{Ethumb\+\_\+\+Client\+\_\+\+Thumb\+\_\+\+Exists\+\_\+\+Cb}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{Ethumb\+\_\+\+Client\+\_\+\+Thumb\+\_\+\+Exists\+\_\+\+Cb}]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$ Ethumb\+\_\+\+Client\+\_\+\+Thumb\+\_\+\+Exists\+\_\+\+Cb)(void $\ast$data, {\bf Ethumb\+\_\+\+Client} $\ast$client, {\bf Ethumb\+\_\+\+Exists} $\ast$thread, {\bf Eina\+\_\+\+Bool} exists)}}\label{group__Ethumb__Client__Basics_gab500683ca59d896307b375f066a6f696}


report results of \hyperlink{group__Ethumb__Client__Basics_ga77e6ec3b0e2d1c99a524399da6a24012}{ethumb\+\_\+client\+\_\+thumb\+\_\+exists()}. 


\begin{DoxyParams}{Parameters}
{\em client} & handle of the current connection to server. \\
\hline
{\em exists} & E\+I\+N\+A\+\_\+\+T\+R\+U\+E if the thumbnail exists. \\
\hline
{\em data} & extra context given to \hyperlink{group__Ethumb__Client__Basics_ga77e6ec3b0e2d1c99a524399da6a24012}{ethumb\+\_\+client\+\_\+thumb\+\_\+exists()}.\\
\hline
\end{DoxyParams}
During the execution of the callback the state of the {\ttfamily client} is temporarily realy restored to what it was when the call to \hyperlink{group__Ethumb__Client__Basics_ga77e6ec3b0e2d1c99a524399da6a24012}{ethumb\+\_\+client\+\_\+thumb\+\_\+exists()} was done. \hypertarget{group__Ethumb__Client__Basics_gabe2b0c6ad1b23be128efea1376d21302}{\index{Ethumb Client Basics@{Ethumb Client Basics}!Ethumb\+\_\+\+Client\+\_\+\+Generate\+\_\+\+Cancel\+\_\+\+Cb@{Ethumb\+\_\+\+Client\+\_\+\+Generate\+\_\+\+Cancel\+\_\+\+Cb}}
\index{Ethumb\+\_\+\+Client\+\_\+\+Generate\+\_\+\+Cancel\+\_\+\+Cb@{Ethumb\+\_\+\+Client\+\_\+\+Generate\+\_\+\+Cancel\+\_\+\+Cb}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{Ethumb\+\_\+\+Client\+\_\+\+Generate\+\_\+\+Cancel\+\_\+\+Cb}]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$ Ethumb\+\_\+\+Client\+\_\+\+Generate\+\_\+\+Cancel\+\_\+\+Cb)(void $\ast$data, {\bf Eina\+\_\+\+Bool} success)}}\label{group__Ethumb__Client__Basics_gabe2b0c6ad1b23be128efea1376d21302}


reports results of \hyperlink{group__Ethumb__Client__Basics_ga55fad34988a1cde2962141e25c5b26c5}{ethumb\+\_\+client\+\_\+generate\+\_\+cancel()} 


\begin{DoxyParams}{Parameters}
{\em data} & extra context given to \hyperlink{group__Ethumb__Client__Basics_ga55fad34988a1cde2962141e25c5b26c5}{ethumb\+\_\+client\+\_\+generate\+\_\+cancel()} \\
\hline
{\em client} & handle of the current connection to server. \\
\hline
\end{DoxyParams}


\subsection{Function Documentation}
\hypertarget{group__Ethumb__Client__Basics_ga64c23fe86d0bce53c9eeaacbe4834c7f}{\index{Ethumb Client Basics@{Ethumb Client Basics}!ethumb\+\_\+client\+\_\+init@{ethumb\+\_\+client\+\_\+init}}
\index{ethumb\+\_\+client\+\_\+init@{ethumb\+\_\+client\+\_\+init}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{ethumb\+\_\+client\+\_\+init}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} int ethumb\+\_\+client\+\_\+init (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__Ethumb__Client__Basics_ga64c23fe86d0bce53c9eeaacbe4834c7f}


Initialize the Ethumb\+\_\+\+Client library. 

\begin{DoxyReturn}{Returns}
1 or greater on success, 0 on error.
\end{DoxyReturn}
This function sets up all the Ethumb\+\_\+\+Client module dependencies. It returns 0 on failure (that is, when one of the dependency fails to initialize), otherwise it returns the number of times it has already been called.

When Ethumb\+\_\+\+Client is not used anymore, call \hyperlink{group__Ethumb__Client__Basics_ga1e32e798f7465f9f699ff4e66e323381}{ethumb\+\_\+client\+\_\+shutdown()} to shut down the Ethumb\+\_\+\+Client library.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Ethumb__Client__Basics_ga1e32e798f7465f9f699ff4e66e323381}{ethumb\+\_\+client\+\_\+shutdown()} 

\hyperlink{group__Ethumb__Client__Basics_gae642a2b632953f0dd2d72bcb8ae19377}{ethumb\+\_\+client\+\_\+connect()} 

\hyperlink{tutorial_ethumb_client}{Client-\/\+Server Thumbnailing Tutorial} 
\end{DoxySeeAlso}


References eina\+\_\+hash\+\_\+stringshared\+\_\+new(), eina\+\_\+init(), eina\+\_\+log\+\_\+domain\+\_\+register(), E\+I\+N\+A\+\_\+\+L\+O\+G\+\_\+\+E\+R\+R, eina\+\_\+shutdown(), eldbus\+\_\+init(), and ethumb\+\_\+init().

\hypertarget{group__Ethumb__Client__Basics_ga1e32e798f7465f9f699ff4e66e323381}{\index{Ethumb Client Basics@{Ethumb Client Basics}!ethumb\+\_\+client\+\_\+shutdown@{ethumb\+\_\+client\+\_\+shutdown}}
\index{ethumb\+\_\+client\+\_\+shutdown@{ethumb\+\_\+client\+\_\+shutdown}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{ethumb\+\_\+client\+\_\+shutdown}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} int ethumb\+\_\+client\+\_\+shutdown (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__Ethumb__Client__Basics_ga1e32e798f7465f9f699ff4e66e323381}


Shut down the Ethumb\+\_\+\+Client library. 

\begin{DoxyReturn}{Returns}
0 when everything is shut down, 1 or greater if there are other users of the Ethumb\+\_\+\+Client library pending shutdown.
\end{DoxyReturn}
This function shuts down the Ethumb\+\_\+\+Client library. It returns 0 when it has been called the same number of times than \hyperlink{group__Ethumb__Client__Basics_ga64c23fe86d0bce53c9eeaacbe4834c7f}{ethumb\+\_\+client\+\_\+init()}. In that case it shut down all the Ethumb\+\_\+\+Client modules dependencies.

Once this function succeeds (that is, {\ttfamily 0} is returned), you must not call any of the Eina function anymore. You must call \hyperlink{group__Ethumb__Client__Basics_ga64c23fe86d0bce53c9eeaacbe4834c7f}{ethumb\+\_\+client\+\_\+init()} again to use the Ethumb\+\_\+\+Client functions again. 

References eina\+\_\+hash\+\_\+free(), eina\+\_\+log\+\_\+domain\+\_\+unregister(), eina\+\_\+shutdown(), eldbus\+\_\+shutdown(), and ethumb\+\_\+shutdown().

\hypertarget{group__Ethumb__Client__Basics_gae642a2b632953f0dd2d72bcb8ae19377}{\index{Ethumb Client Basics@{Ethumb Client Basics}!ethumb\+\_\+client\+\_\+connect@{ethumb\+\_\+client\+\_\+connect}}
\index{ethumb\+\_\+client\+\_\+connect@{ethumb\+\_\+client\+\_\+connect}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{ethumb\+\_\+client\+\_\+connect}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Ethumb\+\_\+\+Client}$\ast$ ethumb\+\_\+client\+\_\+connect (
\begin{DoxyParamCaption}
\item[{{\bf Ethumb\+\_\+\+Client\+\_\+\+Connect\+\_\+\+Cb}}]{connect\+\_\+cb, }
\item[{const void $\ast$}]{data, }
\item[{{\bf Eina\+\_\+\+Free\+\_\+\+Cb}}]{free\+\_\+data}
\end{DoxyParamCaption}
)}}\label{group__Ethumb__Client__Basics_gae642a2b632953f0dd2d72bcb8ae19377}


Connects to Ethumb server and return the client instance. 

This is the \char`\"{}constructor\char`\"{} of Ethumb\+\_\+\+Client, where everything starts.

If server was down, it is tried to start it using D\+Bus activation, then the connection is retried.

This call is asynchronous and will not block, instead it will be in \char`\"{}not connected\char`\"{} state until {\itshape connect\+\_\+cb} is called with either success or failure. On failure, then no methods should be called. On success you're now able to setup and then ask generation of thumbnails.

Usually you should listen for server death/disconenction with \hyperlink{group__Ethumb__Client__Basics_ga453c18b2df77d5cdbaf367587580ae83}{ethumb\+\_\+client\+\_\+on\+\_\+server\+\_\+die\+\_\+callback\+\_\+set()}.


\begin{DoxyParams}{Parameters}
{\em connect\+\_\+cb} & function to call to report connection success or failure. Do not call any other ethumb\+\_\+client method until this function returns. The first received parameter is the given argument {\itshape data}. Must {\bfseries not} be {\ttfamily N\+U\+L\+L}. This function will not be called if user explicitly calls \hyperlink{group__Ethumb__Client__Basics_ga23330db7a756b6ba8026b1bb33ce720d}{ethumb\+\_\+client\+\_\+disconnect()}. \\
\hline
{\em data} & context to give back to {\itshape connect\+\_\+cb}. May be {\ttfamily N\+U\+L\+L}. \\
\hline
{\em free\+\_\+data} & function used to release {\itshape data} resources, if any. May be {\ttfamily N\+U\+L\+L}. If this function exists, it will be called immediately after {\itshape connect\+\_\+cb} is called or if user explicitly calls \hyperlink{group__Ethumb__Client__Basics_ga23330db7a756b6ba8026b1bb33ce720d}{ethumb\+\_\+client\+\_\+disconnect()} before such (that is, don't rely on {\itshape data} after {\itshape connect\+\_\+cb} was called!)\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
client instance or N\+U\+L\+L if failed. If {\itshape connect\+\_\+cb} is missing it returns {\ttfamily N\+U\+L\+L}. If it fail for other conditions, {\ttfamily N\+U\+L\+L} is also returned and {\itshape connect\+\_\+cb} is called with {\ttfamily success=E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E}. The client instance is not ready to be used until {\itshape connect\+\_\+cb} is called. 
\end{DoxyReturn}


References E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E, E\+I\+N\+A\+\_\+\+R\+E\+F\+C\+O\+U\+N\+T\+\_\+\+I\+N\+I\+T, E\+I\+N\+A\+\_\+\+T\+R\+U\+E, eldbus\+\_\+connection\+\_\+get(), eldbus\+\_\+name\+\_\+owner\+\_\+changed\+\_\+callback\+\_\+add(), eldbus\+\_\+name\+\_\+start(), E\+R\+R, ethumb\+\_\+free(), and ethumb\+\_\+new().

\hypertarget{group__Ethumb__Client__Basics_ga23330db7a756b6ba8026b1bb33ce720d}{\index{Ethumb Client Basics@{Ethumb Client Basics}!ethumb\+\_\+client\+\_\+disconnect@{ethumb\+\_\+client\+\_\+disconnect}}
\index{ethumb\+\_\+client\+\_\+disconnect@{ethumb\+\_\+client\+\_\+disconnect}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{ethumb\+\_\+client\+\_\+disconnect}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void ethumb\+\_\+client\+\_\+disconnect (
\begin{DoxyParamCaption}
\item[{{\bf Ethumb\+\_\+\+Client} $\ast$}]{client}
\end{DoxyParamCaption}
)}}\label{group__Ethumb__Client__Basics_ga23330db7a756b6ba8026b1bb33ce720d}


Disconnect the client, releasing all client resources. 

This is the destructor of Ethumb\+\_\+\+Client, after it's disconnected the client handle is now gone and should not be used.


\begin{DoxyParams}{Parameters}
{\em client} & client instance to be destroyed. Must {\bfseries not} be {\ttfamily N\+U\+L\+L}. \\
\hline
\end{DoxyParams}


References E\+I\+N\+A\+\_\+\+R\+E\+F\+C\+O\+U\+N\+T\+\_\+\+U\+N\+R\+E\+F.

\hypertarget{group__Ethumb__Client__Basics_ga453c18b2df77d5cdbaf367587580ae83}{\index{Ethumb Client Basics@{Ethumb Client Basics}!ethumb\+\_\+client\+\_\+on\+\_\+server\+\_\+die\+\_\+callback\+\_\+set@{ethumb\+\_\+client\+\_\+on\+\_\+server\+\_\+die\+\_\+callback\+\_\+set}}
\index{ethumb\+\_\+client\+\_\+on\+\_\+server\+\_\+die\+\_\+callback\+\_\+set@{ethumb\+\_\+client\+\_\+on\+\_\+server\+\_\+die\+\_\+callback\+\_\+set}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{ethumb\+\_\+client\+\_\+on\+\_\+server\+\_\+die\+\_\+callback\+\_\+set}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void ethumb\+\_\+client\+\_\+on\+\_\+server\+\_\+die\+\_\+callback\+\_\+set (
\begin{DoxyParamCaption}
\item[{{\bf Ethumb\+\_\+\+Client} $\ast$}]{client, }
\item[{{\bf Ethumb\+\_\+\+Client\+\_\+\+Die\+\_\+\+Cb}}]{server\+\_\+die\+\_\+cb, }
\item[{const void $\ast$}]{data, }
\item[{{\bf Eina\+\_\+\+Free\+\_\+\+Cb}}]{free\+\_\+data}
\end{DoxyParamCaption}
)}}\label{group__Ethumb__Client__Basics_ga453c18b2df77d5cdbaf367587580ae83}


Sets the callback to report server died. 

When server dies there is nothing you can do, just release resources with \hyperlink{group__Ethumb__Client__Basics_ga23330db7a756b6ba8026b1bb33ce720d}{ethumb\+\_\+client\+\_\+disconnect()} and probably try to connect again.

Usually you should set this callback and handle this case, it does happen!


\begin{DoxyParams}{Parameters}
{\em client} & the client instance to monitor. Must {\bfseries not} be {\ttfamily N\+U\+L\+L}. \\
\hline
{\em server\+\_\+die\+\_\+cb} & function to call back when server dies. The first parameter will be the argument {\itshape data}. May be {\ttfamily N\+U\+L\+L}. \\
\hline
{\em data} & context to give back to {\itshape server\+\_\+die\+\_\+cb}. May be {\ttfamily N\+U\+L\+L}. \\
\hline
{\em free\+\_\+data} & used to release {\itshape data} resources after {\itshape server\+\_\+die\+\_\+cb} is called or user calls \hyperlink{group__Ethumb__Client__Basics_ga23330db7a756b6ba8026b1bb33ce720d}{ethumb\+\_\+client\+\_\+disconnect()}. \\
\hline
\end{DoxyParams}
\hypertarget{group__Ethumb__Client__Basics_gaf1bfc6777a81a1141391f87b0acaadc2}{\index{Ethumb Client Basics@{Ethumb Client Basics}!ethumb\+\_\+client\+\_\+file\+\_\+set@{ethumb\+\_\+client\+\_\+file\+\_\+set}}
\index{ethumb\+\_\+client\+\_\+file\+\_\+set@{ethumb\+\_\+client\+\_\+file\+\_\+set}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{ethumb\+\_\+client\+\_\+file\+\_\+set}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Bool} ethumb\+\_\+client\+\_\+file\+\_\+set (
\begin{DoxyParamCaption}
\item[{{\bf Ethumb\+\_\+\+Client} $\ast$}]{client, }
\item[{const char $\ast$}]{path, }
\item[{const char $\ast$}]{key}
\end{DoxyParamCaption}
)}}\label{group__Ethumb__Client__Basics_gaf1bfc6777a81a1141391f87b0acaadc2}


Set source file to be thumbnailed. 

Calling this function has the side effect of resetting values set with \hyperlink{group__Ethumb__Client__Setup_ga4fb204bd694dbb066fe5dbb15632dd91}{ethumb\+\_\+client\+\_\+thumb\+\_\+path\+\_\+set()} or auto-\/generated with \hyperlink{group__Ethumb__Client__Basics_ga77e6ec3b0e2d1c99a524399da6a24012}{ethumb\+\_\+client\+\_\+thumb\+\_\+exists()}.


\begin{DoxyParams}{Parameters}
{\em client} & the client instance to use. Must {\bfseries not} be {\ttfamily N\+U\+L\+L}. May be pending connected (can be called before {\ttfamily connected\+\_\+cb}) \\
\hline
{\em path} & the filesystem path to use. May be {\ttfamily N\+U\+L\+L}. \\
\hline
{\em key} & the extra argument/key inside {\itshape path} to read image from. This is only used for formats that allow multiple resources in one file, like E\+E\+T or Edje (group name).\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} on failure. 
\end{DoxyReturn}


References ethumb\+\_\+file\+\_\+set().

\hypertarget{group__Ethumb__Client__Basics_gace6930ae055ed155f2b161ba5e83b2d8}{\index{Ethumb Client Basics@{Ethumb Client Basics}!ethumb\+\_\+client\+\_\+file\+\_\+get@{ethumb\+\_\+client\+\_\+file\+\_\+get}}
\index{ethumb\+\_\+client\+\_\+file\+\_\+get@{ethumb\+\_\+client\+\_\+file\+\_\+get}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{ethumb\+\_\+client\+\_\+file\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void ethumb\+\_\+client\+\_\+file\+\_\+get (
\begin{DoxyParamCaption}
\item[{{\bf Ethumb\+\_\+\+Client} $\ast$}]{client, }
\item[{const char $\ast$$\ast$}]{path, }
\item[{const char $\ast$$\ast$}]{key}
\end{DoxyParamCaption}
)}}\label{group__Ethumb__Client__Basics_gace6930ae055ed155f2b161ba5e83b2d8}


Get values set with \hyperlink{group__Ethumb__Client__Basics_gace6930ae055ed155f2b161ba5e83b2d8}{ethumb\+\_\+client\+\_\+file\+\_\+get()} 


\begin{DoxyParams}{Parameters}
{\em client} & the client instance to use. Must {\bfseries not} be {\ttfamily N\+U\+L\+L}. May be pending connected (can be called before {\ttfamily connected\+\_\+cb}) \\
\hline
{\em path} & where to return configured path. May be {\ttfamily N\+U\+L\+L}. If not {\ttfamily N\+U\+L\+L}, then it will be a pointer to a stringshared instance, but {\bfseries no} references are added (do it with \hyperlink{group__Eina__Stringshare__Group_ga4e18c53f96ce4eaa82c5e5dc94e575d5}{eina\+\_\+stringshare\+\_\+ref()})! \\
\hline
{\em key} & where to return configured key. May be {\ttfamily N\+U\+L\+L.\+If} not {\ttfamily N\+U\+L\+L}, then it will be a pointer to a stringshared instance, but {\bfseries no} references are added (do it with \hyperlink{group__Eina__Stringshare__Group_ga4e18c53f96ce4eaa82c5e5dc94e575d5}{eina\+\_\+stringshare\+\_\+ref()})! \\
\hline
\end{DoxyParams}


References ethumb\+\_\+file\+\_\+get().

\hypertarget{group__Ethumb__Client__Basics_gab8b830c4744f72d7a4d3a677a6ba7a91}{\index{Ethumb Client Basics@{Ethumb Client Basics}!ethumb\+\_\+client\+\_\+file\+\_\+free@{ethumb\+\_\+client\+\_\+file\+\_\+free}}
\index{ethumb\+\_\+client\+\_\+file\+\_\+free@{ethumb\+\_\+client\+\_\+file\+\_\+free}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{ethumb\+\_\+client\+\_\+file\+\_\+free}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void ethumb\+\_\+client\+\_\+file\+\_\+free (
\begin{DoxyParamCaption}
\item[{{\bf Ethumb\+\_\+\+Client} $\ast$}]{client}
\end{DoxyParamCaption}
)}}\label{group__Ethumb__Client__Basics_gab8b830c4744f72d7a4d3a677a6ba7a91}


Reset previously set file to {\ttfamily N\+U\+L\+L}. 


\begin{DoxyParams}{Parameters}
{\em client} & the client instance to use. Must {\bfseries not} be {\ttfamily N\+U\+L\+L}. May be pending connected (can be called before {\ttfamily connected\+\_\+cb}) \\
\hline
\end{DoxyParams}


References ethumb\+\_\+file\+\_\+free().

\hypertarget{group__Ethumb__Client__Basics_ga77e6ec3b0e2d1c99a524399da6a24012}{\index{Ethumb Client Basics@{Ethumb Client Basics}!ethumb\+\_\+client\+\_\+thumb\+\_\+exists@{ethumb\+\_\+client\+\_\+thumb\+\_\+exists}}
\index{ethumb\+\_\+client\+\_\+thumb\+\_\+exists@{ethumb\+\_\+client\+\_\+thumb\+\_\+exists}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{ethumb\+\_\+client\+\_\+thumb\+\_\+exists}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Ethumb\+\_\+\+Exists}$\ast$ ethumb\+\_\+client\+\_\+thumb\+\_\+exists (
\begin{DoxyParamCaption}
\item[{{\bf Ethumb\+\_\+\+Client} $\ast$}]{client, }
\item[{{\bf Ethumb\+\_\+\+Client\+\_\+\+Thumb\+\_\+\+Exists\+\_\+\+Cb}}]{exists\+\_\+cb, }
\item[{const void $\ast$}]{data}
\end{DoxyParamCaption}
)}}\label{group__Ethumb__Client__Basics_ga77e6ec3b0e2d1c99a524399da6a24012}


Checks whenever file already exists (locally!) 

This will check locally (not calling server) if thumbnail already exists or not, also calculating the thumbnail path. See \hyperlink{group__Ethumb__Client__Setup_gaaf1931c56f4fc4b02b34f54699f42a34}{ethumb\+\_\+client\+\_\+thumb\+\_\+path\+\_\+get()}. Path must be configured with \hyperlink{group__Ethumb__Client__Basics_gaf1bfc6777a81a1141391f87b0acaadc2}{ethumb\+\_\+client\+\_\+file\+\_\+set()} before using it and the last set file will be used!


\begin{DoxyParams}{Parameters}
{\em client} & client instance. Must {\bfseries not} be {\ttfamily N\+U\+L\+L} and client must be configured with \hyperlink{group__Ethumb__Client__Basics_gaf1bfc6777a81a1141391f87b0acaadc2}{ethumb\+\_\+client\+\_\+file\+\_\+set()}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily N\+U\+L\+L} on failure, a valid Ethumb\+\_\+\+Exists pointer otherwise 
\end{DoxyReturn}


References ecore\+\_\+thread\+\_\+run(), E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E, eina\+\_\+hash\+\_\+direct\+\_\+add(), eina\+\_\+hash\+\_\+find(), eina\+\_\+list\+\_\+append(), E\+I\+N\+A\+\_\+\+R\+E\+F\+C\+O\+U\+N\+T\+\_\+\+R\+E\+F, eina\+\_\+stringshare\+\_\+del(), eina\+\_\+stringshare\+\_\+ref(), ethumb\+\_\+dup(), ethumb\+\_\+file\+\_\+get(), and ethumb\+\_\+free().

\hypertarget{group__Ethumb__Client__Basics_gad96b376ead632e96723ca9f9b0735918}{\index{Ethumb Client Basics@{Ethumb Client Basics}!ethumb\+\_\+client\+\_\+thumb\+\_\+exists\+\_\+cancel@{ethumb\+\_\+client\+\_\+thumb\+\_\+exists\+\_\+cancel}}
\index{ethumb\+\_\+client\+\_\+thumb\+\_\+exists\+\_\+cancel@{ethumb\+\_\+client\+\_\+thumb\+\_\+exists\+\_\+cancel}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{ethumb\+\_\+client\+\_\+thumb\+\_\+exists\+\_\+cancel}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void ethumb\+\_\+client\+\_\+thumb\+\_\+exists\+\_\+cancel (
\begin{DoxyParamCaption}
\item[{{\bf Ethumb\+\_\+\+Exists} $\ast$}]{exists}
\end{DoxyParamCaption}
)}}\label{group__Ethumb__Client__Basics_gad96b376ead632e96723ca9f9b0735918}


Cancel an ongoing exists request. 


\begin{DoxyParams}{Parameters}
{\em exists} & the request to cancel. \\
\hline
\end{DoxyParams}


References ecore\+\_\+thread\+\_\+cancel(), eina\+\_\+list\+\_\+count(), eina\+\_\+list\+\_\+remove(), E\+I\+N\+A\+\_\+\+R\+E\+F\+C\+O\+U\+N\+T\+\_\+\+U\+N\+R\+E\+F, and ethumb\+\_\+free().

\hypertarget{group__Ethumb__Client__Basics_gae68364004bf3ba3247fab20efc58f146}{\index{Ethumb Client Basics@{Ethumb Client Basics}!ethumb\+\_\+client\+\_\+thumb\+\_\+exists\+\_\+check@{ethumb\+\_\+client\+\_\+thumb\+\_\+exists\+\_\+check}}
\index{ethumb\+\_\+client\+\_\+thumb\+\_\+exists\+\_\+check@{ethumb\+\_\+client\+\_\+thumb\+\_\+exists\+\_\+check}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{ethumb\+\_\+client\+\_\+thumb\+\_\+exists\+\_\+check}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Bool} ethumb\+\_\+client\+\_\+thumb\+\_\+exists\+\_\+check (
\begin{DoxyParamCaption}
\item[{{\bf Ethumb\+\_\+\+Exists} $\ast$}]{exists}
\end{DoxyParamCaption}
)}}\label{group__Ethumb__Client__Basics_gae68364004bf3ba3247fab20efc58f146}


Check if an exists request was cancelled. 


\begin{DoxyParams}{Parameters}
{\em exists} & the request to check. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
return E\+I\+N\+A\+\_\+\+T\+R\+U\+E if the request was cancelled. 
\end{DoxyReturn}


References ecore\+\_\+thread\+\_\+check(), E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E, and E\+I\+N\+A\+\_\+\+T\+R\+U\+E.

\hypertarget{group__Ethumb__Client__Basics_gaa09f3c82539082042f47196c47ef8251}{\index{Ethumb Client Basics@{Ethumb Client Basics}!ethumb\+\_\+client\+\_\+generate@{ethumb\+\_\+client\+\_\+generate}}
\index{ethumb\+\_\+client\+\_\+generate@{ethumb\+\_\+client\+\_\+generate}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{ethumb\+\_\+client\+\_\+generate}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} int ethumb\+\_\+client\+\_\+generate (
\begin{DoxyParamCaption}
\item[{{\bf Ethumb\+\_\+\+Client} $\ast$}]{client, }
\item[{{\bf Ethumb\+\_\+\+Client\+\_\+\+Generate\+\_\+\+Cb}}]{generated\+\_\+cb, }
\item[{const void $\ast$}]{data, }
\item[{{\bf Eina\+\_\+\+Free\+\_\+\+Cb}}]{free\+\_\+data}
\end{DoxyParamCaption}
)}}\label{group__Ethumb__Client__Basics_gaa09f3c82539082042f47196c47ef8251}


Ask server to generate thumbnail. 

This process is asynchronous and will report back from main loop using {\itshape generated\+\_\+cb}. One can cancel this request by calling \hyperlink{group__Ethumb__Client__Basics_ga55fad34988a1cde2962141e25c5b26c5}{ethumb\+\_\+client\+\_\+generate\+\_\+cancel()} or \hyperlink{group__Ethumb__Client__Basics_ga37569c3c40b5e0f30d48db23acf4a344}{ethumb\+\_\+client\+\_\+generate\+\_\+cancel\+\_\+all()}, but not that request might be processed by server already and no generated files will be removed if that is the case.

This will not check if file already exists, this should be done by explicitly calling \hyperlink{group__Ethumb__Client__Basics_ga77e6ec3b0e2d1c99a524399da6a24012}{ethumb\+\_\+client\+\_\+thumb\+\_\+exists()}. That is, this function will override any existing thumbnail.


\begin{DoxyParams}{Parameters}
{\em client} & client instance. Must {\bfseries not} be {\ttfamily N\+U\+L\+L} and client must be connected (after connected\+\_\+cb is called). \\
\hline
{\em generated\+\_\+cb} & function to report generation results. \\
\hline
{\em data} & context argument to give back to {\itshape generated\+\_\+cb}. May be {\ttfamily N\+U\+L\+L}. \\
\hline
{\em data} & context to give back to {\itshape generate\+\_\+cb}. May be {\ttfamily N\+U\+L\+L}. \\
\hline
{\em free\+\_\+data} & used to release {\itshape data} resources after {\itshape generated\+\_\+cb} is called or user calls \hyperlink{group__Ethumb__Client__Basics_ga23330db7a756b6ba8026b1bb33ce720d}{ethumb\+\_\+client\+\_\+disconnect()}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
identifier or -\/1 on error. If -\/1 is returned (error) then {\itshape free\+\_\+data} is {\bfseries not} called!
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Ethumb__Client__Basics_gae642a2b632953f0dd2d72bcb8ae19377}{ethumb\+\_\+client\+\_\+connect()} 

\hyperlink{group__Ethumb__Client__Basics_gaf1bfc6777a81a1141391f87b0acaadc2}{ethumb\+\_\+client\+\_\+file\+\_\+set()} 

\hyperlink{group__Ethumb__Client__Basics_ga77e6ec3b0e2d1c99a524399da6a24012}{ethumb\+\_\+client\+\_\+thumb\+\_\+exists()} 

\hyperlink{group__Ethumb__Client__Basics_ga55fad34988a1cde2962141e25c5b26c5}{ethumb\+\_\+client\+\_\+generate\+\_\+cancel()} 

\hyperlink{group__Ethumb__Client__Basics_ga37569c3c40b5e0f30d48db23acf4a344}{ethumb\+\_\+client\+\_\+generate\+\_\+cancel\+\_\+all()} 
\end{DoxySeeAlso}


References E\+R\+R, ethumb\+\_\+client\+\_\+ethumb\+\_\+setup(), ethumb\+\_\+cmp(), ethumb\+\_\+file\+\_\+get(), and ethumb\+\_\+free().

\hypertarget{group__Ethumb__Client__Basics_ga55fad34988a1cde2962141e25c5b26c5}{\index{Ethumb Client Basics@{Ethumb Client Basics}!ethumb\+\_\+client\+\_\+generate\+\_\+cancel@{ethumb\+\_\+client\+\_\+generate\+\_\+cancel}}
\index{ethumb\+\_\+client\+\_\+generate\+\_\+cancel@{ethumb\+\_\+client\+\_\+generate\+\_\+cancel}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{ethumb\+\_\+client\+\_\+generate\+\_\+cancel}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void ethumb\+\_\+client\+\_\+generate\+\_\+cancel (
\begin{DoxyParamCaption}
\item[{{\bf Ethumb\+\_\+\+Client} $\ast$}]{client, }
\item[{int}]{id, }
\item[{{\bf Ethumb\+\_\+\+Client\+\_\+\+Generate\+\_\+\+Cancel\+\_\+\+Cb}}]{cancel\+\_\+cb, }
\item[{const void $\ast$}]{data, }
\item[{{\bf Eina\+\_\+\+Free\+\_\+\+Cb}}]{free\+\_\+data}
\end{DoxyParamCaption}
)}}\label{group__Ethumb__Client__Basics_ga55fad34988a1cde2962141e25c5b26c5}


Ask server to cancel generation of thumbnail. 


\begin{DoxyParams}{Parameters}
{\em client} & client instance. Must {\bfseries not} be {\ttfamily N\+U\+L\+L} and client must be connected (after connected\+\_\+cb is called). \\
\hline
{\em id} & valid id returned by \hyperlink{group__Ethumb__Client__Basics_gaa09f3c82539082042f47196c47ef8251}{ethumb\+\_\+client\+\_\+generate()} \\
\hline
{\em cancel\+\_\+cb} & function to report cancellation results. \\
\hline
{\em data} & context argument to give back to {\itshape cancel\+\_\+cb}. May be {\ttfamily N\+U\+L\+L}. \\
\hline
{\em data} & context to give back to {\itshape cancel\+\_\+cb}. May be {\ttfamily N\+U\+L\+L}. \\
\hline
{\em free\+\_\+data} & used to release {\itshape data} resources after {\itshape cancel\+\_\+cb} is called or user calls \hyperlink{group__Ethumb__Client__Basics_ga23330db7a756b6ba8026b1bb33ce720d}{ethumb\+\_\+client\+\_\+disconnect()}. \\
\hline
\end{DoxyParams}


References \+\_\+\+Eina\+\_\+\+List\+::data, eina\+\_\+list\+\_\+append(), eina\+\_\+list\+\_\+remove\+\_\+list(), eina\+\_\+stringshare\+\_\+del(), eldbus\+\_\+pending\+\_\+cancel(), eldbus\+\_\+proxy\+\_\+call(), and \+\_\+\+Eina\+\_\+\+List\+::next.

\hypertarget{group__Ethumb__Client__Basics_ga37569c3c40b5e0f30d48db23acf4a344}{\index{Ethumb Client Basics@{Ethumb Client Basics}!ethumb\+\_\+client\+\_\+generate\+\_\+cancel\+\_\+all@{ethumb\+\_\+client\+\_\+generate\+\_\+cancel\+\_\+all}}
\index{ethumb\+\_\+client\+\_\+generate\+\_\+cancel\+\_\+all@{ethumb\+\_\+client\+\_\+generate\+\_\+cancel\+\_\+all}!Ethumb Client Basics@{Ethumb Client Basics}}
\subsubsection[{ethumb\+\_\+client\+\_\+generate\+\_\+cancel\+\_\+all}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void ethumb\+\_\+client\+\_\+generate\+\_\+cancel\+\_\+all (
\begin{DoxyParamCaption}
\item[{{\bf Ethumb\+\_\+\+Client} $\ast$}]{client}
\end{DoxyParamCaption}
)}}\label{group__Ethumb__Client__Basics_ga37569c3c40b5e0f30d48db23acf4a344}


Ask server to cancel generation of all thumbnails. 


\begin{DoxyParams}{Parameters}
{\em client} & client instance. Must {\bfseries not} be {\ttfamily N\+U\+L\+L} and client must be connected (after connected\+\_\+cb is called).\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Ethumb__Client__Basics_ga55fad34988a1cde2962141e25c5b26c5}{ethumb\+\_\+client\+\_\+generate\+\_\+cancel()} 
\end{DoxySeeAlso}


References E\+I\+N\+A\+\_\+\+L\+I\+S\+T\+\_\+\+F\+R\+E\+E, eina\+\_\+stringshare\+\_\+del(), eldbus\+\_\+pending\+\_\+cancel(), and eldbus\+\_\+proxy\+\_\+call().

