summaryrefslogtreecommitdiff
path: root/src/lib/ecore
diff options
context:
space:
mode:
Diffstat (limited to '')
-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_copier.c28
-rw-r--r--src/lib/ecore/efl_io_copier.eo4
-rw-r--r--src/lib/ecore_con/ecore_con_legacy.c8
-rw-r--r--src/lib/ecore_con/efl_net_dialer_simple.c24
-rw-r--r--src/lib/ecore_con/efl_net_dialer_simple.eo2
7 files changed, 40 insertions, 40 deletions
diff --git a/src/lib/ecore/efl_io_buffered_stream.c b/src/lib/ecore/efl_io_buffered_stream.c
index 5930fca902..82de769bf0 100644
--- a/src/lib/ecore/efl_io_buffered_stream.c
+++ b/src/lib/ecore/efl_io_buffered_stream.c
@@ -466,21 +466,21 @@ _efl_io_buffered_stream_line_delimiter_get(Eo *o EINA_UNUSED, Efl_Io_Buffered_St
466} 466}
467 467
468EOLIAN static void 468EOLIAN static void
469_efl_io_buffered_stream_inactivity_timeout_set(Eo *o EINA_UNUSED, Efl_Io_Buffered_Stream_Data *pd, double seconds) 469_efl_io_buffered_stream_timeout_inactivity_set(Eo *o EINA_UNUSED, Efl_Io_Buffered_Stream_Data *pd, double seconds)
470{ 470{
471 if (pd->receiver) 471 if (pd->receiver)
472 efl_io_copier_inactivity_timeout_set(pd->receiver, seconds); 472 efl_io_copier_timeout_inactivity_set(pd->receiver, seconds);
473 if (pd->sender) 473 if (pd->sender)
474 efl_io_copier_inactivity_timeout_set(pd->sender, seconds); 474 efl_io_copier_timeout_inactivity_set(pd->sender, seconds);
475} 475}
476 476
477EOLIAN static double 477EOLIAN static double
478_efl_io_buffered_stream_inactivity_timeout_get(Eo *o EINA_UNUSED, Efl_Io_Buffered_Stream_Data *pd) 478_efl_io_buffered_stream_timeout_inactivity_get(Eo *o EINA_UNUSED, Efl_Io_Buffered_Stream_Data *pd)
479{ 479{
480 if (pd->receiver) 480 if (pd->receiver)
481 return efl_io_copier_inactivity_timeout_get(pd->receiver); 481 return efl_io_copier_timeout_inactivity_get(pd->receiver);
482 if (pd->sender) 482 if (pd->sender)
483 return efl_io_copier_inactivity_timeout_get(pd->sender); 483 return efl_io_copier_timeout_inactivity_get(pd->sender);
484 return 0.0; 484 return 0.0;
485} 485}
486 486
diff --git a/src/lib/ecore/efl_io_buffered_stream.eo b/src/lib/ecore/efl_io_buffered_stream.eo
index e8a7b52e46..fd8f1a9859 100644
--- a/src/lib/ecore/efl_io_buffered_stream.eo
+++ b/src/lib/ecore/efl_io_buffered_stream.eo
@@ -91,7 +91,7 @@ class Efl.Io.Buffered_Stream (Efl.Loop_User, Efl.Io.Reader, Efl.Io.Writer, Efl.I
91 } 91 }
92 } 92 }
93 93
94 @property inactivity_timeout { 94 @property timeout_inactivity {
95 [[Error as ETIMEDOUT if it becomes inactive for some time. 95 [[Error as ETIMEDOUT if it becomes inactive for some time.
96 96
97 If no activity, that is no read or write in the given 97 If no activity, that is no read or write in the given
diff --git a/src/lib/ecore/efl_io_copier.c b/src/lib/ecore/efl_io_copier.c
index f315de31ce..d170a19dce 100644
--- a/src/lib/ecore/efl_io_copier.c
+++ b/src/lib/ecore/efl_io_copier.c
@@ -24,7 +24,7 @@ typedef struct _Efl_Io_Copier_Data
24 struct { 24 struct {
25 uint64_t read, written, total; 25 uint64_t read, written, total;
26 } progress; 26 } progress;
27 double inactivity_timeout; 27 double timeout_inactivity;
28 Eina_Bool closed; 28 Eina_Bool closed;
29 Eina_Bool done; 29 Eina_Bool done;
30 Eina_Bool force_dispatch; 30 Eina_Bool force_dispatch;
@@ -73,7 +73,7 @@ static void _efl_io_copier_read(Eo *o, Efl_Io_Copier_Data *pd);
73 while (0) 73 while (0)
74 74
75static void 75static void
76_efl_io_copier_inactivity_timeout_cb(void *data, const Efl_Event *ev EINA_UNUSED) 76_efl_io_copier_timeout_inactivity_cb(void *data, const Efl_Event *ev EINA_UNUSED)
77{ 77{
78 Eo *o = data; 78 Eo *o = data;
79 Eina_Error err = ETIMEDOUT; 79 Eina_Error err = ETIMEDOUT;
@@ -81,13 +81,13 @@ _efl_io_copier_inactivity_timeout_cb(void *data, const Efl_Event *ev EINA_UNUSED
81} 81}
82 82
83static void 83static void
84_efl_io_copier_inactivity_timeout_reschedule(Eo *o, Efl_Io_Copier_Data *pd) 84_efl_io_copier_timeout_inactivity_reschedule(Eo *o, Efl_Io_Copier_Data *pd)
85{ 85{
86 if (pd->inactivity_timer) efl_future_cancel(pd->inactivity_timer); 86 if (pd->inactivity_timer) efl_future_cancel(pd->inactivity_timer);
87 if (pd->inactivity_timeout <= 0.0) return; 87 if (pd->timeout_inactivity <= 0.0) return;
88 88
89 efl_future_use(&pd->inactivity_timer, efl_loop_timeout(efl_loop_get(o), pd->inactivity_timeout, o)); 89 efl_future_use(&pd->inactivity_timer, efl_loop_timeout(efl_loop_get(o), pd->timeout_inactivity, o));
90 efl_future_then(pd->inactivity_timer, _efl_io_copier_inactivity_timeout_cb, NULL, NULL, o); 90 efl_future_then(pd->inactivity_timer, _efl_io_copier_timeout_inactivity_cb, NULL, NULL, o);
91 efl_future_link(o, pd->inactivity_timer); 91 efl_future_link(o, pd->inactivity_timer);
92} 92}
93 93
@@ -117,7 +117,7 @@ _efl_io_copier_job(void *data, const Efl_Event *ev EINA_UNUSED)
117 { 117 {
118 efl_event_callback_call(o, EFL_IO_COPIER_EVENT_PROGRESS, NULL); 118 efl_event_callback_call(o, EFL_IO_COPIER_EVENT_PROGRESS, NULL);
119 if (pd->closed) return; /* cb may call close */ 119 if (pd->closed) return; /* cb may call close */
120 _efl_io_copier_inactivity_timeout_reschedule(o, pd); 120 _efl_io_copier_timeout_inactivity_reschedule(o, pd);
121 } 121 }
122 122
123 if (!pd->source || efl_io_reader_eos_get(pd->source)) 123 if (!pd->source || efl_io_reader_eos_get(pd->source))
@@ -729,16 +729,16 @@ _efl_io_copier_binbuf_steal(Eo *o EINA_UNUSED, Efl_Io_Copier_Data *pd)
729} 729}
730 730
731EOLIAN static void 731EOLIAN static void
732_efl_io_copier_inactivity_timeout_set(Eo *o, Efl_Io_Copier_Data *pd, double seconds) 732_efl_io_copier_timeout_inactivity_set(Eo *o, Efl_Io_Copier_Data *pd, double seconds)
733{ 733{
734 pd->inactivity_timeout = seconds; 734 pd->timeout_inactivity = seconds;
735 _efl_io_copier_inactivity_timeout_reschedule(o, pd); 735 _efl_io_copier_timeout_inactivity_reschedule(o, pd);
736} 736}
737 737
738EOLIAN static double 738EOLIAN static double
739_efl_io_copier_inactivity_timeout_get(Eo *o EINA_UNUSED, Efl_Io_Copier_Data *pd) 739_efl_io_copier_timeout_inactivity_get(Eo *o EINA_UNUSED, Efl_Io_Copier_Data *pd)
740{ 740{
741 return pd->inactivity_timeout; 741 return pd->timeout_inactivity;
742} 742}
743 743
744EOLIAN static Eina_Bool 744EOLIAN static Eina_Bool
@@ -781,7 +781,7 @@ _efl_io_copier_flush(Eo *o, Efl_Io_Copier_Data *pd, Eina_Bool may_block, Eina_Bo
781 { 781 {
782 efl_event_callback_call(o, EFL_IO_COPIER_EVENT_PROGRESS, NULL); 782 efl_event_callback_call(o, EFL_IO_COPIER_EVENT_PROGRESS, NULL);
783 if (pd->closed) return EINA_TRUE; /* cb may call close */ 783 if (pd->closed) return EINA_TRUE; /* cb may call close */
784 _efl_io_copier_inactivity_timeout_reschedule(o, pd); 784 _efl_io_copier_timeout_inactivity_reschedule(o, pd);
785 } 785 }
786 786
787 if (!pd->source || efl_io_reader_eos_get(pd->source)) 787 if (!pd->source || efl_io_reader_eos_get(pd->source))
@@ -834,7 +834,7 @@ _efl_io_copier_efl_object_constructor(Eo *o, Efl_Io_Copier_Data *pd)
834 pd->buf = eina_binbuf_new(); 834 pd->buf = eina_binbuf_new();
835 pd->close_on_exec = EINA_TRUE; 835 pd->close_on_exec = EINA_TRUE;
836 pd->close_on_destructor = EINA_TRUE; 836 pd->close_on_destructor = EINA_TRUE;
837 pd->inactivity_timeout = 0.0; 837 pd->timeout_inactivity = 0.0;
838 838
839 EINA_SAFETY_ON_NULL_RETURN_VAL(pd->buf, NULL); 839 EINA_SAFETY_ON_NULL_RETURN_VAL(pd->buf, NULL);
840 840
diff --git a/src/lib/ecore/efl_io_copier.eo b/src/lib/ecore/efl_io_copier.eo
index 23198e8fc1..33567c797c 100644
--- a/src/lib/ecore/efl_io_copier.eo
+++ b/src/lib/ecore/efl_io_copier.eo
@@ -35,7 +35,7 @@ class Efl.Io.Copier (Efl.Loop_User, Efl.Io.Closer) {
35 - The "error" event is reported if the @Efl.Io.Reader.read, 35 - The "error" event is reported if the @Efl.Io.Reader.read,
36 @Efl.Io.Writer.write or some other internal error happened, 36 @Efl.Io.Writer.write or some other internal error happened,
37 like out of memory. Another common error is ETIMEDOUT if 37 like out of memory. Another common error is ETIMEDOUT if
38 @.inactivity_timeout is set. 38 @.timeout_inactivity is set.
39 39
40 A copier is handful to simplify common I/O use cases, such as: 40 A copier is handful to simplify common I/O use cases, such as:
41 41
@@ -270,7 +270,7 @@ class Efl.Io.Copier (Efl.Loop_User, Efl.Io.Closer) {
270 } 270 }
271 } 271 }
272 272
273 @property inactivity_timeout { 273 @property timeout_inactivity {
274 [[Terminate the copier with ETIMEDOUT if it becomes inactive for some time. 274 [[Terminate the copier with ETIMEDOUT if it becomes inactive for some time.
275 275
276 If the copier cannot do any read or write in the given 276 If the copier cannot do any read or write in the given
diff --git a/src/lib/ecore_con/ecore_con_legacy.c b/src/lib/ecore_con/ecore_con_legacy.c
index fdf6b36220..123cb04b09 100644
--- a/src/lib/ecore_con/ecore_con_legacy.c
+++ b/src/lib/ecore_con/ecore_con_legacy.c
@@ -656,14 +656,14 @@ EAPI void
656ecore_con_client_timeout_set(Ecore_Con_Client *cl, double timeout) 656ecore_con_client_timeout_set(Ecore_Con_Client *cl, double timeout)
657{ 657{
658 ECORE_CON_CLIENT_CHECK_RETURN(cl); 658 ECORE_CON_CLIENT_CHECK_RETURN(cl);
659 efl_io_buffered_stream_inactivity_timeout_set(cl->socket, timeout); 659 efl_io_buffered_stream_timeout_inactivity_set(cl->socket, timeout);
660} 660}
661 661
662EAPI double 662EAPI double
663ecore_con_client_timeout_get(const Ecore_Con_Client *cl) 663ecore_con_client_timeout_get(const Ecore_Con_Client *cl)
664{ 664{
665 ECORE_CON_CLIENT_CHECK_RETURN(cl, -1.0); 665 ECORE_CON_CLIENT_CHECK_RETURN(cl, -1.0);
666 return efl_io_buffered_stream_inactivity_timeout_get(cl->socket); 666 return efl_io_buffered_stream_timeout_inactivity_get(cl->socket);
667} 667}
668 668
669EAPI void * 669EAPI void *
@@ -1775,7 +1775,7 @@ _ecore_con_server_dialer_set(Ecore_Con_Server *svr, Eo *dialer)
1775 svr->dialer = dialer; 1775 svr->dialer = dialer;
1776 efl_io_closer_close_on_exec_set(dialer, EINA_TRUE); 1776 efl_io_closer_close_on_exec_set(dialer, EINA_TRUE);
1777 efl_io_closer_close_on_destructor_set(dialer, EINA_TRUE); 1777 efl_io_closer_close_on_destructor_set(dialer, EINA_TRUE);
1778 efl_io_buffered_stream_inactivity_timeout_set(dialer, svr->timeout); 1778 efl_io_buffered_stream_timeout_inactivity_set(dialer, svr->timeout);
1779 efl_event_callback_array_add(dialer, _ecore_con_server_dialer_cbs(), svr); 1779 efl_event_callback_array_add(dialer, _ecore_con_server_dialer_cbs(), svr);
1780 1780
1781 if (efl_isa(inner_dialer, EFL_NET_DIALER_TCP_CLASS)) 1781 if (efl_isa(inner_dialer, EFL_NET_DIALER_TCP_CLASS))
@@ -2138,7 +2138,7 @@ ecore_con_server_timeout_set(Ecore_Con_Server *svr, double timeout)
2138 svr->timeout = timeout; /* used for new clients */ 2138 svr->timeout = timeout; /* used for new clients */
2139 2139
2140 if (!svr->dialer) return; 2140 if (!svr->dialer) return;
2141 efl_io_buffered_stream_inactivity_timeout_set(svr->dialer, timeout); 2141 efl_io_buffered_stream_timeout_inactivity_set(svr->dialer, timeout);
2142} 2142}
2143 2143
2144EAPI double 2144EAPI double
diff --git a/src/lib/ecore_con/efl_net_dialer_simple.c b/src/lib/ecore_con/efl_net_dialer_simple.c
index 178fe5d26a..317f972862 100644
--- a/src/lib/ecore_con/efl_net_dialer_simple.c
+++ b/src/lib/ecore_con/efl_net_dialer_simple.c
@@ -11,7 +11,7 @@ typedef struct
11 const Efl_Class *inner_class; 11 const Efl_Class *inner_class;
12 Eina_Stringshare *proxy_url; 12 Eina_Stringshare *proxy_url;
13 double dial_timeout; 13 double dial_timeout;
14 double inactivity_timeout; 14 double timeout_inactivity;
15 size_t max_queue_size_input; 15 size_t max_queue_size_input;
16 size_t max_queue_size_output; 16 size_t max_queue_size_output;
17 size_t read_chunk_size; 17 size_t read_chunk_size;
@@ -19,7 +19,7 @@ typedef struct
19 struct { 19 struct {
20 Eina_Bool proxy_url; 20 Eina_Bool proxy_url;
21 Eina_Bool dial_timeout; 21 Eina_Bool dial_timeout;
22 Eina_Bool inactivity_timeout; 22 Eina_Bool timeout_inactivity;
23 Eina_Bool max_queue_size_input; 23 Eina_Bool max_queue_size_input;
24 Eina_Bool max_queue_size_output; 24 Eina_Bool max_queue_size_output;
25 Eina_Bool read_chunk_size; 25 Eina_Bool read_chunk_size;
@@ -132,10 +132,10 @@ _efl_net_dialer_simple_efl_io_buffered_stream_inner_io_set(Eo *o, Efl_Net_Dialer
132 } 132 }
133 133
134 /* apply pending io buffered stream (own) values */ 134 /* apply pending io buffered stream (own) values */
135 if (pd->pending.inactivity_timeout) 135 if (pd->pending.timeout_inactivity)
136 { 136 {
137 pd->pending.inactivity_timeout = EINA_FALSE; 137 pd->pending.timeout_inactivity = EINA_FALSE;
138 efl_io_buffered_stream_inactivity_timeout_set(o, pd->inactivity_timeout); 138 efl_io_buffered_stream_timeout_inactivity_set(o, pd->timeout_inactivity);
139 } 139 }
140 if (pd->pending.max_queue_size_input) 140 if (pd->pending.max_queue_size_input)
141 { 141 {
@@ -224,25 +224,25 @@ _efl_net_dialer_simple_efl_net_dialer_timeout_dial_get(Eo *o, Efl_Net_Dialer_Sim
224} 224}
225 225
226EOLIAN static void 226EOLIAN static void
227_efl_net_dialer_simple_efl_io_buffered_stream_inactivity_timeout_set(Eo *o, Efl_Net_Dialer_Simple_Data *pd, double seconds) 227_efl_net_dialer_simple_efl_io_buffered_stream_timeout_inactivity_set(Eo *o, Efl_Net_Dialer_Simple_Data *pd, double seconds)
228{ 228{
229 Eo *inner_io = efl_io_buffered_stream_inner_io_get(o); 229 Eo *inner_io = efl_io_buffered_stream_inner_io_get(o);
230 230
231 if (!inner_io) 231 if (!inner_io)
232 { 232 {
233 pd->inactivity_timeout = seconds; 233 pd->timeout_inactivity = seconds;
234 pd->pending.inactivity_timeout = EINA_TRUE; 234 pd->pending.timeout_inactivity = EINA_TRUE;
235 return; 235 return;
236 } 236 }
237 efl_io_buffered_stream_inactivity_timeout_set(efl_super(o, MY_CLASS), seconds); 237 efl_io_buffered_stream_timeout_inactivity_set(efl_super(o, MY_CLASS), seconds);
238} 238}
239 239
240EOLIAN static double 240EOLIAN static double
241_efl_net_dialer_simple_efl_io_buffered_stream_inactivity_timeout_get(Eo *o, Efl_Net_Dialer_Simple_Data *pd) 241_efl_net_dialer_simple_efl_io_buffered_stream_timeout_inactivity_get(Eo *o, Efl_Net_Dialer_Simple_Data *pd)
242{ 242{
243 Eo *inner_io = efl_io_buffered_stream_inner_io_get(o); 243 Eo *inner_io = efl_io_buffered_stream_inner_io_get(o);
244 if (!inner_io) return pd->inactivity_timeout; 244 if (!inner_io) return pd->timeout_inactivity;
245 return efl_io_buffered_stream_inactivity_timeout_get(efl_super(o, MY_CLASS)); 245 return efl_io_buffered_stream_timeout_inactivity_get(efl_super(o, MY_CLASS));
246} 246}
247 247
248EOLIAN static void 248EOLIAN static void
diff --git a/src/lib/ecore_con/efl_net_dialer_simple.eo b/src/lib/ecore_con/efl_net_dialer_simple.eo
index f54b13e836..2d51234759 100644
--- a/src/lib/ecore_con/efl_net_dialer_simple.eo
+++ b/src/lib/ecore_con/efl_net_dialer_simple.eo
@@ -76,7 +76,7 @@ class Efl.Net.Dialer.Simple (Efl.Net.Socket.Simple, Efl.Net.Dialer) {
76 Efl.Net.Dialer.connected.get; 76 Efl.Net.Dialer.connected.get;
77 Efl.Net.Dialer.proxy; 77 Efl.Net.Dialer.proxy;
78 Efl.Net.Dialer.timeout_dial; 78 Efl.Net.Dialer.timeout_dial;
79 Efl.Io.Buffered_Stream.inactivity_timeout; 79 Efl.Io.Buffered_Stream.timeout_inactivity;
80 Efl.Io.Buffered_Stream.max_queue_size_input; 80 Efl.Io.Buffered_Stream.max_queue_size_input;
81 Efl.Io.Buffered_Stream.max_queue_size_output; 81 Efl.Io.Buffered_Stream.max_queue_size_output;
82 Efl.Io.Buffered_Stream.read_chunk_size; 82 Efl.Io.Buffered_Stream.read_chunk_size;