Commit Graph

228 Commits

Author SHA1 Message Date
Tom Hacohen 96c4c88070 Efl: Remove "legacy_prefix: null;" as it's now the default. 2016-05-12 17:27:35 +01:00
Tom Hacohen 684d005970 Eldbus: Fix namespacing to use . and not _. 2016-05-12 12:20:34 +01:00
Tom Hacohen c587972e52 Eldbus: Fix namespacing to use . and not _. 2016-05-12 11:17:29 +01:00
Tom Hacohen bcb72b5367 Eldbus: remove shadowing variable.
FFS people, turn on your compiler warnings.
2016-05-10 16:30:18 +01:00
Tom Hacohen 138d4e1353 Efl model: Remove the no longer needed .Base hack. 2016-05-10 11:36:35 +01:00
Mike Blumenkrantz 8a5abfbfc3 eldbus: send exit/quit event upon disconnecting the session bus
if an application is connected to the session bus, being disconnected
should indicate that the session has been terminated and all applications
in that session should also be terminated

this ensures that no zombie processes will remain after the session bus dies
2016-05-06 15:41:38 -04:00
Larry Jr 7bbc5ec623 Eldbus: fixed property_set in Eldbus.Model_Proxy 2016-04-29 20:55:37 -03:00
Larry Jr 0c76f82a31 Efl, Eio, Eldbus, Elementary: new model API use eina_promise
Efl - efl_model_base changed to use eina_promise
Eio - eio_model use efl_model_base with promise
Eldbus - elddbus models use promise now
Elementary - elm_view_list and elm_view_form use new models with promise

updated all related examples and tests
2016-04-29 13:21:24 -03:00
Stefan Schmidt db0858823e docs: ector: document ector cairo surface classes
For both the cairo and the cairo software surfaces.
2016-04-22 09:46:40 +02:00
Stefan Schmidt 42d20b9507 docs: eldbus: document property values
Add documentation comments and switch away from the generic "value" name.
2016-04-22 09:46:40 +02:00
Stefan Schmidt f74c4bbce7 docs: eldbus: add class and property descriptions for eldbus model files
Also fix some existing docs while being there.
2016-04-20 12:46:41 +02:00
Carsten Haitzler 53c66c98c2 ecore - system modules - fix eldbus interdependency and complaints
so ecore uses ecore system modules ... that use eldbus. eldbus inits
ecore. this is a vicious cycle. eldbus shouldnt init ecore. it's a
dependency but should be provided outside of initting eldbus. this all
led to hack-arounds on initting eldbus in these ecore modules that
just break things like shutting down eldbus when still in use.

this ensures any pending messages are canceled on ecore module shutdown.
this ensures every ecore module fully inits and shuts down eldbus as
they should so refcounting the inits works.
this stops eldbus from inittign ecore to avoid the circuluar dependency.

this stops lots of CRI/ERR complaints eg if you run elua with no
cmdline options.

this is just better.

@fix
2016-04-12 14:11:32 +09:00
Tom Hacohen 8706d03b43 Change the EFL according to the renaming of the eo_add() current object. 2016-03-15 15:25:54 +00:00
Tom Hacohen f24210caac Revert "Automatic migration to the new eo_add syntax."
This reverts commit 4f949a2757.
2016-03-11 12:29:03 +00:00
Tom Hacohen 4f949a2757 Automatic migration to the new eo_add syntax. 2016-03-09 16:09:14 +00:00
Tom Hacohen f21ade6123 Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
2016-03-03 09:58:08 +00:00
Marcel Hollerbach e4cb6ff6fe eldbus: eldbus is already defined in eo
the struct is already defined in eldbus_general.eoeldbus: eldbus is
already defined in eo

the struct is already defined in eldbus_general.eott
2016-02-23 18:58:48 +01:00
Mike Blumenkrantz f7cd667766 eldbus: print dbus errors incurred when failing at signal handler operations
seeing these errors is significantly more helpful when debugging why the system
is not responding as expected
2016-02-19 13:24:30 -05:00
Tom Hacohen df8cbbc419 Eldbus: Move more types to eldbus_types.eot. 2016-02-17 11:59:07 +00:00
Tom Hacohen 63f717caaf Eldbus: Create eldbus_types.eot and start using it. 2016-02-17 11:30:24 +00:00
Tom Hacohen 297fc1c42b Eldbus model arguments: Fix Eolian warnings.
This includes either migrating types to eolian, fixing namespace or
importing extra types.
2016-02-17 10:17:59 +00:00
Mike Blumenkrantz 2444e127dd eldbus: add more debug prints for proxy and signal handler 2016-02-13 11:26:03 -05:00
José Roberto de Souza 316cf42159 eldbus: Correctly read/write boolean to eina_value
DBus bool type is a uint32_t not a uint8_t, just changing how read
and write, not chaging how it is stored in eina_value to save some
bytes of RAM.

This fix the stack overflow pointed out here: https://phab.enlightenment.org/T3089

@fix
2016-02-01 12:50:31 -02:00
Stefan Schmidt b63b631efd eldbus model: no need to double const a Eina_Stringshare
Eina_Stringshare is already const, no need to const it again.
2016-01-11 22:55:34 +01:00
Stefan Schmidt 9154fbb0e0 eldbus: add missing since tags for all new symbols 2016-01-06 16:31:55 +01:00
Guilherme Lepsch 10fa1b5b4b eldbus: add efl.model implementation.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-10 12:02:30 -08:00
Shinwoo Kim e555f07235 [eldbus] assign NULL to fd_handler, after deletion.
Summary: [eldbus] assign NULL to fd_handler, after deletion.

Test Plan: N/A

Reviewers: raster, cedric

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D3243
2015-10-29 13:45:07 +09:00
Carsten Haitzler 7d0c5a9423 eldbus - only do syntax checks if libdbus is new enough 2015-10-06 11:29:16 +09:00
Carsten Haitzler 9a467c0451 eldbus - make method calls less crasy since libdbus likes to abort
changes zmike made to e's systray make e abort due to libdbus seeing
the bus name as invalid. it actually is. it's
/org/ayatana/NotificationItem/steam for example - instead of
or.whatever.blah - thuis e aborts continually if you run steam at all.
eldbus should be more crash-proof thus this adds checks so dbus fun
doesnt cause an app to crash if it happens to call incorrect dbus names.

@fix
2015-10-04 17:53:46 +09:00
Marcel Hollerbach 47541b81c6 eldbus: fix _eldbus_message_iter_arguments_vget
Summary:
there is a problem with _eldbus_message_iter_arguments_vget.

Assume: We have a array of type y, there are 3 elements in the array.

Lets say we are iterating with

printf("%c", dbus_message_iter_get_arg_type(iter));

and

dbus_message_iter_next(iter);

throuw the iter.

You will see that this will output yyy. As we are having 3 times v.
While the signature of the message iterator is y.

If you now call eldbus_message_iter_arguments_get(message, "y", &cont)
it will return false, with the errormessage in line 766, reason for this
is that the type of the signature iterator differs from the message
iterator. Because of the upper example.
So all in all: The signature given to the method has not to be equal to
the signature of the message iterator, it has to be equal to the
iterated signature, which cannot be found easily with the eldbus api.

The solution is to only iterate in the message iterator that long until
the signature iterator is at the end, if the type differs in this
region, give a error and return false. Otherwise return true.

The sad thing about this is that it is a behaviour break, but the
behaviour is borked, so its a fix.

I tested this over a week now, without any problem in efl/elm/e.

Reviewers: stefan_schmidt, zmike

Reviewed By: stefan_schmidt

Subscribers: zmike, ceolin, simotek, DaveMDS, cedric

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D3074
2015-10-02 09:14:29 +02:00
Thiep Ha bb9fdad7c2 doc/eldbus: fix parameter in document
Summary:
The allow_initial_call apprears two times in
eldbus_name_owner_changed_callback_add api.

@fix

Reviewers: seoz, Hermet

Reviewed By: Hermet

Subscribers: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D3110
2015-10-01 19:29:23 +09:00
Amitesh Singh 4b8825bbea eldbus: fix typos in documentation 2015-09-28 21:59:34 +05:30
Thiep Ha ffbda5add5 eldbus: add dbus_pending NULL check
Summary:
When we call dbus_connection_send_with_reply, the dbus_pending
can be NULL. In this case, the next call dbus_pending_call_set_notify
will cause application crash.
We should check if dbus_pending is NULL before calling dbus API.

@fix

Reviewers: cedric

Subscribers: englebass, cedric, seoz

Differential Revision: https://phab.enlightenment.org/D3081
2015-09-23 09:22:51 +09:00
Lukasz Stanislawski abdbb9ad14 eldbus: fix broken fallback interface.
Summary:
Previous implementation assumed that fallback interface path should be changed
on every method call. This is generally not needed since real request
path can be obtained directly from dbus message passed as method call
paremeter.

This patch reverts this behaviour and additionally fix broken Property and Introspect
interface handling of fallback interface.

Reviewers: raster, lucasdemarchi, cedric

Subscribers: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D3016

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-09-22 00:04:38 +02:00
Stefan Schmidt 495046e0eb eldbus: add since tag for now public eldbus_message_signal_new API
Thanks go to vtorri for bringing this to my attention.
2015-08-24 12:07:10 +02:00
Stefan Schmidt c4b4cd5967 eldbus: remove now public eldbus_message_signal_new declaration from private.h
The declaration is now on eldbus_message as EAPI so we can safely remove it here.
2015-08-24 10:11:34 +02:00
Lukasz Stanislawski 0416d4d9bb eldbus: add eldbus_message_signal_new to public header
Test Plan: elementary tests

Reviewers: cedric

Subscribers: seoz, cedric

Differential Revision: https://phab.enlightenment.org/D2772
2015-08-24 10:07:40 +02:00
Cedric BAIL 89b6ee058e eldbus: do not release shared connections if connection is private.
Reviewers: cedric

Subscribers: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D2935

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-08-11 17:43:02 +02:00
Cedric BAIL c7d8d83c47 eldbus: remove the need to order the header correctly for Windows. 2015-05-07 09:53:10 +02:00
Tom Hacohen 5e4b523d51 Eldbus: fix potential unsigned int underflow.
Subtracting two unsigned values results in an unsigned value, which means
abs() will have no effect.
This also means that if base is smaller than size, we'll have an
unsigned int underflow.

I did it this way (with the if) because it looked like base might be
smaller than size. However, please remove the if (and don't reinstate
the abs) if this is not the case.
2015-04-22 13:17:31 +01:00
Chris Michael baf998165a eldbus: Fix formatting
Summary: No functional changes, just formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-11 15:29:29 -05:00
Guilherme Lepsch ef6456c541 eldbus: refactoring code.
Summary:
Code smells: Don't Repeat Yourself

Depends on D1927

Reviewers: felipealmeida, larryolj, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1928

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-09 22:03:19 +01:00
Guilherme Lepsch c5c70e54fc eldbus: eina_value not allocated from mempool.
Summary: Eina_Value must be allocated with eina_value_new() to be freed by eina_value_free().
@fix

Reviewers: felipealmeida, larryolj, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1927

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 15:37:15 +01:00
Guilherme Lepsch cd0cca6f80 eldbus: fix memory leak.
Summary:

@fix

Reviewers: felipealmeida, larryolj, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1920

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 11:28:37 +01:00
Guilherme Lepsch 629b5e3d2b eldbus: production code inside Eina Safety Check assert.
Summary: Eina Safety Checks assert macros don't do anything (no-op) if EINA_SAFETY_CHECKS is undefined.

@fix

Reviewers: felipealmeida, larryolj, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1926

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 11:23:44 +01:00
José Roberto de Souza 63abe9b00c eldbus: Fix crash when removing the last reference of the message container inside of the message callback
If user try to remove the last reference of proxy, object, connection
or eldbus(lib) inside of message callback it was causing the
eldbus_pending_dispatch() being called 2 times, one because of the
eldbus_cancel() that is triggered when the last reference of the
message parent is removed and another after the return of the user
callback.

==6545== Invalid read of size 8
==6545==    at 0x52F784E: eldbus_cbs_free_dispatch (eldbus_core.c:266)
==6545==    by 0x53064AA: eldbus_pending_dispatch (eldbus_pending.c:227)
==6545==    by 0x5305961: cb_pending (eldbus_pending.c:74)
==6545==    by 0x6B29DB1: ??? (in /usr/lib/libdbus-1.so.3.8.9)
==6545==    by 0x6B2D280: dbus_connection_dispatch (in /usr/lib/libdbus-1.so.3.8.9)
==6545==    by 0x52F93B4: eldbus_idler (eldbus_core.c:773)
==6545==    by 0x4E4B300: _ecore_call_task_cb (ecore_private.h:305)
==6545==    by 0x4E4B78F: _ecore_idler_all_call (ecore_idler.c:143)
==6545==    by 0x4E4EA73: _ecore_main_loop_spin_core (ecore_main.c:1768)
==6545==    by 0x4E4EAF1: _ecore_main_loop_spin_timers (ecore_main.c:1802)
==6545==    by 0x4E4ED01: _ecore_main_loop_iterate_internal (ecore_main.c:1925)
==6545==    by 0x4E4D03B: ecore_main_loop_begin (ecore_main.c:983)
==6545==  Address 0x701aa78 is 104 bytes inside a block of size 128 free'd
==6545==    at 0x4C2B200: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6545==    by 0x530655B: eldbus_pending_dispatch (eldbus_pending.c:241)
==6545==    by 0x5306763: eldbus_pending_cancel (eldbus_pending.c:259)
==6545==    by 0x52F29DB: _eldbus_proxy_clear (eldbus_proxy.c:146)
==6545==    by 0x52F3057: _eldbus_proxy_unref (eldbus_proxy.c:244)
==6545==    by 0x52F3393: eldbus_proxy_unref (eldbus_proxy.c:264)
==6545==    by 0x401039: on_get_playlists (banshee.c:53)
==6545==    by 0x5306493: eldbus_pending_dispatch (eldbus_pending.c:225)
==6545==    by 0x5305961: cb_pending (eldbus_pending.c:74)
==6545==    by 0x6B29DB1: ??? (in /usr/lib/libdbus-1.so.3.8.9)
==6545==    by 0x6B2D280: dbus_connection_dispatch (in /usr/lib/libdbus-1.so.3.8.9)
==6545==    by 0x52F93B4: eldbus_idler (eldbus_core.c:773)

Now we will remove the pending from parent pending list before
call the user callback, this way only the pending messages will
be canceled.

Also we need increase the eldbus reference before call
dbus_connection_dispatch() or user could remove the last reference of
eldbus inside of a message callback when we still are
holding one reference of the connection.

@fix
ref T1908
2014-12-17 17:05:35 -02:00
José Roberto de Souza 78d5bb17d7 Revert "eldbus hackaround for proxy deletion during pending callback"
This reverts commit 6a08788d59.

This will be properly fixed on the next patch.
2014-12-17 16:58:25 -02:00
Chris Michael 6e46642dfb eldbus: Fix possible null dereference reported by Coverity
Summary: Fix Coverity CID1256952: reports a null derefence here due to
eldbus_message_new returning NULL, thus causing a null dereference
when trying to set reply->dbus_msg

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-10 13:24:54 -05:00
Mike Blumenkrantz 6a08788d59 eldbus hackaround for proxy deletion during pending callback
this is merely a way to avoid crashing immediately when the referenced bug is triggered. it does not fix the problem.

ref T1908
2014-12-08 15:14:24 -05:00
José Roberto de Souza dfb60c0bfe eldbus: Use the timeout parameter on eldbus_proxy_send_and_block()
Sorry by bad I had forgot to use the new parameter.
2014-12-05 13:06:39 -02:00
José Roberto de Souza b9c1dfdf03 eldbus: Add timeout parameter to eldbus_proxy_send_and_block()
As all other send functions have, we need to have here.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-05 09:53:08 -05:00
José Roberto de Souza 8b193c145e eldbus: Fix _eldbus_connection_send_and_block()
Some problems with the actual implementation:
- the reply should not be writable, as it can only be read.
- if an error happen dbus_connection_send_with_reply_and_block()
will return NULL so we need check before use it
- all other send calls remove one reference of the message

Now also it is creating a error message, so the caller can know why it fail.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-05 09:53:08 -05:00
Chris Michael e62dfdd79e eldbus: Add actual API function code for eldbus_proxy_send_and_block
Summary: This adds the actual code to send a dbus message and block
while waiting for a reply.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-04 09:49:02 -05:00
Chris Michael 34dd248551 eldbus: Add code for _eldbus_connection_send_and_block function
Summary: This function will send a message to dbus and block while
waiting for a reply

NB: This is needed for our 'port to libinput', and for our 'opening up the
drm card without systemd' efforts

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-04 09:49:02 -05:00
Chris Michael 14332f5d0d eldbus: Add API function declaration for eldbus_proxy_send_and_block
Summary: This adds a public facing API function to make dbus calls
which will block and wait for a reply. This is needed for a couple of
use cases in our Wayland efforts (libinput, etc).

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-04 09:49:02 -05:00
Chris Michael 7e7a715164 eldbus: Add function prototype for send_and_block
Summary: This just adds the function prototype into the eldbus private
header. It will be used in the new proxy function
"eldbus_proxy_send_and_block"

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-04 09:49:02 -05:00
Pierre Le Magourou ebaba7f20a eldbus: Fix wrong comments. 2014-10-21 23:42:03 +02:00
Pierre Le Magourou f50f321562 eldbus: update missing eldbus_proxy API documentation. 2014-10-20 18:32:28 +02:00
Pierre Le Magourou a86a8e1e4a eldbus: update missing eldbus_pending.h API documentation. 2014-10-20 18:32:28 +02:00
Pierre Le Magourou 321f6482cd eldbus: update missing eldbus_object API documentation. 2014-10-20 18:32:28 +02:00
Pierre Le Magourou de5e028d7d eldbus: update missing eldbus_message API documentation. 2014-10-20 18:32:28 +02:00
Pierre Le Magourou 11b875b6ce eldbus: update missing eldbus_freedesktop.h API documentation. 2014-10-20 18:32:28 +02:00
Pierre Le Magourou 163773ff9f eldbus: update missing API documentation. 2014-10-20 18:32:27 +02:00
Pierre Le Magourou 65db5e981b eldbus: add missing API documentation in Eldbus.h. 2014-10-20 18:32:27 +02:00
Nicolas Aguirre f15d462737 eldbus: add documentation for Eldbus_Version structure. 2014-10-20 18:02:10 +02:00
Stefan Schmidt 7d4c063fbb eldbus: Only call va_end() if the signature does not match after rewrite
If git log is right this is patch number 4 for this CID. Lets hope we handle all
cases for starting and ending va now.

CID 1039883
2014-09-04 10:35:05 +02:00
Carsten Haitzler 7957721849 eldbus - fix missing varags va_end
fix CID 1039883
2014-09-01 19:40:47 +09:00
Carsten Haitzler 463f5a29f9 eldbus - fix varargs usage - missing va_end on return
this fixes CID 1039883
2014-08-25 11:50:36 +09:00
Carsten Haitzler e263af08c9 eldbus - fix varargs missing end in iter get and next
there was an error return handler that would return without doing
va_end(). coverity picked this up. this fixes CID 1039883
2014-08-14 18:53:40 +09:00
Wonguk Jeong f796679af6 eldbus: do not ignore numeric "0" in property_set
"0" value was considered to be error even if signature was numeric

@fix
2014-08-10 22:55:38 +02:00
Felipe Magno de Almeida 835b8756ec Fixes ABI breakage in Eldbus for use with C++ Eldbus
Summary:
This fixes the breakage when Eldbus_Service_Interface_Desc added a
wrongfully methods2 field to a class that is allocated by the user.

This patch adds the respective eldbus_service_interface_register2 and
eldbus_service_interface_fallback_register2 for registration of
Eldbus_Service_Interface_Desc2 which is now versioned. So future the
functions can be backwards compatible and the struct be forward
compatible and leaves the Eldbus_Service_Interface_Desc and
eldbus_service_interface_register and
eldbus_service_interface_fallback_register intact as it was in EFL
1.10.

This fixes T1408

Reviewers: cedric, stefan_schmidt, raster

Reviewed By: raster

Subscribers: cedric

Maniphest Tasks: T1408

Differential Revision: https://phab.enlightenment.org/D1188
2014-07-15 08:01:14 +09:00
Carsten Haitzler fc2c00c67b fix eldbus warnings 2014-07-08 12:45:44 +09:00
Felipe Magno de Almeida 1baf9e4825 eldbus: Fixes ABI break in Eldbus_Method with appended void* data
Summary:
Removed the void* data variable from Eldbus_Method and created another
struct that has the void* data and added an array of Eldbus_Method2 in
the descriptor for the Eldbus_Service_Interface_Desc and making the
appropriate modifications in the implementation to use both
descriptions.

Reviewers: cedric, stefan_schmidt, raster

CC: cedric

Maniphest Tasks: T1408

Differential Revision: https://phab.enlightenment.org/D1139
2014-07-08 11:57:08 +09:00
Felipe Magno de Almeida 30df128be5 eldbus-cxx: Implementation of eldbus C++ API
Summary:
Applications can:

  void method_callback(void* data, const Eldbus_Service_Interface* iface,
                       const Eldbus_Message* message);
  struct { ... } data_struct;

  Eldbus_Method methods[] =
   {
     "method1", ELDBUS_ARGS("b", "bool"), ELDBUS_ARGS("b", "bool"), ELDBUS_METHOD_FLAG_HAS_DATA
     , (Eldbus_Method_Cb)&method_callback, &data_struct
   };

   And method_callback will be called with data parameter pointing to data_struct global object.

Also, Eldbus-cxx supports registering an interface passing a lambda or
function object as method. For example:

  edb::service_interface iface = edb::service_interface_register
    (c, path, interface
     , es::method("SendStringAndBool"
                  , [expected_string, expected_bool] (std::string const& n, bool b
                                                      , bool* out)
                  {
                    std::cout << "Running SendStringAndBool" << std::endl;
                    ck_assert(n == expected_string);
                    ck_assert(b == expected_bool);
                    *out = b;
                    return n;
                  }
                  , es::ins<std::string, bool>("string", "bool")
                  , es::outs<std::string, bool>("string", "bool")
                  )
    );

When a request for "SendStringAndBool" with the proper signature is
called, executes the lambda and replies with the return value and
its bool* out parameter value.

Reviewers: cedric, woohyun, raster

CC: savio, cedric

Differential Revision: https://phab.enlightenment.org/D1052
2014-07-03 16:28:23 +09:00
Jérémy Zurcher f8c2c57406 do not use EINA_FALSE instead of NULL 2014-05-07 17:45:11 +02:00
Carsten Haitzler 86d9b4ed71 Registers a fallback handler for a given subsection of the object hierarchy.
Summary:
Goal of this patch is cover in Eldbus library function dbus_connection_register_fallback.
http://dbus.freedesktop.org/doc/api/html/group__DBusConnection.html#gac4473b37bfa74ccf7459959d27e7bc59

Reviewers: stanluk, raster

Reviewed By: raster

Differential Revision: https://phab.enlightenment.org/D479
2014-01-23 15:45:22 +09:00
Daniel Juyung Seo 76d8532b54 efl: Unified eina critical manro to CRI.
Being annoyed by different types of eina critical macros - CRI, CRIT,
 CRITICAL -, I concluded to unify them to one. Discussed on IRC and
 finally, CRI was chosen to meet the consistency with other macros -
 ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
2013-12-26 12:27:13 +09:00
Cedric BAIL 0a6ce62bb2 eldbus: don't do a double initialization due to ecore module using eldbus now. 2013-12-23 11:24:49 +09:00
Sebastian Dransfeld 6f56406f59 eldbus: Check return value of eina_value_pget
If eina_value_pget returns FALSE, we shouldn't continue.

Fixes CID 1039685
2013-12-07 21:11:33 +01:00
Sebastian Dransfeld 2b9710431e eldbus: use alloca to allocate local mem
Since we free the allocated mem some lines down, we can use alloca. This
also fixes CID 1039179
2013-12-07 21:11:33 +01:00
Sebastian Dransfeld 831d17a8e8 eldbus: unref msg on error
If we return here, the msg isn't sent, so unref it.

Fixes CID 1039178
2013-12-07 21:11:33 +01:00
Sebastian Dransfeld c5caea03e3 eldbus: on error unref msg
This is done on all other errors, EINA_SAFETY macros ain't no silver
bullet.

Fixes CID 1039177
2013-12-07 21:11:33 +01:00
Sebastian Dransfeld f950e7990f eldbus: free allocated mem on error
Fixes CID 1039177
2013-12-07 21:11:33 +01:00
Sebastian Dransfeld 1d1feea572 eldbus: Check return value of _type_size
_type_size could return 0, which would fail in the modulo call next.
Check for 0, and return.

Fixes CID 1039436
2013-12-07 21:11:32 +01:00
Carsten Haitzler 0b605c5daa Eldbus: added function for getting bus unique name
Summary:
Hello guys,

We are now working on a accessibility support for elementary (ATSPI2) and we need following function to correctly register application.

Reviewers: cedric, raster, lucasdemarchi

Reviewed By: raster

Differential Revision: https://phab.enlightenment.org/D327
2013-12-02 14:57:07 +09:00
José Roberto de Souza 64687356b0 eldbus: Fix crash caused when the object of an monitored proxy is deleted
This happen because proxy was already freed and we try print some information
about the proxy in error message.

This fix: https://phab.enlightenment.org/T543
2013-11-29 17:21:14 -02:00
José Roberto de Souza b25fd77827 Revert "workaround for T543"
This reverts commit b663b5b8c7.
2013-11-29 16:39:10 -02:00
Mike Blumenkrantz b663b5b8c7 workaround for T543
this prevents crashing in efm:u2, but is really bad and needs to be fixed more competently before release
2013-11-21 14:44:43 -05:00
Carsten Haitzler b07c0a76ce alpha1 release autofoo/build tree work to pass distcheck and actually work 2013-11-04 18:33:35 +09:00
José Roberto de Souza 2266bf8904 eldbus: Use FDO error message to timeout 2013-09-19 15:47:22 -03:00
José Roberto de Souza 932a7a00cd eldbus: Check if interface of signal match with signal handler
Thanks fgau for pointing this issue.
2013-09-02 17:07:16 -03:00
José Roberto de Souza bcba4779c8 eldbus: Add timeout message error as a macro 2013-09-02 16:14:47 -03:00
José Roberto de Souza 356a4aa8e9 eldbus: Add eldbus_object_manager_interfaces_added/removed() 2013-09-02 16:14:47 -03:00
José Roberto de Souza 928f0e4f83 eldbus: Make properties_monitor() return a boolean indicating if props are already cached 2013-09-02 16:14:47 -03:00
José Roberto de Souza 8b69231897 eldbus: Add a new proxy event to notify when properties are cached 2013-09-02 16:14:43 -03:00
José Roberto de Souza 091c5425c6 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.
2013-08-26 16:11:31 -03:00
José Roberto de Souza 547313ece9 eldbus: Send all object manager signals of all childrens before delete path or detach object manager 2013-08-26 15:17:02 -03:00
José Roberto de Souza 74bf97600f eldbus: ecore_idler_del() return is the data 2013-08-26 15:16:53 -03:00
José Roberto de Souza 9b49791de0 eldbus: Only a explicit call should unregister a object path 2013-08-26 15:16:43 -03:00
José Roberto de Souza 97ad61df93 eldbus: Empty list of interfaces add/del if there is no parent object manager 2013-08-26 15:16:33 -03:00
José Roberto de Souza d1d298e4c2 eldbus: Use EINA_LIST_FREE instead of EINA_LIST_FOREACH to send interfaces add 2013-08-26 15:16:26 -03:00
José Roberto de Souza 36b71d867c eldbus: Send property changed signals before close connection 2013-08-26 15:16:18 -03:00
José Roberto de Souza 26a6b01369 eldbus: Correctly append name of interface removed 2013-08-23 16:05:18 -03:00
José Roberto de Souza fe6a51f7e9 eldbus: Mark introspection of parent object as dirty when adding a child object 2013-08-23 16:05:06 -03:00
José Roberto de Souza 914e05c2ad eldbus: Improve error message when connection get fail 2013-08-15 14:46:30 -03:00
Stefan Schmidt d7d347da0a 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
2013-08-09 10:27:54 +01:00
José Roberto de Souza cbd0ccbbbe eldbus: Check if property_get_all() returned a error before read properties 2013-07-25 14:22:40 -03:00
José Roberto de Souza 353de50898 eldbus: Correclty check if user already create a object manager iface to object
CID: 1039421
2013-07-08 13:52:12 -03:00
José Roberto de Souza 8f69b20a6d eldbus: Remove unnecessary function - _eldbus_connection_unref()
Neither internal function call this function.
2013-07-05 16:08:06 -03:00
José Roberto de Souza 20d9e486a8 eldbus: Handle removal of last reference of connection inside of callback 2013-07-05 16:08:01 -03:00
Carsten Haitzler bf482c7742 eldbus - better fix for dbus_conn becoming null in dispatch 2013-07-04 10:56:43 +09:00
Carsten Haitzler bdd57af113 eldbus - only unref client conns that are not null after dispatch 2013-07-04 08:41:45 +09:00
Eduardo Lima (Etrunko) 2e7479f8db eldbus: Missing dbus_connection_unref() in error path
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
2013-06-27 17:31:22 -03:00
Eduardo Lima (Etrunko) f6295c5828 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>
2013-06-27 17:24:46 -03:00
Eduardo Lima (Etrunko) 6f255a7ccc eldbus: Add proxy call to org.freedesktop.DBus.Hello
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
2013-06-27 16:43:24 -03:00
Carsten Haitzler 29b3c80385 eldbus: error message iters should be initted as readonly. 2013-06-22 20:15:44 +09:00
Mike Blumenkrantz 5ca64106a2 more descriptive error message in eldbus when property fetching fails 2013-06-20 08:13:55 +01:00
José Roberto de Souza 274799cb08 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.
2013-06-10 11:30:49 -03:00
Eduardo Lima (Etrunko) 4fc274253d 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>
2013-05-28 09:42:29 -03:00
Eduardo Lima (Etrunko) 1ac40b5502 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>
2013-05-28 09:42:29 -03:00
Eduardo Lima (Etrunko) fb0dc85bc3 eldbus: Reset value of fd_handler after deletion
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
2013-05-28 09:42:29 -03:00
Jérémy Zurcher 57b2cb5239 eldbus_service: explicitly set flags to 0 in static _Signal and _Method structs 2013-05-07 22:16:37 +02:00
José Roberto de Souza 12855e5fe7 eldbus: Fix interface_unregister() 2013-05-04 10:38:55 -03:00
José Roberto de Souza 9e4dc299a7 eldbus: Fix eldbus_service_*_get() functions over FDO interfaces 2013-05-04 10:38:55 -03:00
José Roberto de Souza d6c7732931 eldbus: Fix eldbus_pending_destination_get(), it was returnig the method name 2013-05-04 10:38:55 -03:00
Lucas De Marchi 49f16237c0 eldbus: Add EINA_ARG_NONNULL to new API function 2013-05-04 10:38:55 -03:00
José Roberto de Souza dd25e02d5c eldbus: Add eldbus_message_iter_fixed_array_append() 2013-05-04 10:38:55 -03:00
Lucas De Marchi 4e3804041f 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 {} \;
2013-04-23 12:36:29 -03:00