ethumb_client.c File Reference

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

- File List
- Globals

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.
int | ethumb_client_shutdown (void)
| Shut down the Ethumb_Client library.
static void | _name_start (void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
Ethumb_Client * | ethumb_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.
void | ethumb_client_disconnect (Ethumb_Client *client)
| Disconnect the client, releasing all client resources.
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.
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.
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.
void | ethumb_client_generate_cancel_all (Ethumb_Client *client)
| Ask server to cancel generation of all thumbnails.
void | ethumb_client_fdo_set (Ethumb_Client *client, Ethumb_Thumb_FDO_Size s)
| Configure future requests to use FreeDesktop.Org preset.
void | ethumb_client_size_set (Ethumb_Client *client, int tw, int th)
| Configure future request to use custom size.
void | ethumb_client_size_get (const Ethumb_Client *client, int *tw, int *th)
| Retrieve future request to use custom size.
void | ethumb_client_format_set (Ethumb_Client *client, Ethumb_Thumb_Format f)
| Configure format to use for future requests.
Ethumb_Thumb_Format | ethumb_client_format_get (const Ethumb_Client *client)
| Retrieve format to use for future requests.
void | ethumb_client_aspect_set (Ethumb_Client *client, Ethumb_Thumb_Aspect a)
| Configure aspect mode to use.
Ethumb_Thumb_Aspect | ethumb_client_aspect_get (const Ethumb_Client *client)
| Get current aspect in use for requests.
void | ethumb_client_orientation_set (Ethumb_Client *client, Ethumb_Thumb_Orientation o)
| Configure orientation to use for future requests.
Ethumb_Thumb_Orientation | ethumb_client_orientation_get (const Ethumb_Client *client)
| Get current orientation in use for requests.
void | ethumb_client_crop_align_set (Ethumb_Client *client, float x, float y)
| Configure crop alignment in use for future requests.
void | ethumb_client_crop_align_get (const Ethumb_Client *client, float *x, float *y)
| Get current crop alignment in use for requests.
void | ethumb_client_quality_set (Ethumb_Client *client, int quality)
| Configure quality to be used in thumbnails.
int | ethumb_client_quality_get (const Ethumb_Client *client)
| Get quality to be used in thumbnails.
void | ethumb_client_compress_set (Ethumb_Client *client, int compress)
| Configure compression level used in requests.
int | ethumb_client_compress_get (const Ethumb_Client *client)
| Get compression level used in requests.
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.
void | ethumb_client_dir_path_set (Ethumb_Client *client, const char *path)
| Configure where to store thumbnails in future requests.
const char * | ethumb_client_dir_path_get (const Ethumb_Client *client)
| Get base directory path where to store thumbnails.
void | ethumb_client_category_set (Ethumb_Client *client, const char *category)
| Category directory to store thumbnails.
const char * | ethumb_client_category_get (const Ethumb_Client *client)
| Get category sub-directory where to store thumbnails.
void | ethumb_client_video_time_set (Ethumb_Client *client, float t)
| Set the video time (duration) in seconds.
void | ethumb_client_video_start_set (Ethumb_Client *client, float start)
| Set initial video position to start thumbnailing, in percentage.
void | ethumb_client_video_interval_set (Ethumb_Client *client, float interval)
| Set the video frame interval, in seconds.
void | ethumb_client_video_ntimes_set (Ethumb_Client *client, unsigned int ntimes)
| Set the number of frames to thumbnail.
void | ethumb_client_video_fps_set (Ethumb_Client *client, unsigned int fps)
| Set the number of frames per second to thumbnail the video.
void | ethumb_client_document_page_set (Ethumb_Client *client, unsigned int page)
| Set the page number to thumbnail in paged documents.
Eina_Bool | ethumb_client_file_set (Ethumb_Client *client, const char *path, const char *key)
| Set source file to be thumbnailed.
void | ethumb_client_file_get (Ethumb_Client *client, const char **path, const char **key)
| Get values set with ethumb_client_file_get()
void | ethumb_client_file_free (Ethumb_Client *client)
| Reset previously set file to `NULL`.
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.
void | ethumb_client_thumb_path_get (Ethumb_Client *client, const char **path, const char **key)
| Get the configured thumbnail path.
Ethumb_Exists * | ethumb_client_thumb_exists (Ethumb_Client *client, Ethumb_Client_Thumb_Exists_Cb exists_cb, const void *data)
| Checks whenever file already exists (locally!)
void | ethumb_client_thumb_exists_cancel (Ethumb_Exists *exists)
| Cancel an ongoing exists request.
Eina_Bool | ethumb_client_thumb_exists_check (Ethumb_Exists *exists)
| Check if an exists request was cancelled.
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.
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_Idler * | idler [2] = { NULL, NULL }
static Eina_List * | pending = NULL
static Eina_List * | idle_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