Enlightenment CVS committal Author : barbieri Project : e17 Module : libs/epsilon
Dir : e17/libs/epsilon/src/include Modified Files: Epsilon_Request.h epsilon_private.h Log Message: Epsilon major overhaul, breaks API. I fixed many issues with epsilon, mainly the Epsilon_Requests, since it broke the ABI, I also changed the API and now it looks a bit better. Changes overview: - epsilon_thumb_{init,shutdown} -> epsilon_request_{init,shutdown} - epsilon_del -> epsilon_request_del() - epsilon_add(file, dest, size, data) -> epsilon_request_add(file, size, data) reason: nobody was using "dest", and if one tried to, it was not implemented. Instead of implementing this, leave to users that could call ecore_file_cp() on the handler. - epsilon_request_add() has a fast path check for already existent thumbnails, instead of going to the server, just ecore_event_add(). To handle epsilon_request_del() fine, we now have to keep the Ecore_Event for further deletion. - epsilon_exists() now just checks the mtime of source and thumbnail, if source is newer, then return EPSILON_FAIL so users regenerate it. There is a possible optimization to be done (it's marked on code in the right place) that can read original file tags to avoid regenerating for copies, but it's not reliable and should be checked after the current ones. - reoder CFLAGS path order to first use local headers instead of the system. - check for errors when loading plugins. - updated every use of these API in e17 CVS. If you find a problem with these, let me know and I'll fix. =================================================================== RCS file: /cvs/e/e17/libs/epsilon/src/include/Epsilon_Request.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- Epsilon_Request.h 30 Oct 2007 23:59:31 -0000 1.3 +++ Epsilon_Request.h 2 Nov 2007 08:03:46 -0000 1.4 @@ -1,30 +1,11 @@ #ifndef _EPSILON_REQUEST_H #define _EPSILON_REQUEST_H -#ifdef EAPI -#undef EAPI -#endif -#ifdef WIN32 -# ifdef BUILDING_DLL -# define EAPI __declspec(dllexport) -# else -# define EAPI __declspec(dllimport) -# endif -#else -# ifdef __GNUC__ -# if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) -# else -# define EAPI -# endif -# else -# define EAPI -# endif -#endif +#include <Epsilon.h> /** * @file - * @brief Functions for dealing with Epsilon thumbs. + * @brief Functions for dealing with epsilon_thumbd requests. */ #ifdef __cplusplus @@ -35,23 +16,23 @@ struct _Epsilon_Request { - unsigned int id; /**< Identifier for this thumbnail */ - unsigned int size; /**< Thumbnail size to be generated */ - unsigned int status; /**< Status code of the thumbnail generation */ - char *path; /**< Path to file requiring thumbnail */ - char *dest; /**< Path to generated file, NULL on error */ - void *data; /**< Data associated with this thumbnail. */ + unsigned int id; /**< Identifier for this thumbnail */ + unsigned int size; /**< Thumbnail size to be generated */ + unsigned int status; /**< Status code of the thumbnail generation */ + char *path; /**< Path to file requiring thumbnail */ + char *dest; /**< Path to generated file, NULL on error */ + void *data; /**< Data associated with this thumbnail. */ + void *_event; /**< private, Pointer to Ecore_Event if it existent. */ }; -EAPI extern int EPSILON_EVENT_DONE; +EAPI extern int EPSILON_EVENT_DONE; /**< Ecore_Event type */ -EAPI int epsilon_thumb_init(void); -EAPI int epsilon_shutdown(void); -EAPI Epsilon_Request *epsilon_add(char *path, char *dst, int size, void *data); -EAPI void epsilon_del(Epsilon_Request *thumb); +EAPI int epsilon_request_init(void); +EAPI int epsilon_request_shutdown(void); +EAPI Epsilon_Request *epsilon_request_add(const char *path, Epsilon_Thumb_Size size, void *data); +EAPI void epsilon_request_del(Epsilon_Request *thumb); #ifdef __cplusplus } #endif - #endif =================================================================== RCS file: /cvs/e/e17/libs/epsilon/src/include/epsilon_private.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- epsilon_private.h 23 Oct 2007 22:04:53 -0000 1.4 +++ epsilon_private.h 2 Nov 2007 08:03:46 -0000 1.5 @@ -38,7 +38,7 @@ int offset; }; -Epsilon_Message *epsilon_message_new(int clientid, char *path, char *dst, int status); +Epsilon_Message *epsilon_message_new(int clientid, const char *path, int status); int epsilon_ipc_client_send(Ecore_Con_Client *cl, Epsilon_Message *msg); int epsilon_ipc_server_send(Ecore_Con_Server *cl, Epsilon_Message *msg); ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs