platform/upstream/eldbus.git
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

11 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.

11 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

11 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

11 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

11 years agoedbus: Only one ref of Properties interface in each object
José Roberto de Souza [Tue, 11 Dec 2012 19:52:06 +0000 (19:52 +0000)]
edbus: Only one ref of Properties interface in each object

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

SVN revision: 80708

11 years agoedbus: Better naming for FDO proxy in connection
Lucas De Marchi [Tue, 11 Dec 2012 19:52:02 +0000 (19:52 +0000)]
edbus: Better naming for FDO proxy in connection

Patch by: Lucas De Marchi <lucas.de.marchi@gmail.com>

SVN revision: 80707

11 years agoedbus: Keep only one reference of object and proxy of dbus daemon interface per conne...
José Roberto de Souza [Tue, 11 Dec 2012 19:51:38 +0000 (19:51 +0000)]
edbus: Keep only one reference of object and proxy of dbus daemon interface per connection

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

SVN revision: 80706

11 years agoedbus: simplify returning new ref of obj/proxy
Lucas De Marchi [Tue, 11 Dec 2012 19:51:34 +0000 (19:51 +0000)]
edbus: simplify returning new ref of obj/proxy

Patch by: Lucas De Marchi <lucas.de.marchi@gmail.com>

SVN revision: 80705

11 years agoedbus: Add ref to object and proxy in edbus_object/proxy_get
José Roberto de Souza [Tue, 11 Dec 2012 19:51:29 +0000 (19:51 +0000)]
edbus: Add ref to object and proxy in edbus_object/proxy_get

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

SVN revision: 80704

11 years agoedbus: Fix typo on doc of edbus_message_arguments_get
José Roberto de Souza [Tue, 11 Dec 2012 19:51:25 +0000 (19:51 +0000)]
edbus: Fix typo on doc of edbus_message_arguments_get

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

SVN revision: 80703

11 years agoedbus: Add object method call
José Roberto de Souza [Tue, 11 Dec 2012 19:51:20 +0000 (19:51 +0000)]
edbus: Add object method call

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

SVN revision: 80702

11 years agoedbus: Add missing break in edbus_message_from_eina_value
José Roberto de Souza [Tue, 11 Dec 2012 19:51:16 +0000 (19:51 +0000)]
edbus: Add missing break in edbus_message_from_eina_value

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

SVN revision: 80701

11 years agoedbus: Add example for reading str array inside a variant using eina_value
José Roberto de Souza [Tue, 11 Dec 2012 19:51:12 +0000 (19:51 +0000)]
edbus: Add example for reading str array inside a variant using eina_value

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

SVN revision: 80700

11 years agoedbus: Change some function parameters to const
José Roberto de Souza [Tue, 11 Dec 2012 19:51:02 +0000 (19:51 +0000)]
edbus: Change some function parameters to const

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

SVN revision: 80699

11 years agoedbus: Signal property changed after a successful property-set in complex server...
José Roberto de Souza [Tue, 11 Dec 2012 19:50:58 +0000 (19:50 +0000)]
edbus: Signal property changed after a successful property-set in complex server example

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

SVN revision: 80698

11 years agoedbus: Fix signature check in edbus_message_iter_fixed_array_get()
José Roberto de Souza [Tue, 11 Dec 2012 19:50:53 +0000 (19:50 +0000)]
edbus: Fix signature check in edbus_message_iter_fixed_array_get()

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

SVN revision: 80697

11 years agoedbus: Add Variant to Property set function
José Roberto de Souza [Tue, 11 Dec 2012 19:50:49 +0000 (19:50 +0000)]
edbus: Add Variant to Property set function

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

SVN revision: 80696

11 years agoedbus: Add proxy to Proxy_Event_Property_Changed
José Roberto de Souza [Tue, 11 Dec 2012 19:50:45 +0000 (19:50 +0000)]
edbus: Add proxy to Proxy_Event_Property_Changed

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

SVN revision: 80695

11 years agoedbus: Remove signal_handler_del over a already freed signal
José Roberto de Souza [Tue, 11 Dec 2012 19:50:40 +0000 (19:50 +0000)]
edbus: Remove signal_handler_del over a already freed signal

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

SVN revision: 80694

11 years agoedbus: Add Disconnected event in connection
José Roberto de Souza [Tue, 11 Dec 2012 19:50:29 +0000 (19:50 +0000)]
edbus: Add Disconnected event in connection

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

SVN revision: 80693

11 years agoedbus: Remove unnecessary connection events
José Roberto de Souza [Tue, 11 Dec 2012 19:50:25 +0000 (19:50 +0000)]
edbus: Remove unnecessary connection events

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

SVN revision: 80692

11 years agoedbus: Add edbus_private_connection_get()
José Roberto de Souza [Tue, 11 Dec 2012 19:50:20 +0000 (19:50 +0000)]
edbus: Add edbus_private_connection_get()

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

SVN revision: 80691

11 years agoedbus: Refactor examples
José Roberto de Souza [Tue, 11 Dec 2012 19:50:16 +0000 (19:50 +0000)]
edbus: Refactor examples

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

SVN revision: 80690

11 years agoedbus: Support '(' and '{' in edbus_message_iter_get_and_next()
José Roberto de Souza [Tue, 11 Dec 2012 19:50:11 +0000 (19:50 +0000)]
edbus: Support '(' and '{' in edbus_message_iter_get_and_next()

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

SVN revision: 80689

11 years agoedbus: Allow to monitor unique id in edbus_name_owner_changed_callback_add
José Roberto de Souza [Tue, 11 Dec 2012 19:50:06 +0000 (19:50 +0000)]
edbus: Allow to monitor unique id in edbus_name_owner_changed_callback_add

This allows to monitor when a client exits. Clients in general don't
register a name in the bus and in some cases it's even not allowed to do
(for example an agent talking to bluetoothd, that runs in system bus).

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

SVN revision: 80687

11 years agoedbus: Fix bug found in refactored banshee example
José Roberto de Souza [Tue, 11 Dec 2012 19:50:01 +0000 (19:50 +0000)]
edbus: Fix bug found in refactored banshee example

Refactor edbus_signal_handler_add() so internal signal handlers don't
set the connection free callback. This fixes the bug in which
EDBus_Connection was freeing the signal handler of EDBus_Conenction_Name

==22814== Invalid read of size 4
==22814==    at 0x40564B0: edbus_signal_handler_del (edbus_signal_handler.c:278)
==22814==    by 0x4040E65: _edbus_connection_name_unref (edbus_core.c:507)
==22814==    by 0x404106B: edbus_connection_name_owner_monitor (edbus_core.c:520)
==22814==    by 0x4055F63: _edbus_signal_handler_clean (edbus_signal_handler.c:217)
==22814==    by 0x40564F8: edbus_signal_handler_del (edbus_signal_handler.c:279)
==22814==    by 0x4043088: _edbus_connection_unref (edbus_core.c:1045)
==22814==    by 0x404352F: edbus_connection_unref (edbus_core.c:1105)
==22814==    by 0x80498AA: main (banshee.c:233)
==22814==  Address 0x44bea48 is 0 bytes inside a block of size 72 free'd
==22814==    at 0x402C06C: free (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==22814==    by 0x4056118: _edbus_signal_handler_del (edbus_signal_handler.c:249)
==22814==    by 0x4056401: edbus_signal_handler_unref (edbus_signal_handler.c:272)
==22814==    by 0x4056503: edbus_signal_handler_del (edbus_signal_handler.c:280)
==22814==    by 0x4043088: _edbus_connection_unref (edbus_core.c:1045)
==22814==    by 0x404352F: edbus_connection_unref (edbus_core.c:1105)
==22814==    by 0x80498AA: main (banshee.c:233)
==22814==
CRI<22814>: src/lib/edbus_signal_handler.c:278 edbus_signal_handler_del() *** Eina Magic Check Failed !!!
    Input handle has already been freed!
    *** NAUGHTY PROGRAMMER!!!
    *** SPANK SPANK SPANK!!!
    *** Now go fix your code. Tut tut tut!

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

SVN revision: 80686

11 years agoedbus: Refactor banshee example
José Roberto de Souza [Tue, 11 Dec 2012 19:49:57 +0000 (19:49 +0000)]
edbus: Refactor banshee example

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

SVN revision: 80685

11 years agoedbus: Refactor edbus_connection_name
José Roberto de Souza [Tue, 11 Dec 2012 19:49:46 +0000 (19:49 +0000)]
edbus: Refactor edbus_connection_name

Simplifications on "monitor" of NameOwnerChanged
Life cycle tied with refcount, objs, and name_owner_changed list.

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

SVN revision: 80684