Commit Graph

30 Commits

Author SHA1 Message Date
Tom Hacohen fd701b710b Edbus: Include config.h 2013-03-06 16:57:01 +00:00
Davide Andreoli 8ecd30d578 Add a new API to edbus to let it create an EDbus session from
an existing DBus connection.

This is needed by the python bindings, was done the same way
in edbus1, so it should fit here also

NOTE: I did not test this yet, and I'm not into the edbus code,
so I please who know the code to give a look. thanks

NOTE2: I don't think this need Changelog and stuff as we are probably
the only users of this function, let me know if i'm wrong
2013-02-28 20:33:29 +01:00
Daniel Willmann dda109a906 edbus: Use snprintf to be sure
Are dbus function calls with more than 1000 arguments possible?
If so -> prevent buffer overflow

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-02-18 12:26:27 +00:00
Daniel Willmann cd9b6bed62 edbus: Fix array access of shared_connection
type is an enum which can be 0. Make sure that it isn't before accessing
shared_connections[type - 1]
Found with klocwork

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-02-18 12:22:45 +00:00
Raphael Kubo da Costa ad5355a307 edbus: Update EDBUS_VERSION_MINOR
Patch by: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>



SVN revision: 83603
2013-02-04 15:29:41 +00:00
Bruno Dilly 1f30bdde5c edbus: implement edbus_proxy_data_{get, set, del}
The prototypes for those functions are defined in edbus_proxy.h, however
there's no implementation at all.

By Raphael Kubo <raphael.kubo.da.costa@intel.com>



SVN revision: 83299
2013-01-24 13:09:26 +00:00
José Roberto de Souza ba63fa7ed2 efl/edbus: Fix edbus_name_owner_changed() when bus name is not on bus
If we pass the last argument as TRUE, that means user want to know the actual
bus id of the bus name and if the bus name is not registered it never notify
the user.

This bug was insert when fixing another one, because of that there more code
here to fix the previous bug too.

Patch by: José Roberto de Souza <zezsouza@gmail.com>



SVN revision: 83082
2013-01-22 13:34:34 +00:00
Henrique Dante de Almeida de6fa1ea64 edbus: Fix list element deletion on _interface_free
SPANK demarchi

Patch by: Henrique Dante de Almeida <hdante@profusion.mobi>



SVN revision: 82952
2013-01-17 22:08:52 +00:00
Lucas De Marchi ae8761f809 edbus: omit InterfacesAdded/InterfacesRemoved signal if we can
If we add and remove the interfaces in the same mainloop iteration,
there's no point in sending the signals at all. Let's just omit them
since it's likely because the rest of the intialization for having them
failed.



SVN revision: 82907
2013-01-16 21:18:07 +00:00
Lucas De Marchi 57ac8b0b95 edbus: Fix reply to GetManagedObjects containing bogus interface
If ther interface was just added on this mainloop iteration we shouldn't
put it in the reply to GetManagedObjects because we still didn't send
the InterfacesAdded signal for that interface.



SVN revision: 82906
2013-01-16 21:18:02 +00:00
Lucas De Marchi 3c308503ea edbus: fix attaching object manager if user registered it himself
SVN revision: 82905
2013-01-16 21:17:57 +00:00
Lucas De Marchi 36e57ca7b2 edbus: simplify and fix ObjectManager
Give the object that originated the signal to use in the idler for
changes in ther interfaces. This greatly simplifies the code,
particularly while removing.

Fix some issues in the previous implementations. There are some races
and corner cases that need to be taken into account in ObjectManager:

 - Adding and removing an interface in the same mainloop iteration. We
   were previously sending only the signal InterfacesRemoved
 - When we dettach an object manager we need to flush its signals
 - Since now we store the iface_{added,removed} in the object in which
   they happen we also need to flush out signals when attaching an
   ObjectManager, but let the previous ObjectManager send the signals
 - When we free an Object also flush the changes. Previously we were
   omitting the signal.

There are still some places to fix and some improvements to be made. I
let some TODOs and FIXMEs there.



SVN revision: 82903
2013-01-16 21:17:45 +00:00
Lucas De Marchi 15cbe4a60d edbus: rename and yodafy functions
SVN revision: 82902
2013-01-16 21:17:06 +00:00
Lucas De Marchi d4da99698e efl/edbus: make all edbus_*_send() methods unref its msg
There's no reason to keep a msg after it was sent. Before this patch we
had edbus_service_signal_send() unref'ing its msg and all the others
not. Also, several users (particularly the edbus_proxy_send() ones) were
forgetting to unref the msg.

This patch makes all these methods unref the message after it has been
succesfully sent:

 - edbus_connection_send()
 - edbus_object_send()
 - edbus_proxy_send()
 - edbus_service_signal_send()



SVN revision: 82807
2013-01-15 14:33:48 +00:00
Lucas De Marchi d976c23f58 efl/edbus: remove bogus line
My bad when applying José's patch.




SVN revision: 82786
2013-01-14 22:39:03 +00:00
José Roberto de Souza 283805237a edbus: Dont call dispatch_name_owner_change() if we get a error message
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 82784
2013-01-14 22:34:51 +00:00
José Roberto de Souza 9690409636 edbus: Fix signal handler extra match check
When an extra argument didn't match, instead of going to the next signal
handler we were skiping to next extra match argument because we were
calling "continue" inside EINA_INLIST_FOREACH.

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



SVN revision: 82351
2013-01-07 15:20:16 +00:00
Gustavo Sverzut Barbieri b716ab72e9 efl: warnings--
SVN revision: 82273
2013-01-05 14:04:22 +00:00
Lucas De Marchi c1d576dcc7 edbus: improve doc of edbus_message_* functions
SVN revision: 82081
2013-01-03 15:06:39 +00:00
Ulisses Furquim af8c81634f edbus: Fix connection name leak
Hack to fix the connection name leak. The problem is that each signal
handler has a reference to the FDO_BUS connection name and when the
penultimate connection name is released (and therefore its signal
handler), FDO_BUS is released, too.

Check if cn is still in the hash before trying to free it.

Patch by: Ulisses Furquim <ulisses@profusion.mobi>



SVN revision: 82077
2013-01-03 14:06:20 +00:00
José Roberto de Souza 32d7c8d5a9 edbus: Remove Connection_Context_NOC_Cb marked to be deleted
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 82076
2013-01-03 14:06:14 +00:00
José Roberto de Souza 30a6da0e7f edbus: Suppress warnings of unused parameters
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 82072
2013-01-03 14:05:51 +00:00
José Roberto de Souza 9e1f5d80fe edbus: Increment/decrement edbus refcount when processing signals
This allows the user to shutdown edbus inside a signal callback.

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



SVN revision: 82071
2013-01-03 14:05:45 +00:00
Lucas De Marchi f1f81ca7c9 efl: stop depending on va_list type
va_list may be typedef'ed not only to array and pointer but also to a
plain struct. It could be made to work this way, but it's a lot simpler
a safer to not depend on it. To deal with the array corner case we copy
the va_list from the function arguments to the stack and call the "real"
function passing it.



SVN revision: 82017
2013-01-02 20:55:57 +00:00
José Roberto de Souza 3988f3fe52 edbus: Test if connection_name could be freed in name_owner_changed_callback_del
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 82010
2013-01-02 20:31:53 +00:00
José Roberto de Souza 42af9b1629 edbus: Remove message leaks
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 82009
2013-01-02 20:31:46 +00:00
Gustavo Sverzut Barbieri 2608f68571 efl/docs: clean-up and make it more uniform.
now unified docs are bit more uniform in their start pages, overall
improved but much to do :-(



SVN revision: 81851
2012-12-28 23:26:05 +00:00
Ulisses Furquim 4f6a4e59a4 edbus: do not crash when dispatching signals
Make sure the next signal handler for the connection is always known and
not vanish under us.

Patch by: Ulisses Furquim <ulisses@profusion.mobi>



SVN revision: 81847
2012-12-28 21:05:57 +00:00
Mike Blumenkrantz 6196c88b1b same edbus commit as last commit
SVN revision: 81840
2012-12-28 20:02:31 +00:00
Gustavo Sverzut Barbieri 331488d1ce efl: merge edbus (v2).
SVN revision: 81825
2012-12-28 17:53:25 +00:00