merge ethumb.

This one was a painful bitch. The edbus2 port was quite broken, mainly
leaking eina_stringshare and also not adding the '\0' to the strings
that are represented as bytearray (paths cannot be utf8 to avoid
translations).

Emotion plugin was also quite bogus and the video thumbnail as edje
(animated) is not working yet due bug in Edje_Edit api -- someone
needs to investigate this, seems strange.

Emotion plugin also had a bug that it was deleting the object from
inside object callback.

Now it seems to work. Please report if it does not.



SVN revision: 82675
devs/devilhorns/wayland_egl
Gustavo Sverzut Barbieri 10 years ago
parent ae51833bac
commit 34f5315141
  1. 7
      AUTHORS
  2. 10
      Makefile.am
  3. 80
      configure.ac
  4. 29
      data/Makefile.am
  5. 2
      data/emotion/checkme
  6. 2
      data/ethumb/checkme
  7. 0
      data/ethumb/frames/border-0.jpg
  8. 0
      data/ethumb/frames/default.edc
  9. 0
      dbus-services/org.enlightenment.Ethumb.service.in
  10. 7
      doc/main.dox
  11. 13
      m4/efl.m4
  12. 0
      old/ChangeLog.ethumb
  13. 0
      old/NEWS.ethumb
  14. 0
      old/README.ethumb
  15. 4
      pc/ethumb.pc.in
  16. 2
      pc/ethumb_client.pc.in
  17. 1
      src/Makefile.am
  18. 171
      src/Makefile_Ethumb.am
  19. 4
      src/bin/ethumb/ethumb.c
  20. 91
      src/bin/ethumb/ethumbd.c
  21. 6
      src/bin/ethumb/ethumbd_client.c
  22. 0
      src/bin/ethumb/ethumbd_private.h
  23. 34
      src/bin/ethumb/ethumbd_slave.c
  24. 3
      src/lib/edje/edje_edit.c
  25. 69
      src/lib/ethumb/Ethumb.h
  26. 0
      src/lib/ethumb/Ethumb_Plugin.h
  27. 1
      src/lib/ethumb/client/Ethumb_Client.h
  28. 57
      src/lib/ethumb/client/ethumb_client.c
  29. 62
      src/lib/ethumb/ethumb.c
  30. 0
      src/lib/ethumb/ethumb_private.h
  31. 0
      src/lib/ethumb/md5.c
  32. 0
      src/lib/ethumb/md5.h
  33. 125
      src/modules/ethumb/emotion/emotion.c
  34. BIN
      src/modules/ethumb/emotion/placeholder.png
  35. 6
      src/modules/ethumb/emotion/template.edc
  36. 4
      src/tests/ethumb/ethumb_dbus.c

@ -257,3 +257,10 @@ Pierre Le Magourou <pierre.lemagourou@openwide.fr>
Hugo Camboulive <hugo.camboulive@zodiacaerospace.com>
Sohyun Kim <anna1014.kim@samsung.com>
Leandro Dorileo <dorileo@profusion.mobi>
Ethumb
------
Rafael Antognolli <antognolli@profusion.mobi>
Cedric Bail <cedric.bail@free.fr>
Mikael SANS <sans.mikael@gmail.com>
Jérôme Pinot <ngc891@gmail.com>

@ -62,6 +62,7 @@ old/ChangeLog.eio \
old/ChangeLog.embryo \
old/ChangeLog.emotion \
old/ChangeLog.escape \
old/ChangeLog.ethumb \
old/ChangeLog.evas \
old/ChangeLog.evil \
old/ChangeLog.evil.0 \
@ -75,6 +76,7 @@ old/NEWS.eio \
old/NEWS.embryo \
old/NEWS.emotion \
old/NEWS.escape \
old/NEWS.ethumb \
old/NEWS.evas \
old/NEWS.evil \
old/README.ecore \
@ -89,6 +91,7 @@ old/README.embryo \
old/README.emotion \
old/README.ephysics \
old/README.escape \
old/README.ethumb \
old/README.evas \
old/README.evil \
spec/efl.spec
@ -125,7 +128,9 @@ pc/efreet.pc \
pc/efreet-mime.pc \
pc/efreet-trash.pc \
pc/edje.pc \
pc/emotion.pc
pc/emotion.pc \
pc/ethumb.pc \
pc/ethumb_client.pc
if BUILD_ENGINE_SOFTWARE_X11
pkgconfig_DATA += pc/evas-software-x11.pc
@ -216,7 +221,8 @@ endif
servicedir = @dbusservicedir@
service_DATA = \
dbus-services/org.enlightenment.Efreet.service
dbus-services/org.enlightenment.Efreet.service \
dbus-services/org.enlightenment.Ethumb.service

@ -3375,6 +3375,81 @@ EFL_LIB_END([Emotion])
#### End of Emotion
#### Ethumb
EFL_LIB_START([Ethumb])
### Default values
### Additional options to configure
### Checks for programs
### Checks for libraries
EFL_PLATFORM_DEPEND([EINA], [evil])
EFL_INTERNAL_DEPEND_PKG([ETHUMB], [eina])
EFL_INTERNAL_DEPEND_PKG([ETHUMB], [evas])
EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore])
EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore-evas])
EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore-file])
EFL_INTERNAL_DEPEND_PKG([ETHUMB], [edje])
## modules
EFL_EVAL_PKGS([ETHUMB])
### Checks for header files
### Checks for types
### Checks for structures
### Checks for compiler characteristics
### Checks for linker characteristics
### Checks for library functions
### Check availability
EFL_LIB_END([Ethumb])
#### End of Ethumb
#### Ethumb_Client
EFL_LIB_START([Ethumb_Client])
### Default values
### Additional options to configure
### Checks for programs
### Checks for libraries
EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eina])
EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [ecore])
EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [edbus])
EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [ethumb])
EFL_EVAL_PKGS([ETHUMB_CLIENT])
### Checks for header files
### Checks for types
### Checks for structures
### Checks for compiler characteristics
### Checks for linker characteristics
### Checks for library functions
### Check availability
EFL_LIB_END([Ethumb_Client])
#### End of Ethumb_Client
AC_ARG_ENABLE([always-build-examples],
[AC_HELP_STRING([--enable-always-build-examples],
[always build examples. @<:@default=disabled@:>@])],
@ -3458,7 +3533,10 @@ pc/eeze.pc
pc/ephysics.pc
pc/edje.pc
pc/emotion.pc
pc/ethumb.pc
pc/ethumb_client.pc
dbus-services/org.enlightenment.Efreet.service
dbus-services/org.enlightenment.Ethumb.service
$po_makefile_in
])
@ -3665,6 +3743,8 @@ echo "Eeze...................: ${efl_lib_optional_eeze} (tizen: ${want_tizen})"
echo "EPhysics...............: ${efl_lib_optional_ephysics}"
echo "Edje...................: yes (physics=${efl_lib_optional_ephysics}, multisense=${want_multisense})"
echo "Emotion................: yes (gstreamer=${have_emotion_module_gstreamer} (xoverlay=${have_gst_xoverlay}), xine=${have_emotion_module_xine}, generic=${have_emotion_module_generic}, v4l2=${want_v4l2})"
echo "Ethumb.................: yes"
echo "Ethumb_Client..........: yes"
echo "Tests..................: ${build_tests}"
echo "Examples...............: make examples"

@ -60,9 +60,38 @@ edje/vim/snippets/edc.snippets \
edje/vim/syntax/edc.vim \
edje/vim/syntax/embryo.vim
# Helper for people using EDJ
EDJE_CC = EFL_RUN_IN_TREE=1 $(top_builddir)/src/bin/edje/edje_cc
EDJE_CC_FLAGS_VERBOSE_0 =
EDJE_CC_FLAGS_VERBOSE_1 = -v
EDJE_CC_FLAGS = $(EDJE_CC_FLAGS_VERBOSE_$(V))
AM_V_EDJ = $(am__v_EDJ_$(V))
am__v_EDJ_ = $(am__v_EDJ_$(AM_DEFAULT_VERBOSITY))
am__v_EDJ_0 = @echo " EDJ " $@;
########################################################################
# Emotion
emotionfilesdir = $(datadir)/emotion
emotionfiles_DATA = emotion/checkme
EXTRA_DIST += $(emotionfiles_DATA)
########################################################################
# Ethumb
ethumbfilesdir = $(datadir)/ethumb
ethumbfiles_DATA = ethumb/checkme
EXTRA_DIST += $(ethumbfiles_DATA)
ethumbframesdir = $(datadir)/ethumb/frames
ethumbframes_DATA = \
ethumb/frames/default.edj
ethumb/frames/default.edj: ethumb/frames/default.edc
@$(MKDIR_P) ethumb/frames/
$(AM_V_EDJ)$(EDJE_CC) $(EDJE_CC_FLAGS) -id $(srcdir)/ethumb/frames/ $< $@
EXTRA_DIST += \
ethumb/frames/default.edc \
ethumb/frames/border-0.jpg

@ -1,2 +1,2 @@
This is just a test file used to help emotion determine its prefix
This is just a test file used to help ethumb determine its prefix
location.

@ -0,0 +1,2 @@
This is just a test file used to help evas determine its prefix
location.

Before

Width:  |  Height:  |  Size: 542 B

After

Width:  |  Height:  |  Size: 542 B

@ -22,6 +22,7 @@
* @li @ref ephysics_main physics simulation integration and visual effects.
* @li @ref edje_main layout and theme library with super powers.
* @li @ref emotion_main to play music and videos.
* @li @ref ethumb_main to generate thumbnail images of files.
*
*/
@ -232,3 +233,9 @@
*
* @brief Plays music and videos.
*/
/**
* @defgroup Ethumb
*
* @brief Generates thumbnail images of files.
*/

@ -16,7 +16,18 @@ dnl Adds a pkg-config dependency on another EFL.
AC_DEFUN([EFL_INTERNAL_DEPEND_PKG],
[dnl
m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
requirements_pc_[]m4_defn([DOWNEFL])="$2 >= ${PACKAGE_VERSION} ${requirements_pc_[][]m4_defn([DOWNEFL])}"
dnl TODO: we need to fix the package config names for 2.0
dnl TODO: and make them uniform in scheme.
depname="$2"
case "${depname}" in
edbus)
depname="edbus2"
;;
ethumb-client)
depname="ethumb_client"
;;
esac
requirements_pc_[]m4_defn([DOWNEFL])="${depname} >= ${PACKAGE_VERSION} ${requirements_pc_[][]m4_defn([DOWNEFL])}"
m4_popdef([DOWNEFL])dnl
])

@ -2,10 +2,12 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
modules=@libdir@/ethumb/modules
module_arch=@MODULE_ARCH@
Name: ethumb
Description: Thumbnail Generator Library
Requires: @requirement_ethumb@
Version: @VERSION@
Requires.private: @requirements_pc_ethumb@
Libs: -L${libdir} -lethumb
Cflags: -I${includedir}/ethumb-@VMAJ@

@ -5,7 +5,7 @@ includedir=@includedir@
Name: ethumb_client
Description: Thumbnail Client Library
Requires: @requirement_ethumb_client@
Version: @VERSION@
Requires.private: @requirements_pc_ethumb_client@
Libs: -L${libdir} -lethumb_client
Cflags: -I${includedir}/ethumb-@VMAJ@

@ -43,6 +43,7 @@ include Makefile_Eeze.am
include Makefile_EPhysics.am
include Makefile_Edje.am
include Makefile_Emotion.am
include Makefile_Ethumb.am
.PHONY: benchmark examples

@ -0,0 +1,171 @@
### Library
lib_LTLIBRARIES += \
lib/ethumb/libethumb.la \
lib/ethumb/client/libethumb_client.la
ETHUMB_COMMON_CPPFLAGS = \
-I$(top_srcdir)/src/lib/eina \
-I$(top_builddir)/src/lib/eina \
-I$(top_srcdir)/src/lib/eo \
-I$(top_builddir)/src/lib/eo \
-I$(top_srcdir)/src/lib/ecore \
-I$(top_builddir)/src/lib/ecore \
-I$(top_srcdir)/src/lib/ecore_evas \
-I$(top_builddir)/src/lib/ecore_evas \
-I$(top_srcdir)/src/lib/ecore_file \
-I$(top_builddir)/src/lib/ecore_file \
-I$(top_srcdir)/src/lib/evas \
-I$(top_builddir)/src/lib/evas \
-I$(top_srcdir)/src/lib/edje \
-I$(top_builddir)/src/lib/edje \
-I$(top_srcdir)/src/lib/ethumb \
-I$(top_builddir)/src/lib/ethumb \
@EFL_COV_CFLAGS@ \
@ETHUMB_CFLAGS@ \
@USE_EVIL_CFLAGS@
ETHUMB_COMMON_LDADD = \
lib/eina/libeina.la \
lib/eo/libeo.la \
lib/ecore/libecore.la \
lib/ecore_evas/libecore_evas.la \
lib/ecore_file/libecore_file.la \
lib/evas/libevas.la \
lib/edje/libedje.la \
@EFL_COV_LIBS@ \
@USE_EVIL_LIBS@
installed_ethumbmainheadersdir = $(includedir)/ethumb-@VMAJ@
dist_installed_ethumbmainheaders_DATA = \
lib/ethumb/Ethumb.h \
lib/ethumb/client/Ethumb_Client.h
# libethumb.la
lib_ethumb_libethumb_la_SOURCES = \
lib/ethumb/Ethumb_Plugin.h \
lib/ethumb/ethumb_private.h \
lib/ethumb/md5.h \
lib/ethumb/ethumb.c \
lib/ethumb/md5.c
ETHUMB_COMMON_LIBADD = $(ETHUMB_COMMON_LDADD) @ETHUMB_LIBS@
ETHUMB_COMMON_LDADD += @ETHUMB_LDFLAGS@
ETHUMB_COMMON_USER_LIBADD = $(ETHUMB_COMMON_LIBADD) lib/ethumb/libethumb.la
ETHUMB_COMMON_USER_LDADD = $(ETHUMB_COMMON_LDADD) lib/ethumb/libethumb.la
lib_ethumb_libethumb_la_CPPFLAGS = \
$(ETHUMB_COMMON_CPPFLAGS) \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/ethumb\" \
-DPACKAGE_BUILD_DIR=\"`pwd`/$(top_builddir)\" \
-DEFL_ETHUMB_BUILD
lib_ethumb_libethumb_la_LIBADD = $(ETHUMB_COMMON_LIBADD)
lib_ethumb_libethumb_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
# libethumb_client.la
lib_ethumb_client_libethumb_client_la_SOURCES = \
lib/ethumb/client/ethumb_client.c
lib_ethumb_client_libethumb_client_la_CPPFLAGS = \
$(ETHUMB_COMMON_CPPFLAGS) \
-I$(top_srcdir)/src/lib/edbus \
-I$(top_builddir)/src/lib/edbus \
-I$(top_srcdir)/src/lib/ethumb/client \
-I$(top_builddir)/src/lib/ethumb/client \
-DEFL_ETHUMB_BUILD
lib_ethumb_client_libethumb_client_la_LIBADD = \
$(ETHUMB_COMMON_USER_LIBADD) \
lib/edbus/libedbus2.la
lib_ethumb_client_libethumb_client_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
## Modules
# Emotion
ethumbmoduleemotiondir = $(libdir)/ethumb/modules/emotion/$(MODULE_ARCH)
ethumbmoduleemotion_LTLIBRARIES = modules/ethumb/emotion/module.la
modules_ethumb_emotion_module_la_SOURCES = \
modules/ethumb/emotion/emotion.c
modules_ethumb_emotion_module_la_CPPFLAGS = \
$(ETHUMB_COMMON_CPPFLAGS) \
-I$(top_srcdir)/src/lib/eet \
-I$(top_builddir)/src/lib/eet \
-I$(top_srcdir)/src/lib/emotion \
-I$(top_builddir)/src/lib/emotion \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/ethumb\" \
-DPACKAGE_BUILD_DIR=\"`pwd`/$(top_builddir)\"
modules_ethumb_emotion_module_la_LIBADD = \
$(ETHUMB_COMMON_USER_LIBADD) \
lib/eet/libeet.la \
lib/emotion/libemotion.la
modules_ethumb_emotion_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_ethumb_emotion_module_la_LIBTOOLFLAGS = --tag=disable-static
modules/ethumb/emotion/template.edj: modules/ethumb/emotion/template.edc modules/ethumb/emotion/placeholder.png bin/edje/edje_cc
@$(MKDIR_P) modules/ethumb/emotion
$(AM_V_EDJ)$(EDJE_CC) $(EDJE_CC_FLAGS) -id $(srcdir)/modules/ethumb/emotion $< $@
ethumbmoduleemotion_DATA = modules/ethumb/emotion/template.edj
EXTRA_DIST += \
modules/ethumb/emotion/template.edc \
modules/ethumb/emotion/placeholder.png
### Binary
bin_PROGRAMS += \
bin/ethumb/ethumb \
bin/ethumb/ethumbd \
bin/ethumb/ethumbd_client
ethumbinternal_bindir=$(libdir)/ethumb/utils/$(MODULE_ARCH)
ethumbinternal_bin_PROGRAMS = \
bin/ethumb/ethumbd_slave
bin_ethumb_ethumb_SOURCES = bin/ethumb/ethumb.c
bin_ethumb_ethumb_CPPFLAGS = $(ETHUMB_COMMON_CPPFLAGS)
bin_ethumb_ethumb_LDADD = $(ETHUMB_COMMON_USER_LDADD)
# TODO: review why ethumd (master) links to libethumb! shouldn't
bin_ethumb_ethumbd_SOURCES = \
bin/ethumb/ethumbd_private.h \
bin/ethumb/ethumbd.c
bin_ethumb_ethumbd_CPPFLAGS = \
$(ETHUMB_COMMON_CPPFLAGS) \
-I$(top_srcdir)/src/lib/edbus \
-I$(top_builddir)/src/lib/edbus \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/ethumb\" \
-DPACKAGE_BUILD_DIR=\"`pwd`/$(top_builddir)\"
bin_ethumb_ethumbd_LDADD = \
$(ETHUMB_COMMON_USER_LDADD) \
lib/edbus/libedbus2.la
bin_ethumb_ethumbd_client_SOURCES = \
bin/ethumb/ethumbd_client.c
bin_ethumb_ethumbd_client_CPPFLAGS = \
$(ETHUMB_COMMON_CPPFLAGS) \
-I$(top_srcdir)/src/lib/edbus \
-I$(top_builddir)/src/lib/edbus \
-I$(top_srcdir)/src/lib/ethumb/client \
-I$(top_builddir)/src/lib/ethumb/client
bin_ethumb_ethumbd_client_LDADD = \
$(ETHUMB_COMMON_USER_LDADD) \
lib/ethumb/client/libethumb_client.la \
lib/edbus/libedbus2.la
bin_ethumb_ethumbd_slave_SOURCES = \
bin/ethumb/ethumbd_private.h \
bin/ethumb/ethumbd_slave.c
bin_ethumb_ethumbd_slave_CPPFLAGS = $(ETHUMB_COMMON_CPPFLAGS)
bin_ethumb_ethumbd_slave_LDADD = $(ETHUMB_COMMON_USER_LDADD)

@ -43,7 +43,7 @@ struct frame
};
static unsigned char
_ethumb_getopt_callback_frame_parse(const Ecore_Getopt *parser __UNUSED__, const Ecore_Getopt_Desc *desc __UNUSED__, const char *str, void *data __UNUSED__, Ecore_Getopt_Value *storage)
_ethumb_getopt_callback_frame_parse(const Ecore_Getopt *parser EINA_UNUSED, const Ecore_Getopt_Desc *desc EINA_UNUSED, const char *str, void *data EINA_UNUSED, Ecore_Getopt_Value *storage)
{
struct frame *f = (struct frame *)storage->ptrp;
const char *tfile, *tgroup, *tswallow, *base, *sep;
@ -135,7 +135,7 @@ _thumb_report(const char *mode, Ethumb *e)
}
static void
_finished_thumb( void *data __UNUSED__, Ethumb *e, Eina_Bool success)
_finished_thumb( void *data EINA_UNUSED, Ethumb *e, Eina_Bool success)
{
const char *mode = success ? "GENERATED" : "FAILED";
_thumb_report(mode, e);

@ -57,6 +57,7 @@ static const char _ethumb_dbus_interface[] = "org.enlightenment.Ethumb";
static const char _ethumb_dbus_objects_interface[] = "org.enlightenment.Ethumb.objects";
static const char _ethumb_dbus_path[] = "/org/enlightenment/Ethumb";
static Eina_Prefix *_pfx = NULL;
static int _log_domain = -1;
typedef struct _Ethumbd_Setup Ethumbd_Setup;
@ -453,7 +454,7 @@ _ethumbd_slave_alloc_cmd(Ethumbd *ed, int ssize, char *sdata)
}
static Eina_Bool
_ethumbd_slave_data_read_cb(void *data, int type __UNUSED__, void *event)
_ethumbd_slave_data_read_cb(void *data, int type EINA_UNUSED, void *event)
{
Ethumbd *ed = data;
Ecore_Exe_Event_Data *ev = event;
@ -499,7 +500,7 @@ _ethumbd_slave_data_read_cb(void *data, int type __UNUSED__, void *event)
}
static Eina_Bool
_ethumbd_slave_del_cb(void *data, int type __UNUSED__, void *event)
_ethumbd_slave_del_cb(void *data, int type EINA_UNUSED, void *event)
{
Ethumbd *ed = data;
Ecore_Exe_Event_Del *ev = event;
@ -885,7 +886,6 @@ _name_owner_changed_cb(void *context, const char *bus, const char *old_id, const
{
Ethumbd_Object_Data *odata = context;
Ethumbd *ed = odata->ed;
Ethumbd_Queue *q = &ed->queue;
DBG("NameOwnerChanged: name = %s, from = %s, to = %s", bus, old_id, new_id);
if (new_id[0])
@ -963,7 +963,8 @@ _ethumb_dbus_get_bytearray(EDBus_Message_Iter *iter)
if (!edbus_message_iter_fixed_array_get(iter, 'y', &result,
&length))
{
ERR("not an byte array element.");
ERR("not byte array element. Signature: %s",
edbus_message_iter_signature_get(iter));
return NULL;
}
@ -981,7 +982,7 @@ _ethumb_dbus_append_bytearray(EDBus_Message_Iter *parent, EDBus_Message_Iter *ar
if (!string)
string = "";
size = strlen(string);
size = strlen(string) + 1;
for (i = 0; i < size; i++)
edbus_message_iter_basic_append(array, 'y', string[i]);
edbus_message_iter_container_close(parent, array);
@ -1012,6 +1013,9 @@ _ethumb_dbus_queue_add_cb(const EDBus_Service_Interface *iface, const EDBus_Mess
if (!file)
{
eina_stringshare_del(key);
eina_stringshare_del(thumb);
eina_stringshare_del(thumb_key);
ERR("no filename given.");
goto end;
}
@ -1019,6 +1023,10 @@ _ethumb_dbus_queue_add_cb(const EDBus_Service_Interface *iface, const EDBus_Mess
odata = edbus_service_object_data_get(iface, ODATA);
if (!odata)
{
eina_stringshare_del(file);
eina_stringshare_del(key);
eina_stringshare_del(thumb);
eina_stringshare_del(thumb_key);
ERR("could not get dbus_object data.");
goto end;
}
@ -1159,7 +1167,7 @@ _ethumb_dbus_delete_cb(const EDBus_Service_Interface *iface, const EDBus_Message
}
static int
_ethumb_dbus_fdo_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request)
_ethumb_dbus_fdo_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
{
int fdo;
@ -1177,7 +1185,7 @@ _ethumb_dbus_fdo_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *var
}
static int
_ethumb_dbus_size_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request)
_ethumb_dbus_size_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
{
EDBus_Message_Iter *st;
int w, h;
@ -1198,7 +1206,7 @@ _ethumb_dbus_size_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *va
}
static int
_ethumb_dbus_format_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request)
_ethumb_dbus_format_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
{
int format;
@ -1216,7 +1224,7 @@ _ethumb_dbus_format_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *
}
static int
_ethumb_dbus_aspect_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request)
_ethumb_dbus_aspect_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
{
int aspect;
@ -1234,7 +1242,7 @@ _ethumb_dbus_aspect_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *
}
static int
_ethumb_dbus_orientation_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request)
_ethumb_dbus_orientation_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
{
int orientation;
@ -1252,7 +1260,7 @@ _ethumb_dbus_orientation_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_I
}
static int
_ethumb_dbus_crop_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request)
_ethumb_dbus_crop_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
{
EDBus_Message_Iter *st;
double x, y;
@ -1273,7 +1281,7 @@ _ethumb_dbus_crop_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *va
}
static int
_ethumb_dbus_quality_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request)
_ethumb_dbus_quality_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
{
int quality;
@ -1292,7 +1300,7 @@ _ethumb_dbus_quality_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter
static int
_ethumb_dbus_compress_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request)
_ethumb_dbus_compress_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
{
int compress;
@ -1310,7 +1318,7 @@ _ethumb_dbus_compress_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter
}
static int
_ethumb_dbus_frame_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request)
_ethumb_dbus_frame_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
{
EDBus_Message_Iter *_struct, *file_iter, *group_iter, *swallow_iter;
const char *file, *group, *swallow;
@ -1328,15 +1336,15 @@ _ethumb_dbus_frame_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *v
swallow = _ethumb_dbus_get_bytearray(swallow_iter);
DBG("setting frame to \"%s:%s:%s\"", file, group, swallow);
request->setup.flags.frame = 1;
request->setup.theme_file = eina_stringshare_add(file);
request->setup.group = eina_stringshare_add(group);
request->setup.swallow = eina_stringshare_add(swallow);
request->setup.theme_file = file;
request->setup.group = group;
request->setup.swallow = swallow;
return 1;
}
static int
_ethumb_dbus_directory_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request)
_ethumb_dbus_directory_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
{
const char *directory;
EDBus_Message_Iter *array;
@ -1350,13 +1358,13 @@ _ethumb_dbus_directory_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Ite
directory = _ethumb_dbus_get_bytearray(array);
DBG("setting directory to: %s", directory);
request->setup.flags.directory = 1;
request->setup.directory = eina_stringshare_add(directory);
request->setup.directory = directory;
return 1;
}
static int
_ethumb_dbus_category_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request)
_ethumb_dbus_category_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
{
const char *category;
EDBus_Message_Iter *array;
@ -1370,13 +1378,13 @@ _ethumb_dbus_category_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter
category = _ethumb_dbus_get_bytearray(array);
DBG("setting category to: %s", category);
request->setup.flags.category = 1;
request->setup.category = eina_stringshare_add(category);
request->setup.category = category;
return 1;
}
static int
_ethumb_dbus_video_time_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request)
_ethumb_dbus_video_time_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
{
double video_time;
@ -1394,7 +1402,7 @@ _ethumb_dbus_video_time_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_It
}
static int
_ethumb_dbus_video_start_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request)
_ethumb_dbus_video_start_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
{
double video_start;
@ -1412,7 +1420,7 @@ _ethumb_dbus_video_start_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_I
}
static int
_ethumb_dbus_video_interval_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request)
_ethumb_dbus_video_interval_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
{
double video_interval;
@ -1429,7 +1437,7 @@ _ethumb_dbus_video_interval_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Messag
}
static int
_ethumb_dbus_video_ntimes_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request)
_ethumb_dbus_video_ntimes_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
{
unsigned int video_ntimes;
@ -1447,7 +1455,7 @@ _ethumb_dbus_video_ntimes_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_
}
static int
_ethumb_dbus_video_fps_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request)
_ethumb_dbus_video_fps_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
{
unsigned int video_fps;
@ -1465,7 +1473,7 @@ _ethumb_dbus_video_fps_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Ite
}
static int
_ethumb_dbus_document_page_set(Ethumbd_Object *eobject __UNUSED__, EDBus_Message_Iter *variant, Ethumbd_Request *request)
_ethumb_dbus_document_page_set(Ethumbd_Object *eobject EINA_UNUSED, EDBus_Message_Iter *variant, Ethumbd_Request *request)
{
unsigned int document_page;
@ -1542,7 +1550,6 @@ _ethumb_dbus_ethumb_setup_cb(const EDBus_Service_Interface *iface, const EDBus_M
Ethumbd_Object *eobject;
Ethumbd_Request *request;
Eina_Bool r = EINA_FALSE;
int atype;
EDBus_Message_Iter *array;
EDBus_Message_Iter *data;
@ -1568,7 +1575,7 @@ _ethumb_dbus_ethumb_setup_cb(const EDBus_Service_Interface *iface, const EDBus_M
r = EINA_TRUE;
while (edbus_message_iter_get_and_next(array, 'r', &data) && r)
{
if (!_ethumb_dbus_ethumb_setup_parse_element(eobject, data, request));
if (!_ethumb_dbus_ethumb_setup_parse_element(eobject, data, request))
r = EINA_FALSE;
}
@ -1610,12 +1617,11 @@ static const EDBus_Service_Interface_Desc server_desc = {
};
static void
_ethumb_dbus_request_name_cb(void *data, const EDBus_Message *msg, EDBus_Pending *pending)
_ethumb_dbus_request_name_cb(void *data, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
{
EDBus_Service_Interface *iface;
const char *errname, *errmsg;
Ethumbd *ed = data;
int r;
if (edbus_message_error_get(msg, &errname, &errmsg))
{
@ -1654,11 +1660,15 @@ _ethumb_dbus_finish(Ethumbd *ed)
static Eina_Bool
_ethumbd_slave_spawn(Ethumbd_Slave *slave, Ethumbd *ed)
{
char buf[PATH_MAX];
slave->bufcmd = NULL;
slave->scmd = 0;
slave->exe = ecore_exe_pipe_run(
ETHUMB_LIBEXEC_DIR"/ethumbd_slave",
snprintf(buf, sizeof(buf), "%s/ethumb/utils/"MODULE_ARCH"/ethumbd_slave",
eina_prefix_lib_get(_pfx));
slave->exe = ecore_exe_pipe_run(buf,
ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_WRITE, ed);
if (!slave->exe)
{
@ -1691,11 +1701,22 @@ main(int argc, char *argv[])
if (_log_domain < 0)
{
EINA_LOG_CRIT("could not register log domain 'ethumbd'");
exit_value = -7;
exit_value = -8;
goto finish;
}
}
_pfx = eina_prefix_new(argv[0], ethumb_init,
"ETHUMB", "ethumb", "checkme",
PACKAGE_BIN_DIR, PACKAGE_LIB_DIR,
PACKAGE_DATA_DIR, PACKAGE_DATA_DIR);
if (!_pfx)
{
ERR("Could not get ethumb installation prefix.");
exit_value = -7;
goto finish;
}
ed.data_cb = ecore_event_handler_add(ECORE_EXE_EVENT_DATA,
_ethumbd_slave_data_read_cb, &ed);
ed.del_cb = ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
@ -1773,6 +1794,8 @@ main(int argc, char *argv[])
finish:
if (ed.slave.exe)
ecore_exe_quit(ed.slave.exe);
if (_pfx) eina_prefix_free(_pfx);
ethumb_shutdown();
eina_init();
ecore_shutdown();

@ -60,7 +60,7 @@ struct options
};
static unsigned char
_ethumb_getopt_callback_frame_parse(const Ecore_Getopt *parser __UNUSED__, const Ecore_Getopt_Desc *desc __UNUSED__, const char *str, void *data __UNUSED__, Ecore_Getopt_Value *storage)
_ethumb_getopt_callback_frame_parse(const Ecore_Getopt *parser EINA_UNUSED, const Ecore_Getopt_Desc *desc EINA_UNUSED, const char *str, void *data EINA_UNUSED, Ecore_Getopt_Value *storage)
{
struct frame *f = (struct frame *)storage->ptrp;
const char *tfile, *tgroup, *tswallow, *base, *sep;
@ -151,7 +151,7 @@ _thumb_report(const char *mode, const char *src_path, const char *src_key, const
}
static void
_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)
_finished_thumb(void *data EINA_UNUSED, Ethumb_Client *client EINA_UNUSED, int id EINA_UNUSED, const char *src_path, const char *src_key, const char *thumb_path, const char *thumb_key, Eina_Bool success)
{
const char *mode = success ? "GENERATED" : "FAILED";
_thumb_report(mode, src_path, src_key, thumb_path, thumb_key);
@ -159,7 +159,7 @@ _finished_thumb(void *data __UNUSED__, Ethumb_Client *client __UNUSED__, int id
}
static void
_exists(void *data, Ethumb_Client *c, __UNUSED__ Ethumb_Exists *thread, Eina_Bool exists)
_exists(void *data, Ethumb_Client *c, EINA_UNUSED Ethumb_Exists *thread, Eina_Bool exists)
{
struct options *opts = data;
const char *thumb_path, *thumb_key;

@ -126,7 +126,7 @@ _ec_write_safe(int fd, const void *buf, ssize_t size)
}
static int
_ec_pipe_str_read(struct _Ethumbd_Child *ec __UNUSED__, char **str)
_ec_pipe_str_read(struct _Ethumbd_Child *ec EINA_UNUSED, char **str)
{
int size;
int r;
@ -215,7 +215,7 @@ _ec_op_del(struct _Ethumbd_Child *ec)
}
static void
_ec_op_generated_cb(void *data __UNUSED__, Ethumb *e, Eina_Bool success)
_ec_op_generated_cb(void *data EINA_UNUSED, Ethumb *e, Eina_Bool success)
{
const char *thumb_path, *thumb_key;
int size_path, size_key, size_cmd;
@ -291,7 +291,7 @@ _ec_op_generate(struct _Ethumbd_Child *ec)
}
static int
_ec_fdo_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
_ec_fdo_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
{
int r;
int value;
@ -306,7 +306,7 @@ _ec_fdo_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
}
static int
_ec_size_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
_ec_size_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
{
int r;
int w, h;
@ -328,7 +328,7 @@ _ec_size_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
}
static int
_ec_format_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
_ec_format_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
{
int r;
int value;
@ -343,7 +343,7 @@ _ec_format_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
}
static int
_ec_aspect_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
_ec_aspect_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
{
int r;
int value;
@ -358,7 +358,7 @@ _ec_aspect_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
}
static int
_ec_orientation_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
_ec_orientation_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
{
int r;
int value;
@ -373,7 +373,7 @@ _ec_orientation_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
}
static int
_ec_crop_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
_ec_crop_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
{
int r;
float x, y;
@ -395,7 +395,7 @@ _ec_crop_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
}
static int
_ec_quality_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
_ec_quality_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
{
int r;
int value;
@ -410,7 +410,7 @@ _ec_quality_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
}
static int
_ec_compress_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
_ec_compress_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
{
int r;
int value;
@ -488,7 +488,7 @@ _ec_category_set(struct _Ethumbd_Child *ec, Ethumb *e)
}
static int
_ec_video_time_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
_ec_video_time_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
{
int r;
float value;
@ -503,7 +503,7 @@ _ec_video_time_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
}
static int
_ec_video_start_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
_ec_video_start_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
{
int r;
float value;
@ -518,7 +518,7 @@ _ec_video_start_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
}
static int
_ec_video_interval_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
_ec_video_interval_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
{
int r;
float value;
@ -533,7 +533,7 @@ _ec_video_interval_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
}
static int
_ec_video_ntimes_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
_ec_video_ntimes_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
{
int r;
int value;
@ -548,7 +548,7 @@ _ec_video_ntimes_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
}
static int
_ec_video_fps_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
_ec_video_fps_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
{
int r;
int value;
@ -563,7 +563,7 @@ _ec_video_fps_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
}
static int
_ec_document_page_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
_ec_document_page_set(struct _Ethumbd_Child *ec EINA_UNUSED, Ethumb *e)
{
int r;
int value;
@ -731,7 +731,7 @@ _ec_setup(struct _Ethumbd_Child *ec)
}
int
main(int argc __UNUSED__, const char *argv[] __UNUSED__)
main(int argc EINA_UNUSED, const char *argv[] EINA_UNUSED)
{
struct _Ethumbd_Child *ec;

@ -4749,7 +4749,8 @@ edje_edit_image_data_add(Evas_Object *obj, const char *name, int id)
if ((unsigned int) id >= ed->file->image_dir->entries_count) return EINA_FALSE;
de = ed->file->image_dir->entries + id;
eina_stringshare_replace(&de->entry, name);
_edje_if_string_free(ed, de->entry);
de->entry = eina_stringshare_add(name);
de->source_type = 1;
de->source_param = 1;

@ -43,9 +43,74 @@ extern "C" {
int micro;
int revision;
} Ethumb_Version;
EAPI extern Ethumb_Version *ethumb_version;
/**
* @page ethumb_main Ethumb
*
* @date 2009 (created)
*
* @section toc Table of Contents
*
* @li @ref ethumb_main_intro
* @li @ref ethumb_main_compiling
* @li @ref ethumb_main_next_steps
*
* @section ethumb_main_intro Introduction
*
* Ethumb will use @ref Evas to generate thumbnail images of given
* files. The API allows great customization of the generated files
* and also helps compling to FreeDesktop.Org Thumbnail Specification
* (http://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-latest.html)
*
* However, thumbnailing can be an expensive process that will impact
* your application experience, blocking animations and user
* interaction during the generation. Another problem is that one
* should try to cache the thumbnails in a place that other
* applications can benefit from the file.
*
* @ref Ethumb_Client exists to solve this. It will communicate with a
* server using standard D-Bus protocol. The server will use @ref
* Ethumb itself to generate the thumbnail images and cache them using
* FreeDesktop.Org standard. It is recommended that most applications
* use @ref Ethumb_Client instead of @ref Ethumb directly.
*
* @section ethumb_main_compiling How to compile
*
* Ethumb is a library your application links to. The procedure for
* this is very simple. Note that usually you want the D-Bus client
* library. You simply have to compile your application with the
* appropriate compiler flags that the @c pkg-config script
* outputs. For example:
*
* Compiling C or C++ files into object files:
*
* @verbatim
gcc -c -o main.o main.c `pkg-config --cflags ethumb_client`
@endverbatim
*
* Linking object files into a binary executable:
*
* @verbatim
gcc -o my_application main.o `pkg-config --libs ethumb_client`
@endverbatim
*
* See @ref pkgconfig
*
* @section ethumb_main_next_steps Next Steps
*
* After you understood what Ethumb is and installed it in your system
* you should proceed understanding the programming interface.
*
* Recommended reading:
*
* @li @ref Ethumb_Client to generate thumbnails using a server
* (recommended).
* @li @ref Ethumb to generate thumbnails in the local process.
*
*/
/**
* @defgroup Ethumb Ethumb
*

@ -35,6 +35,7 @@ extern "C" {
/**
* @defgroup Ethumb_Client Ethumb Client
* @ingroup Ethumb
*
* @{
*/

@ -263,7 +263,7 @@ _ethumb_async_delete(void *data)
}
static void
_ethumb_client_name_owner_changed(void *context, const char *bus, const char *old_id, const char *new_id)
_ethumb_client_name_owner_changed(void *context, const char *bus EINA_UNUSED, const char *old_id, const char *new_id)
{
Ethumb_Client *client = context;
DBG("NameOwnerChanged from=[%s] to=[%s]", old_id, new_id);
@ -311,7 +311,7 @@ _ethumb_client_report_connect(Ethumb_Client *client, Eina_Bool success)
}
static void
_ethumb_client_new_cb(void *data, const EDBus_Message *msg, EDBus_Pending *pending)
_ethumb_client_new_cb(void *data, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
{
const char *errname, *errmsg;
const char *opath;
@ -350,7 +350,7 @@ _ethumb_client_call_new(Ethumb_Client *client)
}
static void
_ethumb_client_exists_heavy(void *data, Ecore_Thread *thread __UNUSED__)
_ethumb_client_exists_heavy(void *data, Ecore_Thread *thread EINA_UNUSED)
{
Ethumb_Async_Exists *async = data;
@ -358,7 +358,7 @@ _ethumb_client_exists_heavy(void *data, Ecore_Thread *thread __UNUSED__)
}
static void
_ethumb_client_exists_end(void *data, Ecore_Thread *thread __UNUSED__)
_ethumb_client_exists_end(void *data, Ecore_Thread *thread EINA_UNUSED)
{
Ethumb_Async_Exists *async = data;
Ethumb_Exists *cb;
@ -617,7 +617,7 @@ ethumb_client_on_server_die_callback_set(Ethumb_Client *client, Ethumb_Client_Di
*/
static void
_ethumb_client_ethumb_setup_cb(void *data, const EDBus_Message *msg, EDBus_Pending *pending)
_ethumb_client_ethumb_setup_cb(void *data EINA_UNUSED, const EDBus_Message *msg, EDBus_Pending *pending EINA_UNUSED)
{
const char *errname, *errmsg;
Eina_Bool result = 0;
@ -643,9 +643,13 @@ _ethumb_client_dbus_get_bytearray(EDBus_Message_Iter *array)
const char *result;
if (edbus_message_iter_fixed_array_get(array, 'y', &result, &length))
return eina_stringshare_add(result);
return eina_stringshare_add_length(result, length);
else
return NULL;
{
ERR("Not byte array. Signature: %s",
edbus_message_iter_signature_get(array));
return NULL;
}
}
static void
@ -658,7 +662,7 @@ _ethumb_client_dbus_append_bytearray(EDBus_Message_Iter *parent, const char *str
string = "";
array = edbus_message_iter_container_new(parent, 'a', "y");
size = strlen(string);
size = strlen(string) + 1;
for (i = 0; i < size; i++)
edbus_message_iter_basic_append(array, 'y', string[i]);
edbus_message_iter_container_close(parent, array);
@ -706,7 +710,6 @@ ethumb_client_ethumb_setup(Ethumb_Client *client)
Ethumb *e = client->ethumb;
int tw, th, format, aspect, orientation, quality, compress;
float cx, cy;
double t;
const char *theme_file, *group, *swallow;
const char *directory, *category;
double video_time, video_start, video_interval;
@ -755,7 +758,7 @@ ethumb_client_ethumb_setup(Ethumb_Client *client)
_setup_iterator_close(array, entry, variant);
variant = _setup_iterator_open(array, &entry, "compress", "i");
quality = ethumb_thumb_quality_get(e);
compress = ethumb_thumb_quality_get(e);
edbus_message_iter_arguments_append(variant, "i", compress);
_setup_iterator_close(array, entry, variant);
@ -826,8 +829,6 @@ _ethumb_client_generated_cb(void *data, const EDBus_Message *msg)
EDBus_Message_Iter *thumb_iter;
EDBus_Message_Iter *thumb_key_iter;
Eina_Bool success;
const char *thumb = NULL;
const char *thumb_key = NULL;
int found;
struct _ethumb_pending_gen *pending;
Eina_List *l;
@ -854,14 +855,14 @@ _ethumb_client_generated_cb(void *data, const EDBus_Message *msg)
if (found)
{
thumb = _ethumb_client_dbus_get_bytearray(thumb_iter);
thumb_key = _ethumb_client_dbus_get_bytearray(thumb_key_iter);
const char *thumb = _ethumb_client_dbus_get_bytearray(thumb_iter);
const char *thumb_key = _ethumb_client_dbus_get_bytearray(thumb_key_iter);
client->pending_gen = eina_list_remove_list(client->pending_gen, l);
if (pending->generated_cb)