Commit Graph

18 Commits

Author SHA1 Message Date
Mike Blumenkrantz 049c65e7ac efl_io_*: apply new event calling convention
Summary:
ref T7758
Depends on D8409

Reviewers: cedric, zmike, segfaultxavi

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7758

Differential Revision: https://phab.enlightenment.org/D8410
2019-03-19 16:32:02 -04:00
Mike Blumenkrantz 421bf2d0a3 api: add bool data to efl.io.reader/writer 'changed' events
Summary:
changed events should always be triggered with the accompanying changed
data to reduce function calls

ref T7600, T7599

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7600, T7599

Differential Revision: https://phab.enlightenment.org/D7984
2019-02-22 08:50:02 -05:00
Xavi Artigas 1534f50be0 Make Efl.Ui.Closer an interface instead of mixin
Summary:
It is a mixin only because of the setter method for the "closed" property,
otherwise, it would be a pure interface.
Nobody is setting that property, so let's just remove the setter (leaving only
the getter) and make this class an interface.
This should clear the scenario for languages currently having issues with
mixins (like C#).

Related to T7601.

Test Plan: Nothing changes. Make check and examples still work.

Reviewers: zmike, bu5hm4n, cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7570
2019-01-17 13:59:57 -05:00
Cedric BAIL 266dabc096 ecore: force close during invalidate of Efl.Io.Buffered_Stream.
Differential Revision: https://phab.enlightenment.org/D6074
2018-05-24 16:02:18 -07:00
Cedric BAIL 33fd77e9e4 ecore: move close_on_destructor to close_on_invalidate as that describe the behavior best.
Fix all use to correctly behave on invalidate.
2018-05-01 10:39:01 -07:00
Cedric BAIL 193149deb8 ecore: apply the same rules as set on the inner_io on the read and write pipe. 2018-05-01 10:39:01 -07:00
Cedric BAIL 3e648c475f ecore: when relying on parent relationship for lifecycle, we should not use efl_del in the destructor. 2018-05-01 10:39:01 -07:00
Daniel Kolesa fcae7cab27 eolian gen: enable constness generation on property getter impls
This changes a lot of things all across the EFL. Previously,
methods tagged @const had both their external prototype and
internal impl generated with const on object, while property
getters only had const on the external API. This is now changed
and it all has const everywhere.

Ref T6859.
2018-04-17 20:31:55 +02:00
Carsten Haitzler b3f0db816a efl io - fix using wrong type for return values pointed to
this potentially could be a bug on 32bit systems. this fixes that and
addresses the warning that pointed it out
2017-02-11 23:13:00 +09:00
Gustavo Sverzut Barbieri fd6dbe3393 efl_io_buffered_stream: eos-mark and flush sender on close.
By marking EOS on the outgoing queue we allow the sender to flush
pending data if that's possible.

This also fixes a typo in the condition for eos_mark, it operates on
outgoing, not incoming queue.
2016-12-20 10:18:33 -02:00
Gustavo Sverzut Barbieri 4d5105afeb efl_io_buffered_stream: if there is a copier, check if it's done.
Before we're exiting if there was nothing pending, but in some cases
this was too aggressive as the copier's source may be alive (ie:
not-EOS), however nothing was read to its internal buffer, thus no
pending.

Since the copier will track its source's EOS, just check if it's done.
2016-12-20 10:18:32 -02:00
Gustavo Sverzut Barbieri dd5cdda64b more eo simplified to use Eina_Slice instead of pointer to.
Working directly with Eina_Slice is easier than a pointer to it,
requires no validation of the pointers and is cheap since it's just
putting together size_t + void*.

However we can't hint the user of 'const(Eina.Slice)' properties as
Eolian is incorrectly generating getters as:

   const Eina_Slice class_property_get(...)

which is makes compilers complain about ignored qualifiers:

   ../src/lib/ecore/efl_io_copier.eo.h:329:7: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]

Leave some TODO so @q66 can fix those.
2016-12-19 15:30:56 -02:00
Gustavo Sverzut Barbieri 25a9e1d886 Efl.Io.{Queue,Buffer,Buffered_Stream}: slice_get is now a property.
Previously we couldn't return a slice, instead required the user to
pass a slice and we'd fill it since Eolian couldn't generate fallbacks
for structures.

Since @q66 fixed eolian, we can now return the structure itself as
initially wanted, ditching some TODO from the code.
2016-12-19 15:30:56 -02:00
Gustavo Sverzut Barbieri 21759f713a yoda-style inactivity timeout.
s/inactivity_timeout/timeout_inactivity/g so it matches the EFL names
with scope first, like timeout_connect, etc.
2016-12-12 02:30:33 -02:00
Gustavo Sverzut Barbieri 47f9d06d0b efl_io_buffered_stream: del inner_io if we're the parent.
This is a nice convenience if inner_io was reparented to the wrapper.
2016-12-09 13:47:04 -02:00
Gustavo Sverzut Barbieri 994d66513f efl_io_buffered_stream: better detection of 'finished' state.
When used with sockets, if it's EOS (ie: remote peer terminated the
connection), but not closed, then it would not emit 'finished' event.

Now it does.
2016-12-08 11:40:45 -02:00
Gustavo Sverzut Barbieri bb5f91273c efl_io_buffered_stream: property and event 'progress'
useful to get feedback on when data was actually sent/received, and
how much.
2016-12-08 11:40:45 -02:00
Gustavo Sverzut Barbieri 46341b329d efl_io_buffered_stream: wraps an I/O object and make it easy to use.
Since all other efl.io objects are low-level, the recommended approach
is to use an efl.io.copier. However when dealing with in-memory,
bi-directional comms like talking to a socket, we always end with 2
queues, 2 copiers and the annoying setup that is being replicated in
ecore_ipc, efl_debug and so on.

This class is the base to make it simpler. Other classes such as
Efl.Net.Socket.Simple, Efl.Net.Dialer.Simple and Efl.Net.Server.Simple
will use it to provide simpler code to users.

I guess we can call EFL+EO Java now?
2016-11-25 17:27:32 -02:00