summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-04-17 16:17:29 -0700
committerCedric BAIL <cedric@osg.samsung.com>2018-05-01 10:39:01 -0700
commit33fd77e9e43b0fa29cb484b72d910bdf0ecccbc8 (patch)
tree0ebd1c0615445af5e1321a85b6878087b4cb54a8 /src/lib
parent193149deb85004aeda452dd4d729f995f4f313f9 (diff)
ecore: move close_on_destructor to close_on_invalidate as that describe the behavior best.
Fix all use to correctly behave on invalidate.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore/efl_io_buffered_stream.c12
-rw-r--r--src/lib/ecore/efl_io_buffered_stream.eo2
-rw-r--r--src/lib/ecore/efl_io_closer_fd.c10
-rw-r--r--src/lib/ecore/efl_io_closer_fd.eo2
-rw-r--r--src/lib/ecore/efl_io_copier.c48
-rw-r--r--src/lib/ecore/efl_io_copier.eo11
-rw-r--r--src/lib/ecore/efl_io_file.c4
-rw-r--r--src/lib/ecore/efl_io_file.eo2
-rw-r--r--src/lib/ecore_con/ecore_con_eet.c6
-rw-r--r--src/lib/ecore_con/ecore_con_legacy.c19
-rw-r--r--src/lib/ecore_con/ecore_con_url.c8
-rw-r--r--src/lib/ecore_con/efl_net_dialer_http.c20
-rw-r--r--src/lib/ecore_con/efl_net_dialer_http.eo3
-rw-r--r--src/lib/ecore_con/efl_net_dialer_simple.c25
-rw-r--r--src/lib/ecore_con/efl_net_dialer_simple.eo1
-rw-r--r--src/lib/ecore_con/efl_net_dialer_ssl.c10
-rw-r--r--src/lib/ecore_con/efl_net_dialer_ssl.eo1
-rw-r--r--src/lib/ecore_con/efl_net_dialer_tcp.c10
-rw-r--r--src/lib/ecore_con/efl_net_dialer_tcp.eo1
-rw-r--r--src/lib/ecore_con/efl_net_dialer_udp.c10
-rw-r--r--src/lib/ecore_con/efl_net_dialer_udp.eo1
-rw-r--r--src/lib/ecore_con/efl_net_dialer_unix.c10
-rw-r--r--src/lib/ecore_con/efl_net_dialer_unix.eo1
-rw-r--r--src/lib/ecore_con/efl_net_dialer_websocket.c8
-rw-r--r--src/lib/ecore_con/efl_net_dialer_websocket.eo2
-rw-r--r--src/lib/ecore_con/efl_net_server_simple.c6
-rw-r--r--src/lib/ecore_con/efl_net_server_ssl.c2
-rw-r--r--src/lib/ecore_con/efl_net_server_tcp.c2
-rw-r--r--src/lib/ecore_con/efl_net_server_udp.c2
-rw-r--r--src/lib/ecore_con/efl_net_server_udp_client.c20
-rw-r--r--src/lib/ecore_con/efl_net_server_udp_client.eo3
-rw-r--r--src/lib/ecore_con/efl_net_server_unix.c2
-rw-r--r--src/lib/ecore_con/efl_net_server_windows.c2
-rw-r--r--src/lib/ecore_con/efl_net_socket_fd.c12
-rw-r--r--src/lib/ecore_con/efl_net_socket_fd.eo3
-rw-r--r--src/lib/ecore_con/efl_net_socket_ssl.c18
-rw-r--r--src/lib/ecore_con/efl_net_socket_ssl.eo5
-rw-r--r--src/lib/ecore_con/efl_net_socket_windows.c20
-rw-r--r--src/lib/ecore_con/efl_net_socket_windows.eo2
-rw-r--r--src/lib/ecore_file/ecore_file_download.c4
-rw-r--r--src/lib/ecore_ipc/ecore_ipc.c10
-rw-r--r--src/lib/efl/interfaces/efl_io_buffer.c4
-rw-r--r--src/lib/efl/interfaces/efl_io_buffer.eo2
-rw-r--r--src/lib/efl/interfaces/efl_io_closer.eo10
-rw-r--r--src/lib/efl/interfaces/efl_io_queue.c4
-rw-r--r--src/lib/efl/interfaces/efl_io_queue.eo2
-rw-r--r--src/lib/elementary/efl_ui_image.c4
-rw-r--r--src/lib/elementary/efl_ui_image_zoomable.c4
48 files changed, 213 insertions, 157 deletions
diff --git a/src/lib/ecore/efl_io_buffered_stream.c b/src/lib/ecore/efl_io_buffered_stream.c
index 3f34aca9fc..3a0921f959 100644
--- a/src/lib/ecore/efl_io_buffered_stream.c
+++ b/src/lib/ecore/efl_io_buffered_stream.c
@@ -227,15 +227,15 @@ _efl_io_buffered_stream_efl_io_closer_close_on_exec_set(Eo *o EINA_UNUSED, Efl_I
227} 227}
228 228
229EOLIAN static Eina_Bool 229EOLIAN static Eina_Bool
230_efl_io_buffered_stream_efl_io_closer_close_on_destructor_get(const Eo *o EINA_UNUSED, Efl_Io_Buffered_Stream_Data *pd) 230_efl_io_buffered_stream_efl_io_closer_close_on_invalidate_get(const Eo *o EINA_UNUSED, Efl_Io_Buffered_Stream_Data *pd)
231{ 231{
232 return efl_io_closer_close_on_destructor_get(pd->inner_io); 232 return efl_io_closer_close_on_invalidate_get(pd->inner_io);
233} 233}
234 234
235EOLIAN static void 235EOLIAN static void
236_efl_io_buffered_stream_efl_io_closer_close_on_destructor_set(Eo *o EINA_UNUSED, Efl_Io_Buffered_Stream_Data *pd, Eina_Bool value) 236_efl_io_buffered_stream_efl_io_closer_close_on_invalidate_set(Eo *o EINA_UNUSED, Efl_Io_Buffered_Stream_Data *pd, Eina_Bool value)
237{ 237{
238 efl_io_closer_close_on_destructor_set(pd->inner_io, value); 238 efl_io_closer_close_on_invalidate_set(pd->inner_io, value);
239} 239}
240 240
241EOLIAN static Eina_Error 241EOLIAN static Eina_Error
@@ -369,7 +369,7 @@ _efl_io_buffered_stream_inner_io_set(Eo *o, Efl_Io_Buffered_Stream_Data *pd, Efl
369 efl_io_copier_buffer_limit_set(efl_added, 4096), 369 efl_io_copier_buffer_limit_set(efl_added, 4096),
370 efl_io_copier_source_set(efl_added, io), 370 efl_io_copier_source_set(efl_added, io),
371 efl_io_copier_destination_set(efl_added, pd->incoming), 371 efl_io_copier_destination_set(efl_added, pd->incoming),
372 efl_io_closer_close_on_destructor_set(efl_added, efl_io_closer_close_on_destructor_get(io)), 372 efl_io_closer_close_on_invalidate_set(efl_added, efl_io_closer_close_on_invalidate_get(io)),
373 efl_event_callback_array_add(efl_added, _efl_io_buffered_stream_receiver_cbs(), o)); 373 efl_event_callback_array_add(efl_added, _efl_io_buffered_stream_receiver_cbs(), o));
374 EINA_SAFETY_ON_NULL_RETURN(pd->receiver); 374 EINA_SAFETY_ON_NULL_RETURN(pd->receiver);
375 } 375 }
@@ -394,7 +394,7 @@ _efl_io_buffered_stream_inner_io_set(Eo *o, Efl_Io_Buffered_Stream_Data *pd, Efl
394 efl_io_copier_buffer_limit_set(efl_added, 4096), 394 efl_io_copier_buffer_limit_set(efl_added, 4096),
395 efl_io_copier_source_set(efl_added, pd->outgoing), 395 efl_io_copier_source_set(efl_added, pd->outgoing),
396 efl_io_copier_destination_set(efl_added, io), 396 efl_io_copier_destination_set(efl_added, io),
397 efl_io_closer_close_on_destructor_set(efl_added, efl_io_closer_close_on_destructor_get(io)), 397 efl_io_closer_close_on_invalidate_set(efl_added, efl_io_closer_close_on_invalidate_get(io)),
398 efl_event_callback_array_add(efl_added, _efl_io_buffered_stream_sender_cbs(), o)); 398 efl_event_callback_array_add(efl_added, _efl_io_buffered_stream_sender_cbs(), o));
399 EINA_SAFETY_ON_NULL_RETURN(pd->sender); 399 EINA_SAFETY_ON_NULL_RETURN(pd->sender);
400 } 400 }
diff --git a/src/lib/ecore/efl_io_buffered_stream.eo b/src/lib/ecore/efl_io_buffered_stream.eo
index 5c413aea91..973de1849e 100644
--- a/src/lib/ecore/efl_io_buffered_stream.eo
+++ b/src/lib/ecore/efl_io_buffered_stream.eo
@@ -251,7 +251,7 @@ class Efl.Io.Buffered_Stream (Efl.Loop_Consumer, Efl.Io.Reader, Efl.Io.Writer, E
251 Efl.Io.Closer.close; 251 Efl.Io.Closer.close;
252 Efl.Io.Closer.closed { get; } 252 Efl.Io.Closer.closed { get; }
253 Efl.Io.Closer.close_on_exec { get; set; } 253 Efl.Io.Closer.close_on_exec { get; set; }
254 Efl.Io.Closer.close_on_destructor { get; set; } 254 Efl.Io.Closer.close_on_invalidate { get; set; }
255 Efl.Io.Reader.read; 255 Efl.Io.Reader.read;
256 Efl.Io.Reader.can_read { get; set; } 256 Efl.Io.Reader.can_read { get; set; }
257 Efl.Io.Reader.eos { get; set; } 257 Efl.Io.Reader.eos { get; set; }
diff --git a/src/lib/ecore/efl_io_closer_fd.c b/src/lib/ecore/efl_io_closer_fd.c
index 9dcea594bc..d0ace13bfe 100644
--- a/src/lib/ecore/efl_io_closer_fd.c
+++ b/src/lib/ecore/efl_io_closer_fd.c
@@ -15,7 +15,7 @@ typedef struct _Efl_Io_Closer_Fd_Data
15 int fd; 15 int fd;
16 16
17 Eina_Bool close_on_exec; 17 Eina_Bool close_on_exec;
18 Eina_Bool close_on_destructor; 18 Eina_Bool close_on_invalidate;
19} Efl_Io_Closer_Fd_Data; 19} Efl_Io_Closer_Fd_Data;
20 20
21static Efl_Object * 21static Efl_Object *
@@ -119,15 +119,15 @@ _efl_io_closer_fd_efl_io_closer_close_on_exec_get(const Eo *o, Efl_Io_Closer_Fd_
119} 119}
120 120
121EOLIAN static void 121EOLIAN static void
122_efl_io_closer_fd_efl_io_closer_close_on_destructor_set(Eo *o EINA_UNUSED, Efl_Io_Closer_Fd_Data *pd, Eina_Bool close_on_destructor) 122_efl_io_closer_fd_efl_io_closer_close_on_invalidate_set(Eo *o EINA_UNUSED, Efl_Io_Closer_Fd_Data *pd, Eina_Bool close_on_invalidate)
123{ 123{
124 pd->close_on_destructor = close_on_destructor; 124 pd->close_on_invalidate = close_on_invalidate;
125} 125}
126 126
127EOLIAN static Eina_Bool 127EOLIAN static Eina_Bool
128_efl_io_closer_fd_efl_io_closer_close_on_destructor_get(const Eo *o EINA_UNUSED, Efl_Io_Closer_Fd_Data *pd) 128_efl_io_closer_fd_efl_io_closer_close_on_invalidate_get(const Eo *o EINA_UNUSED, Efl_Io_Closer_Fd_Data *pd)
129{ 129{
130 return pd->close_on_destructor; 130 return pd->close_on_invalidate;
131} 131}
132 132
133#include "efl_io_closer_fd.eo.c" 133#include "efl_io_closer_fd.eo.c"
diff --git a/src/lib/ecore/efl_io_closer_fd.eo b/src/lib/ecore/efl_io_closer_fd.eo
index b0b63b364b..721e449f1d 100644
--- a/src/lib/ecore/efl_io_closer_fd.eo
+++ b/src/lib/ecore/efl_io_closer_fd.eo
@@ -20,6 +20,6 @@ mixin Efl.Io.Closer_Fd (Efl.Io.Closer, Efl.Object) {
20 Efl.Io.Closer.close; 20 Efl.Io.Closer.close;
21 Efl.Io.Closer.closed { get; } 21 Efl.Io.Closer.closed { get; }
22 Efl.Io.Closer.close_on_exec { get; set; } 22 Efl.Io.Closer.close_on_exec { get; set; }
23 Efl.Io.Closer.close_on_destructor { get; set; } 23 Efl.Io.Closer.close_on_invalidate { get; set; }
24 } 24 }
25} 25}
diff --git a/src/lib/ecore/efl_io_copier.c b/src/lib/ecore/efl_io_copier.c
index 9298459d89..686454912d 100644
--- a/src/lib/ecore/efl_io_copier.c
+++ b/src/lib/ecore/efl_io_copier.c
@@ -28,7 +28,7 @@ typedef struct _Efl_Io_Copier_Data
28 Eina_Bool done; 28 Eina_Bool done;
29 Eina_Bool force_dispatch; 29 Eina_Bool force_dispatch;
30 Eina_Bool close_on_exec; 30 Eina_Bool close_on_exec;
31 Eina_Bool close_on_destructor; 31 Eina_Bool close_on_invalidate;
32} Efl_Io_Copier_Data; 32} Efl_Io_Copier_Data;
33 33
34static void _efl_io_copier_write(Eo *o, Efl_Io_Copier_Data *pd); 34static void _efl_io_copier_write(Eo *o, Efl_Io_Copier_Data *pd);
@@ -433,7 +433,7 @@ _efl_io_copier_source_set(Eo *o, Efl_Io_Copier_Data *pd, Efl_Io_Reader *source)
433 if (efl_isa(pd->source, EFL_IO_CLOSER_MIXIN)) 433 if (efl_isa(pd->source, EFL_IO_CLOSER_MIXIN))
434 { 434 {
435 efl_io_closer_close_on_exec_set(pd->source, efl_io_closer_close_on_exec_get(o)); 435 efl_io_closer_close_on_exec_set(pd->source, efl_io_closer_close_on_exec_get(o));
436 efl_io_closer_close_on_destructor_set(pd->source, efl_io_closer_close_on_destructor_get(o)); 436 efl_io_closer_close_on_invalidate_set(pd->source, efl_io_closer_close_on_invalidate_get(o));
437 efl_event_callback_add(pd->source, EFL_IO_CLOSER_EVENT_CLOSED, 437 efl_event_callback_add(pd->source, EFL_IO_CLOSER_EVENT_CLOSED,
438 _efl_io_copier_source_closed, o); 438 _efl_io_copier_source_closed, o);
439 } 439 }
@@ -512,7 +512,7 @@ _efl_io_copier_destination_set(Eo *o, Efl_Io_Copier_Data *pd, Efl_Io_Writer *des
512 if (efl_isa(pd->destination, EFL_IO_CLOSER_MIXIN)) 512 if (efl_isa(pd->destination, EFL_IO_CLOSER_MIXIN))
513 { 513 {
514 efl_io_closer_close_on_exec_set(pd->destination, efl_io_closer_close_on_exec_get(o)); 514 efl_io_closer_close_on_exec_set(pd->destination, efl_io_closer_close_on_exec_get(o));
515 efl_io_closer_close_on_destructor_set(pd->destination, efl_io_closer_close_on_destructor_get(o)); 515 efl_io_closer_close_on_invalidate_set(pd->destination, efl_io_closer_close_on_invalidate_get(o));
516 efl_event_callback_add(pd->destination, EFL_IO_CLOSER_EVENT_CLOSED, 516 efl_event_callback_add(pd->destination, EFL_IO_CLOSER_EVENT_CLOSED,
517 _efl_io_copier_destination_closed, o); 517 _efl_io_copier_destination_closed, o);
518 } 518 }
@@ -806,7 +806,7 @@ _efl_io_copier_efl_object_constructor(Eo *o, Efl_Io_Copier_Data *pd)
806{ 806{
807 pd->buf = eina_binbuf_new(); 807 pd->buf = eina_binbuf_new();
808 pd->close_on_exec = EINA_TRUE; 808 pd->close_on_exec = EINA_TRUE;
809 pd->close_on_destructor = EINA_TRUE; 809 pd->close_on_invalidate = EINA_TRUE;
810 pd->timeout_inactivity = 0.0; 810 pd->timeout_inactivity = 0.0;
811 811
812 EINA_SAFETY_ON_NULL_RETURN_VAL(pd->buf, NULL); 812 EINA_SAFETY_ON_NULL_RETURN_VAL(pd->buf, NULL);
@@ -836,17 +836,9 @@ _efl_io_copier_efl_object_finalize(Eo *o, Efl_Io_Copier_Data *pd)
836} 836}
837 837
838EOLIAN static void 838EOLIAN static void
839_efl_io_copier_efl_object_destructor(Eo *o, Efl_Io_Copier_Data *pd) 839_efl_io_copier_efl_object_invalidate(Eo *o, Efl_Io_Copier_Data *pd EINA_UNUSED)
840{ 840{
841 _COPIER_DBG(o, pd); 841 if (efl_io_closer_close_on_invalidate_get(o) &&
842
843 if (pd->job)
844 eina_future_cancel(pd->job);
845
846 if (pd->inactivity_timer)
847 eina_future_cancel(pd->inactivity_timer);
848
849 if (efl_io_closer_close_on_destructor_get(o) &&
850 (!efl_io_closer_closed_get(o))) 842 (!efl_io_closer_closed_get(o)))
851 { 843 {
852 efl_event_freeze(o); 844 efl_event_freeze(o);
@@ -857,6 +849,20 @@ _efl_io_copier_efl_object_destructor(Eo *o, Efl_Io_Copier_Data *pd)
857 efl_io_copier_source_set(o, NULL); 849 efl_io_copier_source_set(o, NULL);
858 efl_io_copier_destination_set(o, NULL); 850 efl_io_copier_destination_set(o, NULL);
859 851
852 efl_invalidate(efl_super(o, MY_CLASS));
853}
854
855EOLIAN static void
856_efl_io_copier_efl_object_destructor(Eo *o, Efl_Io_Copier_Data *pd)
857{
858 _COPIER_DBG(o, pd);
859
860 if (pd->job)
861 eina_future_cancel(pd->job);
862
863 if (pd->inactivity_timer)
864 eina_future_cancel(pd->inactivity_timer);
865
860 efl_destructor(efl_super(o, MY_CLASS)); 866 efl_destructor(efl_super(o, MY_CLASS));
861 867
862 if (pd->buf) 868 if (pd->buf)
@@ -895,22 +901,22 @@ _efl_io_copier_efl_io_closer_close_on_exec_get(const Eo *o EINA_UNUSED, Efl_Io_C
895} 901}
896 902
897EOLIAN static void 903EOLIAN static void
898_efl_io_copier_efl_io_closer_close_on_destructor_set(Eo *o EINA_UNUSED, Efl_Io_Copier_Data *pd, Eina_Bool close_on_destructor) 904_efl_io_copier_efl_io_closer_close_on_invalidate_set(Eo *o EINA_UNUSED, Efl_Io_Copier_Data *pd, Eina_Bool close_on_invalidate)
899{ 905{
900 if (pd->close_on_destructor == close_on_destructor) return; 906 if (pd->close_on_invalidate == close_on_invalidate) return;
901 pd->close_on_destructor = close_on_destructor; 907 pd->close_on_invalidate = close_on_invalidate;
902 908
903 if (pd->source && efl_isa(pd->source, EFL_IO_CLOSER_MIXIN)) 909 if (pd->source && efl_isa(pd->source, EFL_IO_CLOSER_MIXIN))
904 efl_io_closer_close_on_destructor_set(pd->source, close_on_destructor); 910 efl_io_closer_close_on_invalidate_set(pd->source, close_on_invalidate);
905 911
906 if (pd->destination && efl_isa(pd->destination, EFL_IO_CLOSER_MIXIN)) 912 if (pd->destination && efl_isa(pd->destination, EFL_IO_CLOSER_MIXIN))
907 efl_io_closer_close_on_destructor_set(pd->destination, close_on_destructor); 913 efl_io_closer_close_on_invalidate_set(pd->destination, close_on_invalidate);
908} 914}
909 915
910EOLIAN static Eina_Bool 916EOLIAN static Eina_Bool
911_efl_io_copier_efl_io_closer_close_on_destructor_get(const Eo *o EINA_UNUSED, Efl_Io_Copier_Data *pd) 917_efl_io_copier_efl_io_closer_close_on_invalidate_get(const Eo *o EINA_UNUSED, Efl_Io_Copier_Data *pd)
912{ 918{
913 return pd->close_on_destructor; 919 return pd->close_on_invalidate;
914} 920}
915 921
916#include "efl_io_copier.eo.c" 922#include "efl_io_copier.eo.c"
diff --git a/src/lib/ecore/efl_io_copier.eo b/src/lib/ecore/efl_io_copier.eo
index 345775eb77..ae40851681 100644
--- a/src/lib/ecore/efl_io_copier.eo
+++ b/src/lib/ecore/efl_io_copier.eo
@@ -57,7 +57,7 @@ class Efl.Io.Copier (Efl.Loop_Consumer, Efl.Io.Closer) {
57 @.source and @.destination if they implement those interfaces. 57 @.source and @.destination if they implement those interfaces.
58 58
59 @Efl.Io.Closer.close_on_exec and 59 @Efl.Io.Closer.close_on_exec and
60 @Efl.Io.Closer.close_on_destructor are respected and applied to 60 @Efl.Io.Closer.close_on_invalidate are respected and applied to
61 both source and destination. Both default to $true. 61 both source and destination. Both default to $true.
62 62
63 @since 1.19 63 @since 1.19
@@ -107,7 +107,7 @@ class Efl.Io.Copier (Efl.Loop_Consumer, Efl.Io.Closer) {
107 If the source object implements @Efl.Io.Closer and it's 107 If the source object implements @Efl.Io.Closer and it's
108 not closed, it will be closed when the copier itself 108 not closed, it will be closed when the copier itself
109 is. This may happen, for example, when the copier is 109 is. This may happen, for example, when the copier is
110 deleted and @Efl.Io.Closer.close_on_destructor is $true 110 deleted and @Efl.Io.Closer.close_on_invalidate is $true
111 (the default). 111 (the default).
112 112
113 Common source classes are @Efl.Io.Buffer (if fixed data 113 Common source classes are @Efl.Io.Buffer (if fixed data
@@ -166,7 +166,7 @@ class Efl.Io.Copier (Efl.Loop_Consumer, Efl.Io.Closer) {
166 If the destination object implements @Efl.Io.Closer and it's 166 If the destination object implements @Efl.Io.Closer and it's
167 not closed, it will be closed when the copier itself 167 not closed, it will be closed when the copier itself
168 is. This may happen, for example, when the copier is 168 is. This may happen, for example, when the copier is
169 deleted and @Efl.Io.Closer.close_on_destructor is $true 169 deleted and @Efl.Io.Closer.close_on_invalidate is $true
170 (the default). 170 (the default).
171 171
172 Common destination classes are @Efl.Io.Buffer (better to 172 Common destination classes are @Efl.Io.Buffer (better to
@@ -370,11 +370,12 @@ class Efl.Io.Copier (Efl.Loop_Consumer, Efl.Io.Closer) {
370 370
371 implements { 371 implements {
372 Efl.Object.constructor; 372 Efl.Object.constructor;
373 Efl.Object.destructor;
374 Efl.Object.finalize; 373 Efl.Object.finalize;
374 Efl.Object.invalidate;
375 Efl.Object.destructor;
375 Efl.Io.Closer.close; 376 Efl.Io.Closer.close;
376 Efl.Io.Closer.closed { get; } 377 Efl.Io.Closer.closed { get; }
377 Efl.Io.Closer.close_on_exec { get; set; } 378 Efl.Io.Closer.close_on_exec { get; set; }
378 Efl.Io.Closer.close_on_destructor { get; set; } 379 Efl.Io.Closer.close_on_invalidate { get; set; }
379 } 380 }
380} 381}
diff --git a/src/lib/ecore/efl_io_file.c b/src/lib/ecore/efl_io_file.c
index cfee3371fc..c8716d2935 100644
--- a/src/lib/ecore/efl_io_file.c
+++ b/src/lib/ecore/efl_io_file.c
@@ -112,7 +112,7 @@ _efl_io_file_efl_object_constructor(Eo *o, Efl_Io_File_Data *pd)
112 o = efl_constructor(efl_super(o, MY_CLASS)); 112 o = efl_constructor(efl_super(o, MY_CLASS));
113 113
114 efl_io_closer_close_on_exec_set(o, EINA_TRUE); 114 efl_io_closer_close_on_exec_set(o, EINA_TRUE);
115 efl_io_closer_close_on_destructor_set(o, EINA_TRUE); 115 efl_io_closer_close_on_invalidate_set(o, EINA_TRUE);
116 efl_io_positioner_fd_set(o, -1); 116 efl_io_positioner_fd_set(o, -1);
117 efl_io_sizer_fd_set(o, -1); 117 efl_io_sizer_fd_set(o, -1);
118 efl_io_reader_fd_set(o, -1); 118 efl_io_reader_fd_set(o, -1);
@@ -125,7 +125,7 @@ _efl_io_file_efl_object_constructor(Eo *o, Efl_Io_File_Data *pd)
125EOLIAN static void 125EOLIAN static void
126_efl_io_file_efl_object_destructor(Eo *o, Efl_Io_File_Data *pd) 126_efl_io_file_efl_object_destructor(Eo *o, Efl_Io_File_Data *pd)
127{ 127{
128 if (efl_io_closer_close_on_destructor_get(o) && 128 if (efl_io_closer_close_on_invalidate_get(o) &&
129 (!efl_io_closer_closed_get(o))) 129 (!efl_io_closer_closed_get(o)))
130 { 130 {
131 efl_event_freeze(o); 131 efl_event_freeze(o);
diff --git a/src/lib/ecore/efl_io_file.eo b/src/lib/ecore/efl_io_file.eo
index 4040f5dc86..b586a88ca2 100644
--- a/src/lib/ecore/efl_io_file.eo
+++ b/src/lib/ecore/efl_io_file.eo
@@ -2,7 +2,7 @@ class Efl.Io.File (Efl.Loop_Fd, Efl.File, Efl.Io.Reader_Fd, Efl.Io.Writer_Fd, Ef
2 [[File access (open, close, read, write, lseek, ftruncate) 2 [[File access (open, close, read, write, lseek, ftruncate)
3 3
4 @Efl.Io.Closer.close_on_exec and 4 @Efl.Io.Closer.close_on_exec and
5 @Efl.Io.Closer.close_on_destructor are respected and default to 5 @Efl.Io.Closer.close_on_invalidate are respected and default to
6 $true. @Efl.Io.Closer.close_on_exec.set sets flag O_CLOEXEC. 6 $true. @Efl.Io.Closer.close_on_exec.set sets flag O_CLOEXEC.
7 7
8 @since 1.19 8 @since 1.19
diff --git a/src/lib/ecore_con/ecore_con_eet.c b/src/lib/ecore_con/ecore_con_eet.c
index 2b3a48b5cf..e5d07d5d9d 100644
--- a/src/lib/ecore_con/ecore_con_eet.c
+++ b/src/lib/ecore_con/ecore_con_eet.c
@@ -686,18 +686,18 @@ _ecore_con_eet_base_efl_object_constructor(Eo *obj, Ecore_Con_Eet_Base_Data *pd)
686EOLIAN static void 686EOLIAN static void
687_ecore_con_eet_base_efl_object_destructor(Eo *obj, Ecore_Con_Eet_Base_Data *pd) 687_ecore_con_eet_base_efl_object_destructor(Eo *obj, Ecore_Con_Eet_Base_Data *pd)
688{ 688{
689 efl_destructor(efl_super(obj, ECORE_CON_EET_BASE_CLASS));
690
691 eet_data_descriptor_free(pd->edd); 689 eet_data_descriptor_free(pd->edd);
692 eet_data_descriptor_free(pd->matching); 690 eet_data_descriptor_free(pd->matching);
693 eina_hash_free(pd->data_callbacks); 691 eina_hash_free(pd->data_callbacks);
694 eina_hash_free(pd->raw_data_callbacks); 692 eina_hash_free(pd->raw_data_callbacks);
693
694 efl_destructor(efl_super(obj, ECORE_CON_EET_BASE_CLASS));
695} 695}
696 696
697EOLIAN static Efl_Object * 697EOLIAN static Efl_Object *
698_ecore_con_eet_base_efl_object_finalize(Eo *obj, Ecore_Con_Eet_Base_Data *pd) 698_ecore_con_eet_base_efl_object_finalize(Eo *obj, Ecore_Con_Eet_Base_Data *pd)
699{ 699{
700 if (pd->server) return obj; 700 if (pd->server) return efl_finalize(efl_super(obj, ECORE_CON_EET_BASE_CLASS));
701 701
702 eet_data_descriptor_free(pd->edd); 702 eet_data_descriptor_free(pd->edd);
703 eet_data_descriptor_free(pd->matching); 703 eet_data_descriptor_free(pd->matching);
diff --git a/src/lib/ecore_con/ecore_con_legacy.c b/src/lib/ecore_con/ecore_con_legacy.c
index 356b25422a..a6246dba46 100644
--- a/src/lib/ecore_con/ecore_con_legacy.c
+++ b/src/lib/ecore_con/ecore_con_legacy.c
@@ -258,11 +258,11 @@ _ecore_con_client_socket_close(Ecore_Con_Client *cl)
258{ 258{
259 if (!cl->socket) return; 259 if (!cl->socket) return;
260 260
261 /* socket may remain alive due other references, we don't own it */
262 efl_event_callback_array_del(cl->socket, _ecore_con_client_socket_cbs(), cl);
263
264 if (!efl_io_closer_closed_get(cl->socket)) 261 if (!efl_io_closer_closed_get(cl->socket))
265 efl_io_closer_close(cl->socket); 262 efl_io_closer_close(cl->socket);
263
264 /* socket may remain alive due other references, we don't own it */
265 efl_event_callback_array_del(cl->socket, _ecore_con_client_socket_cbs(), cl);
266} 266}
267 267
268static void 268static void
@@ -278,7 +278,7 @@ _ecore_con_client_free(Ecore_Con_Client *cl)
278 if (cl->socket) 278 if (cl->socket)
279 { 279 {
280 Eo *parent, *inner_socket = efl_io_buffered_stream_inner_io_get(cl->socket); 280 Eo *parent, *inner_socket = efl_io_buffered_stream_inner_io_get(cl->socket);
281 efl_event_callback_array_del(cl->socket, _ecore_con_client_socket_cbs(), cl); 281
282 if (efl_isa(inner_socket, EFL_NET_SOCKET_SSL_CLASS)) 282 if (efl_isa(inner_socket, EFL_NET_SOCKET_SSL_CLASS))
283 efl_event_callback_array_del(inner_socket, _ecore_con_client_socket_ssl_cbs(), cl); 283 efl_event_callback_array_del(inner_socket, _ecore_con_client_socket_ssl_cbs(), cl);
284 284
@@ -843,11 +843,9 @@ _ecore_con_client_ssl_upgrade_job(void *data, const Eina_Value v,
843 843
844 efl_parent_set(inner_socket, socket); 844 efl_parent_set(inner_socket, socket);
845 845
846 efl_unref(inner_socket); /* socket keeps it */
847
848 cl->socket = socket; 846 cl->socket = socket;
849 efl_io_closer_close_on_exec_set(socket, EINA_TRUE); 847 efl_io_closer_close_on_exec_set(socket, EINA_TRUE);
850 efl_io_closer_close_on_destructor_set(socket, EINA_TRUE); 848 efl_io_closer_close_on_invalidate_set(socket, EINA_TRUE);
851 efl_event_callback_array_del(tcp_socket, _ecore_con_client_socket_cbs(), cl); 849 efl_event_callback_array_del(tcp_socket, _ecore_con_client_socket_cbs(), cl);
852 efl_event_callback_array_add(socket, _ecore_con_client_socket_cbs(), cl); 850 efl_event_callback_array_add(socket, _ecore_con_client_socket_cbs(), cl);
853 efl_event_callback_array_add(inner_socket, _ecore_con_client_socket_ssl_cbs(), cl); 851 efl_event_callback_array_add(inner_socket, _ecore_con_client_socket_ssl_cbs(), cl);
@@ -1626,7 +1624,6 @@ _ecore_con_server_server_ssl_job(void *data, const Eina_Value v,
1626 efl_parent_set(inner_server, server); 1624 efl_parent_set(inner_server, server);
1627 1625
1628 efl_unref(ssl_ctx); /* inner_server keeps it */ 1626 efl_unref(ssl_ctx); /* inner_server keeps it */
1629 efl_unref(inner_server); /* server keeps it */
1630 1627
1631 if (!_ecore_con_server_server_set(svr, server)) 1628 if (!_ecore_con_server_server_set(svr, server))
1632 goto error_serve; 1629 goto error_serve;
@@ -1852,7 +1849,7 @@ _ecore_con_server_dialer_set(Ecore_Con_Server *svr, Eo *dialer)
1852 1849
1853 svr->dialer = dialer; 1850 svr->dialer = dialer;
1854 efl_io_closer_close_on_exec_set(dialer, EINA_TRUE); 1851 efl_io_closer_close_on_exec_set(dialer, EINA_TRUE);
1855 efl_io_closer_close_on_destructor_set(dialer, EINA_TRUE); 1852 efl_io_closer_close_on_invalidate_set(dialer, EINA_TRUE);
1856 efl_io_buffered_stream_timeout_inactivity_set(dialer, svr->timeout); 1853 efl_io_buffered_stream_timeout_inactivity_set(dialer, svr->timeout);
1857 efl_event_callback_array_add(dialer, _ecore_con_server_dialer_cbs(), svr); 1854 efl_event_callback_array_add(dialer, _ecore_con_server_dialer_cbs(), svr);
1858 1855
@@ -1993,7 +1990,6 @@ _ecore_con_server_dialer_ssl_job(void *data, const Eina_Value v,
1993 efl_parent_set(inner_dialer, dialer); 1990 efl_parent_set(inner_dialer, dialer);
1994 1991
1995 efl_unref(ssl_ctx); /* inner_dialer keeps it */ 1992 efl_unref(ssl_ctx); /* inner_dialer keeps it */
1996 efl_unref(inner_dialer); /* dialer keeps it */
1997 1993
1998 if (!_ecore_con_server_dialer_set(svr, dialer)) 1994 if (!_ecore_con_server_dialer_set(svr, dialer))
1999 goto error_dial; 1995 goto error_dial;
@@ -2092,11 +2088,10 @@ _ecore_con_server_dialer_ssl_upgrade_job(void *data, const Eina_Value v,
2092 efl_parent_set(inner_dialer, dialer); 2088 efl_parent_set(inner_dialer, dialer);
2093 2089
2094 efl_unref(ssl_ctx); /* inner_dialer keeps it */ 2090 efl_unref(ssl_ctx); /* inner_dialer keeps it */
2095 efl_unref(inner_dialer); /* dialer keeps it */
2096 2091
2097 svr->dialer = dialer; 2092 svr->dialer = dialer;
2098 efl_io_closer_close_on_exec_set(dialer, EINA_TRUE); 2093 efl_io_closer_close_on_exec_set(dialer, EINA_TRUE);
2099 efl_io_closer_close_on_destructor_set(dialer, EINA_TRUE); 2094 efl_io_closer_close_on_invalidate_set(dialer, EINA_TRUE);
2100 efl_event_callback_array_del(tcp_dialer, _ecore_con_server_dialer_cbs(), svr); 2095 efl_event_callback_array_del(tcp_dialer, _ecore_con_server_dialer_cbs(), svr);
2101 efl_event_callback_array_add(dialer, _ecore_con_server_dialer_cbs(), svr); 2096 efl_event_callback_array_add(dialer, _ecore_con_server_dialer_cbs(), svr);
2102 2097
diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c
index 6a9d06d582..3c9faea28c 100644
--- a/src/lib/ecore_con/ecore_con_url.c
+++ b/src/lib/ecore_con/ecore_con_url.c
@@ -922,7 +922,7 @@ ecore_con_url_post(Ecore_Con_Url *url_con,
922 922
923 buffer = efl_add(EFL_IO_BUFFER_CLASS, efl_loop_get(url_con->dialer), 923 buffer = efl_add(EFL_IO_BUFFER_CLASS, efl_loop_get(url_con->dialer),
924 efl_name_set(efl_added, "post-buffer"), 924 efl_name_set(efl_added, "post-buffer"),
925 efl_io_closer_close_on_destructor_set(efl_added, EINA_TRUE), 925 efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE),
926 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE)); 926 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE));
927 EINA_SAFETY_ON_NULL_GOTO(buffer, error_buffer); 927 EINA_SAFETY_ON_NULL_GOTO(buffer, error_buffer);
928 928
@@ -938,7 +938,7 @@ ecore_con_url_post(Ecore_Con_Url *url_con,
938 efl_name_set(efl_added, "send-copier"), 938 efl_name_set(efl_added, "send-copier"),
939 efl_io_copier_source_set(efl_added, buffer), 939 efl_io_copier_source_set(efl_added, buffer),
940 efl_io_copier_destination_set(efl_added, url_con->dialer), 940 efl_io_copier_destination_set(efl_added, url_con->dialer),
941 efl_io_closer_close_on_destructor_set(efl_added, EINA_FALSE), 941 efl_io_closer_close_on_invalidate_set(efl_added, EINA_FALSE),
942 efl_event_callback_array_add(efl_added, _ecore_con_url_copier_cbs(), url_con)); 942 efl_event_callback_array_add(efl_added, _ecore_con_url_copier_cbs(), url_con));
943 EINA_SAFETY_ON_NULL_GOTO(copier, error_copier); 943 EINA_SAFETY_ON_NULL_GOTO(copier, error_copier);
944 944
@@ -1179,7 +1179,7 @@ ecore_con_url_ftp_upload(Ecore_Con_Url *url_con,
1179 efl_name_set(efl_added, "upload-file"), 1179 efl_name_set(efl_added, "upload-file"),
1180 efl_file_set(efl_added, filename, NULL), 1180 efl_file_set(efl_added, filename, NULL),
1181 efl_io_file_flags_set(efl_added, O_RDONLY), 1181 efl_io_file_flags_set(efl_added, O_RDONLY),
1182 efl_io_closer_close_on_destructor_set(efl_added, EINA_TRUE), 1182 efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE),
1183 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE)); 1183 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE));
1184 EINA_SAFETY_ON_NULL_GOTO(file, error_file); 1184 EINA_SAFETY_ON_NULL_GOTO(file, error_file);
1185 1185
@@ -1187,7 +1187,7 @@ ecore_con_url_ftp_upload(Ecore_Con_Url *url_con,
1187 efl_name_set(efl_added, "send-copier"), 1187 efl_name_set(efl_added, "send-copier"),
1188 efl_io_copier_source_set(efl_added, file), 1188 efl_io_copier_source_set(efl_added, file),
1189 efl_io_copier_destination_set(efl_added, url_con->dialer), 1189 efl_io_copier_destination_set(efl_added, url_con->dialer),
1190 efl_io_closer_close_on_destructor_set(efl_added, EINA_FALSE), 1190 efl_io_closer_close_on_invalidate_set(efl_added, EINA_FALSE),
1191 efl_event_callback_array_add(efl_added, _ecore_con_url_copier_cbs(), url_con)); 1191 efl_event_callback_array_add(efl_added, _ecore_con_url_copier_cbs(), url_con));
1192 EINA_SAFETY_ON_NULL_GOTO(copier, error_copier); 1192 EINA_SAFETY_ON_NULL_GOTO(copier, error_copier);
1193 1193
diff --git a/src/lib/ecore_con/efl_net_dialer_http.c b/src/lib/ecore_con/efl_net_dialer_http.c
index c31c0e4356..df1fedf61e 100644
--- a/src/lib/ecore_con/efl_net_dialer_http.c
+++ b/src/lib/ecore_con/efl_net_dialer_http.c
@@ -218,7 +218,7 @@ typedef struct
218 Eina_Bool connected; 218 Eina_Bool connected;
219 Eina_Bool closed; 219 Eina_Bool closed;
220 Eina_Bool close_on_exec; 220 Eina_Bool close_on_exec;
221 Eina_Bool close_on_destructor; 221 Eina_Bool close_on_invalidate;
222 Eina_Bool pending_eos; 222 Eina_Bool pending_eos;
223 Eina_Bool eos; 223 Eina_Bool eos;
224 Eina_Bool can_read; 224 Eina_Bool can_read;
@@ -1129,7 +1129,7 @@ _efl_net_dialer_http_efl_object_constructor(Eo *o, Efl_Net_Dialer_Http_Data *pd)
1129} 1129}
1130 1130
1131EOLIAN static void 1131EOLIAN static void
1132_efl_net_dialer_http_efl_object_destructor(Eo *o, Efl_Net_Dialer_Http_Data *pd) 1132_efl_net_dialer_http_efl_object_invalidate(Eo *o, Efl_Net_Dialer_Http_Data *pd)
1133{ 1133{
1134 if (pd->libproxy_thread) 1134 if (pd->libproxy_thread)
1135 { 1135 {
@@ -1149,7 +1149,7 @@ _efl_net_dialer_http_efl_object_destructor(Eo *o, Efl_Net_Dialer_Http_Data *pd)
1149 efl_io_closer_close(o); 1149 efl_io_closer_close(o);
1150 efl_event_thaw(o); 1150 efl_event_thaw(o);
1151 } 1151 }
1152 else if (efl_io_closer_close_on_destructor_get(o) && 1152 else if (efl_io_closer_close_on_invalidate_get(o) &&
1153 (!efl_io_closer_closed_get(o))) 1153 (!efl_io_closer_closed_get(o)))
1154 { 1154 {
1155 efl_event_freeze(o); 1155 efl_event_freeze(o);
@@ -1157,6 +1157,12 @@ _efl_net_dialer_http_efl_object_destructor(Eo *o, Efl_Net_Dialer_Http_Data *pd)
1157 efl_event_thaw(o); 1157 efl_event_thaw(o);
1158 } 1158 }
1159 1159
1160 efl_invalidate(efl_super(o, MY_CLASS));
1161}
1162
1163EOLIAN static void
1164_efl_net_dialer_http_efl_object_destructor(Eo *o, Efl_Net_Dialer_Http_Data *pd)
1165{
1160 efl_net_dialer_http_response_headers_clear(o); 1166 efl_net_dialer_http_response_headers_clear(o);
1161 1167
1162 if (pd->easy) 1168 if (pd->easy)
@@ -1806,15 +1812,15 @@ _efl_net_dialer_http_efl_io_closer_close_on_exec_get(const Eo *o EINA_UNUSED, Ef
1806} 1812}
1807 1813
1808EOLIAN static void 1814EOLIAN static void
1809_efl_net_dialer_http_efl_io_closer_close_on_destructor_set(Eo *o EINA_UNUSED, Efl_Net_Dialer_Http_Data *pd, Eina_Bool close_on_destructor) 1815_efl_net_dialer_http_efl_io_closer_close_on_invalidate_set(Eo *o EINA_UNUSED, Efl_Net_Dialer_Http_Data *pd, Eina_Bool close_on_invalidate)
1810{ 1816{
1811 pd->close_on_destructor = close_on_destructor; 1817 pd->close_on_invalidate = close_on_invalidate;
1812} 1818}
1813 1819
1814EOLIAN static Eina_Bool 1820EOLIAN static Eina_Bool
1815_efl_net_dialer_http_efl_io_closer_close_on_destructor_get(const Eo *o EINA_UNUSED, Efl_Net_Dialer_Http_Data *pd) 1821_efl_net_dialer_http_efl_io_closer_close_on_invalidate_get(const Eo *o EINA_UNUSED, Efl_Net_Dialer_Http_Data *pd)
1816{ 1822{
1817 return pd->close_on_destructor; 1823 return pd->close_on_invalidate;
1818} 1824}
1819 1825
1820EOLIAN static Eina_Error 1826EOLIAN static Eina_Error
diff --git a/src/lib/ecore_con/efl_net_dialer_http.eo b/src/lib/ecore_con/efl_net_dialer_http.eo
index faecaebd35..7aab27cefb 100644
--- a/src/lib/ecore_con/efl_net_dialer_http.eo
+++ b/src/lib/ecore_con/efl_net_dialer_http.eo
@@ -393,6 +393,7 @@ class Efl.Net.Dialer_Http (Efl.Loop_Consumer, Efl.Net.Dialer, Efl.Io.Sizer) {
393 393
394 implements { 394 implements {
395 Efl.Object.constructor; 395 Efl.Object.constructor;
396 Efl.Object.invalidate;
396 Efl.Object.destructor; 397 Efl.Object.destructor;
397 Efl.Net.Dialer.dial; 398 Efl.Net.Dialer.dial;
398 Efl.Net.Dialer.address_dial { get; set; } 399 Efl.Net.Dialer.address_dial { get; set; }
@@ -409,7 +410,7 @@ class Efl.Net.Dialer_Http (Efl.Loop_Consumer, Efl.Net.Dialer, Efl.Io.Sizer) {
409 Efl.Io.Closer.close; 410 Efl.Io.Closer.close;
410 Efl.Io.Closer.closed { get; } 411 Efl.Io.Closer.closed { get; }
411 Efl.Io.Closer.close_on_exec { get; set; } 412 Efl.Io.Closer.close_on_exec { get; set; }
412 Efl.Io.Closer.close_on_destructor { get; set; } 413 Efl.Io.Closer.close_on_invalidate { get; set; }
413 Efl.Io.Sizer.resize; 414 Efl.Io.Sizer.resize;
414 Efl.Io.Sizer.size { get; } 415 Efl.Io.Sizer.size { get; }
415 } 416 }
diff --git a/src/lib/ecore_con/efl_net_dialer_simple.c b/src/lib/ecore_con/efl_net_dialer_simple.c
index 8bf7b169a6..8d25c370e2 100644
--- a/src/lib/ecore_con/efl_net_dialer_simple.c
+++ b/src/lib/ecore_con/efl_net_dialer_simple.c
@@ -48,6 +48,7 @@ static void
48_efl_net_dialer_simple_inner_io_connected(void *data, const Efl_Event *event) 48_efl_net_dialer_simple_inner_io_connected(void *data, const Efl_Event *event)
49{ 49{
50 Eo *o = data; 50 Eo *o = data;
51
51 efl_event_callback_call(o, EFL_NET_DIALER_EVENT_CONNECTED, event->info); 52 efl_event_callback_call(o, EFL_NET_DIALER_EVENT_CONNECTED, event->info);
52} 53}
53 54
@@ -87,10 +88,24 @@ _efl_net_dialer_simple_efl_object_finalize(Eo *o, Efl_Net_Dialer_Simple_Data *pd
87} 88}
88 89
89EOLIAN static void 90EOLIAN static void
90_efl_net_dialer_simple_efl_object_destructor(Eo *o, Efl_Net_Dialer_Simple_Data *pd) 91_efl_net_dialer_simple_efl_object_invalidate(Eo *o, Efl_Net_Dialer_Simple_Data *pd EINA_UNUSED)
91{ 92{
92 Eo *inner_io; 93 Eo *inner_io;
93 94
95 inner_io = efl_io_buffered_stream_inner_io_get(o);
96 if (inner_io)
97 {
98 efl_event_callback_array_del(inner_io, _efl_net_dialer_simple_inner_io_cbs(), o);
99 if (efl_parent_get(inner_io) == o)
100 efl_parent_set(inner_io, NULL);
101 }
102
103 efl_invalidate(efl_super(o, EFL_NET_DIALER_SIMPLE_CLASS));
104}
105
106EOLIAN static void
107_efl_net_dialer_simple_efl_object_destructor(Eo *o, Efl_Net_Dialer_Simple_Data *pd)
108{
94 if (pd->inner_class) pd->inner_class = NULL; 109 if (pd->inner_class) pd->inner_class = NULL;
95 110
96 eina_stringshare_replace(&pd->proxy_url, NULL); 111 eina_stringshare_replace(&pd->proxy_url, NULL);
@@ -100,14 +115,6 @@ _efl_net_dialer_simple_efl_object_destructor(Eo *o, Efl_Net_Dialer_Simple_Data *
100 pd->line_delimiter.mem = NULL; 115 pd->line_delimiter.mem = NULL;
101 } 116 }
102 117
103 inner_io = efl_io_buffered_stream_inner_io_get(o);
104 if (inner_io)
105 {
106 efl_event_callback_array_del(inner_io, _efl_net_dialer_simple_inner_io_cbs(), o);
107 if (efl_parent_get(inner_io) == o)
108 efl_parent_set(inner_io, NULL);
109 }
110
111 efl_destructor(efl_super(o, EFL_NET_DIALER_SIMPLE_CLASS)); 118 efl_destructor(efl_super(o, EFL_NET_DIALER_SIMPLE_CLASS));
112} 119}
113 120
diff --git a/src/lib/ecore_con/efl_net_dialer_simple.eo b/src/lib/ecore_con/efl_net_dialer_simple.eo
index e1e6522f68..38ec878808 100644
--- a/src/lib/ecore_con/efl_net_dialer_simple.eo
+++ b/src/lib/ecore_con/efl_net_dialer_simple.eo
@@ -69,6 +69,7 @@ class Efl.Net.Dialer_Simple (Efl.Net.Socket_Simple, Efl.Net.Dialer) {
69 69
70 implements { 70 implements {
71 Efl.Object.finalize; 71 Efl.Object.finalize;
72 Efl.Object.invalidate;
72 Efl.Object.destructor; 73 Efl.Object.destructor;
73 Efl.Io.Buffered_Stream.inner_io { set; } 74 Efl.Io.Buffered_Stream.inner_io { set; }
74 Efl.Net.Dialer.dial; 75 Efl.Net.Dialer.dial;
diff --git a/src/lib/ecore_con/efl_net_dialer_ssl.c b/src/lib/ecore_con/efl_net_dialer_ssl.c
index 4ecfc03530..9a89ea90d2 100644
--- a/src/lib/ecore_con/efl_net_dialer_ssl.c
+++ b/src/lib/ecore_con/efl_net_dialer_ssl.c
@@ -98,13 +98,7 @@ _efl_net_dialer_ssl_efl_object_invalidate(Eo *o, Efl_Net_Dialer_Ssl_Data *pd)
98{ 98{
99 pd->sock = NULL; 99 pd->sock = NULL;
100 100
101 efl_invalidate(efl_super(o, MY_CLASS)); 101 if (efl_io_closer_close_on_invalidate_get(o) &&
102}
103
104EOLIAN static void
105_efl_net_dialer_ssl_efl_object_destructor(Eo *o, Efl_Net_Dialer_Ssl_Data *pd)
106{
107 if (efl_io_closer_close_on_destructor_get(o) &&
108 (!efl_io_closer_closed_get(o))) 102 (!efl_io_closer_closed_get(o)))
109 { 103 {
110 efl_event_freeze(o); 104 efl_event_freeze(o);
@@ -118,7 +112,7 @@ _efl_net_dialer_ssl_efl_object_destructor(Eo *o, Efl_Net_Dialer_Ssl_Data *pd)
118 pd->ssl_ctx = NULL; 112 pd->ssl_ctx = NULL;
119 } 113 }
120 114
121 efl_destructor(efl_super(o, MY_CLASS)); 115 efl_invalidate(efl_super(o, MY_CLASS));
122} 116}
123 117
124EOLIAN static void 118EOLIAN static void
diff --git a/src/lib/ecore_con/efl_net_dialer_ssl.eo b/src/lib/ecore_con/efl_net_dialer_ssl.eo
index 7a9ffe5cd0..c732e1c621 100644
--- a/src/lib/ecore_con/efl_net_dialer_ssl.eo
+++ b/src/lib/ecore_con/efl_net_dialer_ssl.eo
@@ -68,7 +68,6 @@ class Efl.Net.Dialer_Ssl (Efl.Net.Socket_Ssl, Efl.Net.Dialer) {
68 Efl.Object.constructor; 68 Efl.Object.constructor;
69 Efl.Object.finalize; 69 Efl.Object.finalize;
70 Efl.Object.invalidate; 70 Efl.Object.invalidate;
71 Efl.Object.destructor;
72 Efl.Net.Dialer.dial; 71 Efl.Net.Dialer.dial;
73 Efl.Net.Dialer.address_dial { get; } 72 Efl.Net.Dialer.address_dial { get; }
74 Efl.Net.Dialer.connected { get; set; } 73 Efl.Net.Dialer.connected { get; set; }
diff --git a/src/lib/ecore_con/efl_net_dialer_tcp.c b/src/lib/ecore_con/efl_net_dialer_tcp.c
index 88f1bb7bb8..12e24b7238 100644
--- a/src/lib/ecore_con/efl_net_dialer_tcp.c
+++ b/src/lib/ecore_con/efl_net_dialer_tcp.c
@@ -53,9 +53,9 @@ _efl_net_dialer_tcp_efl_object_constructor(Eo *o, Efl_Net_Dialer_Tcp_Data *pd EI
53} 53}
54 54
55EOLIAN static void 55EOLIAN static void
56_efl_net_dialer_tcp_efl_object_destructor(Eo *o, Efl_Net_Dialer_Tcp_Data *pd) 56_efl_net_dialer_tcp_efl_object_invalidate(Eo *o, Efl_Net_Dialer_Tcp_Data *pd)
57{ 57{
58 if (efl_io_closer_close_on_destructor_get(o) && 58 if (efl_io_closer_close_on_invalidate_get(o) &&
59 (!efl_io_closer_closed_get(o))) 59 (!efl_io_closer_closed_get(o)))
60 { 60 {
61 efl_event_freeze(o); 61 efl_event_freeze(o);
@@ -69,6 +69,12 @@ _efl_net_dialer_tcp_efl_object_destructor(Eo *o, Efl_Net_Dialer_Tcp_Data *pd)
69 pd->connect.thread = NULL; 69 pd->connect.thread = NULL;
70 } 70 }
71 71
72 efl_invalidate(efl_super(o, MY_CLASS));
73}
74
75EOLIAN static void
76_efl_net_dialer_tcp_efl_object_destructor(Eo *o, Efl_Net_Dialer_Tcp_Data *pd)
77{
72 efl_destructor(efl_super(o, MY_CLASS)); 78 efl_destructor(efl_super(o, MY_CLASS));
73 79
74 eina_stringshare_replace(&pd->address_dial, NULL); 80 eina_stringshare_replace(&pd->address_dial, NULL);
diff --git a/src/lib/ecore_con/efl_net_dialer_tcp.eo b/src/lib/ecore_con/efl_net_dialer_tcp.eo
index c46084b151..757e926ab5 100644
--- a/src/lib/ecore_con/efl_net_dialer_tcp.eo
+++ b/src/lib/ecore_con/efl_net_dialer_tcp.eo
@@ -24,6 +24,7 @@ class Efl.Net.Dialer_Tcp (Efl.Net.Socket_Tcp, Efl.Net.Dialer) {
24 24
25 implements { 25 implements {
26 Efl.Object.constructor; 26 Efl.Object.constructor;
27 Efl.Object.invalidate;
27 Efl.Object.destructor; 28 Efl.Object.destructor;
28 Efl.Net.Dialer.dial; 29 Efl.Net.Dialer.dial;
29 Efl.Net.Dialer.address_dial { get; set; } 30 Efl.Net.Dialer.address_dial { get; set; }
diff --git a/src/lib/ecore_con/efl_net_dialer_udp.c b/src/lib/ecore_con/efl_net_dialer_udp.c
index 1c7eda3fd1..89a7154710 100644
--- a/src/lib/ecore_con/efl_net_dialer_udp.c
+++ b/src/lib/ecore_con/efl_net_dialer_udp.c
@@ -54,9 +54,9 @@ _efl_net_dialer_udp_efl_object_constructor(Eo *o, Efl_Net_Dialer_Udp_Data *pd EI
54} 54}
55 55
56EOLIAN static void 56EOLIAN static void
57_efl_net_dialer_udp_efl_object_destructor(Eo *o, Efl_Net_Dialer_Udp_Data *pd) 57_efl_net_dialer_udp_efl_object_invalidate(Eo *o, Efl_Net_Dialer_Udp_Data *pd)
58{ 58{
59 if (efl_io_closer_close_on_destructor_get(o) && 59 if (efl_io_closer_close_on_invalidate_get(o) &&
60 (!efl_io_closer_closed_get(o))) 60 (!efl_io_closer_closed_get(o)))
61 { 61 {
62 efl_event_freeze(o); 62 efl_event_freeze(o);
@@ -70,6 +70,12 @@ _efl_net_dialer_udp_efl_object_destructor(Eo *o, Efl_Net_Dialer_Udp_Data *pd)
70 pd->resolver.thread = NULL; 70 pd->resolver.thread = NULL;
71 } 71 }
72 72
73 efl_invalidate(efl_super(o, MY_CLASS));
74}
75
76EOLIAN static void
77_efl_net_dialer_udp_efl_object_destructor(Eo *o, Efl_Net_Dialer_Udp_Data *pd)
78{
73 efl_destructor(efl_super(o, MY_CLASS)); 79 efl_destructor(efl_super(o, MY_CLASS));
74 80
75 eina_stringshare_replace(&pd->address_dial, NULL); 81 eina_stringshare_replace(&pd->address_dial, NULL);
diff --git a/src/lib/ecore_con/efl_net_dialer_udp.eo b/src/lib/ecore_con/efl_net_dialer_udp.eo
index 56f34413af..4e5a407015 100644
--- a/src/lib/ecore_con/efl_net_dialer_udp.eo
+++ b/src/lib/ecore_con/efl_net_dialer_udp.eo
@@ -27,6 +27,7 @@ class Efl.Net.Dialer_Udp (Efl.Net.Socket_Udp, Efl.Net.Dialer) {
27 27
28 implements { 28 implements {
29 Efl.Object.constructor; 29 Efl.Object.constructor;
30 Efl.Object.invalidate;
30 Efl.Object.destructor; 31 Efl.Object.destructor;
31 Efl.Net.Dialer.dial; 32 Efl.Net.Dialer.dial;
32 Efl.Net.Dialer.address_dial { get; set; } 33 Efl.Net.Dialer.address_dial { get; set; }
diff --git a/src/lib/ecore_con/efl_net_dialer_unix.c b/src/lib/ecore_con/efl_net_dialer_unix.c
index 9c20bf19c6..683a37b89f 100644
--- a/src/lib/ecore_con/efl_net_dialer_unix.c
+++ b/src/lib/ecore_con/efl_net_dialer_unix.c
@@ -43,9 +43,9 @@ _efl_net_dialer_unix_efl_object_constructor(Eo *o, Efl_Net_Dialer_Unix_Data *pd
43} 43}
44 44
45EOLIAN static void 45EOLIAN static void
46_efl_net_dialer_unix_efl_object_destructor(Eo *o, Efl_Net_Dialer_Unix_Data *pd) 46_efl_net_dialer_unix_efl_object_invalidate(Eo *o, Efl_Net_Dialer_Unix_Data *pd)
47{ 47{
48 if (efl_io_closer_close_on_destructor_get(o) && 48 if (efl_io_closer_close_on_invalidate_get(o) &&
49 (!efl_io_closer_closed_get(o))) 49 (!efl_io_closer_closed_get(o)))
50 { 50 {
51 efl_event_freeze(o); 51 efl_event_freeze(o);
@@ -59,6 +59,12 @@ _efl_net_dialer_unix_efl_object_destructor(Eo *o, Efl_Net_Dialer_Unix_Data *pd)
59 pd->connect.thread = NULL; 59 pd->connect.thread = NULL;
60 } 60 }
61 61
62 efl_invalidate(efl_super(o, MY_CLASS));
63}
64
65EOLIAN static void
66_efl_net_dialer_unix_efl_object_destructor(Eo *o, Efl_Net_Dialer_Unix_Data *pd)
67{
62 efl_destructor(efl_super(o, MY_CLASS)); 68 efl_destructor(efl_super(o, MY_CLASS));
63 69
64 eina_stringshare_replace(&pd->address_dial, NULL); 70 eina_stringshare_replace(&pd->address_dial, NULL);
diff --git a/src/lib/ecore_con/efl_net_dialer_unix.eo b/src/lib/ecore_con/efl_net_dialer_unix.eo
index aafe27fdf6..a45d2be5c7 100644
--- a/src/lib/ecore_con/efl_net_dialer_unix.eo
+++ b/src/lib/ecore_con/efl_net_dialer_unix.eo
@@ -12,6 +12,7 @@ class Efl.Net.Dialer_Unix (Efl.Net.Socket_Unix, Efl.Net.Dialer) {
12 12
13 implements { 13 implements {
14 Efl.Object.constructor; 14 Efl.Object.constructor;
15 Efl.Object.invalidate;
15 Efl.Object.destructor; 16 Efl.Object.destructor;
16 Efl.Net.Dialer.dial; 17 Efl.Net.Dialer.dial;
17 Efl.Net.Dialer.address_dial { get; set; } 18 Efl.Net.Dialer.address_dial { get; set; }
diff --git a/src/lib/ecore_con/efl_net_dialer_websocket.c b/src/lib/ecore_con/efl_net_dialer_websocket.c
index 79e03f08cc..80c598ac4b 100644
--- a/src/lib/ecore_con/efl_net_dialer_websocket.c
+++ b/src/lib/ecore_con/efl_net_dialer_websocket.c
@@ -1374,15 +1374,15 @@ _efl_net_dialer_websocket_efl_io_closer_close_on_exec_get(const Eo *o EINA_UNUSE
1374} 1374}
1375 1375
1376EOLIAN static void 1376EOLIAN static void
1377_efl_net_dialer_websocket_efl_io_closer_close_on_destructor_set(Eo *o EINA_UNUSED, Efl_Net_Dialer_Websocket_Data *pd, Eina_Bool close_on_destructor) 1377_efl_net_dialer_websocket_efl_io_closer_close_on_invalidate_set(Eo *o EINA_UNUSED, Efl_Net_Dialer_Websocket_Data *pd, Eina_Bool close_on_invalidate)
1378{ 1378{
1379 efl_io_closer_close_on_destructor_set(pd->http, close_on_destructor); 1379 efl_io_closer_close_on_invalidate_set(pd->http, close_on_invalidate);
1380} 1380}
1381 1381
1382EOLIAN static Eina_Bool 1382EOLIAN static Eina_Bool
1383_efl_net_dialer_websocket_efl_io_closer_close_on_destructor_get(const Eo *o EINA_UNUSED, Efl_Net_Dialer_Websocket_Data *pd) 1383_efl_net_dialer_websocket_efl_io_closer_close_on_invalidate_get(const Eo *o EINA_UNUSED, Efl_Net_Dialer_Websocket_Data *pd)
1384{ 1384{
1385 return efl_io_closer_close_on_destructor_get(pd->http); 1385 return efl_io_closer_close_on_invalidate_get(pd->http);
1386} 1386}
1387 1387
1388EOLIAN static void 1388EOLIAN static void
diff --git a/src/lib/ecore_con/efl_net_dialer_websocket.eo b/src/lib/ecore_con/efl_net_dialer_websocket.eo
index a994e590c2..f22bf54104 100644
--- a/src/lib/ecore_con/efl_net_dialer_websocket.eo
+++ b/src/lib/ecore_con/efl_net_dialer_websocket.eo
@@ -331,6 +331,6 @@ class Efl.Net.Dialer_Websocket (Efl.Loop_Consumer, Efl.Net.Dialer) {
331 Efl.Io.Closer.close; 331 Efl.Io.Closer.close;
332 Efl.Io.Closer.closed { get; } 332 Efl.Io.Closer.closed { get; }
333 Efl.Io.Closer.close_on_exec { get; set; } 333 Efl.Io.Closer.close_on_exec { get; set; }
334 Efl.Io.Closer.close_on_destructor { get; set; } 334 Efl.Io.Closer.close_on_invalidate { get; set; }
335 } 335 }
336} 336}
diff --git a/src/lib/ecore_con/efl_net_server_simple.c b/src/lib/ecore_con/efl_net_server_simple.c
index 4dec2200fb..8c0c4a6732 100644
--- a/src/lib/ecore_con/efl_net_server_simple.c
+++ b/src/lib/ecore_con/efl_net_server_simple.c
@@ -161,10 +161,8 @@ _efl_net_server_simple_efl_object_invalidate(Eo *o, Efl_Net_Server_Simple_Data *
161 if (pd->inner_server) 161 if (pd->inner_server)
162 { 162 {
163 efl_event_callback_array_del(pd->inner_server, _efl_net_server_simple_inner_server_cbs(), o); 163 efl_event_callback_array_del(pd->inner_server, _efl_net_server_simple_inner_server_cbs(), o);
164 if (efl_parent_get(pd->inner_server) == o)
165 efl_parent_set(pd->inner_server, NULL);
166 164
167 efl_unref(pd->inner_server); 165 efl_xunref(pd->inner_server, o);
168 pd->inner_server = NULL; 166 pd->inner_server = NULL;
169 } 167 }
170 168
@@ -232,7 +230,7 @@ _efl_net_server_simple_inner_server_set(Eo *o, Efl_Net_Server_Simple_Data *pd, E
232 EINA_SAFETY_ON_TRUE_RETURN(pd->inner_server != NULL); 230 EINA_SAFETY_ON_TRUE_RETURN(pd->inner_server != NULL);
233 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(server, EFL_NET_SERVER_INTERFACE)); 231 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(server, EFL_NET_SERVER_INTERFACE));
234 232
235 pd->inner_server = efl_ref(server); 233 pd->inner_server = efl_xref(server, o);
236 efl_event_callback_array_add(server, _efl_net_server_simple_inner_server_cbs(), o); 234 efl_event_callback_array_add(server, _efl_net_server_simple_inner_server_cbs(), o);
237 DBG("%p inner_server=%p (%s)", o, server, efl_class_name_get(efl_class_get(server))); 235 DBG("%p inner_server=%p (%s)", o, server, efl_class_name_get(efl_class_get(server)));
238} 236}
diff --git a/src/lib/ecore_con/efl_net_server_ssl.c b/src/lib/ecore_con/efl_net_server_ssl.c
index 7315484b1c..c865e7d0ab 100644
--- a/src/lib/ecore_con/efl_net_server_ssl.c
+++ b/src/lib/ecore_con/efl_net_server_ssl.c
@@ -89,7 +89,7 @@ _efl_net_server_ssl_efl_net_server_fd_client_add(Eo *o, Efl_Net_Server_Ssl_Data
89 89
90 client_tcp = efl_add(EFL_NET_SOCKET_TCP_CLASS, o, 90 client_tcp = efl_add(EFL_NET_SOCKET_TCP_CLASS, o,
91 efl_io_closer_close_on_exec_set(efl_added, efl_net_server_fd_close_on_exec_get(o)), 91 efl_io_closer_close_on_exec_set(efl_added, efl_net_server_fd_close_on_exec_get(o)),
92 efl_io_closer_close_on_destructor_set(efl_added, EINA_TRUE), 92 efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE),
93 efl_loop_fd_set(efl_added, client_fd)); 93 efl_loop_fd_set(efl_added, client_fd));
94 if (!client_tcp) 94 if (!client_tcp)
95 { 95 {
diff --git a/src/lib/ecore_con/efl_net_server_tcp.c b/src/lib/ecore_con/efl_net_server_tcp.c
index b56984f853..e4e5bcb377 100644
--- a/src/lib/ecore_con/efl_net_server_tcp.c
+++ b/src/lib/ecore_con/efl_net_server_tcp.c
@@ -253,7 +253,7 @@ _efl_net_server_tcp_efl_net_server_fd_client_add(Eo *o, Efl_Net_Server_Tcp_Data
253{ 253{
254 Eo *client = efl_add(EFL_NET_SOCKET_TCP_CLASS, o, 254 Eo *client = efl_add(EFL_NET_SOCKET_TCP_CLASS, o,
255 efl_io_closer_close_on_exec_set(efl_added, efl_net_server_fd_close_on_exec_get(o)), 255 efl_io_closer_close_on_exec_set(efl_added, efl_net_server_fd_close_on_exec_get(o)),
256 efl_io_closer_close_on_destructor_set(efl_added, EINA_TRUE), 256 efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE),
257 efl_loop_fd_set(efl_added, client_fd)); 257 efl_loop_fd_set(efl_added, client_fd));
258 if (!client) 258 if (!client)
259 { 259 {
diff --git a/src/lib/ecore_con/efl_net_server_udp.c b/src/lib/ecore_con/efl_net_server_udp.c
index 674945ec86..ced3e04662 100644
--- a/src/lib/ecore_con/efl_net_server_udp.c
+++ b/src/lib/ecore_con/efl_net_server_udp.c
@@ -369,7 +369,7 @@ _efl_net_server_udp_efl_net_server_fd_process_incoming_data(Eo *o, Efl_Net_Serve
369 } 369 }
370 370
371 client = efl_add(EFL_NET_SERVER_UDP_CLIENT_CLASS, o, 371 client = efl_add(EFL_NET_SERVER_UDP_CLIENT_CLASS, o,
372 efl_io_closer_close_on_destructor_set(efl_added, EINA_TRUE), 372 efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE),
373 373
374 efl_net_socket_address_local_set(efl_added, efl_net_server_address_get(o)), 374 efl_net_socket_address_local_set(efl_added, efl_net_server_address_get(o)),
375 _efl_net_server_udp_client_init(efl_added, fd, (const struct sockaddr *)&addr, addrlen, str), 375 _efl_net_server_udp_client_init(efl_added, fd, (const struct sockaddr *)&addr, addrlen, str),
diff --git a/src/lib/ecore_con/efl_net_server_udp_client.c b/src/lib/ecore_con/efl_net_server_udp_client.c
index 33d4716269..52a9d38008 100644
--- a/src/lib/ecore_con/efl_net_server_udp_client.c
+++ b/src/lib/ecore_con/efl_net_server_udp_client.c
@@ -42,7 +42,7 @@ typedef struct _Efl_Net_Server_Udp_Client_Data
42 struct sockaddr *addr_remote; 42 struct sockaddr *addr_remote;
43 socklen_t addr_remote_len; 43 socklen_t addr_remote_len;
44 SOCKET fd; 44 SOCKET fd;
45 Eina_Bool close_on_destructor; 45 Eina_Bool close_on_invalidate;
46 Eina_Bool eos; 46 Eina_Bool eos;
47 Eina_Bool can_read; 47 Eina_Bool can_read;
48 Eina_Bool can_write; 48 Eina_Bool can_write;
@@ -71,9 +71,9 @@ _efl_net_server_udp_client_cleanup(Efl_Net_Server_Udp_Client_Data *pd)
71} 71}
72 72
73EOLIAN static void 73EOLIAN static void
74_efl_net_server_udp_client_efl_object_destructor(Eo *o, Efl_Net_Server_Udp_Client_Data *pd) 74_efl_net_server_udp_client_efl_object_invalidate(Eo *o, Efl_Net_Server_Udp_Client_Data *pd EINA_UNUSED)
75{ 75{
76 if (efl_io_closer_close_on_destructor_get(o) && 76 if (efl_io_closer_close_on_invalidate_get(o) &&
77 (!efl_io_closer_closed_get(o))) 77 (!efl_io_closer_closed_get(o)))
78 { 78 {
79 efl_event_freeze(o); 79 efl_event_freeze(o);
@@ -81,6 +81,12 @@ _efl_net_server_udp_client_efl_object_destructor(Eo *o, Efl_Net_Server_Udp_Clien
81 efl_event_thaw(o); 81 efl_event_thaw(o);
82 } 82 }
83 83
84 efl_invalidate(efl_super(o, MY_CLASS));
85}
86
87EOLIAN static void
88_efl_net_server_udp_client_efl_object_destructor(Eo *o, Efl_Net_Server_Udp_Client_Data *pd)
89{
84 efl_destructor(efl_super(o, MY_CLASS)); 90 efl_destructor(efl_super(o, MY_CLASS));
85 91
86 _efl_net_server_udp_client_cleanup(pd); 92 _efl_net_server_udp_client_cleanup(pd);
@@ -269,15 +275,15 @@ _efl_net_server_udp_client_efl_io_closer_closed_get(const Eo *o EINA_UNUSED, Efl
269} 275}
270 276
271EOLIAN static void 277EOLIAN static void
272_efl_net_server_udp_client_efl_io_closer_close_on_destructor_set(Eo *o EINA_UNUSED, Efl_Net_Server_Udp_Client_Data *pd, Eina_Bool close_on_destructor) 278_efl_net_server_udp_client_efl_io_closer_close_on_invalidate_set(Eo *o EINA_UNUSED, Efl_Net_Server_Udp_Client_Data *pd, Eina_Bool close_on_invalidate)
273{ 279{
274 pd->close_on_destructor = close_on_destructor; 280 pd->close_on_invalidate = close_on_invalidate;
275} 281}
276 282
277EOLIAN static Eina_Bool 283EOLIAN static Eina_Bool
278_efl_net_server_udp_client_efl_io_closer_close_on_destructor_get(const Eo *o EINA_UNUSED, Efl_Net_Server_Udp_Client_Data *pd) 284_efl_net_server_udp_client_efl_io_closer_close_on_invalidate_get(const Eo *o EINA_UNUSED, Efl_Net_Server_Udp_Client_Data *pd)
279{ 285{
280 return pd->close_on_destructor; 286 return pd->close_on_invalidate;
281} 287}
282 288
283EOLIAN static Eina_Bool 289EOLIAN static Eina_Bool
diff --git a/src/lib/ecore_con/efl_net_server_udp_client.eo b/src/lib/ecore_con/efl_net_server_udp_client.eo
index 12f5bbce4a..6eeeedef31 100644
--- a/src/lib/ecore_con/efl_net_server_udp_client.eo
+++ b/src/lib/ecore_con/efl_net_server_udp_client.eo
@@ -26,10 +26,11 @@ class Efl.Net.Server_Udp_Client (Efl.Object, Efl.Net.Socket) {
26 26
27 implements { 27 implements {
28 Efl.Object.finalize; 28 Efl.Object.finalize;
29 Efl.Object.invalidate;
29 Efl.Object.destructor; 30 Efl.Object.destructor;
30 Efl.Io.Closer.close; 31 Efl.Io.Closer.close;
31 Efl.Io.Closer.closed { get; } 32 Efl.Io.Closer.closed { get; }
32 Efl.Io.Closer.close_on_destructor { get; set; } 33 Efl.Io.Closer.close_on_invalidate { get; set; }
33 Efl.Io.Closer.close_on_exec { get; set; } 34 Efl.Io.Closer.close_on_exec { get; set; }
34 Efl.Io.Reader.can_read { get; set; } 35 Efl.Io.Reader.can_read { get; set; }
35 Efl.Io.Reader.eos { get; set; } 36 Efl.Io.Reader.eos { get; set; }
diff --git a/src/lib/ecore_con/efl_net_server_unix.c b/src/lib/ecore_con/efl_net_server_unix.c
index a0ab684858..38280c27c8 100644
--- a/src/lib/ecore_con/efl_net_server_unix.c
+++ b/src/lib/ecore_con/efl_net_server_unix.c
@@ -246,7 +246,7 @@ _efl_net_server_unix_efl_net_server_fd_client_add(Eo *o, Efl_Net_Server_Unix_Dat
246{ 246{
247 Eo *client = efl_add(EFL_NET_SOCKET_UNIX_CLASS, o, 247 Eo *client = efl_add(EFL_NET_SOCKET_UNIX_CLASS, o,
248 efl_io_closer_close_on_exec_set(efl_added, efl_net_server_fd_close_on_exec_get(o)), 248 efl_io_closer_close_on_exec_set(efl_added, efl_net_server_fd_close_on_exec_get(o)),
249 efl_io_closer_close_on_destructor_set(efl_added, EINA_TRUE), 249 efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE),
250 efl_loop_fd_set(efl_added, client_fd)); 250 efl_loop_fd_set(efl_added, client_fd));
251 if (!client) 251 if (!client)
252 { 252 {
diff --git a/src/lib/ecore_con/efl_net_server_windows.c b/src/lib/ecore_con/efl_net_server_windows.c
index fc01728d42..1e0375ead1 100644
--- a/src/lib/ecore_con/efl_net_server_windows.c
+++ b/src/lib/ecore_con/efl_net_server_windows.c
@@ -231,7 +231,7 @@ _efl_net_server_windows_client_new(Eo *o, Efl_Net_Server_Windows_Data *pd)
231 } 231 }
232 232
233 pd->next_client = efl_add(EFL_NET_SOCKET_WINDOWS_CLASS, o, 233 pd->next_client = efl_add(EFL_NET_SOCKET_WINDOWS_CLASS, o,
234 efl_io_closer_close_on_destructor_set(efl_added, EINA_TRUE)); 234 efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE));
235 if (!pd->next_client) 235 if (!pd->next_client)
236 { 236 {
237 err = ENOMEM; 237 err = ENOMEM;
diff --git a/src/lib/ecore_con/efl_net_socket_fd.c b/src/lib/ecore_con/efl_net_socket_fd.c
index 14c2142006..3ade365fc2 100644
--- a/src/lib/ecore_con/efl_net_socket_fd.c
+++ b/src/lib/ecore_con/efl_net_socket_fd.c
@@ -78,7 +78,7 @@ _efl_net_socket_fd_efl_object_constructor(Eo *o, Efl_Net_Socket_Fd_Data *pd)
78 o = efl_constructor(efl_super(o, MY_CLASS)); 78 o = efl_constructor(efl_super(o, MY_CLASS));
79 79
80 efl_io_closer_close_on_exec_set(o, EINA_TRUE); 80 efl_io_closer_close_on_exec_set(o, EINA_TRUE);
81 efl_io_closer_close_on_destructor_set(o, EINA_TRUE); 81 efl_io_closer_close_on_invalidate_set(o, EINA_TRUE);
82 efl_io_reader_fd_set(o, SOCKET_TO_LOOP_FD(INVALID_SOCKET)); 82 efl_io_reader_fd_set(o, SOCKET_TO_LOOP_FD(INVALID_SOCKET));
83 efl_io_writer_fd_set(o, SOCKET_TO_LOOP_FD(INVALID_SOCKET)); 83 efl_io_writer_fd_set(o, SOCKET_TO_LOOP_FD(INVALID_SOCKET));
84 efl_io_closer_fd_set(o, SOCKET_TO_LOOP_FD(INVALID_SOCKET)); 84 efl_io_closer_fd_set(o, SOCKET_TO_LOOP_FD(INVALID_SOCKET));
@@ -87,9 +87,9 @@ _efl_net_socket_fd_efl_object_constructor(Eo *o, Efl_Net_Socket_Fd_Data *pd)
87} 87}
88 88
89EOLIAN static void 89EOLIAN static void
90_efl_net_socket_fd_efl_object_destructor(Eo *o, Efl_Net_Socket_Fd_Data *pd) 90_efl_net_socket_fd_efl_object_invalidate(Eo *o, Efl_Net_Socket_Fd_Data *pd EINA_UNUSED)
91{ 91{
92 if (efl_io_closer_close_on_destructor_get(o) && 92 if (efl_io_closer_close_on_invalidate_get(o) &&
93 (!efl_io_closer_closed_get(o))) 93 (!efl_io_closer_closed_get(o)))
94 { 94 {
95 efl_event_freeze(o); 95 efl_event_freeze(o);
@@ -97,6 +97,12 @@ _efl_net_socket_fd_efl_object_destructor(Eo *o, Efl_Net_Socket_Fd_Data *pd)
97 efl_event_thaw(o); 97 efl_event_thaw(o);
98 } 98 }
99 99
100 efl_invalidate(efl_super(o, MY_CLASS));
101}
102
103EOLIAN static void
104_efl_net_socket_fd_efl_object_destructor(Eo *o, Efl_Net_Socket_Fd_Data *pd)
105{
100 efl_destructor(efl_super(o, MY_CLASS)); 106 efl_destructor(efl_super(o, MY_CLASS));
101 107
102 eina_stringshare_replace(&pd->address_local, NULL); 108 eina_stringshare_replace(&pd->address_local, NULL);
diff --git a/src/lib/ecore_con/efl_net_socket_fd.eo b/src/lib/ecore_con/efl_net_socket_fd.eo
index 8cce3ff318..951fe7f8cc 100644
--- a/src/lib/ecore_con/efl_net_socket_fd.eo
+++ b/src/lib/ecore_con/efl_net_socket_fd.eo
@@ -5,7 +5,7 @@ class Efl.Net.Socket_Fd (Efl.Loop_Fd, Efl.Io.Reader_Fd, Efl.Io.Writer_Fd, Efl.Io
5 created by an dialer or server. 5 created by an dialer or server.
6 6
7 @Efl.Io.Closer.close_on_exec and 7 @Efl.Io.Closer.close_on_exec and
8 @Efl.Io.Closer.close_on_destructor are respected and default to 8 @Efl.Io.Closer.close_on_invalidate are respected and default to
9 $true. 9 $true.
10 10
11 @since 1.19 11 @since 1.19
@@ -32,6 +32,7 @@ class Efl.Net.Socket_Fd (Efl.Loop_Fd, Efl.Io.Reader_Fd, Efl.Io.Writer_Fd, Efl.Io
32 implements { 32 implements {
33 Efl.Object.finalize; 33 Efl.Object.finalize;
34 Efl.Object.constructor; 34 Efl.Object.constructor;
35 Efl.Object.invalidate;
35 Efl.Object.destructor; 36 Efl.Object.destructor;
36 Efl.Loop_Fd.fd { set; } 37 Efl.Loop_Fd.fd { set; }
37 Efl.Io.Closer.close; 38 Efl.Io.Closer.close;
diff --git a/src/lib/ecore_con/efl_net_socket_ssl.c b/src/lib/ecore_con/efl_net_socket_ssl.c
index a281d0f722..b91f6649d3 100644
--- a/src/lib/ecore_con/efl_net_socket_ssl.c
+++ b/src/lib/ecore_con/efl_net_socket_ssl.c
@@ -445,9 +445,9 @@ _efl_net_socket_ssl_efl_object_constructor(Eo *o, Efl_Net_Socket_Ssl_Data *pd)
445} 445}
446 446
447EOLIAN static void 447EOLIAN static void
448_efl_net_socket_ssl_efl_object_destructor(Eo *o, Efl_Net_Socket_Ssl_Data *pd) 448_efl_net_socket_ssl_efl_object_invalidate(Eo *o, Efl_Net_Socket_Ssl_Data *pd EINA_UNUSED)
449{ 449{
450 if (efl_io_closer_close_on_destructor_get(o) && 450 if (efl_io_closer_close_on_invalidate_get(o) &&
451 (!efl_io_closer_closed_get(o))) 451 (!efl_io_closer_closed_get(o)))
452 { 452 {
453 efl_event_freeze(o); 453 efl_event_freeze(o);
@@ -455,6 +455,12 @@ _efl_net_socket_ssl_efl_object_destructor(Eo *o, Efl_Net_Socket_Ssl_Data *pd)
455 efl_event_thaw(o); 455 efl_event_thaw(o);
456 } 456 }
457 457
458 efl_invalidate(efl_super(o, MY_CLASS));
459}
460
461EOLIAN static void
462_efl_net_socket_ssl_efl_object_destructor(Eo *o, Efl_Net_Socket_Ssl_Data *pd)
463{
458 efl_destructor(efl_super(o, MY_CLASS)); 464 efl_destructor(efl_super(o, MY_CLASS));
459 465
460 pd->torndown = EINA_TRUE; 466 pd->torndown = EINA_TRUE;
@@ -617,15 +623,15 @@ _efl_net_socket_ssl_efl_io_closer_close_on_exec_get(const Eo *o EINA_UNUSED, Efl
617} 623}
618 624
619EOLIAN static void 625EOLIAN static void
620_efl_net_socket_ssl_efl_io_closer_close_on_destructor_set(Eo *o EINA_UNUSED, Efl_Net_Socket_Ssl_Data *pd, Eina_Bool close_on_destructor) 626_efl_net_socket_ssl_efl_io_closer_close_on_invalidate_set(Eo *o EINA_UNUSED, Efl_Net_Socket_Ssl_Data *pd, Eina_Bool close_on_invalidate)
621{ 627{
622 if (pd->sock) efl_io_closer_close_on_destructor_set(pd->sock, close_on_destructor); 628 if (pd->sock) efl_io_closer_close_on_invalidate_set(pd->sock, close_on_invalidate);
623} 629}
624 630
625EOLIAN static Eina_Bool 631EOLIAN static Eina_Bool
626_efl_net_socket_ssl_efl_io_closer_close_on_destructor_get(const Eo *o EINA_UNUSED, Efl_Net_Socket_Ssl_Data *pd) 632_efl_net_socket_ssl_efl_io_closer_close_on_invalidate_get(const Eo *o EINA_UNUSED, Efl_Net_Socket_Ssl_Data *pd)
627{ 633{
628 return pd->sock && efl_io_closer_close_on_destructor_get(pd->sock); 634 return pd->sock && efl_io_closer_close_on_invalidate_get(pd->sock);
629} 635}
630 636
631EOLIAN static const char * 637EOLIAN static const char *
diff --git a/src/lib/ecore_con/efl_net_socket_ssl.eo b/src/lib/ecore_con/efl_net_socket_ssl.eo
index 2e6ee11099..4f461814b3 100644
--- a/src/lib/ecore_con/efl_net_socket_ssl.eo
+++ b/src/lib/ecore_con/efl_net_socket_ssl.eo
@@ -84,12 +84,13 @@ class Efl.Net.Socket_Ssl (Efl.Loop_Consumer, Efl.Net.Socket) {
84 84
85 implements { 85 implements {
86 Efl.Object.constructor; 86 Efl.Object.constructor;
87 Efl.Object.destructor;
88 Efl.Object.finalize; 87 Efl.Object.finalize;
88 Efl.Object.invalidate;
89 Efl.Object.destructor;
89 Efl.Io.Closer.close; 90 Efl.Io.Closer.close;
90 Efl.Io.Closer.closed { get; } 91 Efl.Io.Closer.closed { get; }
91 Efl.Io.Closer.close_on_exec { get; set; } 92 Efl.Io.Closer.close_on_exec { get; set; }
92 Efl.Io.Closer.close_on_destructor { get; set; } 93 Efl.Io.Closer.close_on_invalidate { get; set; }
93 Efl.Io.Reader.read; 94 Efl.Io.Reader.read;
94 Efl.Io.Reader.can_read { get; set; } 95 Efl.Io.Reader.can_read { get; set; }
95 Efl.Io.Reader.eos { get; set; } 96 Efl.Io.Reader.eos { get; set; }
diff --git a/src/lib/ecore_con/efl_net_socket_windows.c b/src/lib/ecore_con/efl_net_socket_windows.c
index 33e166aea1..c69d0a8b6d 100644
--- a/src/lib/ecore_con/efl_net_socket_windows.c
+++ b/src/lib/ecore_con/efl_net_socket_windows.c
@@ -47,7 +47,7 @@ typedef struct _Efl_Net_Socket_Windows_Data
47 Eina_Bool can_write; 47 Eina_Bool can_write;
48 Eina_Bool io_started; 48 Eina_Bool io_started;
49 Eina_Bool close_on_exec; 49 Eina_Bool close_on_exec;
50 Eina_Bool close_on_destructor; 50 Eina_Bool close_on_invalidate;
51} Efl_Net_Socket_Windows_Data; 51} Efl_Net_Socket_Windows_Data;
52 52
53struct _Efl_Net_Socket_Windows_Operation 53struct _Efl_Net_Socket_Windows_Operation
@@ -634,9 +634,9 @@ _efl_net_socket_windows_efl_object_constructor(Eo *o, Efl_Net_Socket_Windows_Dat
634} 634}
635 635
636EOLIAN static void 636EOLIAN static void
637_efl_net_socket_windows_efl_object_destructor(Eo *o, Efl_Net_Socket_Windows_Data *pd) 637_efl_net_socket_windows_efl_object_invalidate(Eo *o, Efl_Net_Socket_Windows_Data *pd)
638{ 638{
639 if (efl_io_closer_close_on_destructor_get(o) && 639 if (efl_io_closer_close_on_invalidate_get(o) &&
640 (!efl_io_closer_closed_get(o))) 640 (!efl_io_closer_closed_get(o)))
641 { 641 {
642 efl_event_freeze(o); 642 efl_event_freeze(o);
@@ -644,6 +644,12 @@ _efl_net_socket_windows_efl_object_destructor(Eo *o, Efl_Net_Socket_Windows_Data
644 efl_event_thaw(o); 644 efl_event_thaw(o);
645 } 645 }
646 646
647 efl_invalidate(efl_super(o, MY_CLASS));
648}
649
650EOLIAN static void
651_efl_net_socket_windows_efl_object_destructor(Eo *o, Efl_Net_Socket_Windows_Data *pd)
652{
647 efl_destructor(efl_super(o, MY_CLASS)); 653 efl_destructor(efl_super(o, MY_CLASS));
648 654
649 eina_stringshare_replace(&pd->address_local, NULL); 655 eina_stringshare_replace(&pd->address_local, NULL);
@@ -748,15 +754,15 @@ _efl_net_socket_windows_efl_io_closer_close_on_exec_get(const Eo *o EINA_UNUSED,
748} 754}
749 755
750EOLIAN static void 756EOLIAN static void
751_efl_net_socket_windows_efl_io_closer_close_on_destructor_set(Eo *o EINA_UNUSED, Efl_Net_Socket_Windows_Data *pd, Eina_Bool close_on_destructor) 757_efl_net_socket_windows_efl_io_closer_close_on_invalidate_set(Eo *o EINA_UNUSED, Efl_Net_Socket_Windows_Data *pd, Eina_Bool close_on_invalidate)
752{ 758{
753 pd->close_on_destructor = close_on_destructor; 759 pd->close_on_invalidate = close_on_invalidate;
754} 760}
755 761
756EOLIAN static Eina_Bool 762EOLIAN static Eina_Bool
757_efl_net_socket_windows_efl_io_closer_close_on_destructor_get(const Eo *o EINA_UNUSED, Efl_Net_Socket_Windows_Data *pd) 763_efl_net_socket_windows_efl_io_closer_close_on_invalidate_get(const Eo *o EINA_UNUSED, Efl_Net_Socket_Windows_Data *pd)
758{ 764{
759 return pd->close_on_destructor; 765 return pd->close_on_invalidate;
760} 766}
761 767
762EOLIAN static Eina_Error 768EOLIAN static Eina_Error
diff --git a/src/lib/ecore_con/efl_net_socket_windows.eo b/src/lib/ecore_con/efl_net_socket_windows.eo
index 8df3b4c860..95cdea693c 100644
--- a/src/lib/ecore_con/efl_net_socket_windows.eo
+++ b/src/lib/ecore_con/efl_net_socket_windows.eo
@@ -14,7 +14,7 @@ class Efl.Net.Socket_Windows (Efl.Loop_Consumer, Efl.Net.Socket) {
14 Efl.Io.Closer.close; 14 Efl.Io.Closer.close;
15 Efl.Io.Closer.closed { get; } 15 Efl.Io.Closer.closed { get; }
16 Efl.Io.Closer.close_on_exec { get; set; } 16 Efl.Io.Closer.close_on_exec { get; set; }
17 Efl.Io.Closer.close_on_destructor { get; set; } 17 Efl.Io.Closer.close_on_invalidate { get; set; }
18 Efl.Io.Reader.read; 18 Efl.Io.Reader.read;
19 Efl.Io.Reader.can_read { get; set; } 19 Efl.Io.Reader.can_read { get; set; }
20 Efl.Io.Reader.eos { get; set; } 20 Efl.Io.Reader.eos { get; set; }
diff --git a/src/lib/ecore_file/ecore_file_download.c b/src/lib/ecore_file/ecore_file_download.c
index 1323dbc8e6..54666693d2 100644
--- a/src/lib/ecore_file/ecore_file_download.c
+++ b/src/lib/ecore_file/ecore_file_download.c
@@ -230,14 +230,14 @@ ecore_file_download_full(const char *url,
230 efl_file_set(efl_added, dst, NULL), 230 efl_file_set(efl_added, dst, NULL),
231 efl_io_file_flags_set(efl_added, O_WRONLY | O_CREAT), 231 efl_io_file_flags_set(efl_added, O_WRONLY | O_CREAT),
232 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE), 232 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE),
233 efl_io_closer_close_on_destructor_set(efl_added, EINA_TRUE), 233 efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE),
234 efl_io_file_mode_set(efl_added, 0644)); 234 efl_io_file_mode_set(efl_added, 0644));
235 EINA_SAFETY_ON_NULL_GOTO(job->output, error_output); 235 EINA_SAFETY_ON_NULL_GOTO(job->output, error_output);
236 236
237 job->copier = efl_add(EFL_IO_COPIER_CLASS, loop, 237 job->copier = efl_add(EFL_IO_COPIER_CLASS, loop,
238 efl_io_copier_source_set(efl_added, job->input), 238 efl_io_copier_source_set(efl_added, job->input),
239 efl_io_copier_destination_set(efl_added, job->output), 239 efl_io_copier_destination_set(efl_added, job->output),
240 efl_io_closer_close_on_destructor_set(efl_added, EINA_TRUE), 240 efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE),
241 efl_event_callback_array_add(efl_added, ecore_file_download_copier_cbs(), job)); 241 efl_event_callback_array_add(efl_added, ecore_file_download_copier_cbs(), job));
242 EINA_SAFETY_ON_NULL_GOTO(job->copier, error_copier); 242 EINA_SAFETY_ON_NULL_GOTO(job->copier, error_copier);
243 243
diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index d4b11617ce..babf033a17 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -745,21 +745,21 @@ ecore_ipc_server_connect(Ecore_Ipc_Type type, char *name, int port, const void *
745 goto error_dialer; 745 goto error_dialer;
746 } 746 }
747 747
748 efl_io_closer_close_on_destructor_set(svr->dialer.dialer, EINA_TRUE); 748 efl_io_closer_close_on_invalidate_set(svr->dialer.dialer, EINA_TRUE);
749 efl_event_callback_array_add(svr->dialer.dialer, _ecore_ipc_dialer_cbs(), svr); 749 efl_event_callback_array_add(svr->dialer.dialer, _ecore_ipc_dialer_cbs(), svr);
750 750
751 svr->dialer.input = efl_add(EFL_IO_QUEUE_CLASS, loop); 751 svr->dialer.input = efl_add(EFL_IO_QUEUE_CLASS, loop);
752 EINA_SAFETY_ON_NULL_GOTO(svr->dialer.input, error); 752 EINA_SAFETY_ON_NULL_GOTO(svr->dialer.input, error);
753 753
754 svr->dialer.send_copier = efl_add(EFL_IO_COPIER_CLASS, loop, 754 svr->dialer.send_copier = efl_add(EFL_IO_COPIER_CLASS, loop,
755 efl_io_closer_close_on_destructor_set(efl_added, EINA_FALSE), 755 efl_io_closer_close_on_invalidate_set(efl_added, EINA_FALSE),
756 efl_io_copier_source_set(efl_added, svr->dialer.input), 756 efl_io_copier_source_set(efl_added, svr->dialer.input),
757 efl_io_copier_destination_set(efl_added, svr->dialer.dialer), 757 efl_io_copier_destination_set(efl_added, svr->dialer.dialer),
758 efl_event_callback_array_add(efl_added, _ecore_ipc_dialer_copier_cbs(), svr)); 758 efl_event_callback_array_add(efl_added, _ecore_ipc_dialer_copier_cbs(), svr));
759 EINA_SAFETY_ON_NULL_GOTO(svr->dialer.send_copier, error); 759 EINA_SAFETY_ON_NULL_GOTO(svr->dialer.send_copier, error);
760 760
761 svr->dialer.recv_copier = efl_add(EFL_IO_COPIER_CLASS, loop, 761 svr->dialer.recv_copier = efl_add(EFL_IO_COPIER_CLASS, loop,
762 efl_io_closer_close_on_destructor_set(efl_added, EINA_FALSE), 762 efl_io_closer_close_on_invalidate_set(efl_added, EINA_FALSE),
763 efl_io_copier_source_set(efl_added, svr->dialer.dialer), 763 efl_io_copier_source_set(efl_added, svr->dialer.dialer),
764 efl_event_callback_array_add(efl_added, _ecore_ipc_dialer_copier_cbs(), svr), 764 efl_event_callback_array_add(efl_added, _ecore_ipc_dialer_copier_cbs(), svr),
765 efl_event_callback_add(efl_added, EFL_IO_COPIER_EVENT_DATA, _ecore_ipc_dialer_copier_data, svr)); 765 efl_event_callback_add(efl_added, EFL_IO_COPIER_EVENT_DATA, _ecore_ipc_dialer_copier_data, svr));
@@ -1343,14 +1343,14 @@ _ecore_ipc_server_client_add(void *data, const Efl_Event *event)
1343 EINA_SAFETY_ON_NULL_GOTO(cl->socket.input, error); 1343 EINA_SAFETY_ON_NULL_GOTO(cl->socket.input, error);
1344 1344
1345 cl->socket.send_copier = efl_add(EFL_IO_COPIER_CLASS, loop, 1345 cl->socket.send_copier = efl_add(EFL_IO_COPIER_CLASS, loop,
1346 efl_io_closer_close_on_destructor_set(efl_added, EINA_FALSE), 1346 efl_io_closer_close_on_invalidate_set(efl_added, EINA_FALSE),
1347 efl_io_copier_source_set(efl_added, cl->socket.input), 1347 efl_io_copier_source_set(efl_added, cl->socket.input),
1348 efl_io_copier_destination_set(efl_added, cl->socket.socket), 1348 efl_io_copier_destination_set(efl_added, cl->socket.socket),
1349 efl_event_callback_array_add(efl_added, _ecore_ipc_client_socket_copier_cbs(), cl)); 1349 efl_event_callback_array_add(efl_added, _ecore_ipc_client_socket_copier_cbs(), cl));
1350 EINA_SAFETY_ON_NULL_GOTO(cl->socket.send_copier, error); 1350 EINA_SAFETY_ON_NULL_GOTO(cl->socket.send_copier, error);
1351 1351
1352 cl->socket.recv_copier = efl_add(EFL_IO_COPIER_CLASS, loop, 1352 cl->socket.recv_copier = efl_add(EFL_IO_COPIER_CLASS, loop,
1353 efl_io_closer_close_on_destructor_set(efl_added, EINA_FALSE), 1353 efl_io_closer_close_on_invalidate_set(efl_added, EINA_FALSE),
1354 efl_io_copier_source_set(efl_added, cl->socket.socket), 1354 efl_io_copier_source_set(efl_added, cl->socket.socket),
1355 efl_event_callback_array_add(efl_added, _ecore_ipc_client_socket_copier_cbs(), cl), 1355 efl_event_callback_array_add(efl_added, _ecore_ipc_client_socket_copier_cbs(), cl),
1356 efl_event_callback_add(efl_added, EFL_IO_COPIER_EVENT_DATA, _ecore_ipc_client_socket_copier_data, cl)); 1356 efl_event_callback_add(efl_added, EFL_IO_COPIER_EVENT_DATA, _ecore_ipc_client_socket_copier_data, cl));
diff --git a/src/lib/efl/interfaces/efl_io_buffer.c b/src/lib/efl/interfaces/efl_io_buffer.c
index 5a0a0d10ba..c0c505e6b8 100644
--- a/src/lib/efl/interfaces/efl_io_buffer.c
+++ b/src/lib/efl/interfaces/efl_io_buffer.c
@@ -356,12 +356,12 @@ _efl_io_buffer_efl_io_closer_close_on_exec_get(const Eo *o EINA_UNUSED, Efl_Io_B
356} 356}
357 357
358EOLIAN static void 358EOLIAN static void
359_efl_io_buffer_efl_io_closer_close_on_destructor_set(Eo *o EINA_UNUSED, Efl_Io_Buffer_Data *pd EINA_UNUSED, Eina_Bool close_on_destructor EINA_UNUSED) 359_efl_io_buffer_efl_io_closer_close_on_invalidate_set(Eo *o EINA_UNUSED, Efl_Io_Buffer_Data *pd EINA_UNUSED, Eina_Bool close_on_invalidate EINA_UNUSED)
360{ 360{
361} 361}
362 362
363EOLIAN static Eina_Bool 363EOLIAN static Eina_Bool
364_efl_io_buffer_efl_io_closer_close_on_destructor_get(const Eo *o EINA_UNUSED, Efl_Io_Buffer_Data *pd EINA_UNUSED) 364_efl_io_buffer_efl_io_closer_close_on_invalidate_get(const Eo *o EINA_UNUSED, Efl_Io_Buffer_Data *pd EINA_UNUSED)
365{ 365{
366 return EINA_TRUE; 366 return EINA_TRUE;
367} 367}
diff --git a/src/lib/efl/interfaces/efl_io_buffer.eo b/src/lib/efl/interfaces/efl_io_buffer.eo
index 75358d7bb3..428d45aeaa 100644
--- a/src/lib/efl/interfaces/efl_io_buffer.eo
+++ b/src/lib/efl/interfaces/efl_io_buffer.eo
@@ -153,7 +153,7 @@ class Efl.Io.Buffer (Efl.Object, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer, Ef
153 Efl.Io.Closer.close; 153 Efl.Io.Closer.close;
154 Efl.Io.Closer.closed { get; } 154 Efl.Io.Closer.closed { get; }
155 Efl.Io.Closer.close_on_exec { get; set; } 155 Efl.Io.Closer.close_on_exec { get; set; }
156 Efl.Io.Closer.close_on_destructor { get; set; } 156 Efl.Io.Closer.close_on_invalidate { get; set; }
157 Efl.Io.Sizer.resize; 157 Efl.Io.Sizer.resize;
158 Efl.Io.Sizer.size { get; } 158 Efl.Io.Sizer.size { get; }
159 Efl.Io.Positioner.seek; 159 Efl.Io.Positioner.seek;
diff --git a/src/lib/efl/interfaces/efl_io_closer.eo b/src/lib/efl/interfaces/efl_io_closer.eo
index f14c94401f..863be86c31 100644
--- a/src/lib/efl/interfaces/efl_io_closer.eo
+++ b/src/lib/efl/interfaces/efl_io_closer.eo
@@ -59,16 +59,16 @@ mixin Efl.Io.Closer {
59 } 59 }
60 } 60 }
61 61
62 @property close_on_destructor { 62 @property close_on_invalidate {
63 [[If true will automatically close() on object destructor. 63 [[If true will automatically close() on object invalidate.
64 64
65 If the object was deleted without close, this property 65 If the object was disconnected from its parent (including the main loop) without close,
66 will state whenever it should be closed or not. 66 this property will state whenever it should be closed or not.
67 ]] 67 ]]
68 get @pure_virtual { } 68 get @pure_virtual { }
69 set @pure_virtual { } 69 set @pure_virtual { }
70 values { 70 values {
71 close_on_destructor: bool; [[$true if close on destructor, $false otherwise]] 71 close_on_invalidate: bool; [[$true if close on invalidate, $false otherwise]]
72 } 72 }
73 } 73 }
74 } 74 }
diff --git a/src/lib/efl/interfaces/efl_io_queue.c b/src/lib/efl/interfaces/efl_io_queue.c
index 9885a5b693..20f3e951ef 100644
--- a/src/lib/efl/interfaces/efl_io_queue.c
+++ b/src/lib/efl/interfaces/efl_io_queue.c
@@ -483,12 +483,12 @@ _efl_io_queue_efl_io_closer_close_on_exec_get(const Eo *o EINA_UNUSED, Efl_Io_Qu
483} 483}
484 484
485EOLIAN static void 485EOLIAN static void
486_efl_io_queue_efl_io_closer_close_on_destructor_set(Eo *o EINA_UNUSED, Efl_Io_Queue_Data *pd EINA_UNUSED, Eina_Bool close_on_destructor EINA_UNUSED) 486_efl_io_queue_efl_io_closer_close_on_invalidate_set(Eo *o EINA_UNUSED, Efl_Io_Queue_Data *pd EINA_UNUSED, Eina_Bool close_on_invalidate EINA_UNUSED)
487{ 487{
488} 488}
489 489
490EOLIAN static Eina_Bool 490EOLIAN static Eina_Bool
491_efl_io_queue_efl_io_closer_close_on_destructor_get(const Eo *o EINA_UNUSED, Efl_Io_Queue_Data *pd EINA_UNUSED) 491_efl_io_queue_efl_io_closer_close_on_invalidate_get(const Eo *o EINA_UNUSED, Efl_Io_Queue_Data *pd EINA_UNUSED)
492{ 492{
493 return EINA_TRUE; 493 return EINA_TRUE;
494} 494}
diff --git a/src/lib/efl/interfaces/efl_io_queue.eo b/src/lib/efl/interfaces/efl_io_queue.eo
index 46bcde493f..f89c683c3e 100644
--- a/src/lib/efl/interfaces/efl_io_queue.eo
+++ b/src/lib/efl/interfaces/efl_io_queue.eo
@@ -116,6 +116,6 @@ class Efl.Io.Queue (Efl.Object, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer) {
116 Efl.Io.Closer.close; 116 Efl.Io.Closer.close;
117 Efl.Io.Closer.closed { get; } 117 Efl.Io.Closer.closed { get; }
118 Efl.Io.Closer.close_on_exec { get; set; } 118 Efl.Io.Closer.close_on_exec { get; set; }
119 Efl.Io.Closer.close_on_destructor { get; set; } 119 Efl.Io.Closer.close_on_invalidate { get; set; }
120 } 120 }
121} 121}
diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c
index bc274ae50d..37f1ef90ae 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -945,7 +945,7 @@ _efl_ui_image_remote_copier_cancel(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd)
945 Eo *copier = sd->remote.copier; 945 Eo *copier = sd->remote.copier;
946 946
947 if (!copier) return; 947 if (!copier) return;
948 /* copier is flagged as close_on_destructor, thus: 948 /* copier is flagged as close_on_invalidate, thus:
949 * efl_del() 949 * efl_del()
950 * -> efl_io_closer_close() 950 * -> efl_io_closer_close()
951 * -> "done" event 951 * -> "done" event
@@ -1056,7 +1056,7 @@ _efl_ui_image_download(Eo *obj, Efl_Ui_Image_Data *sd, const char *url, const ch
1056 1056
1057 sd->remote.copier = efl_add(EFL_IO_COPIER_CLASS, obj, 1057 sd->remote.copier = efl_add(EFL_IO_COPIER_CLASS, obj,
1058 efl_io_copier_source_set(efl_added, dialer), 1058 efl_io_copier_source_set(efl_added, dialer),
1059 efl_io_closer_close_on_destructor_set(efl_added, EINA_TRUE), 1059 efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE),
1060 efl_event_callback_array_add(efl_added, _efl_ui_image_remote_copier_cbs(), obj)); 1060 efl_event_callback_array_add(efl_added, _efl_ui_image_remote_copier_cbs(), obj));
1061 EINA_SAFETY_ON_NULL_GOTO(sd->remote.copier, error_copier); 1061 EINA_SAFETY_ON_NULL_GOTO(sd->remote.copier, error_copier);
1062 eina_stringshare_replace(&sd->remote.key, key); 1062 eina_stringshare_replace(&sd->remote.key, key);
diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c
index d4426aafd1..183b2712ab 100644
--- a/src/lib/elementary/efl_ui_image_zoomable.c
+++ b/src/lib/elementary/efl_ui_image_zoomable.c
@@ -2221,7 +2221,7 @@ _efl_ui_image_zoomable_remote_copier_cancel(Eo *obj EINA_UNUSED, Efl_Ui_Image_Zo
2221 Eo *copier = sd->remote.copier; 2221 Eo *copier = sd->remote.copier;
2222 2222
2223 if (!copier) return; 2223 if (!copier) return;
2224 /* copier is flagged as close_on_destructor, thus: 2224 /* copier is flagged as close_on_invalidate, thus:
2225 * efl_del() 2225 * efl_del()
2226 * -> efl_io_closer_close() 2226 * -> efl_io_closer_close()
2227 * -> "done" event 2227 * -> "done" event
@@ -2323,7 +2323,7 @@ _efl_ui_image_zoomable_download(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, const c
2323 2323
2324 sd->remote.copier = efl_add(EFL_IO_COPIER_CLASS, obj, 2324 sd->remote.copier = efl_add(EFL_IO_COPIER_CLASS, obj,
2325 efl_io_copier_source_set(efl_added, dialer), 2325 efl_io_copier_source_set(efl_added, dialer),
2326 efl_io_closer_close_on_destructor_set(efl_added, EINA_TRUE), 2326 efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE),
2327 efl_event_callback_array_add(efl_added, _efl_ui_image_zoomable_remote_copier_cbs(), obj)); 2327 efl_event_callback_array_add(efl_added, _efl_ui_image_zoomable_remote_copier_cbs(), obj));
2328 EINA_SAFETY_ON_NULL_GOTO(sd->remote.copier, error_copier); 2328 EINA_SAFETY_ON_NULL_GOTO(sd->remote.copier, error_copier);
2329 2329