[EGIT] [tools/edi] master 01/01: ui: Reset search term when activating search

2016-11-25 Thread Andy Williams
ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=9a0b7e8d53aceddaea962ec181d57dfaf0405cb2

commit 9a0b7e8d53aceddaea962ec181d57dfaf0405cb2
Author: Andy Williams 
Date:   Sat Nov 26 02:20:35 2016 +

ui: Reset search term when activating search
---
 src/bin/editor/edi_editor_search.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/editor/edi_editor_search.c 
b/src/bin/editor/edi_editor_search.c
index ba591b4..8bb0c62 100644
--- a/src/bin/editor/edi_editor_search.c
+++ b/src/bin/editor/edi_editor_search.c
@@ -188,6 +188,7 @@ edi_editor_search(Edi_Editor *editor)
   elm_object_disabled_set(search->replace_btn, EINA_TRUE);
  }
 
+   elm_object_text_set(search->entry, "");
elm_object_focus_set(search->entry, EINA_TRUE);
 }
 

-- 




[EGIT] [core/efl] master 01/01: efl_debug (client and server): now on top of efl_net_{server, dialer}_simple.

2016-11-25 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a8d1aa14413aa95349636172b5aaad3510e68b54

commit a8d1aa14413aa95349636172b5aaad3510e68b54
Author: Gustavo Sverzut Barbieri 
Date:   Fri Nov 25 19:39:01 2016 -0200

efl_debug (client and server): now on top of efl_net_{server,dialer}_simple.

Much simpler! :-D
---
 src/bin/efl/efl_debug.c|  81 ++--
 src/bin/efl/efl_debug_common.c |  70 +++
 src/bin/efl/efl_debug_common.h |  28 ++-
 src/bin/efl/efl_debugd.c   | 448 ++---
 4 files changed, 429 insertions(+), 198 deletions(-)

diff --git a/src/bin/efl/efl_debug.c b/src/bin/efl/efl_debug.c
index 5c0ee95..177dfa9 100644
--- a/src/bin/efl/efl_debug.c
+++ b/src/bin/efl/efl_debug.c
@@ -16,8 +16,6 @@
  * if not, see .
  */
 
-#define EFL_BETA_API_SUPPORT 1
-#define EFL_EO_API_SUPPORT 1
 #include "efl_debug_common.h"
 
 static Eo *dialer;
@@ -26,19 +24,15 @@ static Eina_List *waiting;
 
 static int retval = EXIT_SUCCESS;
 
-static const char CLST[4] = "CLST";
-
 static void
-_process_reply(const char op[static 4], const Eina_Slice payload)
+_process_reply(void *data EINA_UNUSED, const char op[static 4], const 
Eina_Slice payload)
 {
-#define IS_OP(x) memcmp(op, x, 4) == 0
-
if (IS_OP(CLST))
  {
 int mypid = getpid();
 size_t offset;
 
-waiting = eina_list_remove(waiting, CLST);
+waiting = eina_list_remove(waiting, OP_CLST);
 
 for (offset = 0; offset + sizeof(int) <= payload.len; offset += 
sizeof(int))
   {
@@ -57,76 +51,23 @@ _process_reply(const char op[static 4], const Eina_Slice 
payload)
  }
 
if (!waiting) ecore_main_loop_quit();
-
-#undef IS_OP
 }
 
 static void
 _on_data(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
 {
-   Eina_Slice slice, payload;
-   Efl_Debug_Message_Header msgheader;
-
-   if (!efl_io_buffered_stream_slice_get(dialer, ))
- return;
-
-   if (slice.len < sizeof(msgheader))
- return;
-
-   memcpy(, slice.mem, sizeof(msgheader));
-   if (msgheader.size < 4) /* must contain at last 4 byte opcode */
+   if (!received_data(dialer, _process_reply, NULL))
  {
-fprintf(stderr, "ERROR: invalid message header, size=%u\n", 
msgheader.size);
 retval = EXIT_FAILURE;
 ecore_main_loop_quit();
-return;
  }
-
-   if (msgheader.size + 4 > slice.len)
- return;
-
-   payload.bytes = slice.bytes + sizeof(msgheader);
-   payload.len = msgheader.size - 4;
-
-   _process_reply(msgheader.op, payload);
-
-   efl_io_buffered_stream_discard(dialer, sizeof(msgheader) + payload.len);
 }
 
 static Eina_Bool
 _command_send(const char op[static 4], const void *data, unsigned int len)
 {
-   Eina_Error err;
-   Efl_Debug_Message_Header msghdr = {
- .size = 4 + len,
-   };
-   Eina_Slice s, r;
-
-   memcpy(msghdr.op, op, 4);
-
-   s.mem = 
-   s.len = sizeof(msghdr);
-
-   err = efl_io_writer_write(dialer, , );
-   if (err || r.len) goto end;
-
-   if (!len) goto end;
-
-   s.mem = data;
-   s.len = len;
-   err = efl_io_writer_write(dialer, , );
-
- end:
-   if (err)
+   if (!send_data(dialer, op, data, len))
  {
-fprintf(stderr, "ERROR: could not queue message '%.4s': %s\n", op, 
eina_error_msg_get(err));
-retval = EXIT_FAILURE;
-return EINA_FALSE;
- }
-
-   if (r.len)
- {
-fprintf(stderr, "ERROR: could not queue message '%.4s': out of 
memory\n", op);
 retval = EXIT_FAILURE;
 return EINA_FALSE;
  }
@@ -134,6 +75,8 @@ _command_send(const char op[static 4], const void *data, 
unsigned int len)
return EINA_TRUE;
 }
 
+#define command_send(op, data, len) _command_send(OP_ ## op, data, len)
+
 static void
 _write_finished(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
 {
@@ -234,9 +177,9 @@ main(int argc, char **argv)
 
 if (strcmp(cmd, "list") == 0)
   {
- if (!_command_send("LIST", NULL, 0))
+ if (!command_send(LIST, NULL, 0))
goto end;
- waiting = eina_list_append(waiting, CLST);
+ waiting = eina_list_append(waiting, OP_CLST);
   }
 else if (strcmp(cmd, "pon") == 0)
   {
@@ -249,7 +192,7 @@ main(int argc, char **argv)
  else
{
   int data[2] = {atoi(argv[i + 1]), atoi(argv[1 + 2])};
-  if (!_command_send("PLON", data, sizeof(data)))
+  if (!command_send(PLON, data, sizeof(data)))
 goto end;
   i += 2;
}
@@ -265,7 +208,7 @@ main(int argc, char **argv)
  else
{
   int data[1] = {atoi(argv[i + 1])};
-  if (!_command_send("PLOFF", data, sizeof(data)))
+  if (!command_send(PLOF, data, sizeof(data)))
 goto end;
  

[EGIT] [core/efl] master 01/01: efl_net_server_unix: add leading_directories_create property.

2016-11-25 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=48049a4ce24d9bc71cdd73033f2fa6c6281f3b87

commit 48049a4ce24d9bc71cdd73033f2fa6c6281f3b87
Author: Gustavo Sverzut Barbieri 
Date:   Fri Nov 25 18:01:29 2016 -0200

efl_net_server_unix: add leading_directories_create property.

This allows us to crete any parent directories that are missing.
---
 src/lib/ecore_con/ecore_con_local.c  |  2 +-
 src/lib/ecore_con/ecore_con_private.h|  2 ++
 src/lib/ecore_con/efl_net_server_unix.c  | 20 
 src/lib/ecore_con/efl_net_server_unix.eo | 12 +++
 src/lib/ecore_ipc/ecore_ipc.c| 56 ++--
 5 files changed, 37 insertions(+), 55 deletions(-)

diff --git a/src/lib/ecore_con/ecore_con_local.c 
b/src/lib/ecore_con/ecore_con_local.c
index 3bf9b97..1cccf04 100644
--- a/src/lib/ecore_con/ecore_con_local.c
+++ b/src/lib/ecore_con/ecore_con_local.c
@@ -229,7 +229,7 @@ error:
 }
 
 #ifdef HAVE_LOCAL_SOCKETS
-static void
+void
 _ecore_con_local_mkpath(const char *path, mode_t mode)
 {
char *s, *d, *itr;
diff --git a/src/lib/ecore_con/ecore_con_private.h 
b/src/lib/ecore_con/ecore_con_private.h
index 391204f..45864da 100644
--- a/src/lib/ecore_con/ecore_con_private.h
+++ b/src/lib/ecore_con/ecore_con_private.h
@@ -386,6 +386,8 @@ void ecore_con_mempool_shutdown(void);
 
 #undef GENERIC_ALLOC_FREE_HEADER
 
+void _ecore_con_local_mkpath(const char *path, mode_t mode);
+
 /* allow windows and posix to use the same error comparison */
 #ifndef SOCKET_ERROR
 #define SOCKET_ERROR -1
diff --git a/src/lib/ecore_con/efl_net_server_unix.c 
b/src/lib/ecore_con/efl_net_server_unix.c
index 53deb4d..b407d91 100644
--- a/src/lib/ecore_con/efl_net_server_unix.c
+++ b/src/lib/ecore_con/efl_net_server_unix.c
@@ -24,6 +24,8 @@
 
 typedef struct _Efl_Net_Server_Unix_Data
 {
+   unsigned int leading_directories_create_mode;
+   Eina_Bool leading_directories_create;
Eina_Bool unlink_before_bind;
 } Efl_Net_Server_Unix_Data;
 
@@ -54,6 +56,9 @@ _efl_net_server_unix_bind(Eo *o, Efl_Net_Server_Unix_Data *pd)
 
efl_net_server_fd_family_set(o, AF_UNIX);
 
+   if (pd->leading_directories_create)
+ _ecore_con_local_mkpath(address, pd->leading_directories_create_mode);
+
do
  {
 fd = efl_net_socket4(AF_UNIX, SOCK_STREAM, 0,
@@ -272,4 +277,19 @@ _efl_net_server_unix_unlink_before_bind_get(Eo *o 
EINA_UNUSED, Efl_Net_Server_Un
return pd->unlink_before_bind;
 }
 
+
+static void
+_efl_net_server_unix_leading_directories_create_set(Eo *o EINA_UNUSED, 
Efl_Net_Server_Unix_Data *pd, Eina_Bool do_it, unsigned int mode)
+{
+   pd->leading_directories_create = do_it;
+   pd->leading_directories_create_mode = mode;
+}
+
+static void
+_efl_net_server_unix_leading_directories_create_get(Eo *o EINA_UNUSED, 
Efl_Net_Server_Unix_Data *pd, Eina_Bool *do_it, unsigned int *mode)
+{
+   if (do_it) *do_it = pd->leading_directories_create;
+   if (mode) *mode = pd->leading_directories_create_mode;
+}
+
 #include "efl_net_server_unix.eo.c"
diff --git a/src/lib/ecore_con/efl_net_server_unix.eo 
b/src/lib/ecore_con/efl_net_server_unix.eo
index accd0792..69a3e39 100644
--- a/src/lib/ecore_con/efl_net_server_unix.eo
+++ b/src/lib/ecore_con/efl_net_server_unix.eo
@@ -23,6 +23,18 @@ class Efl.Net.Server.Unix (Efl.Net.Server.Fd) {
 unlink_before_bind: bool; [[If $true, server will unlink() the 
path before bind() is called.]]
 }
 }
+
+@property leading_directories_create {
+[[If $true, all parent directories will be created with given mode.
+
+  This is only effective before @Efl.Net.Server.serve is
+  called as it is used from inside that method.
+]]
+values {
+leading_directories_create: bool; [[If $true, create missing 
parent directories. Do nothing if $false]]
+mode: uint; [[The file system permissions to use (file mode)]]
+}
+}
 }
 
 implements {
diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index e4287aa..8b62435 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -438,56 +438,6 @@ ecore_ipc_server_add_legacy(Ecore_Ipc_Type compl_type, 
const char *name, int por
ECORE_MAGIC_SET(svr, ECORE_MAGIC_IPC_SERVER);
return svr;
 }
-#else
-static Eina_Bool
-_ecore_ipc_local_mkpath(const char *path, mode_t mode)
-{
-   Eina_Bool ret = EINA_FALSE;
-   char *s, *d, *itr;
-
-   if (!path) return EINA_FALSE;
-   EINA_SAFETY_ON_TRUE_RETURN_VAL(path[0] != '/', EINA_FALSE);
-
-   s = strdup(path);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(s, EINA_FALSE);
-   d = dirname(s);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(d, EINA_FALSE);
-
-   for (itr = d + 1; *itr != '\0'; itr++)
- {
-if (*itr == '/')
-  {
- *itr = '\0';
- if (mkdir(d, mode) != 0)
-   {
- 

[EGIT] [core/efl] master 01/01: efl_debug: use new efl_net_dialer_simple, remove lots of code.

2016-11-25 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3346e6973b5e831e0db6ad3cd9034d5f6b663799

commit 3346e6973b5e831e0db6ad3cd9034d5f6b663799
Author: Gustavo Sverzut Barbieri 
Date:   Fri Nov 25 17:42:17 2016 -0200

efl_debug: use new efl_net_dialer_simple, remove lots of code.

this is what led me to create the efl_net_dialer_simple, this kind of
code was being repeated in too many places.
---
 src/bin/efl/efl_debug.c | 77 +
 1 file changed, 14 insertions(+), 63 deletions(-)

diff --git a/src/bin/efl/efl_debug.c b/src/bin/efl/efl_debug.c
index 4cb4b03..5c0ee95 100644
--- a/src/bin/efl/efl_debug.c
+++ b/src/bin/efl/efl_debug.c
@@ -21,10 +21,6 @@
 #include "efl_debug_common.h"
 
 static Eo *dialer;
-static Eo *input;
-static Eo *output;
-static Eo *send_copier;
-static Eo *recv_copier;
 
 static Eina_List *waiting;
 
@@ -71,7 +67,7 @@ _on_data(void *data EINA_UNUSED, const Efl_Event *event 
EINA_UNUSED)
Eina_Slice slice, payload;
Efl_Debug_Message_Header msgheader;
 
-   if (!efl_io_queue_slice_get(output, ))
+   if (!efl_io_buffered_stream_slice_get(dialer, ))
  return;
 
if (slice.len < sizeof(msgheader))
@@ -94,7 +90,7 @@ _on_data(void *data EINA_UNUSED, const Efl_Event *event 
EINA_UNUSED)
 
_process_reply(msgheader.op, payload);
 
-   efl_io_queue_discard(output, sizeof(msgheader) + payload.len);
+   efl_io_buffered_stream_discard(dialer, sizeof(msgheader) + payload.len);
 }
 
 static Eina_Bool
@@ -111,14 +107,14 @@ _command_send(const char op[static 4], const void *data, 
unsigned int len)
s.mem = 
s.len = sizeof(msghdr);
 
-   err = efl_io_writer_write(input, , );
+   err = efl_io_writer_write(dialer, , );
if (err || r.len) goto end;
 
if (!len) goto end;
 
s.mem = data;
s.len = len;
-   err = efl_io_writer_write(input, , );
+   err = efl_io_writer_write(dialer, , );
 
  end:
if (err)
@@ -139,19 +135,19 @@ _command_send(const char op[static 4], const void *data, 
unsigned int len)
 }
 
 static void
-_finished_sending(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
+_write_finished(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
 {
if (!waiting) ecore_main_loop_quit();
 }
 
 static void
-_dialer_eos(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
+_finished(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
 {
ecore_main_loop_quit();
 }
 
 static void
-_dialer_error(void *data EINA_UNUSED, const Efl_Event *event)
+_error(void *data EINA_UNUSED, const Efl_Event *event)
 {
Eina_Error *perr = event->info;
 
@@ -213,7 +209,8 @@ main(int argc, char **argv)
loop = ecore_main_loop_get();
 
 #ifdef EFL_NET_DIALER_UNIX_CLASS
-   dialer = efl_add(EFL_NET_DIALER_UNIX_CLASS, loop);
+   dialer = efl_add(EFL_NET_DIALER_SIMPLE_CLASS, loop,
+efl_net_dialer_simple_inner_class_set(efl_added, 
EFL_NET_DIALER_UNIX_CLASS));
 #else
/* TODO: maybe start a TCP using locahost:12345?
 * Right now eina_debug_monitor is only for AF_UNIX, so not an issue.
@@ -226,48 +223,10 @@ main(int argc, char **argv)
 retval = EXIT_FAILURE;
 goto end;
  }
-   efl_event_callback_add(dialer, EFL_NET_DIALER_EVENT_ERROR, _dialer_error, 
NULL);
-   efl_event_callback_add(dialer, EFL_IO_READER_EVENT_EOS, _dialer_eos, NULL);
-
-   input = efl_add(EFL_IO_QUEUE_CLASS, loop);
-   if (!input)
- {
-fprintf(stderr, "ERROR: could not create input queue\n");
-retval = EXIT_FAILURE;
-goto end;
- }
-
-   output = efl_add(EFL_IO_QUEUE_CLASS, loop,
-efl_event_callback_add(efl_added, 
EFL_IO_QUEUE_EVENT_SLICE_CHANGED, _on_data, NULL));
-   if (!output)
- {
-fprintf(stderr, "ERROR: could not create output queue\n");
-retval = EXIT_FAILURE;
-goto end;
- }
-
-   send_copier = efl_add(EFL_IO_COPIER_CLASS, loop,
- efl_io_copier_source_set(efl_added, input),
- efl_io_copier_destination_set(efl_added, dialer),
- efl_io_closer_close_on_destructor_set(efl_added, 
EINA_FALSE),
- efl_event_callback_add(efl_added, 
EFL_IO_COPIER_EVENT_DONE, _finished_sending, NULL));
-   if (!send_copier)
- {
-fprintf(stderr, "ERROR: could not create send copier\n");
-retval = EXIT_FAILURE;
-goto end;
- }
-
-   recv_copier = efl_add(EFL_IO_COPIER_CLASS, loop,
- efl_io_copier_source_set(efl_added, dialer),
- efl_io_copier_destination_set(efl_added, output),
- efl_io_closer_close_on_destructor_set(efl_added, 
EINA_FALSE));
-   if (!recv_copier)
- {
-fprintf(stderr, "ERROR: could not create receive copier\n");
-retval = EXIT_FAILURE;
-goto end;
- }
+   efl_event_callback_add(dialer, 

[EGIT] [core/efl] master 02/07: efl_net_socket_fd: stop monitoring fd on EOS.

2016-11-25 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c534d7912434d0d0fdc6adf1941f0bddac640dd7

commit c534d7912434d0d0fdc6adf1941f0bddac640dd7
Author: Gustavo Sverzut Barbieri 
Date:   Fri Nov 25 01:24:38 2016 -0200

efl_net_socket_fd: stop monitoring fd on EOS.

There was a bug that if the remote peer closed the connection, it
would trigger 'read' event, which would read 0 bytes, flagging as
EOS... but then marking as "can_read", which was wrong.

Just stop monitoring the events and fix that.
---
 src/lib/ecore_con/efl_net_socket_fd.c  | 15 +++
 src/lib/ecore_con/efl_net_socket_fd.eo |  1 +
 2 files changed, 16 insertions(+)

diff --git a/src/lib/ecore_con/efl_net_socket_fd.c 
b/src/lib/ecore_con/efl_net_socket_fd.c
index 822154c..e2ddcc2 100644
--- a/src/lib/ecore_con/efl_net_socket_fd.c
+++ b/src/lib/ecore_con/efl_net_socket_fd.c
@@ -238,6 +238,21 @@ _efl_net_socket_fd_efl_io_reader_can_read_set(Eo *o, 
Efl_Net_Socket_Fd_Data *pd
  }
 }
 
+EOLIAN static void
+_efl_net_socket_fd_efl_io_reader_eos_set(Eo *o, Efl_Net_Socket_Fd_Data *pd 
EINA_UNUSED, Eina_Bool value)
+{
+   Eina_Bool old = efl_io_reader_eos_get(o);
+   if (old == value) return;
+
+   efl_io_reader_eos_set(efl_super(o, MY_CLASS), value);
+
+   if (!value) return;
+
+   /* stop monitoring the FD, it's closed */
+   efl_event_callback_del(o, EFL_LOOP_FD_EVENT_READ, 
_efl_net_socket_fd_event_read, NULL);
+   efl_event_callback_del(o, EFL_LOOP_FD_EVENT_WRITE, 
_efl_net_socket_fd_event_write, NULL);
+}
+
 EOLIAN static Eina_Error
 _efl_net_socket_fd_efl_io_writer_write(Eo *o, Efl_Net_Socket_Fd_Data *pd 
EINA_UNUSED, Eina_Slice *ro_slice, Eina_Slice *remaining)
 {
diff --git a/src/lib/ecore_con/efl_net_socket_fd.eo 
b/src/lib/ecore_con/efl_net_socket_fd.eo
index b5973f9..8250800 100644
--- a/src/lib/ecore_con/efl_net_socket_fd.eo
+++ b/src/lib/ecore_con/efl_net_socket_fd.eo
@@ -38,6 +38,7 @@ class Efl.Net.Socket.Fd (Efl.Loop.Fd, Efl.Io.Reader.Fd, 
Efl.Io.Writer.Fd, Efl.Io
 Efl.Io.Closer.closed.get;
 Efl.Io.Reader.read;
 Efl.Io.Reader.can_read.set;
+Efl.Io.Reader.eos.set;
 Efl.Io.Writer.write;
 Efl.Io.Writer.can_write.set;
 Efl.Net.Socket.address_local;

-- 




[EGIT] [core/efl] master 06/07: efl_io_buffered_stream: wraps an I/O object and make it easy to use.

2016-11-25 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=46341b329d72736c1f1c47478f760ab8db76bbc8

commit 46341b329d72736c1f1c47478f760ab8db76bbc8
Author: Gustavo Sverzut Barbieri 
Date:   Fri Nov 25 01:27:33 2016 -0200

efl_io_buffered_stream: wraps an I/O object and make it easy to use.

Since all other efl.io objects are low-level, the recommended approach
is to use an efl.io.copier. However when dealing with in-memory,
bi-directional comms like talking to a socket, we always end with 2
queues, 2 copiers and the annoying setup that is being replicated in
ecore_ipc, efl_debug and so on.

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

I guess we can call EFL+EO Java now?
---
 src/Makefile_Ecore.am  |   5 +-
 src/examples/ecore/.gitignore  |   1 +
 src/examples/ecore/Makefile.am |   5 +
 .../ecore/efl_io_buffered_stream_example.c | 312 
 src/lib/ecore/Ecore_Eo.h   |   1 +
 src/lib/ecore/efl_io_buffered_stream.c | 549 +
 src/lib/ecore/efl_io_buffered_stream.eo| 251 ++
 7 files changed, 1123 insertions(+), 1 deletion(-)

diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am
index 1eeab08..7ebef69 100644
--- a/src/Makefile_Ecore.am
+++ b/src/Makefile_Ecore.am
@@ -19,7 +19,9 @@ ecore_eolian_files_public = \
lib/ecore/efl_io_stdout.eo \
lib/ecore/efl_io_stderr.eo \
lib/ecore/efl_io_file.eo \
-lib/ecore/efl_io_copier.eo
+lib/ecore/efl_io_copier.eo \
+lib/ecore/efl_io_buffered_stream.eo
+
 
 ecore_eolian_files = \
$(ecore_eolian_files_public) \
@@ -82,6 +84,7 @@ lib/ecore/efl_io_stdout.c \
 lib/ecore/efl_io_stderr.c \
 lib/ecore/efl_io_file.c \
 lib/ecore/efl_io_copier.c \
+lib/ecore/efl_io_buffered_stream.c \
 lib/ecore/efl_promise.c \
 lib/ecore/ecore_pipe.c \
 lib/ecore/ecore_poller.c \
diff --git a/src/examples/ecore/.gitignore b/src/examples/ecore/.gitignore
index e8e8aa9..b353fa7 100644
--- a/src/examples/ecore/.gitignore
+++ b/src/examples/ecore/.gitignore
@@ -51,6 +51,7 @@
 /efl_io_copier_example
 /efl_io_copier_simple_example
 /efl_io_queue_example
+/efl_io_buffered_stream_example
 /efl_net_server_example
 /efl_net_dialer_http_example
 /efl_net_dialer_websocket_example
diff --git a/src/examples/ecore/Makefile.am b/src/examples/ecore/Makefile.am
index bd5796a..db23d30 100644
--- a/src/examples/ecore/Makefile.am
+++ b/src/examples/ecore/Makefile.am
@@ -84,6 +84,7 @@ ecore_con_eet_server_example \
 efl_io_copier_example \
 efl_io_copier_simple_example \
 efl_io_queue_example \
+efl_io_buffered_stream_example \
 efl_net_server_example \
 efl_net_dialer_http_example \
 efl_net_dialer_websocket_example \
@@ -317,6 +318,9 @@ efl_io_copier_simple_example_LDADD = $(ECORE_COMMON_LDADD)
 efl_io_queue_example_SOURCES = efl_io_queue_example.c
 efl_io_queue_example_LDADD = $(ECORE_CON_COMMON_LDADD)
 
+efl_io_buffered_stream_example_SOURCES = efl_io_buffered_stream_example.c
+efl_io_buffered_stream_example_LDADD = $(ECORE_CON_COMMON_LDADD)
+
 efl_net_server_example_SOURCES = efl_net_server_example.c
 efl_net_server_example_LDADD = $(ECORE_CON_COMMON_LDADD)
 
@@ -407,6 +411,7 @@ ecore_con_eet_descriptor_example.c \
 efl_io_copier_example.c \
 efl_io_copier_simple_example.c \
 efl_io_queue_example.c \
+efl_io_buffered_stream_example.c \
 efl_net_server_example.c \
 efl_net_dialer_http_example.c \
 efl_net_dialer_websocket_example.c \
diff --git a/src/examples/ecore/efl_io_buffered_stream_example.c 
b/src/examples/ecore/efl_io_buffered_stream_example.c
new file mode 100644
index 000..ec8ff1f
--- /dev/null
+++ b/src/examples/ecore/efl_io_buffered_stream_example.c
@@ -0,0 +1,312 @@
+#define EFL_BETA_API_SUPPORT 1
+#define EFL_EO_API_SUPPORT 1
+#include 
+#include 
+#include 
+
+static int retval = EXIT_SUCCESS;
+static Eina_List *commands = NULL;
+static Eina_Slice line_delimiter;
+static Eo *stream = NULL;
+
+static void
+_command_next(void)
+{
+   Eina_Slice slice;
+   char *cmd;
+
+   if (!commands)
+ {
+efl_io_buffered_stream_eos_mark(stream);
+return;
+ }
+
+   cmd = commands->data;
+   commands = eina_list_remove_list(commands, commands);
+
+   slice = (Eina_Slice)EINA_SLICE_STR(cmd);
+   efl_io_writer_write(stream, , NULL);
+   fprintf(stderr, "INFO: sent '" EINA_SLICE_STR_FMT "'\n",
+   EINA_SLICE_STR_PRINT(slice));
+
+   /* don't use line_delimiter directly, 'len' may be changed! */
+   slice = line_delimiter;
+   efl_io_writer_write(stream, , NULL);
+   free(cmd);
+}
+
+static void
+_receiver_data(void *data EINA_UNUSED, const Efl_Event *event)
+{
+   Eina_Slice slice;
+
+   if 

[EGIT] [core/efl] master 07/07: efl_net_{socket, dialer, server}_simple: easy to use, buffered network sockets.

2016-11-25 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=167ff29ea004f6d2d22e5f94a3b0b64fb19da44b

commit 167ff29ea004f6d2d22e5f94a3b0b64fb19da44b
Author: Gustavo Sverzut Barbieri 
Date:   Fri Nov 25 17:18:34 2016 -0200

efl_net_{socket,dialer,server}_simple: easy to use, buffered network 
sockets.

The low level I/O primitives are powerful but adds some complexity to
use, for bi-directional streaming communication one ends creating two
Efl.Io.Queue and two Efl.Io.Copier to pipe data to socket when it can
operate.

Then encapsulate the socket using the new Efl.Io.Buffered_Stream, this
will allow the socket, be a dialer or a server client, to be operated
as a single handle that internally carries about the buffering for
you.

As one can see in the examples, compared to their "manual"
alternatives they are very easy to use, ressembling
Ecore_Con_Server/Ecore_Con_Client, but also offers line-based
delimiters and the possibility to let the socket to handle queueing
for you in case you received partial messages (just do not
read/clear/discard the received data).
---
 src/Makefile_Ecore_Con.am  |   6 +
 src/examples/ecore/.gitignore  |   2 +
 src/examples/ecore/Makefile.am |  10 +
 src/examples/ecore/efl_net_dialer_simple_example.c | 451 +
 src/examples/ecore/efl_net_server_simple_example.c | 559 +
 src/lib/ecore_con/Ecore_Con_Eo.h   |   4 +
 src/lib/ecore_con/efl_net_dialer_simple.c  | 367 ++
 src/lib/ecore_con/efl_net_dialer_simple.eo |  85 
 src/lib/ecore_con/efl_net_server_simple.c  | 243 +
 src/lib/ecore_con/efl_net_server_simple.eo |  55 ++
 src/lib/ecore_con/efl_net_socket_simple.c  |  35 ++
 src/lib/ecore_con/efl_net_socket_simple.eo |  45 ++
 12 files changed, 1862 insertions(+)

diff --git a/src/Makefile_Ecore_Con.am b/src/Makefile_Ecore_Con.am
index d661861..82221e7 100644
--- a/src/Makefile_Ecore_Con.am
+++ b/src/Makefile_Ecore_Con.am
@@ -7,15 +7,18 @@ ecore_con_eolian_files = \
lib/ecore_con/efl_network_server.eo \
lib/ecore_con/efl_network_connector.eo \
 lib/ecore_con/efl_net_socket.eo \
+lib/ecore_con/efl_net_socket_simple.eo \
 lib/ecore_con/efl_net_socket_fd.eo \
 lib/ecore_con/efl_net_socket_tcp.eo \
 lib/ecore_con/efl_net_socket_udp.eo \
 lib/ecore_con/efl_net_dialer.eo \
+lib/ecore_con/efl_net_dialer_simple.eo \
 lib/ecore_con/efl_net_dialer_tcp.eo \
 lib/ecore_con/efl_net_dialer_udp.eo \
 lib/ecore_con/efl_net_dialer_http.eo \
 lib/ecore_con/efl_net_dialer_websocket.eo \
 lib/ecore_con/efl_net_server.eo \
+lib/ecore_con/efl_net_server_simple.eo \
 lib/ecore_con/efl_net_server_fd.eo \
 lib/ecore_con/efl_net_server_tcp.eo \
 lib/ecore_con/efl_net_server_udp.eo \
@@ -92,15 +95,18 @@ static_libs/http-parser/http_parser.h \
 lib/ecore_con/ecore_con_private.h \
 lib/ecore_con/ecore_con_info.c \
 lib/ecore_con/efl_net_socket.c \
+lib/ecore_con/efl_net_socket_simple.c \
 lib/ecore_con/efl_net_socket_fd.c \
 lib/ecore_con/efl_net_socket_tcp.c \
 lib/ecore_con/efl_net_socket_udp.c \
 lib/ecore_con/efl_net_dialer.c \
+lib/ecore_con/efl_net_dialer_simple.c \
 lib/ecore_con/efl_net_dialer_tcp.c \
 lib/ecore_con/efl_net_dialer_udp.c \
 lib/ecore_con/efl_net_dialer_http.c \
 lib/ecore_con/efl_net_dialer_websocket.c \
 lib/ecore_con/efl_net_server.c \
+lib/ecore_con/efl_net_server_simple.c \
 lib/ecore_con/efl_net_server_fd.c \
 lib/ecore_con/efl_net_server_tcp.c \
 lib/ecore_con/efl_net_server_udp.c \
diff --git a/src/examples/ecore/.gitignore b/src/examples/ecore/.gitignore
index b353fa7..88fc2bd 100644
--- a/src/examples/ecore/.gitignore
+++ b/src/examples/ecore/.gitignore
@@ -53,10 +53,12 @@
 /efl_io_queue_example
 /efl_io_buffered_stream_example
 /efl_net_server_example
+/efl_net_server_simple_example
 /efl_net_dialer_http_example
 /efl_net_dialer_websocket_example
 /efl_net_dialer_websocket_autobahntestee
 /efl_net_dialer_udp_example
+/efl_net_dialer_simple_example
 /efl_net_dialer_unix_example
 /ecore_evas_vnc
 /efl_net_socket_ssl_dialer_example
diff --git a/src/examples/ecore/Makefile.am b/src/examples/ecore/Makefile.am
index db23d30..88f2384 100644
--- a/src/examples/ecore/Makefile.am
+++ b/src/examples/ecore/Makefile.am
@@ -86,10 +86,12 @@ efl_io_copier_simple_example \
 efl_io_queue_example \
 efl_io_buffered_stream_example \
 efl_net_server_example \
+efl_net_server_simple_example \
 efl_net_dialer_http_example \
 efl_net_dialer_websocket_example \
 efl_net_dialer_websocket_autobahntestee \
 efl_net_dialer_udp_example \
+efl_net_dialer_simple_example \
 efl_net_socket_ssl_dialer_example \
 efl_net_socket_ssl_server_example \
 

Re: [E-devel] eeze_scanner?

2016-11-25 Thread Gustavo Sverzut Barbieri
ok, will take a look at it!

On Fri, Nov 25, 2016 at 10:12 AM, Mike Blumenkrantz
 wrote:
> There is a backend for efm which uses this. It was written while the udisks
> api was unstable and is intended for systems where udisks/dbus is not
> available.
>
> On Thu, Nov 24, 2016 at 4:09 PM Gustavo Sverzut Barbieri 
> wrote:
>
>> Hi all,
>>
>> I see src/bin/eeze/eeze_scanner... but I wonder who uses that and why
>> it exists. It seems to broadcast some events, like cdrom was found,
>> things like that. But I don't see anyone connecting to its socket.
>>
>> Since it uses eet_connection, it's not only about connecting to the
>> socket and getting some messages, you need to specify a matching
>> Eet_Data_Descriptor (EDD) to parse it correctly.
>>
>> So I wonder if this is something that is used and where? Otherwise if
>> we should drop it.
>>
>>
>> --
>> Gustavo Sverzut Barbieri
>> --
>> Mobile: +55 (16) 99354-9890 <+55%2016%2099354-9890>
>>
>>
>> --
>> ___
>> enlightenment-devel mailing list
>> enlightenment-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
> --
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel



-- 
Gustavo Sverzut Barbieri
--
Mobile: +55 (16) 99354-9890

--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 03/07: efl_net_server: add 'client_announce', share logic and fix a bug.

2016-11-25 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=410d65900c9ce4daa412047c8b49312b98a1d353

commit 410d65900c9ce4daa412047c8b49312b98a1d353
Author: Gustavo Sverzut Barbieri 
Date:   Fri Nov 25 05:32:16 2016 -0200

efl_net_server: add 'client_announce', share logic and fix a bug.

I just realized that if a client is not referenced it would leak in
the 'ssl' server as we must del it.

However, if we del the SSL socket, we're going to close the underlying
TCP. But we're from the TCP "client,add" callback and this causes
issues since "closed" will be emitted, our close callback will
unparent the client, which lead to it being deleted.

The proper solution is to only monitor "closed" if the client is
accepted. Otherwise we just check if it was closed, if we're the
parent, etc...

Fixing this in all servers were painful, we could share since most
inherit from Efl.Net.Server.Fd. Then add the "client_announce"
protected method to do it, and document how it should work.
---
 src/lib/ecore_con/efl_net_server.eo | 39 
 src/lib/ecore_con/efl_net_server_fd.c   | 61 +++
 src/lib/ecore_con/efl_net_server_fd.eo  |  1 +
 src/lib/ecore_con/efl_net_server_ssl.c  | 63 -
 src/lib/ecore_con/efl_net_server_ssl.eo |  1 +
 src/lib/ecore_con/efl_net_server_tcp.c  | 29 +--
 src/lib/ecore_con/efl_net_server_udp.c  | 26 +++---
 src/lib/ecore_con/efl_net_server_unix.c | 29 +--
 8 files changed, 170 insertions(+), 79 deletions(-)

diff --git a/src/lib/ecore_con/efl_net_server.eo 
b/src/lib/ecore_con/efl_net_server.eo
index 00084ea..f4a7cd7 100644
--- a/src/lib/ecore_con/efl_net_server.eo
+++ b/src/lib/ecore_con/efl_net_server.eo
@@ -99,6 +99,45 @@ interface Efl.Net.Server {
 }
 }
 
+client_announce @protected {
+[[Implementions should call this method to announce new clients.
+
+  This method will account the new client in
+  @.clients_count as well as emit the event "client,add".
+
+  After this call, the client ownership will be
+  managed. If no event handler references the object, it
+  will be deleted.
+
+  Most implementions will do the sequence:
+
+   - emit "client,add"
+
+   - check if client was referenced
+
+   - if we're not the parent anymore, ignore (do not
+ change @.clients_count) and return $true.
+
+   - if not referenced, delete it and return $false.
+
+   - if it's closed, delete it and return $false.
+
+   - if referenced, increment @.clients_count and monitor
+ for client "closed" event and return $true.
+
+   - on client "closed", decrease @.clients_count and
+ unset its parent (if we're still the parent).
+
+  Do not monitor "closed" before emitting
+  "client,add". Doing so may lead to double free if
+  callbacks close the client by themselves!
+]]
+params {
+client: Efl.Net.Socket; [[A socket representing the client.]]
+}
+return: bool(false); [[If $true, then client was handled. If 
$false, it was dropped and deleted.]]
+}
+
 @property serving {
 [[Returns whenever the server is ready to accept clients or not.
 
diff --git a/src/lib/ecore_con/efl_net_server_fd.c 
b/src/lib/ecore_con/efl_net_server_fd.c
index b10a260..8506c6e 100644
--- a/src/lib/ecore_con/efl_net_server_fd.c
+++ b/src/lib/ecore_con/efl_net_server_fd.c
@@ -487,4 +487,65 @@ _efl_net_server_fd_process_incoming_data(Eo *o, 
Efl_Net_Server_Fd_Data *pd)
  efl_net_server_fd_client_add(o, client);
 }
 
+static void
+_efl_net_server_fd_client_event_closed(void *data, const Efl_Event *event)
+{
+   Eo *server = data;
+   Eo *client = event->object;
+
+   efl_event_callback_del(client, EFL_IO_CLOSER_EVENT_CLOSED, 
_efl_net_server_fd_client_event_closed, server);
+   if (efl_parent_get(client) == server)
+ efl_parent_set(client, NULL);
+
+   efl_net_server_clients_count_set(server, 
efl_net_server_clients_count_get(server) - 1);
+}
+
+static Eina_Bool
+_efl_net_server_fd_efl_net_server_client_announce(Eo *o, 
Efl_Net_Server_Fd_Data *pd EINA_UNUSED, Eo *client)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(client, EINA_FALSE);
+   EINA_SAFETY_ON_FALSE_GOTO(efl_isa(client, EFL_NET_SOCKET_INTERFACE), 
wrong_type);
+   EINA_SAFETY_ON_FALSE_GOTO(efl_parent_get(client) == o, wrong_parent);
+
+   efl_event_callback_call(o, EFL_NET_SERVER_EVENT_CLIENT_ADD, client);
+
+   if (efl_parent_get(client) != o)
+ {
+DBG("client %s was reparented! Ignoring it...",
+efl_net_socket_address_remote_get(client));
+return 

[EGIT] [core/efl] master 05/07: efl_io_copier_flush: add may_block and ignore_line_delimiter parameters.

2016-11-25 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=16be61c7e15d89ba9ba4529e0d280dcb5fb81da7

commit 16be61c7e15d89ba9ba4529e0d280dcb5fb81da7
Author: Gustavo Sverzut Barbieri 
Date:   Fri Nov 25 16:48:45 2016 -0200

efl_io_copier_flush: add may_block and ignore_line_delimiter parameters.

The may_block parameter is useful to force a flush without blocking on
read/write, sometimes particularly useful if ignore_line_delimiter is
true, then you get the data events without blocking -- as if a server
sending some content misses a trailing line delimiter, you do not want
to block on recv() but still want to flush data to user.

The ignore_line_delimiter parameter is useful if we're going to close
the copier and want to flush pending data which may exist due missing
trailing terminator. The close method will also force that if
destination can take more data.
---
 src/bin/efl/efl_debug.c|  2 +-
 src/lib/ecore/efl_io_copier.c  | 58 +++---
 src/lib/ecore/efl_io_copier.eo |  4 +++
 src/lib/ecore_ipc/ecore_ipc.c  |  4 +--
 4 files changed, 61 insertions(+), 7 deletions(-)

diff --git a/src/bin/efl/efl_debug.c b/src/bin/efl/efl_debug.c
index 7b4dbb0..4cb4b03 100644
--- a/src/bin/efl/efl_debug.c
+++ b/src/bin/efl/efl_debug.c
@@ -364,7 +364,7 @@ main(int argc, char **argv)
 
while ((!efl_io_closer_closed_get(dialer)) &&
   efl_io_queue_usage_get(input))
- efl_io_copier_flush(send_copier);
+ efl_io_copier_flush(send_copier, EINA_TRUE, EINA_TRUE);
 
  end:
eina_list_free(waiting);
diff --git a/src/lib/ecore/efl_io_copier.c b/src/lib/ecore/efl_io_copier.c
index 3eee61f..c92a8ef 100644
--- a/src/lib/ecore/efl_io_copier.c
+++ b/src/lib/ecore/efl_io_copier.c
@@ -27,6 +27,7 @@ typedef struct _Efl_Io_Copier_Data
double inactivity_timeout;
Eina_Bool closed;
Eina_Bool done;
+   Eina_Bool force_dispatch;
Eina_Bool close_on_exec;
Eina_Bool close_on_destructor;
 } Efl_Io_Copier_Data;
@@ -281,7 +282,7 @@ _efl_io_copier_write(Eo *o, Efl_Io_Copier_Data *pd)
 return;
  }
 
-   if ((pd->line_delimiter.len > 0) &&
+   if ((pd->line_delimiter.len > 0) && (!pd->force_dispatch) &&
(pd->source && !efl_io_reader_eos_get(pd->source)))
  {
 const uint8_t *p = eina_slice_find(ro_slice, pd->line_delimiter);
@@ -469,6 +470,8 @@ _efl_io_copier_destination_closed(void *data, const 
Efl_Event *event EINA_UNUSED
  {
 Eina_Error err = EBADF;
 if (pd->inactivity_timer) efl_future_cancel(pd->inactivity_timer);
+WRN("copier %p destination %p closed with %zd bytes pending...",
+o, pd->destination, eina_binbuf_length_get(pd->buf));
 efl_event_callback_call(o, EFL_IO_COPIER_EVENT_ERROR, );
  }
 }
@@ -604,6 +607,34 @@ _efl_io_copier_efl_io_closer_close(Eo *o, 
Efl_Io_Copier_Data *pd)
 
_COPIER_DBG(o, pd);
 
+   while (pd->buf)
+ {
+size_t pending = eina_binbuf_length_get(pd->buf);
+if (pending == 0) break;
+else if (pd->destination && 
efl_io_writer_can_write_get(pd->destination))
+  {
+ DBG("copier %p destination %p closed with %zd bytes pending, do 
final write...",
+ o, pd->destination, pending);
+ pd->force_dispatch = EINA_TRUE;
+ _efl_io_copier_write(o, pd);
+ pd->force_dispatch = EINA_FALSE;
+  }
+else if (!pd->destination)
+  {
+ Eina_Slice binbuf_slice = eina_binbuf_slice_get(pd->buf);
+ DBG("copier %p destination %p closed with %zd bytes pending, 
dispatch events...",
+ o, pd->destination, pending);
+ _efl_io_copier_dispatch_data_events(o, pd, binbuf_slice);
+ break;
+  }
+else
+  {
+ DBG("copier %p destination %p closed with %zd bytes pending...",
+ o, pd->destination, pending);
+ break;
+  }
+ }
+
if (pd->job)
  efl_future_cancel(pd->job);
 
@@ -699,7 +730,7 @@ _efl_io_copier_inactivity_timeout_get(Eo *o EINA_UNUSED, 
Efl_Io_Copier_Data *pd)
 }
 
 EOLIAN static Eina_Bool
-_efl_io_copier_flush(Eo *o, Efl_Io_Copier_Data *pd)
+_efl_io_copier_flush(Eo *o, Efl_Io_Copier_Data *pd, Eina_Bool may_block, 
Eina_Bool ignore_line_delimiter)
 {
uint64_t old_read = pd->progress.read;
uint64_t old_written = pd->progress.written;
@@ -708,10 +739,29 @@ _efl_io_copier_flush(Eo *o, Efl_Io_Copier_Data *pd)
_COPIER_DBG(o, pd);
 
if (pd->source && !efl_io_reader_eos_get(pd->source))
- _efl_io_copier_read(o, pd);
+ {
+if (may_block || efl_io_reader_can_read_get(pd->source))
+  _efl_io_copier_read(o, pd);
+ }
 
if (pd->destination)
- _efl_io_copier_write(o, pd);
+ {
+if (may_block || efl_io_writer_can_write_get(pd->source))
+  {
+ 

[EGIT] [core/efl] master 01/07: eina_slice: fix eina_slice_endswith() for same-sized slices.

2016-11-25 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a9d9936a088d8033de2b468d131589b635fc3205

commit a9d9936a088d8033de2b468d131589b635fc3205
Author: Gustavo Sverzut Barbieri 
Date:   Fri Nov 25 13:31:56 2016 -0200

eina_slice: fix eina_slice_endswith() for same-sized slices.
---
 src/lib/eina/eina_inline_slice.x | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eina/eina_inline_slice.x b/src/lib/eina/eina_inline_slice.x
index 67d5353..b1eba96 100644
--- a/src/lib/eina/eina_inline_slice.x
+++ b/src/lib/eina/eina_inline_slice.x
@@ -192,7 +192,7 @@ eina_slice_startswith(const Eina_Slice slice, const 
Eina_Slice prefix)
 static inline Eina_Bool
 eina_slice_endswith(const Eina_Slice slice, const Eina_Slice suffix)
 {
-   if ((suffix.len != 0) && (slice.len > suffix.len))
+   if ((suffix.len != 0) && (slice.len >= suffix.len))
  return memcmp(slice.bytes + slice.len - suffix.len,
suffix.mem, suffix.len) == 0;
return EINA_FALSE;

-- 




[EGIT] [core/efl] master 04/07: efl_io_copier: expose 'done' property.

2016-11-25 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d9dafab78531f676217e0e81d78c0533edd0cc30

commit d9dafab78531f676217e0e81d78c0533edd0cc30
Author: Gustavo Sverzut Barbieri 
Date:   Fri Nov 25 14:22:13 2016 -0200

efl_io_copier: expose 'done' property.

This property has a protected setter and will simplify both internal
implementation as well as usage.
---
 src/lib/ecore/efl_io_copier.c  | 46 +++---
 src/lib/ecore/efl_io_copier.eo | 15 ++
 2 files changed, 40 insertions(+), 21 deletions(-)

diff --git a/src/lib/ecore/efl_io_copier.c b/src/lib/ecore/efl_io_copier.c
index 5646e0d..3eee61f 100644
--- a/src/lib/ecore/efl_io_copier.c
+++ b/src/lib/ecore/efl_io_copier.c
@@ -1,3 +1,5 @@
+#define EFL_IO_COPIER_PROTECTED 1
+
 #ifdef HAVE_CONFIG_H
 # include 
 #endif
@@ -120,11 +122,7 @@ _efl_io_copier_job(void *data, const Efl_Event *ev 
EINA_UNUSED)
  {
 if ((!pd->done) &&
 ((!pd->destination) || (eina_binbuf_length_get(pd->buf) == 0)))
-  {
- pd->done = EINA_TRUE;
- if (pd->inactivity_timer) efl_future_cancel(pd->inactivity_timer);
- efl_event_callback_call(o, EFL_IO_COPIER_EVENT_DONE, NULL);
-  }
+  efl_io_copier_done_set(o, EINA_TRUE);
  }
 
efl_unref(o);
@@ -242,7 +240,7 @@ _efl_io_copier_read(Eo *o, Efl_Io_Copier_Data *pd)
  }
 
pd->progress.read += rw_slice.len;
-   pd->done = EINA_FALSE;
+   efl_io_copier_done_set(o, EINA_FALSE);
 
if ((!pd->destination) && (eina_binbuf_length_get(pd->buf) > used))
  {
@@ -307,7 +305,7 @@ _efl_io_copier_write(Eo *o, Efl_Io_Copier_Data *pd)
  return;
 
pd->progress.written += ro_slice.len;
-   pd->done = EINA_FALSE;
+   efl_io_copier_done_set(o, EINA_FALSE);
 
/* Note: dispatch data and line from write since it will remove
 * from binbuf and make it simple to not repeat data that was
@@ -465,11 +463,7 @@ _efl_io_copier_destination_closed(void *data, const 
Efl_Event *event EINA_UNUSED
if (eina_binbuf_length_get(pd->buf) == 0)
  {
 if (!pd->done)
-  {
- pd->done = EINA_TRUE;
- if (pd->inactivity_timer) efl_future_cancel(pd->inactivity_timer);
- efl_event_callback_call(o, EFL_IO_COPIER_EVENT_DONE, NULL);
-  }
+  efl_io_copier_done_set(o, EINA_TRUE);
  }
else
  {
@@ -617,10 +611,7 @@ _efl_io_copier_efl_io_closer_close(Eo *o, 
Efl_Io_Copier_Data *pd)
  efl_future_cancel(pd->inactivity_timer);
 
if (!pd->done)
- {
-pd->done = EINA_TRUE;
-efl_event_callback_call(o, EFL_IO_COPIER_EVENT_DONE, NULL);
- }
+ efl_io_copier_done_set(o, EINA_TRUE);
 
if (pd->source)
  {
@@ -734,16 +725,29 @@ _efl_io_copier_flush(Eo *o, Efl_Io_Copier_Data *pd)
  {
 if ((!pd->done) &&
 ((!pd->destination) || (eina_binbuf_length_get(pd->buf) == 0)))
-  {
- pd->done = EINA_TRUE;
- if (pd->inactivity_timer) efl_future_cancel(pd->inactivity_timer);
- efl_event_callback_call(o, EFL_IO_COPIER_EVENT_DONE, NULL);
-  }
+  efl_io_copier_done_set(o, EINA_TRUE);
  }
 
return pd->done;
 }
 
+EOLIAN static Eina_Bool
+_efl_io_copier_done_get(Eo *o EINA_UNUSED, Efl_Io_Copier_Data *pd)
+{
+   return pd->done;
+}
+
+EOLIAN static void
+_efl_io_copier_done_set(Eo *o, Efl_Io_Copier_Data *pd, Eina_Bool value)
+{
+   if (pd->done == value) return;
+   pd->done = value;
+   if (!value) return;
+   if (pd->inactivity_timer) efl_future_cancel(pd->inactivity_timer);
+   efl_event_callback_call(o, EFL_IO_COPIER_EVENT_DONE, NULL);
+}
+
+
 EOLIAN static Eo *
 _efl_io_copier_efl_object_constructor(Eo *o, Efl_Io_Copier_Data *pd)
 {
diff --git a/src/lib/ecore/efl_io_copier.eo b/src/lib/ecore/efl_io_copier.eo
index af0bf8f..1c0bd5f 100644
--- a/src/lib/ecore/efl_io_copier.eo
+++ b/src/lib/ecore/efl_io_copier.eo
@@ -285,6 +285,21 @@ class Efl.Io.Copier (Efl.Loop_User, Efl.Io.Closer) {
 }
 }
 
+@property done {
+[[Reports if copier is done.
+
+  A copier is done if source reached "eos" and all data
+  was written to "destination".
+
+  The copier is also done when it's @Efl.Io.Closer.closed.
+]]
+get { }
+set @protected { }
+values {
+done: bool; [[If $true, source is "eos" and all data was 
written to "destination". If $false, it's still pending some more copies]]
+}
+}
+
 binbuf_steal {
[[Steals the internal binbuf and return it to caller.
 

-- 




[EGIT] [e16/e16] master 02/03: Fix warning with recent pango.

2016-11-25 Thread Kim Woelders
kwo pushed a commit to branch master.

http://git.enlightenment.org/e16/e16.git/commit/?id=cafd8672e6941cee6886cc1f4a07ea57a8705212

commit cafd8672e6941cee6886cc1f4a07ea57a8705212
Author: Kim Woelders 
Date:   Fri Nov 25 17:38:26 2016 +0100

Fix warning with recent pango.

pango_xft_get_context() is deprecated.
---
 src/text_pango.c | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/text_pango.c b/src/text_pango.c
index 35a486b..0c4885a 100644
--- a/src/text_pango.c
+++ b/src/text_pango.c
@@ -49,13 +49,19 @@ static int
 _pango_xft_Load(TextState * ts, const char *name)
 {
FontCtxPangoXft*fdc;
+   PangoFontMap   *fmap;
PangoFontDescription *font;
PangoFontMask   flags;
 
if (!_pango_ctx)
-  _pango_ctx = pango_xft_get_context(disp, Dpy.screen);
-   if (!_pango_ctx)
-  return -1;
+ {
+   fmap = pango_xft_get_font_map(disp, Dpy.screen);
+   if (!fmap)
+  return -1;
+   _pango_ctx = pango_font_map_create_context(fmap);
+   if (!_pango_ctx)
+  return -1;
+ }
 
font = pango_font_description_from_string(name);
if (!font)

-- 




[EGIT] [e16/e16] master 01/03: Drop incomplete HAVE_STDARG_H stuff.

2016-11-25 Thread Kim Woelders
kwo pushed a commit to branch master.

http://git.enlightenment.org/e16/e16.git/commit/?id=33991a6bf2e1afc42d31ec80c8b9da86cb9101be

commit 33991a6bf2e1afc42d31ec80c8b9da86cb9101be
Author: Kim Woelders 
Date:   Thu Jun 30 06:04:48 2016 +0200

Drop incomplete HAVE_STDARG_H stuff.
---
 configure.ac   |  2 +-
 src/snprintf.c | 12 
 src/util.h |  4 
 3 files changed, 1 insertion(+), 17 deletions(-)

diff --git a/configure.ac b/configure.ac
index eeb701c..147efd1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,7 +40,7 @@ LT_INIT([dlopen])
 AC_PATH_X
 AC_PATH_XTRA
 
-AC_CHECK_HEADERS(alloca.h locale.h stdarg.h wctype.h)
+AC_CHECK_HEADERS(alloca.h locale.h wctype.h)
 
 AC_C_BIGENDIAN
 AC_C_CONST
diff --git a/src/snprintf.c b/src/snprintf.c
index 0f070d6..e94c315 100644
--- a/src/snprintf.c
+++ b/src/snprintf.c
@@ -82,21 +82,9 @@ Evsnprintf(char *str, size_t count, const char *fmt, va_list 
args)
return (strlen(str));
 }
 
-#ifdef HAVE_STDARG_H
 int
 Esnprintf(char *str, size_t count, const char *fmt, ...)
-#else
-int
-Esnprintf(va_alist)
- va_dcl
-#endif
 {
-#ifndef HAVE_STDARG_H
-   char   *str;
-   size_t  count;
-   char   *fmt;
-
-#endif
VA_LOCAL_DECL;
 
VA_START(fmt);
diff --git a/src/util.h b/src/util.h
index 9b02563..3f8ae3f 100644
--- a/src/util.h
+++ b/src/util.h
@@ -116,12 +116,8 @@ __EXPORT__ void __PRINTF__ Eprintf(const char *fmt, ...);
 int Evsnprintf(char *str, size_t count, const char *fmt,
   va_list args);
 
-#ifdef HAVE_STDARG_H
 int Esnprintf(char *str, size_t count, const char *fmt, ...);
 
-#else
-int Esnprintf(va_alist);
-#endif
 #endif /* HAVE_SNPRINTF */
 
 #if USE_MODULES

-- 




[EGIT] [website/www-content] master 01/01: Wiki page fedora-start changed with summary [] by Anisse Astier

2016-11-25 Thread Anisse Astier
WWW-www.enlightenment.org pushed a commit to branch master.

http://git.enlightenment.org/website/www-content.git/commit/?id=831eb805c548c2b14682fe385088721300862329

commit 831eb805c548c2b14682fe385088721300862329
Author: Anisse Astier 
Date:   Fri Nov 25 09:20:54 2016 -0800

Wiki page fedora-start changed with summary [] by Anisse Astier
---
 pages/distros/fedora-start.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pages/distros/fedora-start.txt b/pages/distros/fedora-start.txt
index 9694ad1..1d7d945 100644
--- a/pages/distros/fedora-start.txt
+++ b/pages/distros/fedora-start.txt
@@ -32,7 +32,7 @@ yum install efl
 
 
  Compiling from source 
-On Fedora 24, run this command as root to install all the dependencies:
+On Fedora 24 and Fedora 25, run this command as root to install all the 
dependencies:
 
 dnf install bullet-devel libpng-devel libjpeg-turbo-devel gstreamer1-devel  
gstreamer1-plugins-base-devel  zlib-devel luajit-devel libtiff-devel 
openssl-devel libcurl-devel dbus-devel glibc-devel fontconfig-devel 
freetype-devel fribidi-devel pulseaudio-libs-devel libsndfile-devel 
libX11-devel libXau-devel libXcomposite-devel libXdamage-devel libXdmcp-devel 
libXext-devel libXfixes-devel libXinerama-devel libXrandr-devel 
libXrender-devel libXScrnSaver-devel libXtst-devel libXcursor-devel l [...]
 

-- 




[EGIT] [core/enlightenment] master 01/01: Fix wayland deferred buffer free crash

2016-11-25 Thread Derek Foreman
derekf pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=9f3de5e34622fbea719a9d21350ad68fab6347c1

commit 9f3de5e34622fbea719a9d21350ad68fab6347c1
Author: Derek Foreman 
Date:   Fri Nov 25 11:13:11 2016 -0600

Fix wayland deferred buffer free crash

We'd sometimes get a stale pointer when doing a deferred buffer free.
---
 src/bin/e_pixmap.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/bin/e_pixmap.c b/src/bin/e_pixmap.c
index 0c3b7d3..3f166d7 100644
--- a/src/bin/e_pixmap.c
+++ b/src/bin/e_pixmap.c
@@ -781,14 +781,13 @@ e_pixmap_image_clear(E_Pixmap *cp, Eina_Bool cache)
 break;
   case E_PIXMAP_TYPE_WL:
 #ifdef HAVE_WAYLAND
+_e_pixmap_wl_buffers_free(cp);
 if (cache)
   {
  E_Comp_Wl_Client_Data *cd;
  struct wl_resource *cb;
  Eina_List *free_list;
 
- if (!e_comp->rendering) _e_pixmap_wl_buffers_free(cp);
-
  if ((!cp->client) || (!cp->client->comp_data)) return;
  cd = (E_Comp_Wl_Client_Data *)cp->client->comp_data;
 
@@ -803,8 +802,6 @@ e_pixmap_image_clear(E_Pixmap *cp, Eina_Bool cache)
   wl_resource_destroy(cb);
}
   }
-else
-  _e_pixmap_wl_buffers_free(cp);
 #endif
 break;
   default:

-- 




[EGIT] [tools/eflete] master 01/01: project_manager: don't save the full path to project env

2016-11-25 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=636ea9bed1664c23972391b2e4291a05153418dc

commit 636ea9bed1664c23972391b2e4291a05153418dc
Author: Vyacheslav Reutskiy 
Date:   Fri Nov 25 11:56:19 2016 +0200

project_manager: don't save the full path to project env

This need for avoid errors in case when project is moved after save.
Now we save only project name and generate all paths on project open.

@fix

Change-Id: Ib7fc46a7063de7127ebba0b7712e4eb864682ee8
---
 src/bin/project_manager/project_manager2.c | 25 ++---
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/src/bin/project_manager/project_manager2.c 
b/src/bin/project_manager/project_manager2.c
index 26d856c..6e7d139 100644
--- a/src/bin/project_manager/project_manager2.c
+++ b/src/bin/project_manager/project_manager2.c
@@ -99,9 +99,7 @@ _project_descriptor_init(Project_Process_Data *ppd)
ppd->eed_project = eet_data_descriptor_stream_new();
 
EET_DATA_DESCRIPTOR_ADD_BASIC (ppd->eed_project, Project, "version", 
version, EET_T_INT);
-   EET_DATA_DESCRIPTOR_ADD_BASIC (ppd->eed_project, Project, "dev", dev, 
EET_T_STRING);
-   EET_DATA_DESCRIPTOR_ADD_BASIC (ppd->eed_project, Project, "saved_edj", 
saved_edj, EET_T_STRING);
-   EET_DATA_DESCRIPTOR_ADD_BASIC (ppd->eed_project, Project, "develop_path", 
develop_path, EET_T_STRING);
+   EET_DATA_DESCRIPTOR_ADD_BASIC (ppd->eed_project, Project, "name", name, 
EET_T_STRING);
EET_DATA_DESCRIPTOR_ADD_BASIC (ppd->eed_project, Project, 
"release_options", release_options, EET_T_STRING);
 }
 
@@ -586,7 +584,7 @@ _project_close_internal(Project *project)
 static PM_Project_Result
 _project_open_internal(Project_Process_Data *ppd)
 {
-   char cmd[PATH_MAX];
+   char buf[PATH_MAX];
char *file_dir;
 
 #ifdef _WIN32
@@ -639,6 +637,20 @@ _project_open_internal(Project_Process_Data *ppd)
ppd->project->pro_path = eina_stringshare_add(ppd->path);
ppd->project->pro_fd = pro_fd;
 
+   file_dir = ecore_file_dir_get(ppd->path);
+   ppd->project->dev = eina_stringshare_printf("%s/%s.dev", file_dir, 
ppd->name);
+   ppd->project->saved_edj = eina_stringshare_printf("%s/%s.edj", file_dir, 
ppd->name);
+   ppd->project->develop_path = eina_stringshare_printf("%s/develop", 
file_dir);
+
+   snprintf(buf, sizeof(buf), "%s/images", ppd->project->develop_path);
+   ecore_file_mkdir(buf);
+   snprintf(buf, sizeof(buf), "%s/sounds", ppd->project->develop_path);
+   ecore_file_mkdir(buf);
+   snprintf(buf, sizeof(buf), "%s/fonts", ppd->project->develop_path);
+   ecore_file_mkdir(buf);
+
+
+
/* updating .dev file path */
tmp = strdup(ppd->path);
tmp_len = strlen(tmp);
@@ -724,11 +736,10 @@ _project_open_internal(Project_Process_Data *ppd)
 
 
 
/**/
-   file_dir = ecore_file_dir_get(ppd->path);
-   snprintf(cmd, sizeof(cmd),
+   snprintf(buf, sizeof(buf),
 "%s --edj %s --path %s/develop", ap.path.exporter, 
ppd->project->saved_edj, file_dir);
 
-   ecore_exe_pipe_run(cmd, FLAGS, NULL);
+   ecore_exe_pipe_run(buf, FLAGS, NULL);
 
ppd->data_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DATA, 
_exe_output_handler, ppd);
ppd->del_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DEL, 
_exporter_finish_handler, ppd);

-- 




[E-devel] EFL 1.18.3 release

2016-11-25 Thread Stefan Schmidt
Our third stable update for the 1.18.x series.

==Fixes:==

   * eocre animator - the anim thread is polled on shutdown use volatile
   * ecore anim - actually fix by checking fd not thread handle
   * ecore_cocoa: fix handling of some keys
   * ecore audio - fix hang in wayland due to pulse audio connecting to x
   * emotion gst1 module - disable subtitles by default as that should
be (T4795)
   * wl_drm and eayland_egl buffer age fix for gl when age changes

==Download:==

http://download.enlightenment.org/rel/libs/efl/efl-1.18.3.tar.gz
914a1145e9854ca0dbc07725865045dbed4d59c7e8b7b9d51ca1ace5540e7f88

http://download.enlightenment.org/rel/libs/efl/efl-1.18.3.tar.xz
0748ec0847f543d96b149cb3a84e6438724e827a38d530922ecb4bd59d3e64c0



--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [website/www-content] master 01/01: Wiki page efl-1.18.3 changed with summary [created] by Stefan Schmidt

2016-11-25 Thread Stefan Schmidt
WWW-www.enlightenment.org pushed a commit to branch master.

http://git.enlightenment.org/website/www-content.git/commit/?id=f09c6b54849c3504fdd6df9f3802cc56c5dcd53f

commit f09c6b54849c3504fdd6df9f3802cc56c5dcd53f
Author: Stefan Schmidt 
Date:   Fri Nov 25 07:05:26 2016 -0800

Wiki page efl-1.18.3 changed with summary [created] by Stefan Schmidt
---
 pages/news/efl-1.18.3.txt | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/pages/news/efl-1.18.3.txt b/pages/news/efl-1.18.3.txt
new file mode 100644
index 000..25ef431
--- /dev/null
+++ b/pages/news/efl-1.18.3.txt
@@ -0,0 +1,22 @@
+=== EFL 1.18.3 release ===
+  * //2016-11-25 - by Stefan Schmidt//
+
+Our third stable update for the 1.18.x series.
+
+==Fixes:==
+
+   * eocre animator - the anim thread is polled on shutdown use volatile
+   * ecore anim - actually fix by checking fd not thread handle
+   * ecore_cocoa: fix handling of some keys
+   * ecore audio - fix hang in wayland due to pulse audio connecting to x
+   * emotion gst1 module - disable subtitles by default as that should be 
(T4795)
+   * wl_drm and eayland_egl buffer age fix for gl when age changes
+ 
+==Download:==
+
+^ ** LINK ** ^ ** SHA256 ** ^
+| [[http://download.enlightenment.org/rel/libs/efl/efl-1.18.3.tar.gz  | 
efl-1.18.3.tar.gz ]] |  
914a1145e9854ca0dbc07725865045dbed4d59c7e8b7b9d51ca1ace5540e7f88 |
+| [[http://download.enlightenment.org/rel/libs/efl/efl-1.18.3.tar.xz  | 
efl-1.18.3.tar.xz ]] | 
0748ec0847f543d96b149cb3a84e6438724e827a38d530922ecb4bd59d3e64c0 |
+
+{{:blank.png?nolink&100|}}
+~~DISCUSSIONS~~
\ No newline at end of file

-- 




[EGIT] [website/www-content] master 01/01: Wiki page start-release changed with summary [] by Stefan Schmidt

2016-11-25 Thread Stefan Schmidt
WWW-www.enlightenment.org pushed a commit to branch master.

http://git.enlightenment.org/website/www-content.git/commit/?id=9efa7f88f1ba125fd1590f6255fd6cde40a161ac

commit 9efa7f88f1ba125fd1590f6255fd6cde40a161ac
Author: Stefan Schmidt 
Date:   Fri Nov 25 06:57:46 2016 -0800

Wiki page start-release changed with summary [] by Stefan Schmidt
---
 pages/start-release.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pages/start-release.txt b/pages/start-release.txt
index 960896f..c82107f 100644
--- a/pages/start-release.txt
+++ b/pages/start-release.txt
@@ -1,3 +1,3 @@
 
-EFL 1.18.2 and Enlightenment 0.21.3 are out - go to our [[download]] page.
+EFL 1.18.3 and Enlightenment 0.21.3 are out - go to our [[download]] page.
 

-- 




[EGIT] [website/www-content] master 01/01: Wiki page download-latest changed with summary [] by Stefan Schmidt

2016-11-25 Thread Stefan Schmidt
WWW-www.enlightenment.org pushed a commit to branch master.

http://git.enlightenment.org/website/www-content.git/commit/?id=d224801dc9bbb9af357d7312d7212ece33a62499

commit d224801dc9bbb9af357d7312d7212ece33a62499
Author: Stefan Schmidt 
Date:   Fri Nov 25 06:57:29 2016 -0800

Wiki page download-latest changed with summary [] by Stefan Schmidt
---
 pages/download-latest.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pages/download-latest.txt b/pages/download-latest.txt
index 331abcc..48660c8 100644
--- a/pages/download-latest.txt
+++ b/pages/download-latest.txt
@@ -1,5 +1,5 @@
 
-efl_v = 1.18.2
+efl_v = 1.18.3
 python_efl_v  = 1.18.0
 elm_v = In efl
 emotion_generic_players_v = In efl

-- 




[EGIT] [core/efl] annotated tag v1.18.3 created (now 71505e1)

2016-11-25 Thread Enlightenment Git
This is an automated email from the git hooks/post-receive script.

stefan pushed a change to annotated tag v1.18.3
in repository core/efl.

at  71505e1   (tag)
   tagging  dd3582298569fe344ed290d8de8d8b430c8577b6 (commit)
  replaces  v1.18.2
 tagged by  Stefan Schmidt
on  Fri Nov 25 15:55:01 2016 +0100

- Log -
v1.18.3

Carsten Haitzler (5):
  eocre animator - the anim thread is polled on shutdown use volatile
  ecore anim - actually fix by checking fd not thread handle
  ecore audio - fix hang in wayland due to pulse audio connecting to x
  emotion gst1 module - disable subtitles by default as that should be
  wl_drm and eayland_egl buffer age fix for gl when age changes

Cedric BAIL (1):
  eet: fix gnutls support with newer version.

Jean Guyomarc'h (1):
  ecore_cocoa: fix handling of some keys

Simon Lees (1):
  Emile: use stronger ssl cipher

Stefan Schmidt (1):
  release: Update NEWS and bump version for 1.18.3 release

---

No new revisions were added by this update.

-- 




[EGIT] [core/efl] master 01/01: elementary_test: fix function name conflict on Windows

2016-11-25 Thread Andrii Kroitor
lorddrew pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=47f14b78f45b188fdabaf3a491479a641c7c7e3d

commit 47f14b78f45b188fdabaf3a491479a641c7c7e3d
Author: Andrii Kroitor 
Date:   Fri Nov 25 15:51:10 2016 +0200

elementary_test: fix function name conflict on Windows
---
 src/bin/elementary/test_win_modal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/elementary/test_win_modal.c 
b/src/bin/elementary/test_win_modal.c
index b844b8a..8775ead 100644
--- a/src/bin/elementary/test_win_modal.c
+++ b/src/bin/elementary/test_win_modal.c
@@ -15,7 +15,7 @@ _parent_win_get(Evas_Object *obj)
 }
 
 static void
-_close(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+_close_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
 {
Evas_Object *win = data;
 
@@ -66,7 +66,7 @@ test_win_modal(void *data EINA_UNUSED, Evas_Object *obj, void 
*event_info EINA_U
elm_object_text_set(bt, "Close");
evas_object_size_hint_align_set(bt, 0.5, 0.5);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
-   evas_object_smart_callback_add(bt, "clicked", _close, win);
+   evas_object_smart_callback_add(bt, "clicked", _close_cb, win);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
 

-- 




[EGIT] [core/efl] master 01/01: Edje_Edit: use specific function to get file's name correctly on Win and Linux

2016-11-25 Thread Vitalii Vorobiov
furrymyad pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1a9a3e701dee43661df97a07a39cd60495c27a7a

commit 1a9a3e701dee43661df97a07a39cd60495c27a7a
Author: Vitalii Vorobiov 
Date:   Fri Nov 25 15:00:49 2016 +0200

Edje_Edit: use specific function to get file's name correctly on Win and 
Linux

Because '\' is dir path for linux, but '/' is dir path for Window,
so better use specific function for getting file's name depending on 
specific
system
---
 src/lib/edje/edje_edit.c | 15 ++-
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 9455999..486395c 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -8562,7 +8562,7 @@ EAPI Eina_Bool
 edje_edit_font_add(Evas_Object *obj, const char *path, const char *alias)
 {
char entry[PATH_MAX];
-   char *new_path;
+   const char *new_path;
struct stat st;
Edje_Font_Directory_Entry *fnt;
 
@@ -8578,14 +8578,12 @@ edje_edit_font_add(Evas_Object *obj, const char *path, 
const char *alias)
/* Alias */
if (alias)
  {
-if ((new_path = strrchr(path, '/'))) new_path++;
-else new_path = (char *)path;
+new_path = ecore_file_file_get(path);
  }
else
  {
-if ((alias = strrchr(path, '/'))) alias++;
-else alias = (char *)path;
-new_path = (char *)alias;
+alias = ecore_file_file_get(path);
+new_path = alias;
  }
snprintf(entry, sizeof(entry), "edje/fonts/%s", alias);
 
@@ -9641,7 +9639,7 @@ edje_edit_image_add(Evas_Object *obj, const char *path)
Edje_Image_Directory_Entry *de;
unsigned int i;
int free_id = -1;
-   char *name;
+   const char *name;
 
GET_ED_OR_RETURN(EINA_FALSE);
 
@@ -9657,8 +9655,7 @@ edje_edit_image_add(Evas_Object *obj, const char *path)
  }
 
/* Image name */
-   if ((name = strrchr(path, '/'))) name++;
-   else name = (char *)path;
+   name = ecore_file_file_get(path);
 
/* Loop trough image directory to find if image exist */
for (i = 0; i < ed->file->image_dir->entries_count; ++i)

-- 




Re: [E-devel] eeze_scanner?

2016-11-25 Thread Mike Blumenkrantz
There is a backend for efm which uses this. It was written while the udisks
api was unstable and is intended for systems where udisks/dbus is not
available.

On Thu, Nov 24, 2016 at 4:09 PM Gustavo Sverzut Barbieri 
wrote:

> Hi all,
>
> I see src/bin/eeze/eeze_scanner... but I wonder who uses that and why
> it exists. It seems to broadcast some events, like cdrom was found,
> things like that. But I don't see anyone connecting to its socket.
>
> Since it uses eet_connection, it's not only about connecting to the
> socket and getting some messages, you need to specify a matching
> Eet_Data_Descriptor (EDD) to parse it correctly.
>
> So I wonder if this is something that is used and where? Otherwise if
> we should drop it.
>
>
> --
> Gustavo Sverzut Barbieri
> --
> Mobile: +55 (16) 99354-9890 <+55%2016%2099354-9890>
>
>
> --
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [tools/eflete] master 01/01: managers: fix "Preview" text

2016-11-25 Thread Andrii Kroitor
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=778b8a73194835f7e037cf069d82594383c3aa36

commit 778b8a73194835f7e037cf069d82594383c3aa36
Author: Andrii Kroitor 
Date:   Thu Nov 24 17:11:56 2016 +0200

managers: fix "Preview" text

Change-Id: I9856207fe655d9571ed40af4ae48d0ef2fedbb19
---
 data/themes/tizen/widgets/layouts/manager.edc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/data/themes/tizen/widgets/layouts/manager.edc 
b/data/themes/tizen/widgets/layouts/manager.edc
index ae36bc3..0691831 100644
--- a/data/themes/tizen/widgets/layouts/manager.edc
+++ b/data/themes/tizen/widgets/layouts/manager.edc
@@ -11,7 +11,9 @@ group { name: "elm/layout/manager/internal";
 text {
font: "Breeze";
size: 13;
+   min: 1 0;
max: 1 0;
+   ellipsis: -1;
 }
 rel1.to_x: "border";
 rel2.to_x: "border";

-- 




[EGIT] [core/efl] master 01/01: elementary flip: skip unnecessary sizing.

2016-11-25 Thread ChunEon Park
hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7171dd09c659ffe5597c29b50c10580237f37d67

commit 7171dd09c659ffe5597c29b50c10580237f37d67
Author: Hermet Park 
Date:   Fri Nov 25 20:16:34 2016 +0900

elementary flip: skip unnecessary sizing.

Sizing in the constructor is wrong.
It's just a waste of function call.
---
 src/lib/elementary/efl_ui_flip.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/lib/elementary/efl_ui_flip.c b/src/lib/elementary/efl_ui_flip.c
index 07e1a26..57d1b18 100644
--- a/src/lib/elementary/efl_ui_flip.c
+++ b/src/lib/elementary/efl_ui_flip.c
@@ -1897,8 +1897,6 @@ _efl_ui_flip_efl_canvas_group_group_add(Eo *obj, 
Efl_Ui_Flip_Data *priv)
priv->intmode = EFL_UI_FLIP_INTERACTION_NONE;
 
elm_widget_can_focus_set(obj, EINA_FALSE);
-
-   _sizing_eval(obj);
 }
 
 EOLIAN static void

-- 




Re: [E-devel] EDD 2017 location discussion - Vote opened

2016-11-25 Thread Stefan Schmidt
Hello.

On 14/11/16 10:11, Stefan Schmidt wrote:
> Hello.
>
> On 04/11/16 11:48, Stefan Schmidt wrote:
>> Hello.
>>
>> After gettign more feedback and proposals here I put out a vote:
>>
>> https://phab.enlightenment.org/V27
>>
>> Let us know what makes sense to you!
>
> We got feedback and preferences form 15 people so far which is great and
> already gives a direction. (e.g. Paris, Toulouse and Edinburgh are
> leading with Malta directly behind)
>
> This community is bigger than 15 people though. :) If you have not voted
> yet please do so to help us understand where we should focus on.

We got to 22 votes now. I still miss some of the usual suspects though. :)

Malta and Toulouse are leading with 14 votes so far, followed by Paris 
with 13, Edinburgh with 12 and USA with 11.

regards
Stefan Schmidt

--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Making documentation for all elements of a eo file mandatory for new files

2016-11-25 Thread Stefan Schmidt
Hello.

On 24/11/16 23:33, Gustavo Sverzut Barbieri wrote:
> Plus reference to events, as it will be hard to add afterwards. See all
> io/net where I try to document their relation to methods

Jpeg also raised this point before. Daniel is looking into this. AFAIK 
he was thinking about the best syntax to use for this which would not 
clash with other reference e.g. same name for event and function.

> Also, it would be nice to extend or replace docs for methods we implement.
> Clear user is "dial(address)" where I'd like to document address string
> encoding for each protocol.

I think Daniel was thinking about this as well. No more details from my 
side on this. Daniel, any comments?

regards
Stefan Schmidt

--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel