platform/upstream/eldbus.git
10 years agoAdded tizen packaging 32/11032/1 accepted/tizen/ivi accepted/tizen/mobile accepted/tizen_generic accepted/tizen_ivi accepted/tizen_ivi_panda tizen tizen_ivi_panda accepted/tizen/20131105.234120 accepted/tizen/20131107.174331 accepted/tizen/20131111.232935 accepted/tizen/ivi/panda/20140403.014658 submit/tizen/20131105.222958 submit/tizen_ivi_panda/20140403.011942
Eduardo Lima (Etrunko) [Mon, 14 Oct 2013 19:40:53 +0000 (16:40 -0300)]
Added tizen packaging

Change-Id: I2a53542f9a1f8a8b84af540ad2136b0bc170381e
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
10 years agoImported Upstream version 1.7.8 upstream upstream/1.7.8
Eduardo Lima (Etrunko) [Wed, 16 Oct 2013 19:44:21 +0000 (16:44 -0300)]
Imported Upstream version 1.7.8

10 years agoMerge branch 'backports' master
Eduardo Lima (Etrunko) [Fri, 11 Oct 2013 19:57:14 +0000 (16:57 -0300)]
Merge branch 'backports'

10 years agoeldbus: Use FDO error message to timeout
José Roberto de Souza [Tue, 10 Sep 2013 21:09:43 +0000 (18:09 -0300)]
eldbus: Use FDO error message to timeout

10 years agoeldbus: Check if interface of signal match with signal handler
José Roberto de Souza [Mon, 2 Sep 2013 20:07:16 +0000 (17:07 -0300)]
eldbus: Check if interface of signal match with signal handler

Thanks fgau for pointing this issue.

10 years agoeldbus: Add timeout message error as a macro
José Roberto de Souza [Fri, 30 Aug 2013 13:52:04 +0000 (10:52 -0300)]
eldbus: Add timeout message error as a macro

10 years agoeldbus: Add eldbus_object_manager_interfaces_added/removed()
José Roberto de Souza [Fri, 30 Aug 2013 13:23:28 +0000 (10:23 -0300)]
eldbus: Add eldbus_object_manager_interfaces_added/removed()

10 years agoeldbus: Make properties_monitor() return a boolean indicating if props are already...
José Roberto de Souza [Fri, 30 Aug 2013 13:15:35 +0000 (10:15 -0300)]
eldbus: Make properties_monitor() return a boolean indicating if props are already cached

10 years agoeldbus: Add a new proxy event to notify when properties are cached
José Roberto de Souza [Fri, 30 Aug 2013 13:15:10 +0000 (10:15 -0300)]
eldbus: Add a new proxy event to notify when properties are cached

10 years agoeldbus: Handle correclty the last unref of a object path or conn in service callback
José Roberto de Souza [Mon, 26 Aug 2013 19:11:31 +0000 (16:11 -0300)]
eldbus: Handle correclty the last unref of a object path or conn in service callback

This allow user remove the last reference of service object path or last
last reference of connection be removed inside of a method callback.

10 years agoeldbus: Send all object manager signals of all childrens before delete path or detach...
José Roberto de Souza [Mon, 26 Aug 2013 17:57:27 +0000 (14:57 -0300)]
eldbus: Send all object manager signals of all childrens before delete path or detach object manager

10 years agoeldbus: ecore_idler_del() return is the data
José Roberto de Souza [Fri, 23 Aug 2013 23:44:43 +0000 (20:44 -0300)]
eldbus: ecore_idler_del() return is the data

10 years agoeldbus: Only a explicit call should unregister a object path
José Roberto de Souza [Fri, 23 Aug 2013 23:06:56 +0000 (20:06 -0300)]
eldbus: Only a explicit call should unregister a object path

10 years agoeldbus: Empty list of interfaces add/del if there is no parent object manager
José Roberto de Souza [Fri, 23 Aug 2013 22:47:40 +0000 (19:47 -0300)]
eldbus: Empty list of interfaces add/del if there is no parent object manager

10 years agoeldbus: Use EINA_LIST_FREE instead of EINA_LIST_FOREACH to send interfaces add
José Roberto de Souza [Fri, 23 Aug 2013 22:45:12 +0000 (19:45 -0300)]
eldbus: Use EINA_LIST_FREE instead of EINA_LIST_FOREACH to send interfaces add

10 years agoeldbus: Send property changed signals before close connection
José Roberto de Souza [Fri, 23 Aug 2013 19:54:12 +0000 (16:54 -0300)]
eldbus: Send property changed signals before close connection

10 years agoeldbus: Correctly append name of interface removed
José Roberto de Souza [Fri, 23 Aug 2013 19:00:44 +0000 (16:00 -0300)]
eldbus: Correctly append name of interface removed

10 years agoeldbus: Mark introspection of parent object as dirty when adding a child object
José Roberto de Souza [Mon, 19 Aug 2013 18:24:17 +0000 (15:24 -0300)]
eldbus: Mark introspection of parent object as dirty when adding a child object

10 years agoeldbus: Improve error message when connection get fail
José Roberto de Souza [Tue, 13 Aug 2013 18:37:42 +0000 (15:37 -0300)]
eldbus: Improve error message when connection get fail

10 years agoeldbus: Fix copy and paste error.
Stefan Schmidt [Fri, 9 Aug 2013 09:27:54 +0000 (10:27 +0100)]
eldbus: Fix copy and paste error.

We are in the remove case here. The interfaces_added looks like a missed change
from the copy and paste of the add case.

CID 1039671

10 years agoeldbus: Check if property_get_all() returned a error before read properties
José Roberto de Souza [Thu, 25 Jul 2013 17:22:10 +0000 (14:22 -0300)]
eldbus: Check if property_get_all() returned a error before read properties

10 years agoefl: fix headers order.
Cedric Bail [Tue, 23 Jul 2013 02:25:22 +0000 (11:25 +0900)]
efl: fix headers order.

10 years agoeldbus-codegen: If substr dont exist in string return string.
José Roberto de Souza [Mon, 8 Jul 2013 16:42:18 +0000 (13:42 -0300)]
eldbus-codegen: If substr dont exist in string return string.

CID: 1039339

10 years agoeldbus: Correclty check if user already create a object manager iface to object
José Roberto de Souza [Mon, 8 Jul 2013 16:36:40 +0000 (13:36 -0300)]
eldbus: Correclty check if user already create a object manager iface to object

CID: 1039421

10 years agoeldbus: Remove unnecessary function - _eldbus_connection_unref()
José Roberto de Souza [Fri, 5 Jul 2013 17:34:27 +0000 (14:34 -0300)]
eldbus: Remove unnecessary function - _eldbus_connection_unref()

Neither internal function call this function.

10 years agoeldbus: Handle removal of last reference of connection inside of callback
José Roberto de Souza [Fri, 5 Jul 2013 17:45:48 +0000 (14:45 -0300)]
eldbus: Handle removal of last reference of connection inside of callback

10 years agoUpdated Eldbus connect_address example
Eduardo Lima (Etrunko) [Thu, 4 Jul 2013 20:23:52 +0000 (17:23 -0300)]
Updated Eldbus connect_address example

See description on the header of the source file

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
10 years agoeldbus - better fix for dbus_conn becoming null in dispatch
Carsten Haitzler (Rasterman) [Thu, 4 Jul 2013 01:56:43 +0000 (10:56 +0900)]
eldbus - better fix for dbus_conn becoming null in dispatch

10 years agoeldbus - only unref client conns that are not null after dispatch
Carsten Haitzler (Rasterman) [Wed, 3 Jul 2013 23:41:45 +0000 (08:41 +0900)]
eldbus - only unref client conns that are not null after dispatch

10 years agoeldbus: Missing dbus_connection_unref() in error path
Eduardo Lima (Etrunko) [Thu, 27 Jun 2013 20:31:22 +0000 (17:31 -0300)]
eldbus: Missing dbus_connection_unref() in error path

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
10 years agoeldbus: Call dbus_bus_register() for TYPE_ADDRESS connections
Eduardo Lima (Etrunko) [Thu, 27 Jun 2013 20:24:46 +0000 (17:24 -0300)]
eldbus: Call dbus_bus_register() for TYPE_ADDRESS connections

From D-Bus documentation:

http://dbus.freedesktop.org/doc/api/html/group__DBusBus.html

dbus_bus_register():

    If you open a bus connection with dbus_connection_open() or
    dbus_connection_open_private() you will have to dbus_bus_register()
    yourself, or make the appropriate registration method calls yourself.

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
10 years agoeldbus: Add proxy call to org.freedesktop.DBus.Hello
Eduardo Lima (Etrunko) [Thu, 27 Jun 2013 19:38:53 +0000 (16:38 -0300)]
eldbus: Add proxy call to org.freedesktop.DBus.Hello

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
10 years agoeldbus: error message iters should be initted as readonly.
Carsten Haitzler (Rasterman) [Sat, 22 Jun 2013 11:15:44 +0000 (20:15 +0900)]
eldbus: error message iters should be initted as readonly.

10 years agomore descriptive error message in eldbus when property fetching fails
Mike Blumenkrantz [Thu, 20 Jun 2013 07:13:25 +0000 (08:13 +0100)]
more descriptive error message in eldbus when property fetching fails

10 years agoinform users when eldbus-codegen is cowardly refusing to generate code
Mike Blumenkrantz [Wed, 19 Jun 2013 10:18:17 +0000 (11:18 +0100)]
inform users when eldbus-codegen is cowardly refusing to generate code

10 years agouse sizeof for eldbus-codegen internal define lengths
Mike Blumenkrantz [Wed, 19 Jun 2013 10:09:01 +0000 (11:09 +0100)]
use sizeof for eldbus-codegen internal define lengths

10 years agos/LENGHT/LENGTH
Mike Blumenkrantz [Wed, 19 Jun 2013 10:08:10 +0000 (11:08 +0100)]
s/LENGHT/LENGTH

10 years agoeldbus: Fix crash when eldbus is shutdown and we have a live connection of type address
José Roberto de Souza [Mon, 10 Jun 2013 04:33:31 +0000 (01:33 -0300)]
eldbus: Fix crash when eldbus is shutdown and we have a live connection of type address

Also show info about each connection of type address live.

10 years agoExample for eldbus_address_connection_get() functions
Eduardo Lima (Etrunko) [Mon, 27 May 2013 21:14:44 +0000 (18:14 -0300)]
Example for eldbus_address_connection_get() functions

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
10 years agoeldbus: Welcome two new APIs and one connection type
Eduardo Lima (Etrunko) [Thu, 23 May 2013 20:08:16 +0000 (17:08 -0300)]
eldbus: Welcome two new APIs and one connection type

eldbus_address_connection_get() and eldbus_private_address_connection_get()
are similar to the respective _connection_get() counterparts, but enables
users to connect to buses other than system or session.

The new type introduced for those connections is ELDBUS_CONNECTION_TYPE_ADDRESS
and they require an additional address parameter, which will be passed to
dbus_connection_open().

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
10 years agoeldbus: New internal function _eldbus_connection_free()
Eduardo Lima (Etrunko) [Thu, 23 May 2013 19:36:29 +0000 (16:36 -0300)]
eldbus: New internal function _eldbus_connection_free()

This is actually a split on the _eldbus_connection_unref() function, that
will be called either when the refcount reaches 0 or to force the deletion
of an Eldus_Connection.

The second use case will be contemplated in a following patch.

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
10 years agoeldbus: Reset value of fd_handler after deletion
Eduardo Lima (Etrunko) [Mon, 27 May 2013 21:17:54 +0000 (18:17 -0300)]
eldbus: Reset value of fd_handler after deletion

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
10 years agofix eldbus generator memleak when failing to fetch args
Mike Blumenkrantz [Mon, 20 May 2013 10:12:33 +0000 (11:12 +0100)]
fix eldbus generator memleak when failing to fetch args

10 years agoeldbus_service: explicitly set flags to 0 in static _Signal and _Method structs
Jérémy Zurcher [Tue, 7 May 2013 20:16:37 +0000 (22:16 +0200)]
eldbus_service: explicitly set flags to 0 in static _Signal and _Method structs

10 years agoeldbus: Fix interface_unregister()
José Roberto de Souza [Sat, 23 Mar 2013 17:43:05 +0000 (14:43 -0300)]
eldbus: Fix interface_unregister()

10 years agoeldbus: Fix eldbus_service_*_get() functions over FDO interfaces
José Roberto de Souza [Sat, 23 Mar 2013 04:36:48 +0000 (01:36 -0300)]
eldbus: Fix eldbus_service_*_get() functions over FDO interfaces

10 years agoeldbus: Fix eldbus_pending_destination_get(), it was returnig the method name
José Roberto de Souza [Sat, 23 Mar 2013 03:54:49 +0000 (00:54 -0300)]
eldbus: Fix eldbus_pending_destination_get(), it was returnig the method name

10 years agoeldbus: Add EINA_ARG_NONNULL to new API function
Lucas De Marchi [Sat, 4 May 2013 13:03:53 +0000 (10:03 -0300)]
eldbus: Add EINA_ARG_NONNULL to new API function

10 years agoeldbus: Add eldbus_message_iter_fixed_array_append()
José Roberto de Souza [Sat, 23 Mar 2013 03:24:23 +0000 (00:24 -0300)]
eldbus: Add eldbus_message_iter_fixed_array_append()

10 years agoAdd missing files in previous backport
José Roberto de Souza [Fri, 2 Aug 2013 18:35:09 +0000 (15:35 -0300)]
Add missing files in previous backport

10 years agoRevert "Backport fixes from EFL tree"
José Roberto de Souza [Mon, 5 Aug 2013 16:25:04 +0000 (13:25 -0300)]
Revert "Backport fixes from EFL tree"

This reverts commit 7de696d9d258c372d503c8040d79fd061dc3765a.

10 years agoeldbus: use the right variable name for version.
Cedric Bail [Tue, 30 Jul 2013 05:45:56 +0000 (14:45 +0900)]
eldbus: use the right variable name for version.

10 years agoBackport fixes from EFL tree
José Roberto de Souza [Tue, 16 Jul 2013 17:54:36 +0000 (14:54 -0300)]
Backport fixes from EFL tree

10 years agoBackport changes from EFL
Lucas De Marchi [Fri, 26 Apr 2013 16:05:06 +0000 (13:05 -0300)]
Backport changes from EFL

There were lots of changes in eldbus inside EFL. This commit imports all
of them by simply copying the headers and source files over the old
ones. This is the lazy way to do but there were way too many missing
commits, including renames and cleanups.

Docs are probably broken - NOT TESTED. Use the EFL version if you are
interested in the documentation.

10 years agobuild-sys: Define version as in EFL
Lucas De Marchi [Fri, 26 Apr 2013 15:30:40 +0000 (12:30 -0300)]
build-sys: Define version as in EFL

10 years agoDon't use deprecated AM_CONFIG_HEADER
Lucas De Marchi [Tue, 23 Apr 2013 15:33:53 +0000 (12:33 -0300)]
Don't use deprecated AM_CONFIG_HEADER

10 years agoRename edbus->eldbus
Lucas De Marchi [Tue, 23 Apr 2013 15:30:07 +0000 (12:30 -0300)]
Rename edbus->eldbus

11 years agoSpec file fix.
Michael Jennings [Wed, 26 Dec 2012 10:08:24 +0000 (10:08 +0000)]
Spec file fix.

SVN revision: 81704

11 years agoedbus: Fix make distcheck.
Stefan Schmidt [Fri, 21 Dec 2012 08:10:17 +0000 (08:10 +0000)]
edbus: Fix make distcheck.

SVN revision: 81515

11 years agoedbus codegen: rename tool and move it to the right dir
Lucas De Marchi [Thu, 20 Dec 2012 22:04:11 +0000 (22:04 +0000)]
edbus codegen: rename tool and move it to the right dir

SVN revision: 81496

11 years agoedbus codegen: fix check for eina + ecore
Lucas De Marchi [Thu, 20 Dec 2012 22:04:07 +0000 (22:04 +0000)]
edbus codegen: fix check for eina + ecore

This way we get a spurious line in configure, resulting in this message:

/home/lucas/p/edbus/configure: line 14196: ecore: command not found

SVN revision: 81495

11 years agoedbus: Mark instrospectable as dirty when needed
José Roberto de Souza [Thu, 20 Dec 2012 22:04:02 +0000 (22:04 +0000)]
edbus: Mark instrospectable as dirty when needed

Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>

SVN revision: 81494

11 years agoedbus: Fix edbus_proxy_property_set
José Roberto de Souza [Thu, 20 Dec 2012 21:48:22 +0000 (21:48 +0000)]
edbus: Fix edbus_proxy_property_set

Fix the function and add support for complex types, in which case a
Eina_Value is expected.

Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>

SVN revision: 81493

11 years agoedbus codegen: Initial commit
José Roberto de Souza [Thu, 20 Dec 2012 21:47:20 +0000 (21:47 +0000)]
edbus codegen: Initial commit

Add codegen tool to generate client code.

Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>

SVN revision: 81492

11 years agoedbus: add helper function edbus_message_iter_struct_like_to_eina_value()
José Roberto de Souza [Thu, 20 Dec 2012 21:38:15 +0000 (21:38 +0000)]
edbus: add helper function edbus_message_iter_struct_like_to_eina_value()

Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>

SVN revision: 81489

11 years agoedbus: add _message_iter_from_eina_value_struct to private header
José Roberto de Souza [Thu, 20 Dec 2012 21:38:10 +0000 (21:38 +0000)]
edbus: add _message_iter_from_eina_value_struct to private header

Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>

SVN revision: 81488

11 years agoedbus: avoid cyclic unref
Lucas De Marchi [Thu, 20 Dec 2012 14:52:27 +0000 (14:52 +0000)]
edbus: avoid cyclic unref

If we are freeing a EDBUS_Connection_Name its name_owner_changed signal
handler may hold a pointer and try to unref it when deleting the signal
handler. We can't simply make the signal handler hold a reference to the
connection name, otherwise edbus_connection_name_gc will never be
triggered because of cyclic references.

Thus, just set the cn->name_owner_changed->bus to NULL before trying to
delete the signal handler.

Related log found by Lucas Jóia:

==20607== Invalid read of size 4
==20607==    at 0x6FE29EE: edbus_connection_name_gc.isra.3 (edbus_core.c:375)
==20607==    by 0x6FE4287: edbus_connection_unref (edbus_core.c:1028)
==20607==    by 0x4C8D94: e_msgbus_shutdown (e_msgbus.c:167)
==20607==    by 0x436194: _e_main_shutdown (e_main.c:1136)
==20607==    by 0x434F25: main (e_main.c:1074)
==20607==  Address 0x1461ba68 is 24 bytes inside a block of size 64 free'd
==20607==    at 0x4C2A739: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20607==    by 0x6FF0E78: edbus_signal_handler_unref (edbus_signal_handler.c:269)
==20607==    by 0x6FE2A48: edbus_connection_name_gc.isra.3 (edbus_core.c:384)
==20607==    by 0x6FE4287: edbus_connection_unref (edbus_core.c:1028)
==20607==    by 0x4C8D94: e_msgbus_shutdown (e_msgbus.c:167)
==20607==    by 0x436194: _e_main_shutdown (e_main.c:1136)
==20607==    by 0x434F25: main (e_main.c:1074)

SVN revision: 81463

11 years agoedbus: Do not modify cn->names hash while walking it
Lucas De Marchi [Thu, 20 Dec 2012 14:52:21 +0000 (14:52 +0000)]
edbus: Do not modify cn->names hash while walking it

Bug triggered by Lucas Jóia:

==10042== Invalid read of size 8
==10042==    at 0x6B86626: _eina_rbtree_iterator_next (eina_rbtree.c:165)
==10042==    by 0x6B7228D: _eina_hash_iterator_next (eina_hash.c:622)
==10042==    by 0x6FE41DC: edbus_connection_unref (edbus_core.c:1015)
==10042==    by 0x4C8D94: e_msgbus_shutdown (e_msgbus.c:167)
==10042==    by 0x436194: _e_main_shutdown (e_main.c:1136)
==10042==    by 0x434F25: main (e_main.c:1074)
==10042==  Address 0x15c1b958 is 40 bytes inside a block of size 96 free'd
==10042==    at 0x4C2A739: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==10042==    by 0x6B71CB7: _eina_hash_del_by_hash_el (eina_hash.c:441)
==10042==    by 0x6FE2A1E: edbus_connection_name_gc.isra.2 (edbus_core.c:385)
==10042==    by 0x6FE4217: edbus_connection_unref (edbus_core.c:1026)
==10042==    by 0x4C8D94: e_msgbus_shutdown (e_msgbus.c:167)
==10042==    by 0x436194: _e_main_shutdown (e_main.c:1136)
==10042==    by 0x434F25: main (e_main.c:1074)

SVN revision: 81462

11 years agoedbus: no need for this auxiliary variables, and check refcount first
Lucas De Marchi [Thu, 20 Dec 2012 14:52:15 +0000 (14:52 +0000)]
edbus: no need for this auxiliary variables, and check refcount first

SVN revision: 81461

11 years agoedbus: Remove object path of service if ObjectManager is the last optional iface
José Roberto de Souza [Thu, 20 Dec 2012 01:55:47 +0000 (01:55 +0000)]
edbus: Remove object path of service if ObjectManager is the last optional iface

Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>

SVN revision: 81416

11 years agoedbus: Fix undefined ref. to 'EINA_LOG_DOMAIN_GLOBAL' in examples
José Roberto de Souza [Thu, 20 Dec 2012 01:55:42 +0000 (01:55 +0000)]
edbus: Fix undefined ref. to 'EINA_LOG_DOMAIN_GLOBAL' in examples

Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>

SVN revision: 81415

11 years agoedbus: Only create one ref of proxys when listen object manager
José Roberto de Souza [Thu, 20 Dec 2012 01:55:34 +0000 (01:55 +0000)]
edbus: Only create one ref of proxys when listen object manager

Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>

SVN revision: 81414

11 years agoedbus: (de)yodafy free cb functions
Lucas De Marchi [Wed, 19 Dec 2012 17:30:11 +0000 (17:30 +0000)]
edbus: (de)yodafy free cb functions

edbus_connection_cb_free_add     -> edbus_connection_free_cb_add
edbus_connection_cb_free_del     -> edbus_connection_free_cb_del
edbus_object_cb_free_add         -> edbus_object_free_cb_add
edbus_object_cb_free_del         -> edbus_object_free_cb_del
edbus_pending_cb_free_add        -> edbus_pending_free_cb_add
edbus_pending_cb_free_del        -> edbus_pending_free_cb_del
edbus_proxy_cb_free_add          -> edbus_proxy_free_cb_add
edbus_proxy_cb_free_del          -> edbus_proxy_free_cb_del
edbus_signal_handler_cb_free_add -> edbus_signal_handler_free_cb_add
edbus_signal_handler_cb_free_del -> edbus_signal_handler_free_cb_del

SVN revision: 81389

11 years agoedbus: Fix leftover unref after edbus_service_signal_send change
Lucas De Marchi [Wed, 19 Dec 2012 17:30:03 +0000 (17:30 +0000)]
edbus: Fix leftover unref after edbus_service_signal_send change

SVN revision: 81388

11 years agoedbus: unexport edbus_message_signal_new()
Lucas De Marchi [Tue, 18 Dec 2012 21:38:49 +0000 (21:38 +0000)]
edbus: unexport edbus_message_signal_new()

Signals need to be sent with edbus_service_signal_emit() -- for basic
messages -- or edbus_service_signal_new() + edbus_service_signal_send --
for complex messages.  Otherwise it's possible to send signals that are
not in the service introspection or that have different signatures by
mistake/typo.

SVN revision: 81311

11 years agoedbus: unref sent signal, also for complex types
Lucas De Marchi [Tue, 18 Dec 2012 21:38:43 +0000 (21:38 +0000)]
edbus: unref sent signal, also for complex types

SVN revision: 81310

11 years agoedbus: rename functions edbus_message{_iter,}_arguments_set
Lucas De Marchi [Tue, 18 Dec 2012 20:05:02 +0000 (20:05 +0000)]
edbus: rename functions edbus_message{_iter,}_arguments_set

Rename these functions since they do not set the data in the
iterator/message but rather they append the data.

Also improve the documentation of edbus_message_iter_arguments_append()
to clarify its usage.

SVN revision: 81295

11 years agoedbus: Fix invalid access memory in edbus_service_interface_unregister()
José Roberto de Souza [Mon, 17 Dec 2012 19:48:54 +0000 (19:48 +0000)]
edbus: Fix invalid access memory in edbus_service_interface_unregister()

_object_unregister is called synchronized by libdbus, so when _interface_free() ran
your object its already freed.

==30579== Invalid read of size 4
==30579==    at 0x4775190: _find_object_manager_parent (edbus_service.c:803)
==30579==    by 0x4775292: _interface_free (edbus_service.c:1011)
==30579==    by 0x4777F1D: edbus_service_interface_unregister (edbus_service.c:1101)
==30579==    by 0x40CBD28: elm_dbus_menu_delete (elm_dbus_menu.c:128)
==30579==    by 0x414552F: _elm_menu_smart_del (elm_menu.c:562)
==30579==    by 0x4810F39: _eo_op_internal (eo.c:363)
==30579==    by 0x4812E1B: eo_do_internal (eo.c:403)
==30579==    by 0x4279D02: evas_object_smart_del (evas_object_smart.c:1080)

Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>

SVN revision: 81180

11 years agoedbus: fix missing blank lines
Lucas De Marchi [Mon, 17 Dec 2012 19:48:45 +0000 (19:48 +0000)]
edbus: fix missing blank lines

Apparently the previous sed script didn't caught all missing blank
lines.

SVN revision: 81179

11 years agoedbus: rename DISCONNECTED event
Lucas De Marchi [Mon, 17 Dec 2012 18:25:13 +0000 (18:25 +0000)]
edbus: rename DISCONNECTED event

SVN revision: 81177

11 years agoedbus: Fix formatting
Lucas De Marchi [Mon, 17 Dec 2012 18:25:06 +0000 (18:25 +0000)]
edbus: Fix formatting

SVN revision: 81176

11 years agoedbus: simplify end condition check in loop
Lucas De Marchi [Mon, 17 Dec 2012 18:25:00 +0000 (18:25 +0000)]
edbus: simplify end condition check in loop

SVN revision: 81175

11 years agoedbus: avoid using dbus_signature_iter_get_signature when not needed
Lucas De Marchi [Mon, 17 Dec 2012 18:24:54 +0000 (18:24 +0000)]
edbus: avoid using dbus_signature_iter_get_signature when not needed

SVN revision: 81174

11 years agoedbus: Use eina_log in client example and generalize expected values
Lucas De Marchi [Mon, 17 Dec 2012 18:24:49 +0000 (18:24 +0000)]
edbus: Use eina_log in client example and generalize expected values

Keep expected values in a struct. It would be ideal to have all values
and compare functions in an array, so we would be able to set the same
callback function for all methods. But it's already short enough so keep
it as is.

The usage of eina_log here allows us to easily catch which test failed.

SVN revision: 81173

11 years agoedbus: Fix typo in error message
Lucas De Marchi [Mon, 17 Dec 2012 18:24:43 +0000 (18:24 +0000)]
edbus: Fix typo in error message

SVN revision: 81172

11 years agoedbus: Don't use "bool" as a variable name
Lucas De Marchi [Mon, 17 Dec 2012 18:24:37 +0000 (18:24 +0000)]
edbus: Don't use "bool" as a variable name

Using bool as variable name is asking for trouble in C99. If we end up
including stdbool.h, this would fail.

SVN revision: 81171

11 years agoedbus: Let arguments_get fail if getting less args than passed
Lucas De Marchi [Mon, 17 Dec 2012 18:24:31 +0000 (18:24 +0000)]
edbus: Let arguments_get fail if getting less args than passed

If user passed a string with more elements, return EINA_FALSE on
edbus_message_arguments_get() so he knows not all elements are
initialized. Before this patch, we would notify user of its error if he
did something like:

i) edbus_message_arguments_get(msg, "uu", &a)
ii) edbus_message_arguments_get(msg, "uu", &a, &b)

And "msg" containing only 1 argument.

This also fixes the case in which user is getting the elements of an
array iterator and the array is empty. We were previously returning
EINA_TRUE, even if we were not filling the variable.

Last but not least, if the user was calling
edbus_message_iter_arguments_get() in an empty array, we would return
EINA_FALSE, even if we didn't actually get any element.

SVN revision: 81170

11 years agoedbus: do not use dbus_signature_iter_get_signature in edbus_message_iter_arguments_vget
Lucas De Marchi [Mon, 17 Dec 2012 18:24:23 +0000 (18:24 +0000)]
edbus: do not use dbus_signature_iter_get_signature in edbus_message_iter_arguments_vget

we are only interested in the first char of the signature so we can use
dbus_signature_iter_get_current_type and:

a) avoid the allocation of the signature for each complete type
b) simplify the check for struct and dict, since *_get_current_type()
   does TheRightThing (TM)

This also rename some variables to clarify the new semantics:

 iter_type -> iter
 sig_type  -> sig_iter

SVN revision: 81169

11 years agoedbus: Improve doc of edbus_{private_,}connection_get
Lucas De Marchi [Fri, 14 Dec 2012 16:29:08 +0000 (16:29 +0000)]
edbus: Improve doc of edbus_{private_,}connection_get

SVN revision: 80968

11 years agoedbus: add edbus.spec to gitignore
Lucas De Marchi [Fri, 14 Dec 2012 16:29:01 +0000 (16:29 +0000)]
edbus: add edbus.spec to gitignore

SVN revision: 80967

11 years agoedbus: Remove useless defines
Lucas De Marchi [Fri, 14 Dec 2012 16:28:55 +0000 (16:28 +0000)]
edbus: Remove useless defines

These values are used only using they directly are more meaninful than
those defines.

SVN revision: 80966

11 years agoedbus: remove unneeded code
Lucas De Marchi [Fri, 14 Dec 2012 16:28:50 +0000 (16:28 +0000)]
edbus: remove unneeded code

SVN revision: 80965

11 years agoedbus: if you goto end, you don't use else
Lucas De Marchi [Fri, 14 Dec 2012 16:28:46 +0000 (16:28 +0000)]
edbus: if you goto end, you don't use else

SVN revision: 80964

11 years agoedbus: Add missing EINA_WARN_UNUSED_RESULT to service API
Lucas De Marchi [Fri, 14 Dec 2012 16:28:41 +0000 (16:28 +0000)]
edbus: Add missing EINA_WARN_UNUSED_RESULT to service API

SVN revision: 80963

11 years agoedbus: Add blank lines to separate function docs
Lucas De Marchi [Fri, 14 Dec 2012 16:28:36 +0000 (16:28 +0000)]
edbus: Add blank lines to separate function docs

find . -name '*.h' -exec \
     sed -i '/^\s*$/b; N; /\n\/\*\*/{P;x;p;x;D}' {} \;

This ensures to add a blank line above a doxygen comment if and only if
there wasn't one.

SVN revision: 80962

11 years agoedbus: Give proper doc to edbus_service_property_changed()
Lucas De Marchi [Fri, 14 Dec 2012 16:28:27 +0000 (16:28 +0000)]
edbus: Give proper doc to edbus_service_property_changed()

SVN revision: 80961

11 years agoedbus: Dont create proxy of FDO.Instropectable
José Roberto de Souza [Tue, 11 Dec 2012 19:52:24 +0000 (19:52 +0000)]
edbus: Dont create proxy of FDO.Instropectable

Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>

SVN revision: 80712

11 years agoedbus: Dont create proxy of FDO.Peer
José Roberto de Souza [Tue, 11 Dec 2012 19:52:20 +0000 (19:52 +0000)]
edbus: Dont create proxy of FDO.Peer

Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>

SVN revision: 80711

11 years agoedbus: Fix typo in object manager
José Roberto de Souza [Tue, 11 Dec 2012 19:52:15 +0000 (19:52 +0000)]
edbus: Fix typo in object manager

Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>

SVN revision: 80710

11 years agoedbus: Dont create proxy of Object Manager on edbus_object_managed_objects_get()
José Roberto de Souza [Tue, 11 Dec 2012 19:52:11 +0000 (19:52 +0000)]
edbus: Dont create proxy of Object Manager on edbus_object_managed_objects_get()

Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>

SVN revision: 80709