Functions | Variables
ethumb_client.c File Reference

This is the client-server thumbnail library, see Client-Server Thumbnailing Tutorial. More...

Functions

int ethumb_client_init (void)
 Initialize the Ethumb_Client library. More...
 
int ethumb_client_shutdown (void)
 Shut down the Ethumb_Client library. More...
 
static void _name_start (void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
 
Ethumb_Clientethumb_client_connect (Ethumb_Client_Connect_Cb connect_cb, const void *data, Eina_Free_Cb free_data)
 Connects to Ethumb server and return the client instance. More...
 
void ethumb_client_disconnect (Ethumb_Client *client)
 Disconnect the client, releasing all client resources. More...
 
void ethumb_client_on_server_die_callback_set (Ethumb_Client *client, Ethumb_Client_Die_Cb server_die_cb, const void *data, Eina_Free_Cb free_data)
 Sets the callback to report server died. More...
 
static Eldbus_Message_Iter_setup_iterator_open (Eldbus_Message_Iter *array, Eldbus_Message_Iter **entry, const char *key, const char *type)
 
static void _setup_iterator_close (Eldbus_Message_Iter *array, Eldbus_Message_Iter *entry, Eldbus_Message_Iter *variant)
 
void ethumb_client_ethumb_setup (Ethumb_Client *client)
 Send setup to server. More...
 
void ethumb_client_generate_cancel (Ethumb_Client *client, int id, Ethumb_Client_Generate_Cancel_Cb cancel_cb, const void *data, Eina_Free_Cb free_data)
 Ask server to cancel generation of thumbnail. More...
 
void ethumb_client_generate_cancel_all (Ethumb_Client *client)
 Ask server to cancel generation of all thumbnails. More...
 
void ethumb_client_fdo_set (Ethumb_Client *client, Ethumb_Thumb_FDO_Size s)
 Configure future requests to use FreeDesktop.Org preset. More...
 
void ethumb_client_size_set (Ethumb_Client *client, int tw, int th)
 Configure future request to use custom size. More...
 
void ethumb_client_size_get (const Ethumb_Client *client, int *tw, int *th)
 Retrieve future request to use custom size. More...
 
void ethumb_client_format_set (Ethumb_Client *client, Ethumb_Thumb_Format f)
 Configure format to use for future requests. More...
 
Ethumb_Thumb_Format ethumb_client_format_get (const Ethumb_Client *client)
 Retrieve format to use for future requests. More...
 
void ethumb_client_aspect_set (Ethumb_Client *client, Ethumb_Thumb_Aspect a)
 Configure aspect mode to use. More...
 
Ethumb_Thumb_Aspect ethumb_client_aspect_get (const Ethumb_Client *client)
 Get current aspect in use for requests. More...
 
void ethumb_client_orientation_set (Ethumb_Client *client, Ethumb_Thumb_Orientation o)
 Configure orientation to use for future requests. More...
 
Ethumb_Thumb_Orientation ethumb_client_orientation_get (const Ethumb_Client *client)
 Get current orientation in use for requests. More...
 
void ethumb_client_crop_align_set (Ethumb_Client *client, float x, float y)
 Configure crop alignment in use for future requests. More...
 
void ethumb_client_crop_align_get (const Ethumb_Client *client, float *x, float *y)
 Get current crop alignment in use for requests. More...
 
void ethumb_client_quality_set (Ethumb_Client *client, int quality)
 Configure quality to be used in thumbnails. More...
 
int ethumb_client_quality_get (const Ethumb_Client *client)
 Get quality to be used in thumbnails. More...
 
void ethumb_client_compress_set (Ethumb_Client *client, int compress)
 Configure compression level used in requests. More...
 
int ethumb_client_compress_get (const Ethumb_Client *client)
 Get compression level used in requests. More...
 
Eina_Bool ethumb_client_frame_set (Ethumb_Client *client, const char *file, const char *group, const char *swallow)
 Set frame to apply to future thumbnails. More...
 
void ethumb_client_dir_path_set (Ethumb_Client *client, const char *path)
 Configure where to store thumbnails in future requests. More...
 
const char * ethumb_client_dir_path_get (const Ethumb_Client *client)
 Get base directory path where to store thumbnails. More...
 
void ethumb_client_category_set (Ethumb_Client *client, const char *category)
 Category directory to store thumbnails. More...
 
const char * ethumb_client_category_get (const Ethumb_Client *client)
 Get category sub-directory where to store thumbnails. More...
 
void ethumb_client_video_time_set (Ethumb_Client *client, float t)
 Set the video time (duration) in seconds. More...
 
void ethumb_client_video_start_set (Ethumb_Client *client, float start)
 Set initial video position to start thumbnailing, in percentage. More...
 
void ethumb_client_video_interval_set (Ethumb_Client *client, float interval)
 Set the video frame interval, in seconds. More...
 
void ethumb_client_video_ntimes_set (Ethumb_Client *client, unsigned int ntimes)
 Set the number of frames to thumbnail. More...
 
void ethumb_client_video_fps_set (Ethumb_Client *client, unsigned int fps)
 Set the number of frames per second to thumbnail the video. More...
 
void ethumb_client_document_page_set (Ethumb_Client *client, unsigned int page)
 Set the page number to thumbnail in paged documents. More...
 
Eina_Bool ethumb_client_file_set (Ethumb_Client *client, const char *path, const char *key)
 Set source file to be thumbnailed. More...
 
void ethumb_client_file_get (Ethumb_Client *client, const char **path, const char **key)
 Get values set with ethumb_client_file_get() More...
 
void ethumb_client_file_free (Ethumb_Client *client)
 Reset previously set file to NULL. More...
 
void ethumb_client_thumb_path_set (Ethumb_Client *client, const char *path, const char *key)
 Set a defined path and key to store the thumbnail. More...
 
void ethumb_client_thumb_path_get (Ethumb_Client *client, const char **path, const char **key)
 Get the configured thumbnail path. More...
 
Ethumb_Existsethumb_client_thumb_exists (Ethumb_Client *client, Ethumb_Client_Thumb_Exists_Cb exists_cb, const void *data)
 Checks whenever file already exists (locally!) More...
 
void ethumb_client_thumb_exists_cancel (Ethumb_Exists *exists)
 Cancel an ongoing exists request. More...
 
Eina_Bool ethumb_client_thumb_exists_check (Ethumb_Exists *exists)
 Check if an exists request was cancelled. More...
 
int ethumb_client_generate (Ethumb_Client *client, Ethumb_Client_Generate_Cb generated_cb, const void *data, Eina_Free_Cb free_data)
 Ask server to generate thumbnail. More...
 
static void _ethumb_client_async_free (Ethumb_Client_Async *async)
 
static void _ethumb_client_thumb_finish (void *data, Ethumb_Client *client, int id, const char *file, const char *key, const char *thumb_path, const char *thumb_key, Eina_Bool success)
 
static Eina_Bool _ethumb_client_thumb_generate_idler (void *data)
 
static void _ethumb_client_thumb_exists (void *data, Ethumb_Client *client, Ethumb_Exists *request, Eina_Bool exists)
 
static Eina_Bool _ethumb_client_thumb_exists_idler (void *data)
 
Ethumb_Client_Async * ethumb_client_thumb_async_get (Ethumb_Client *client, Ethumb_Client_Async_Done_Cb done, Ethumb_Client_Async_Error_Cb error, const void *data)
 
void ethumb_client_thumb_async_cancel (Ethumb_Client *client, Ethumb_Client_Async *request)
 

Variables

static Ecore_Idleridler [2] = { NULL, NULL }
 
static Eina_Listpending = NULL
 
static Eina_Listidle_tasks [2] = { NULL, NULL }
 

Detailed Description

This is the client-server thumbnail library, see Client-Server Thumbnailing Tutorial.

Copyright (C) 2009 by ProFUSION embedded systems

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, see http://www.gnu.org/licenses/.

Author
Rafael Antognolli antog.nosp@m.noll.nosp@m.i@pro.nosp@m.fusi.nosp@m.on.mo.nosp@m.bi
Gustavo Sverzut Barbieri barbi.nosp@m.eri@.nosp@m.profu.nosp@m.sion.nosp@m..mobi