Commit Graph

96 Commits

Author SHA1 Message Date
Lucas De Marchi aa31434d1f edbus: Remove useless defines
These values are used only using they directly are more meaninful than
those defines.



SVN revision: 80966
2012-12-14 16:28:55 +00:00
Lucas De Marchi eb967fa9d8 edbus: remove unneeded code
SVN revision: 80965
2012-12-14 16:28:50 +00:00
Lucas De Marchi 57e4972180 edbus: if you goto end, you don't use else
SVN revision: 80964
2012-12-14 16:28:46 +00:00
Lucas De Marchi d2a1198b51 edbus: Add missing EINA_WARN_UNUSED_RESULT to service API
SVN revision: 80963
2012-12-14 16:28:41 +00:00
Lucas De Marchi c598ce36fc 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
2012-12-14 16:28:36 +00:00
Lucas De Marchi 7a3fd93948 edbus: Give proper doc to edbus_service_property_changed()
SVN revision: 80961
2012-12-14 16:28:27 +00:00
José Roberto de Souza 3909a4ba36 edbus: Dont create proxy of FDO.Instropectable
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 80712
2012-12-11 19:52:24 +00:00
José Roberto de Souza cb2b967570 edbus: Dont create proxy of FDO.Peer
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 80711
2012-12-11 19:52:20 +00:00
José Roberto de Souza 7c8e5cd193 edbus: Fix typo in object manager
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 80710
2012-12-11 19:52:15 +00:00
José Roberto de Souza 4f05ef66e5 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
2012-12-11 19:52:11 +00:00
José Roberto de Souza d3a279ff56 edbus: Only one ref of Properties interface in each object
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 80708
2012-12-11 19:52:06 +00:00
Lucas De Marchi cbc0a8311a edbus: Better naming for FDO proxy in connection
Patch by: Lucas De Marchi <lucas.de.marchi@gmail.com>



SVN revision: 80707
2012-12-11 19:52:02 +00:00
José Roberto de Souza d05347bb91 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
2012-12-11 19:51:38 +00:00
Lucas De Marchi 07e21b19c8 edbus: simplify returning new ref of obj/proxy
Patch by: Lucas De Marchi <lucas.de.marchi@gmail.com>



SVN revision: 80705
2012-12-11 19:51:34 +00:00
José Roberto de Souza 85192f5045 edbus: Add ref to object and proxy in edbus_object/proxy_get
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 80704
2012-12-11 19:51:29 +00:00
José Roberto de Souza 4b874afdd9 edbus: Fix typo on doc of edbus_message_arguments_get
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 80703
2012-12-11 19:51:25 +00:00
José Roberto de Souza 150a4a5c41 edbus: Add object method call
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 80702
2012-12-11 19:51:20 +00:00
José Roberto de Souza 3dd67bbc2f edbus: Add missing break in edbus_message_from_eina_value
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 80701
2012-12-11 19:51:16 +00:00
José Roberto de Souza 3a4cbf1e4c edbus: Change some function parameters to const
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 80699
2012-12-11 19:51:02 +00:00
José Roberto de Souza 55cd1268b3 edbus: Fix signature check in edbus_message_iter_fixed_array_get()
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 80697
2012-12-11 19:50:53 +00:00
José Roberto de Souza 851fcb14ff edbus: Add Variant to Property set function
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 80696
2012-12-11 19:50:49 +00:00
José Roberto de Souza 53f9a1cafc edbus: Add proxy to Proxy_Event_Property_Changed
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 80695
2012-12-11 19:50:45 +00:00
José Roberto de Souza cb6aab3513 edbus: Remove signal_handler_del over a already freed signal
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 80694
2012-12-11 19:50:40 +00:00
José Roberto de Souza 80adffbdb0 edbus: Add Disconnected event in connection
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 80693
2012-12-11 19:50:29 +00:00
José Roberto de Souza 1956b12fa0 edbus: Remove unnecessary connection events
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 80692
2012-12-11 19:50:25 +00:00
José Roberto de Souza 3c8076fa53 edbus: Add edbus_private_connection_get()
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 80691
2012-12-11 19:50:20 +00:00
José Roberto de Souza 3134ba4ad0 edbus: Support '(' and '{' in edbus_message_iter_get_and_next()
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 80689
2012-12-11 19:50:11 +00:00
José Roberto de Souza 5a49f65f6f 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
2012-12-11 19:50:06 +00:00
José Roberto de Souza 00e6dac1ac 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
2012-12-11 19:50:01 +00:00
José Roberto de Souza 4327109500 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
2012-12-11 19:49:46 +00:00
José Roberto de Souza d5dab6de7b edbus: Handle 'unref signal handler inside of own callback' with ref and unref
This way is much simpler and doesn't generate many events when main loop
is quit inside of a signal handler callback.

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



SVN revision: 80683
2012-12-11 19:49:42 +00:00
José Roberto de Souza 7115dfa939 edbus: Use edbus_connection_name_get() instead of try find and alloc
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 80682
2012-12-11 19:49:37 +00:00
José Roberto de Souza 00c5b00c7d edbus: Add EINA_ARG_NONNULL and EINA_WARN_UNUSED_RESULT to API
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 80681
2012-12-11 19:49:33 +00:00
José Roberto de Souza 146db396e4 edbus: Implement edbus_object_managed_objects_get()
Also removed edbus_object_interfaces_added_callback_add/del() because we already
have object events for that.

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



SVN revision: 80680
2012-12-11 19:49:27 +00:00
José Roberto de Souza 4ec1d6c4bb edbus: Implement edbus_object_event_callback_add()
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 80058
2012-12-03 12:09:53 +00:00
Lucas De Marchi 7c533e08c5 edbus: remove static from var
This is not needed. Let it on stack.



SVN revision: 80057
2012-12-03 12:09:43 +00:00
José Roberto de Souza ba1f699883 edbus: Add main page to doxygen
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 79388
2012-11-16 13:07:53 +00:00
José Roberto de Souza 4fa2b8d735 edbus: Rename edbus_object_bus_path_get() to edbus_object_path_get()
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 79387
2012-11-16 13:07:45 +00:00
José Roberto de Souza c3828323c2 edbus: Fix search of children objects when path = "/"
Example: there's an object in "/org/bla" and we are adding an object in
"/". Thus the second should becaome the parent of the first, which was a
root object since it had no parent yet.

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



SVN revision: 79386
2012-11-16 13:07:38 +00:00
José Roberto de Souza 7a407c66db edbus: Fix segfault in edbus_message_to_eina_value() when message have no args
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 79385
2012-11-16 13:07:32 +00:00
José Roberto de Souza e3607b5b35 edbus: Cosmetic change
There's no need to call eina_array_count(). Pop until it finishes.

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



SVN revision: 79384
2012-11-16 13:07:26 +00:00
José Roberto de Souza f1db6fcba9 edbus: Remove stringshare of Instrospectable interface
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 79383
2012-11-16 13:07:21 +00:00
José Roberto de Souza 2c9e6e4760 edbus: Add edbus_service_object_manager_attach/detach
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 79382
2012-11-16 13:07:14 +00:00
José Roberto de Souza d26d9a48b1 edbus: Fix leak in GetAll Properties of Proxy monitor
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 79381
2012-11-16 13:07:06 +00:00
José Roberto de Souza 7c2d19fce2 edbus: Add input message to get property function
Without this message, it's not possible for user create the error
message. Also update the docs to clarify usage of the Get/Set callbacks.

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



SVN revision: 79380
2012-11-16 13:06:53 +00:00
Lucas De Marchi 0fa753cd7d edbus: add const where it's due and remove casts
SVN revision: 79185
2012-11-12 16:16:16 +00:00
Lucas De Marchi c2de1aa13e edbus: check signature earlier and fail on invalid signature
The problem is: if there's any arg with invalid signatures, we cannot
continue adding the interface. Just fail with a log message so user will
notice it.

This means we need to check if signals are valid much earlier. Actually
before even adding the object/interface.

Also change the iteration on signals so we don't use a needless index.



SVN revision: 79184
2012-11-12 16:16:10 +00:00
Lucas De Marchi 1478175b5f edbus: do not alloc/free eina_strbuf. Reset it instead
SVN revision: 79183
2012-11-12 16:16:04 +00:00
Lucas De Marchi e877a52f97 edbus: simplify/unify appending args to methods/signals
Functions to append methods/properties/signals also marked as inline as
they should be called by only one place.



SVN revision: 79182
2012-11-12 16:15:58 +00:00
Lucas De Marchi 219ca93d23 edbus: compat introspection with no annotation/arg
SVN revision: 79181
2012-11-12 16:15:52 +00:00