Commit Graph

140 Commits

Author SHA1 Message Date
Vitor Sousa 8356b16a49 Efl Object: remove legacy callback calls from event_callback_call
Efl.Object.event_callback_call no longer calls legacy smart callbacks;
calling only event callbacks registered with the given event description
pointer.

Create the method Efl.Object.event_callback_legacy_call to inherit the old
behavior from Efl.Object.event_callback_call, calling both Efl.Object events
and legacy smart callbacks.

Update all other files accordingly in order to still supply legacy
callbacks while they are necessary.
2016-08-26 15:45:07 -03:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Stefan Schmidt f752288666 eldbus: make sure eldbus model is hidden behind the BETA API flag
Make sure we keep this in beta for now until our EO based interfaces are ready.
2016-07-29 12:04:13 +02:00
Chris Michael fb09df7977 eldbus: Check return value and error out if necessary
Coverity reports that we do not check the return value of
_eldbus_model_proxy_load here. We likely should be checking that in
case the model proxy fails to load so we can return proper values here.

Fixes Coverity CID1355233

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-21 12:50:19 -04:00
Daniel Kolesa 7584960377 eolian: implement a stringshare builtin
This implements a new builtin, stringshare, which is replaced with the right
pointer to Eina_Strinshare as necessary. This allows simplifying binding code
(it can call the proper eina APIs, deal with lifetime etc).

It also removes the extern Eina.Stringshare typedef from eina_types.eot, which
was actually incorrect and would generate invalid code in binding generators.

@feature @fix
2016-06-21 14:41:18 +01:00
Felipe Magno de Almeida 8e4f383d61 efl: Move promise parameter to return in data model
Summary:
Instead of:

efl_model_property_get("name", &promise);

now:

promise = efl_model_property_get("name");

Reviewers: stefan_schmidt, cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4038
2016-06-16 22:01:07 -03:00
Lauro Moura 46843551c0 eina: Remove value type promises
All values in promises are now considered as by-pointer.
2016-06-09 22:38:54 -03:00
Felipe Magno de Almeida 8fec0d5139 eina: Remove unnecessary indirection to promises
Now when dealing with pointer types, we will not get pointer to
pointer semantics in callbacks and eina_promise_owner_value_set
for Eina_Promise.

It will work as expected:

Eina_Promise_Owner* promise = eina_promise_add();

void* p = malloc(sizeof(T));
eina_promise_owner_value_set(promise, p, &free);
2016-06-03 17:22:12 -03:00
Daniel Kolesa 6fc482aa9b eolian: utilize the new builtin string type across eo files 2016-05-31 16:05:43 +01:00
Mike Blumenkrantz e682e7af55 eldbus: divide dbus call timeouts by 1000 to convert from milliseconds
@fix
2016-05-24 16:00:45 -04:00
Daniel Kolesa e984e5a11a eolian: remove pointers from complex and class types
Complex types (i.e. list, array, hash, accessor etc.) now do not require
pointers with them anymore (the pointer is implied) and the same goes for
class handles. Eolian now explicitly disallows creating pointers to these
as well. This is the first part of the work to remove pointers from Eolian
completely, with the goal of simplifying the DSL (higher level) and therefore
making it easier for bindings (as well as easier API usage).

@feature
2016-05-23 15:58:33 +01:00
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