Commit 4e380404 authored by Lucas De Marchi's avatar Lucas De Marchi

Rename edbus->eldbus

git grep -l edbus2 | while read f; do sed -i 's/edbus2/eldbus/g' "$f"; done
find . -name '*edbus2*' -exec rename edbus2 eldbus {} \;

git grep -l "EDBUS" | while read f; do sed -i 's/EDBUS/ELDBUS/g' "$f"; done
git grep -l "EDBus" | while read f; do sed -i 's/EDBus/Eldbus/g' "$f"; done
git grep -l "edbus (v2)" | while read f; do sed -i 's/edbus (v2)/eldbus/g' "$f"; done
git grep -l "Edbus" | while read f; do sed -i 's/Edbus/Eldbus/g' "$f"; done
git grep -l "edbus" | while read f; do sed -i 's/edbus/eldbus/g' "$f"; done

find . -name '*edbus*' -exec rename edbus eldbus {} \;
find . -name '*EDBus*' -exec rename EDBus Eldbus {} \;
parent 4cf68bf7
......@@ -72,7 +72,7 @@ tags
/src/bin/evas/evas_cserve2_usage
/src/lib/eina/eina_config.h
/src/lib/ecore_x/ecore_x_version.h
/src/bin/edbus/edbus-codegen
/src/bin/eldbus/eldbus-codegen
/src/bin/efreet/efreet_desktop_cache_create
/src/bin/efreet/efreet_icon_cache_create
/src/bin/efreet/efreetd
......@@ -202,15 +202,15 @@ tags
/src/examples/ecore/ecore_file_download_example
/src/examples/ecore/ecore_imf_example
/src/examples/ecore/ecore_pipe_gstreamer_example
/src/examples/edbus/banshee
/src/examples/edbus/client
/src/examples/edbus/complex-types
/src/examples/edbus/complex-types-client-eina-value
/src/examples/edbus/complex-types-server
/src/examples/edbus/connman-list-services
/src/examples/edbus/ofono-dial
/src/examples/edbus/server
/src/examples/edbus/simple-signal-emit
/src/examples/eldbus/banshee
/src/examples/eldbus/client
/src/examples/eldbus/complex-types
/src/examples/eldbus/complex-types-client-eina-value
/src/examples/eldbus/complex-types-server
/src/examples/eldbus/connman-list-services
/src/examples/eldbus/ofono-dial
/src/examples/eldbus/server
/src/examples/eldbus/simple-signal-emit
/src/examples/edje/edje-multisense
/src/examples/edje/edje_example
/src/examples/eet/eet_basic
......@@ -298,9 +298,9 @@ tags
/src/tests/efreet/efreet_user_dir
/src/tests/emotion/emotion_test
/src/tests/ecore/ecore_suite
/src/tests/edbus/edbus_suite
/src/tests/edbus/edbus_suite.log
/src/tests/edbus/edbus_suite.trs
/src/tests/eldbus/eldbus_suite
/src/tests/eldbus/eldbus_suite.log
/src/tests/eldbus/eldbus_suite.trs
/src/tests/edje/edje_suite
/src/tests/eet/eet_suite
/src/tests/eeze/eeze_suite
......@@ -322,7 +322,7 @@ tags
/src/tests/evas/evas_suite.trs
/src/test-suite.log
/src/tests/ecore/check-results.xml
/src/tests/edbus/check-results.xml
/src/tests/eldbus/check-results.xml
/src/tests/edje/check-results.xml
/src/tests/eet/check-results.xml
/src/tests/eeze/check-results.xml
......
......@@ -215,7 +215,7 @@ Daniel Willmann <d.willmann@samsung.com>
Jérémy Zurcher <jeremy@asynk.ch>
EDBus
Eldbus
-----
Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
......
......@@ -20,7 +20,7 @@ evas: licenses/COPYING.BSD
embryo: licenses/COPYING.SMALL
ecore: licenses/COPYING.BSD
eio: licenses/COPYING.LGPL
edbus: licenses/COPYING.LGPL
eldbus: licenses/COPYING.LGPL
efreet: licenses/COPYING.BSD
eeze: licenses/COPYING.BSD
ephysics: licenses/COPYING.BSD
......
......@@ -92,7 +92,7 @@ old/NEWS.ethumb \
old/NEWS.evas \
old/NEWS.evil \
old/README.ecore \
old/README.edbus \
old/README.eldbus \
old/README.edje \
old/README.eet \
old/README.eeze \
......@@ -136,7 +136,7 @@ pc/ecore-imf-evas.pc \
pc/ecore-evas.pc \
pc/embryo.pc \
pc/eio.pc \
pc/edbus2.pc \
pc/eldbus.pc \
pc/efreet.pc \
pc/efreet-mime.pc \
pc/efreet-trash.pc \
......
......@@ -3124,8 +3124,8 @@ if test "x${want_eo_id}" = "xyes" ; then
AC_DEFINE([HAVE_EO_ID], [1], [Have eo id])
fi
#### EDBus
EFL_LIB_START([EDBus])
#### Eldbus
EFL_LIB_START([Eldbus])
### Additional options to configure
......@@ -3134,16 +3134,16 @@ EFL_LIB_START([EDBus])
### Checks for programs
## Compatibility layers
EFL_PLATFORM_DEPEND([EDBUS], [evil])
EFL_PLATFORM_DEPEND([ELDBUS], [evil])
### Checks for libraries
EFL_INTERNAL_DEPEND_PKG([EDBUS], [ecore])
EFL_INTERNAL_DEPEND_PKG([EDBUS], [eo])
EFL_INTERNAL_DEPEND_PKG([EDBUS], [eina])
EFL_INTERNAL_DEPEND_PKG([ELDBUS], [ecore])
EFL_INTERNAL_DEPEND_PKG([ELDBUS], [eo])
EFL_INTERNAL_DEPEND_PKG([ELDBUS], [eina])
EFL_DEPEND_PKG([EDBUS], [DBUS], [dbus-1])
EFL_DEPEND_PKG([ELDBUS], [DBUS], [dbus-1])
EFL_EVAL_PKGS([EDBUS])
EFL_EVAL_PKGS([ELDBUS])
### Checks for header files
......@@ -3157,8 +3157,8 @@ EFL_EVAL_PKGS([EDBUS])
### Checks for library functions
EFL_LIB_END([EDBus])
#### End of EDBus
EFL_LIB_END([Eldbus])
#### End of Eldbus
#### Efreet
......@@ -3179,7 +3179,7 @@ EFL_PLATFORM_DEPEND([EFREET], [evil])
EFL_INTERNAL_DEPEND_PKG([EFREET], [eet])
EFL_INTERNAL_DEPEND_PKG([EFREET], [ecore])
EFL_INTERNAL_DEPEND_PKG([EFREET], [ecore-file])
EFL_INTERNAL_DEPEND_PKG([EFREET], [edbus])
EFL_INTERNAL_DEPEND_PKG([EFREET], [eldbus])
EFL_INTERNAL_DEPEND_PKG([EFREET], [eo])
EFL_INTERNAL_DEPEND_PKG([EFREET], [eina])
......@@ -3611,7 +3611,7 @@ EFL_PLATFORM_DEPEND([ETHUMB_CLIENT], [evil])
EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eina])
EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eo])
EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [ecore])
EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [edbus])
EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eldbus])
EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [ethumb])
EFL_EVAL_PKGS([ETHUMB_CLIENT])
......@@ -3662,7 +3662,7 @@ src/examples/eo/Makefile
src/examples/evas/Makefile
src/examples/ecore/Makefile
src/examples/eio/Makefile
src/examples/edbus/Makefile
src/examples/eldbus/Makefile
src/examples/ephysics/Makefile
src/examples/edje/Makefile
src/examples/emotion/Makefile
......@@ -3709,7 +3709,7 @@ pc/ecore-imf-evas.pc
pc/ecore-audio.pc
pc/embryo.pc
pc/eio.pc
pc/edbus2.pc
pc/eldbus.pc
pc/efreet.pc
pc/efreet-mime.pc
pc/efreet-trash.pc
......
......@@ -601,7 +601,7 @@ INPUT = @top_srcdir@/src/lib \
@srcdir@/evas_examples.dox \
@srcdir@/eo_tutorial.dox \
@srcdir@/eio_examples.dox \
@srcdir@/edbus_examples.dox \
@srcdir@/eldbus_examples.dox \
@srcdir@/ephysics_examples.dox \
@srcdir@/edje_examples.dox \
@top_srcdir@/src/bin/edje/edje_cc_handlers.c \
......@@ -815,7 +815,7 @@ evas_ _evas_ Evas_ _Evas_ EVAS_ _EVAS_ \
eet_ _eet_ Eet_ _Eet_ EET_ _EET_ \
ecore_ _ecore_ Ecore_ _Ecore_ ECORE_ _ECORE_ \
eio_ _eio_ Eio_ _Eio_ EIO_ _EIO_ \
edbus_ _edbus_ EDBus_ _EDBus_ EDBUS_ _EDBUS_ \
eldbus_ _eldbus_ Eldbus_ _Eldbus_ ELDBUS_ _ELDBUS_ \
efreet_ _efreet_ Efreet_ _Efreet_ EFREET_ _EFREET_ \
eeze_ _eeze_ Eeze_ _Eeze_ EEZE_ _EEZE_ \
ephysics_ _ephysics_ EPhysics_ _EPhysics_ EPHYSICS_ _EPHYSICS_ \
......
......@@ -38,7 +38,7 @@ e.css \
head.html \
foot.html \
ecore_examples.dox \
edbus_examples.dox \
eldbus_examples.dox \
edje_examples.dox \
eet_examples.dox \
eina_examples.dox \
......
/**
* @page edbus_examples EDBus Examples
* @page eldbus_examples Eldbus Examples
*
* Examples:
* @li @ref banshee.c
......
......@@ -16,7 +16,7 @@
* @li @ref escape_main playstation3 portability layer.
* @li @ref evil_main microsoft windows portability layer.
* @li @ref eio_main asynchronous input/output
* @li @ref edbus_main d-bus integration.
* @li @ref eldbus_main d-bus integration.
* @li @ref efreet_main freedesktop.org (xdg) menu and desktop integration.
* @li @ref eeze_main hardware device manipulation and notification.
* @li @ref ephysics_main physics simulation integration and visual effects.
......@@ -205,7 +205,7 @@
*/
/**
* @defgroup EDBus
* @defgroup Eldbus
*
* @brief D-Bus integration with EFL (Ecore).
*/
......
......@@ -137,9 +137,9 @@ depname="$2"
libdirname="m4_defn([DOWNOTHER])"
libname="m4_defn([DOWNOTHER])"
case "m4_defn([DOWNOTHER])" in
edbus)
depname="edbus2"
libname="edbus2"
eldbus)
depname="eldbus"
libname="eldbus"
;;
ethumb_client)
depname="ethumb_client"
......@@ -357,8 +357,8 @@ m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
libdirname="m4_defn([DOWN])"
libname="m4_defn([DOWN])"
case "m4_defn([DOWN])" in
edbus)
libname="edbus2"
eldbus)
libname="eldbus"
;;
esac
......
2012-12-03 Gustavo Sverzut Barbieri (k-s)
* port to edbus (v2)
* port to eldbus
2012-04-26 Carsten Haitzler (The Rasterman)
......
......@@ -4,7 +4,7 @@ Changes since Ethumb 1.7.0:
Additions:
- Port to edbus (v2), added new dependency.
- Port to eldbus, added new dependency.
Fixes:
......
ABOUT:
-----
EDBus provides easy access to D-Bus from EFL applications.
Eldbus provides easy access to D-Bus from EFL applications.
EDBus allows connecting to both system and session buses acting as
Eldbus allows connecting to both system and session buses acting as
both client and service roles.
Many official D-Bus specifications and interfaces are supported, namely:
......@@ -14,8 +14,8 @@ Many official D-Bus specifications and interfaces are supported, namely:
- org.freedesktop.DBus.ObjectManager: partial support (under dev).
One can create client-side objects using the low-level methods from
EDBus_Connection and EDBus_Object, or go high level with
EDBus_Proxy.
Eldbus_Connection and Eldbus_Object, or go high level with
Eldbus_Proxy.
RELATION TO OLD E_DBUS:
......
......@@ -3,11 +3,11 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: edbus
Name: eldbus
Description: D-Bus access from Ecore
Requires.private: @requirements_pc_edbus@
Requires.private: @requirements_pc_eldbus@
Version: @VERSION@
Libs: -L${libdir} -ledbus2
Libs.private: @requirements_libs_edbus@
Cflags: -I${includedir}/edbus-@VMAJ@
Libs: -L${libdir} -leldbus
Libs.private: @requirements_libs_eldbus@
Cflags: -I${includedir}/eldbus-@VMAJ@
......@@ -42,7 +42,7 @@ include Makefile_Ecore_Evas.am
include Makefile_Ecore_Audio.am
include Makefile_Embryo.am
include Makefile_Eio.am
include Makefile_EDBus.am
include Makefile_Eldbus.am
include Makefile_Efreet.am
include Makefile_Eeze.am
include Makefile_EPhysics.am
......@@ -71,7 +71,7 @@ examples/eet \
examples/evas \
examples/ecore \
examples/eio \
examples/edbus \
examples/eldbus \
examples/ephysics \
examples/edje \
examples/emotion \
......
### Library
lib_LTLIBRARIES += lib/edbus/libedbus2.la
installed_edbusmainheadersdir = $(includedir)/edbus-@VMAJ@
dist_installed_edbusmainheaders_DATA = \
lib/edbus/EDBus.h \
lib/edbus/edbus_connection.h \
lib/edbus/edbus_freedesktop.h \
lib/edbus/edbus_message.h \
lib/edbus/edbus_object.h \
lib/edbus/edbus_pending.h \
lib/edbus/edbus_proxy.h \
lib/edbus/edbus_service.h \
lib/edbus/edbus_signal_handler.h \
lib/edbus/edbus_message_helper.h \
lib/edbus/edbus_message_eina_value.h
lib_edbus_libedbus2_la_SOURCES = \
lib/edbus/edbus_private.h \
lib/edbus/edbus_private_types.h \
lib/edbus/edbus_proxy.c \
lib/edbus/edbus_core.c \
lib/edbus/edbus_message.c \
lib/edbus/edbus_object.c \
lib/edbus/edbus_pending.c \
lib/edbus/edbus_freedesktop.c \
lib/edbus/edbus_service.c \
lib/edbus/edbus_signal_handler.c \
lib/edbus/edbus_message_helper.c \
lib/edbus/edbus_message_to_eina_value.c \
lib/edbus/edbus_message_from_eina_value.c
lib_edbus_libedbus2_la_CPPFLAGS = \
-include $(top_builddir)/config.h \
@EDBUS_CFLAGS@
lib_edbus_libedbus2_la_LIBADD = @EDBUS_LIBS@
lib_edbus_libedbus2_la_DEPENDENCIES = @EDBUS_INTERNAL_LIBS@
lib_edbus_libedbus2_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
### Binary
bin_PROGRAMS += bin/edbus/edbus-codegen
bin_edbus_edbus_codegen_SOURCES = \
bin/edbus/codegen.h \
bin/edbus/utils.c \
bin/edbus/parser.c \
bin/edbus/dbus.c \
bin/edbus/source_client.c \
bin/edbus/client.c
bin_edbus_edbus_codegen_CPPFLAGS = \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/edbus\" \
@EDBUS_CFLAGS@
if HAVE_WIN32
bin_edbus_edbus_codegen_LDADD = -L$(top_builddir)/src/lib/evil @USE_EDBUS_LIBS@
else
bin_edbus_edbus_codegen_LDADD = @USE_EDBUS_LIBS@
endif
bin_edbus_edbus_codegen_DEPENDENCIES = @USE_EDBUS_INTERNAL_LIBS@
### Unit tests
if EFL_ENABLE_TESTS
check_PROGRAMS += tests/edbus/edbus_suite
TESTS += tests/edbus/edbus_suite
tests_edbus_edbus_suite_SOURCES = \
tests/edbus/edbus_suite.c \
tests/edbus/edbus_test_edbus_init.c \
tests/edbus/edbus_suite.h
tests_edbus_edbus_suite_CPPFLAGS = @CHECK_CFLAGS@ @EDBUS_CFLAGS@ \
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/edbus\"
tests_edbus_edbus_suite_LDADD = @CHECK_LIBS@ @USE_EDBUS_LIBS@
tests_edbus_edbus_suite_DEPENDENCIES = @USE_EDBUS_INTERNAL_LIBS@
endif
### Library
lib_LTLIBRARIES += lib/eldbus/libeldbus.la
installed_eldbusmainheadersdir = $(includedir)/eldbus-@VMAJ@
dist_installed_eldbusmainheaders_DATA = \
lib/eldbus/Eldbus.h \
lib/eldbus/eldbus_connection.h \
lib/eldbus/eldbus_freedesktop.h \
lib/eldbus/eldbus_message.h \
lib/eldbus/eldbus_object.h \
lib/eldbus/eldbus_pending.h \
lib/eldbus/eldbus_proxy.h \
lib/eldbus/eldbus_service.h \
lib/eldbus/eldbus_signal_handler.h \
lib/eldbus/eldbus_message_helper.h \
lib/eldbus/eldbus_message_eina_value.h
lib_eldbus_libeldbus_la_SOURCES = \
lib/eldbus/eldbus_private.h \
lib/eldbus/eldbus_private_types.h \
lib/eldbus/eldbus_proxy.c \
lib/eldbus/eldbus_core.c \
lib/eldbus/eldbus_message.c \
lib/eldbus/eldbus_object.c \
lib/eldbus/eldbus_pending.c \
lib/eldbus/eldbus_freedesktop.c \
lib/eldbus/eldbus_service.c \
lib/eldbus/eldbus_signal_handler.c \
lib/eldbus/eldbus_message_helper.c \
lib/eldbus/eldbus_message_to_eina_value.c \
lib/eldbus/eldbus_message_from_eina_value.c
lib_eldbus_libeldbus_la_CPPFLAGS = \
-include $(top_builddir)/config.h \
@ELDBUS_CFLAGS@
lib_eldbus_libeldbus_la_LIBADD = @ELDBUS_LIBS@
lib_eldbus_libeldbus_la_DEPENDENCIES = @ELDBUS_INTERNAL_LIBS@
lib_eldbus_libeldbus_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
### Binary
bin_PROGRAMS += bin/eldbus/eldbus-codegen
bin_eldbus_eldbus_codegen_SOURCES = \
bin/eldbus/codegen.h \
bin/eldbus/utils.c \
bin/eldbus/parser.c \
bin/eldbus/dbus.c \
bin/eldbus/source_client.c \
bin/eldbus/client.c
bin_eldbus_eldbus_codegen_CPPFLAGS = \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/eldbus\" \
@ELDBUS_CFLAGS@
if HAVE_WIN32
bin_eldbus_eldbus_codegen_LDADD = -L$(top_builddir)/src/lib/evil @USE_ELDBUS_LIBS@
else
bin_eldbus_eldbus_codegen_LDADD = @USE_ELDBUS_LIBS@
endif
bin_eldbus_eldbus_codegen_DEPENDENCIES = @USE_ELDBUS_INTERNAL_LIBS@
### Unit tests
if EFL_ENABLE_TESTS
check_PROGRAMS += tests/eldbus/eldbus_suite
TESTS += tests/eldbus/eldbus_suite
tests_eldbus_eldbus_suite_SOURCES = \
tests/eldbus/eldbus_suite.c \
tests/eldbus/eldbus_test_eldbus_init.c \
tests/eldbus/eldbus_suite.h
tests_eldbus_eldbus_suite_CPPFLAGS = @CHECK_CFLAGS@ @ELDBUS_CFLAGS@ \
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/eldbus\"
tests_eldbus_eldbus_suite_LDADD = @CHECK_LIBS@ @USE_ELDBUS_LIBS@
tests_eldbus_eldbus_suite_DEPENDENCIES = @USE_ELDBUS_INTERNAL_LIBS@
endif
This diff is collapsed.
#include "codegen.h"
static const Ecore_Getopt optdesc = {
"edbus_codegen",
"eldbus_codegen",
"%prog [options] <file.xml>",
"1.0",
"(C) 2012 - The Enlightenment Project",
......
......@@ -132,28 +132,28 @@ string_build(const char *fmt, ...)
}
#define UTIL_H "\
#ifndef EDBUS_UTILS_H\n\
#define EDBUS_UTILS_H 1\n\
#ifndef ELDBUS_UTILS_H\n\
#define ELDBUS_UTILS_H 1\n\
\n\
typedef struct _EDBus_Error_Info\n\
typedef struct _Eldbus_Error_Info\n\
{\n\
const char *error;\n\
const char *message;\n\
} EDBus_Error_Info;\n\
} Eldbus_Error_Info;\n\
\n\
typedef void (*EDBus_Codegen_Property_Set_Cb)(void *data, const char *propname, EDBus_Proxy *proxy, EDBus_Pending *p, EDBus_Error_Info *error_info);\n\
typedef void (*Eldbus_Codegen_Property_Set_Cb)(void *data, const char *propname, Eldbus_Proxy *proxy, Eldbus_Pending *p, Eldbus_Error_Info *error_info);\n\
\n\
typedef void (*EDBus_Codegen_Property_String_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, const char *value);\n\
typedef void (*EDBus_Codegen_Property_Int32_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, int value);\n\
typedef void (*EDBus_Codegen_Property_Byte_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, unsigned char value);\n\
typedef void (*EDBus_Codegen_Property_Bool_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, Eina_Bool value);\n\
typedef void (*EDBus_Codegen_Property_Int16_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, short int value);\n\
typedef void (*EDBus_Codegen_Property_Uint16_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, unsigned short int value);\n\
typedef void (*EDBus_Codegen_Property_Uint32_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, unsigned int value);\n\
typedef void (*EDBus_Codegen_Property_Double_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, double value);\n\
typedef void (*EDBus_Codegen_Property_Int64_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, int64_t value);\n\
typedef void (*EDBus_Codegen_Property_Uint64_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, uint64_t value);\n\
typedef void (*EDBus_Codegen_Property_Complex_Get_Cb)(void *data, EDBus_Pending *p, const char *propname, EDBus_Proxy *proxy, EDBus_Error_Info *error_info, Eina_Value *value);\n\
typedef void (*Eldbus_Codegen_Property_String_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, const char *value);\n\
typedef void (*Eldbus_Codegen_Property_Int32_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, int value);\n\
typedef void (*Eldbus_Codegen_Property_Byte_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, unsigned char value);\n\
typedef void (*Eldbus_Codegen_Property_Bool_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, Eina_Bool value);\n\
typedef void (*Eldbus_Codegen_Property_Int16_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, short int value);\n\
typedef void (*Eldbus_Codegen_Property_Uint16_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, unsigned short int value);\n\
typedef void (*Eldbus_Codegen_Property_Uint32_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, unsigned int value);\n\
typedef void (*Eldbus_Codegen_Property_Double_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, double value);\n\
typedef void (*Eldbus_Codegen_Property_Int64_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, int64_t value);\n\
typedef void (*Eldbus_Codegen_Property_Uint64_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, uint64_t value);\n\
typedef void (*Eldbus_Codegen_Property_Complex_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, Eina_Value *value);\n\
\n\
#endif\
"
......@@ -161,5 +161,5 @@ typedef void (*EDBus_Codegen_Property_Complex_Get_Cb)(void *data, EDBus_Pending
Eina_Bool
util_h_write(void)
{
return file_write("edbus_utils.h", UTIL_H);
return file_write("eldbus_utils.h", UTIL_H);
}
This diff is collapsed.
//Compile with:
// gcc -o server server.c `pkg-config --cflags --libs edbus2 ecore`
#include "EDBus.h"
#include <Ecore.h>
#define BUS "org.Enlightenment"
#define PATH "/org/enlightenment"
#define PATH_TEST_SON "/org/enlightenment/son"
#define INTERFACE "org.enlightenment.Test"
static EDBus_Connection *conn;
static EDBus_Message *
_hello(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *message)
{
EDBus_Message *reply = edbus_message_method_return_new(message);
edbus_message_arguments_append(reply, "s", "Hello World");
printf("Hello\n");
return reply;
}
static EDBus_Message *
_quit(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *message)
{
printf("Quit\n");
ecore_main_loop_quit();
return edbus_message_method_return_new(message);
}
enum
{
TEST_SIGNAL_ALIVE = 0,
TEST_SIGNAL_HELLO
};
static Eina_Bool
send_signal_alive(void *data)
{
EDBus_Service_Interface *iface = data;
edbus_service_signal_emit(iface, TEST_SIGNAL_ALIVE);
return ECORE_CALLBACK_RENEW;
}
static Eina_Bool
send_signal_hello(void *data)
{
EDBus_Service_Interface *iface = data;
edbus_service_signal_emit(iface, TEST_SIGNAL_HELLO, "Hello World");
return ECORE_CALLBACK_RENEW;
}
static EDBus_Message *
_send_bool(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
{
EDBus_Message *reply = edbus_message_method_return_new(msg);
Eina_Bool bool;
if (!edbus_message_arguments_get(msg, "b", &bool))
printf("edbus_message_arguments_get() error\n");
edbus_message_arguments_append(reply, "b", bool);
return reply;
}
static EDBus_Message *
_send_byte(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
{
EDBus_Message *reply = edbus_message_method_return_new(msg);
unsigned char byte;
if (!edbus_message_arguments_get(msg, "y", &byte))
printf("edbus_message_arguments_get() error\n");
edbus_message_arguments_append(reply, "y", byte);
return reply;
}
static EDBus_Message *
_send_uint32(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
{
EDBus_Message *reply = edbus_message_method_return_new(msg);
unsigned int uint32;
if (!edbus_message_arguments_get(msg, "u", &uint32))
printf("edbus_message_arguments_get() error\n");
edbus_message_arguments_append(reply, "u", uint32);
return reply;
}
static EDBus_Message *
_send_int32(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
{
EDBus_Message *reply = edbus_message_method_return_new(msg);
int int32;
if (!edbus_message_arguments_get(msg, "i", &int32))
printf("edbus_message_arguments_get() error\n");
edbus_message_arguments_append(reply, "i", int32);
return reply;
}
static EDBus_Message *
_send_int16(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
{
EDBus_Message *reply = edbus_message_method_return_new(msg);
short int int16;
if (!edbus_message_arguments_get(msg, "n", &int16))
printf("edbus_message_arguments_get() error\n");
edbus_message_arguments_append(reply, "n", int16);
return reply;
}
static EDBus_Message *
_send_double(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
{
EDBus_Message *reply = edbus_message_method_return_new(msg);
double d;
if (!edbus_message_arguments_get(msg, "d", &d))
printf("edbus_message_arguments_get() error\n");
edbus_message_arguments_append(reply, "d", d);
return reply;
}
static EDBus_Message *
_send_string(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
{
EDBus_Message *reply = edbus_message_method_return_new(msg);
const char *txt;
if (!edbus_message_arguments_get(msg, "s", &txt))
printf("edbus_message_arguments_get() error\n");
edbus_message_arguments_append(reply, "s", txt);
return reply;
}
static Eina_Bool
_resp_async(void *data)
{
EDBus_Message *msg = data;
edbus_message_arguments_append(msg, "s", "Async test ok");
edbus_connection_send(conn, msg, NULL, NULL, -1);
return ECORE_CALLBACK_CANCEL;
}
static EDBus_Message *
_async_test(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Message *msg)
{
EDBus_Message *reply = edbus_message_method_return_new(msg);
printf("Received a call to AsyncTest.\n");
printf("Response will be send in 5 seconds.\n");
ecore_timer_add(5, _resp_async, reply);
return NULL;
}
static const EDBus_Signal signals[] = {
[TEST_SIGNAL_ALIVE] = {"Alive", NULL, 0},
[TEST_SIGNAL_HELLO] = {"Hello", EDBUS_ARGS({ "s", "message" }), 0},
{ }
};
static const EDBus_Method methods[] = {
{
"Hello", NULL, EDBUS_ARGS({"s", "message"}),
_hello
},
{
"Quit", NULL, NULL,
_quit, EDBUS_METHOD_FLAG_DEPRECATED
},
{ "SendBool", EDBUS_ARGS({"b", "bool"}), EDBUS_ARGS({"b", "bool"}),
_send_bool
},
{ "SendByte", EDBUS_ARGS({"y", "byte"}), EDBUS_ARGS({"y", "byte"}),
_send_byte
},
{ "SendUint32", EDBUS_ARGS({"u", "uint32"}), EDBUS_ARGS({"u", "uint32"}),
_send_uint32
},
{ "SendInt32", EDBUS_ARGS({"i", "int32"}), EDBUS_ARGS({"i", "int32"}),
_send_int32
},
{ "SendInt16", EDBUS_ARGS({"n", "int16"}), EDBUS_ARGS({"n", "int16"}),
_send_int16