elm now supports edbus v2, deprecated v1 function.

v1 is now deprecated (EINA_DEPRECATED) but still there, should still
work and not break any existing app.

v2 is now there as well, all software is being ported to use it
now. Just Enlightenment itself will still ship with v1 and as soon as
we release it will go v2, we have the patches here.



SVN revision: 80110
This commit is contained in:
Gustavo Sverzut Barbieri 2012-12-03 21:45:48 +00:00
parent 5c22cf8b7e
commit b3f157541c
6 changed files with 83 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2012-12-03 Gustavo Sverzut Barbieri (k-s)
* Add elm_need_edbus(), deprecate elm_need_e_dbus(), integrating
edbus (v2).
2012-04-26 Carsten Haitzler (The Rasterman)
* 1.0.0 release

View File

@ -18,6 +18,7 @@ Additions:
* Add elm_genlist_nth_item_get
* Add elm_gengrid_nth_item_get
* Add elm_config_selection_unfocused_clear_get and elm_config_selection_unfocused_clear_set
* Add elm_need_edbus() and EDBus.h support with ELM_EDBUS2 macro to integrate edbus (v2). Deprecated elm_need_e_dbus() (e_dbus, v1).
Improvements:

View File

@ -497,6 +497,34 @@ if test "x$want_elementary_edbus" = "xyes" -a "x$have_elementary_edbus" = "xno";
fi
AC_SUBST(ELM_EDBUS_DEF)
ELM_EDBUS2_DEF="#undef"
have_elementary_edbus2="no"
want_elementary_edbus2="auto"
AC_ARG_ENABLE([edbus2],
[AC_HELP_STRING([--disable-edbus2], [disable edbus2 support. @<:@default=detect@:>@])],
[want_elementary_edbus2=$enableval], [])
if test "x$want_elementary_edbus2" != "xno"; then
PKG_CHECK_MODULES([ELEMENTARY_EDBUS2],
[
edbus2 >= 1.7.99
],
[
AC_DEFINE(HAVE_ELEMENTARY_EDBUS2, 1, [EDbus2 support for Elementary])
have_elementary_edbus2="yes"
ELM_EDBUS2_DEF="#define"
requirement_elm="edbus2 >= 1.7.99 ${requirement_elm}"
],
[have_elementary_edbus2="no"]
)
else
have_elementary_edbus2="no"
fi
if test "x$want_elementary_edbus2" = "xyes" -a "x$have_elementary_edbus2" = "xno"; then
AC_MSG_ERROR([EDBus (v2) support requested, but no edbus2 found by pkg-config.])
fi
AC_SUBST(ELM_EDBUS2_DEF)
ELM_EFREET_DEF="#undef"
have_elementary_efreet="no"
want_elementary_efreet="auto"
@ -814,7 +842,7 @@ echo
echo " Features:"
echo " Ecore_IMF..............: ${have_ecore_imf}"
echo " Ecore_Con..............: ${have_ecore_con}"
echo " EDBus..................: ${have_elementary_edbus}"
echo " EDBus..................: v1=${have_elementary_edbus}, v2=${have_elementary_edbus2}"
echo " EFreet.................: ${have_elementary_efreet}"
echo " EWeather...............: ${have_elementary_eweather}"
echo " EMap...................: ${have_elementary_emap}"

View File

@ -11,6 +11,7 @@
@ELM_WIN32_DEF@ ELM_WIN32
@ELM_WINCE_DEF@ ELM_WINCE
@ELM_EDBUS_DEF@ ELM_EDBUS
@ELM_EDBUS2_DEF@ ELM_EDBUS2
@ELM_EFREET_DEF@ ELM_EFREET
@ELM_ETHUMB_DEF@ ELM_ETHUMB
@ELM_WEB_DEF@ ELM_WEB
@ -76,6 +77,9 @@
#ifdef ELM_EDBUS
#include <E_DBus.h>
#endif
#ifdef ELM_EDBUS
#include <EDBus.h>
#endif
#ifdef ELM_EFREET
#include <Efreet.h>

View File

@ -343,6 +343,32 @@ _elm_unneed_e_dbus(void)
#endif
}
#ifdef ELM_EDBUS2
static int _elm_need_edbus = 0;
#endif
EAPI Eina_Bool
elm_need_edbus(void)
{
#ifdef ELM_EDBUS2
if (_elm_need_edbus++) return EINA_TRUE;
edbus_init();
return EINA_TRUE;
#else
return EINA_FALSE;
#endif
}
static void
_elm_unneed_edbus(void)
{
#ifdef ELM_EDBUS2
if (--_elm_need_edbus) return;
_elm_need_edbus = 0;
edbus_shutdown();
#endif
}
#ifdef ELM_EFREET
static int _elm_need_efreet = 0;
#endif
@ -553,6 +579,7 @@ elm_quicklaunch_shutdown(void)
_elm_theme_shutdown();
_elm_unneed_efreet();
_elm_unneed_e_dbus();
_elm_unneed_edbus();
_elm_unneed_ethumb();
_elm_unneed_web();
ecore_file_shutdown();

View File

@ -20,9 +20,25 @@ EAPI Eina_Bool elm_need_efreet(void);
*
* @return EINA_TRUE if support exists and initialization succeeded.
*
* @deprecated use elm_need_edbus() for EDBus (v2) support. Old API is
* deprecated.
*
* @ingroup E_dbus
*/
EAPI Eina_Bool elm_need_e_dbus(void);
EAPI Eina_Bool elm_need_e_dbus(void) EINA_DEPRECATED;
/**
* Request that your elementary application needs edbus
*
* This initializes the edbus (aka v2) library when called and if
* support exists it returns EINA_TRUE, otherwise returns
* EINA_FALSE. This must be called before any edbus calls.
*
* @return EINA_TRUE if support exists and initialization succeeded.
*
* @ingroup edbus
*/
EAPI Eina_Bool elm_need_edbus(void) EINA_DEPRECATED;
/**
* Request that your elementary application needs ethumb