summaryrefslogtreecommitdiff
path: root/legacy/ethumb/src/bin
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2009-09-12 18:23:05 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2009-09-12 18:23:05 +0000
commit97645fe7bc69994a5430a9fbf1b521af75cb11a6 (patch)
treef5279769191bd394b27748e223d3715045e7aa44 /legacy/ethumb/src/bin
parent52de9e33cdf7bd4f8b769388faf54651d42e5844 (diff)
API BREAK: Fix Ethumb API to be more EFL-like
* Callbacks were named to help Vala bindings. * All callbacks get 'void *data' as first argument, always. * All async methods get free_data parameters and call them also on disconnect() * queue_remove() renamed to generate_cancel() to be more clear. * queue_clear() renamed tp generate_cancel_call() to be more clear. SVN revision: 42445
Diffstat (limited to '')
-rw-r--r--legacy/ethumb/src/bin/ethumb.c2
-rw-r--r--legacy/ethumb/src/bin/ethumbd.c8
-rw-r--r--legacy/ethumb/src/bin/ethumbd_child.c13
-rw-r--r--legacy/ethumb/src/bin/ethumbd_client.c4
4 files changed, 13 insertions, 14 deletions
diff --git a/legacy/ethumb/src/bin/ethumb.c b/legacy/ethumb/src/bin/ethumb.c
index 5fb285e335..0e31942ae0 100644
--- a/legacy/ethumb/src/bin/ethumb.c
+++ b/legacy/ethumb/src/bin/ethumb.c
@@ -133,7 +133,7 @@ _thumb_report(const char *mode, Ethumb *e)
133} 133}
134 134
135static void 135static void
136_finished_thumb(Ethumb *e, Eina_Bool success, void *data __UNUSED__) 136_finished_thumb( void *data __UNUSED__, Ethumb *e, Eina_Bool success)
137{ 137{
138 const char *mode = success ? "GENERATED" : "FAILED"; 138 const char *mode = success ? "GENERATED" : "FAILED";
139 _thumb_report(mode, e); 139 _thumb_report(mode, e);
diff --git a/legacy/ethumb/src/bin/ethumbd.c b/legacy/ethumb/src/bin/ethumbd.c
index 731337a068..0cce3ece73 100644
--- a/legacy/ethumb/src/bin/ethumbd.c
+++ b/legacy/ethumb/src/bin/ethumbd.c
@@ -42,10 +42,10 @@
42 42
43#define MAX_ID 2000000 43#define MAX_ID 2000000
44 44
45#define DBG(...) EINA_ERROR_PDBG(__VA_ARGS__) 45#define DBG(...) EINA_LOG_DBG(__VA_ARGS__)
46#define INF(...) EINA_ERROR_PINFO(__VA_ARGS__) 46#define INF(...) EINA_LOG_INFO(__VA_ARGS__)
47#define WRN(...) EINA_ERROR_PWARN(__VA_ARGS__) 47#define WRN(...) EINA_LOG_WARN(__VA_ARGS__)
48#define ERR(...) EINA_ERROR_PERR(__VA_ARGS__) 48#define ERR(...) EINA_LOG_ERR(__VA_ARGS__)
49 49
50static const char _ethumb_dbus_bus_name[] = "org.enlightenment.Ethumb"; 50static const char _ethumb_dbus_bus_name[] = "org.enlightenment.Ethumb";
51static const char _ethumb_dbus_interface[] = "org.enlightenment.Ethumb"; 51static const char _ethumb_dbus_interface[] = "org.enlightenment.Ethumb";
diff --git a/legacy/ethumb/src/bin/ethumbd_child.c b/legacy/ethumb/src/bin/ethumbd_child.c
index 5a6ac805a0..48516056b5 100644
--- a/legacy/ethumb/src/bin/ethumbd_child.c
+++ b/legacy/ethumb/src/bin/ethumbd_child.c
@@ -33,10 +33,10 @@
33 33
34#include "ethumbd_private.h" 34#include "ethumbd_private.h"
35 35
36#define DBG(...) EINA_ERROR_PDBG(__VA_ARGS__) 36#define DBG(...) EINA_LOG_DBG(__VA_ARGS__)
37#define INF(...) EINA_ERROR_PINFO(__VA_ARGS__) 37#define INF(...) EINA_LOG_INFO(__VA_ARGS__)
38#define WRN(...) EINA_ERROR_PWARN(__VA_ARGS__) 38#define WRN(...) EINA_LOG_WARN(__VA_ARGS__)
39#define ERR(...) EINA_ERROR_PERR(__VA_ARGS__) 39#define ERR(...) EINA_LOG_ERR(__VA_ARGS__)
40 40
41#define NETHUMBS 100 41#define NETHUMBS 100
42 42
@@ -228,7 +228,7 @@ _ec_op_del(struct _Ethumbd_Child *ec)
228} 228}
229 229
230static void 230static void
231_ec_op_generated_cb(Ethumb *e, Eina_Bool success, void *data) 231_ec_op_generated_cb(void *data, Ethumb *e, Eina_Bool success)
232{ 232{
233 struct _Ethumbd_Child *ec = data; 233 struct _Ethumbd_Child *ec = data;
234 const char *thumb_path, *thumb_key; 234 const char *thumb_path, *thumb_key;
@@ -267,8 +267,7 @@ _ec_op_generate(struct _Ethumbd_Child *ec)
267 267
268 ethumb_file_set(ec->ethumbt[index], path, key); 268 ethumb_file_set(ec->ethumbt[index], path, key);
269 ethumb_thumb_path_set(ec->ethumbt[index], thumb_path, thumb_key); 269 ethumb_thumb_path_set(ec->ethumbt[index], thumb_path, thumb_key);
270 ethumb_generate(ec->ethumbt[index], _ec_op_generated_cb, 270 ethumb_generate(ec->ethumbt[index], _ec_op_generated_cb, ec, NULL);
271 ec, NULL);
272 271
273 free(path); 272 free(path);
274 free(key); 273 free(key);
diff --git a/legacy/ethumb/src/bin/ethumbd_client.c b/legacy/ethumb/src/bin/ethumbd_client.c
index 69dac049b9..685cb9b0ac 100644
--- a/legacy/ethumb/src/bin/ethumbd_client.c
+++ b/legacy/ethumb/src/bin/ethumbd_client.c
@@ -149,7 +149,7 @@ _thumb_report(const char *mode, const char *src_path, const char *src_key, const
149} 149}
150 150
151static void 151static void
152_finished_thumb(long id __UNUSED__, const char *src_path, const char *src_key, const char *thumb_path, const char *thumb_key, Eina_Bool success, void *data __UNUSED__) 152_finished_thumb(void *data __UNUSED__, Ethumb_Client *client __UNUSED__, int id __UNUSED__, const char *src_path, const char *src_key, const char *thumb_path, const char *thumb_key, Eina_Bool success)
153{ 153{
154 const char *mode = success ? "GENERATED" : "FAILED"; 154 const char *mode = success ? "GENERATED" : "FAILED";
155 _thumb_report(mode, src_path, src_key, thumb_path, thumb_key); 155 _thumb_report(mode, src_path, src_key, thumb_path, thumb_key);
@@ -157,7 +157,7 @@ _finished_thumb(long id __UNUSED__, const char *src_path, const char *src_key, c
157} 157}
158 158
159static void 159static void
160_connected(Ethumb_Client *c, Eina_Bool success, void *data) 160_connected(void *data, Ethumb_Client *c, Eina_Bool success)
161{ 161{
162 struct options *opts = data; 162 struct options *opts = data;
163 const char *thumb_path, *thumb_key; 163 const char *thumb_path, *thumb_key;