aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-03-23 13:50:06 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-03-23 13:53:51 -0400
commitcf0e1fac4cb84efe1311cb65edc60e06d93ffac2 (patch)
tree5b34ed803fe450d745ba588b9633c3fb4a3255d7
parenteolian: commit all changes into staging area first (diff)
downloadefl-devs/discomfitor/void.tar.gz
ecore-con-eet: replace void_ptr usage with binbuf in eo apidevs/discomfitor/void
-rw-r--r--src/lib/ecore_con/ecore_con_eet.c14
-rw-r--r--src/lib/ecore_con/ecore_con_eet_base.eo3
2 files changed, 13 insertions, 4 deletions
diff --git a/src/lib/ecore_con/ecore_con_eet.c b/src/lib/ecore_con/ecore_con_eet.c
index 134d691f4c..4fa79b7736 100644
--- a/src/lib/ecore_con/ecore_con_eet.c
+++ b/src/lib/ecore_con/ecore_con_eet.c
@@ -535,18 +535,26 @@ _ecore_con_eet_base_send(Eo *obj EINA_UNUSED, Ecore_Con_Eet_Base_Data *pd, Ecore
}
EOLIAN static void
-_ecore_con_eet_base_raw_send(Eo *obj EINA_UNUSED, Ecore_Con_Eet_Base_Data *pd, Ecore_Con_Reply *reply, const char *protocol_name, const char *section, void *value, unsigned int length)
+_ecore_con_eet_base_raw_send(Eo *obj EINA_UNUSED, Ecore_Con_Eet_Base_Data *pd, Ecore_Con_Reply *reply, const char *protocol_name, const char *section, Eina_Binbuf *section_data)
{
unsigned int protocol[4];
unsigned int protocol_length;
unsigned int section_length;
unsigned int size;
+ unsigned int length = 0;
+ const void *value = NULL;
char *tmp;
if (!reply) return;
if (!protocol_name) return;
if (!section) return;
+ if (section_data)
+ {
+ length = eina_binbuf_length_get(section_data);
+ value = eina_binbuf_string_get(section_data);
+ }
+
protocol_length = strlen(protocol_name) + 1;
if (protocol_length == 1) return;
section_length = strlen(section) + 1;
@@ -946,7 +954,9 @@ ecore_con_eet_send(Ecore_Con_Reply *reply, const char *name, void *value)
EAPI void
ecore_con_eet_raw_send(Ecore_Con_Reply *reply, const char *protocol_name, const char *section, void *value, unsigned int length)
{
- ecore_con_eet_base_raw_send(reply->ece, reply, protocol_name, section, value, length);
+ Eina_Binbuf *buf = eina_binbuf_manage_new(value, length, 1);
+ ecore_con_eet_base_raw_send(reply->ece, reply, protocol_name, section, buf);
+ eina_binbuf_free(buf);
}
#include "ecore_con_eet_base.eo.c"
diff --git a/src/lib/ecore_con/ecore_con_eet_base.eo b/src/lib/ecore_con/ecore_con_eet_base.eo
index 8c5b3a554f..76bdb3aeca 100644
--- a/src/lib/ecore_con/ecore_con_eet_base.eo
+++ b/src/lib/ecore_con/ecore_con_eet_base.eo
@@ -83,8 +83,7 @@ class Ecore.Con.Eet.Base (Efl.Object) {
to which the data has to be sent.]]
protocol_name: string; [[The name of the eet stream.]]
section: string; [[Name of section in the eet descriptor.]]
- value: void_ptr; [[The value of the section.]]
- length: uint; [[The length of the data that is being sent.]]
+ section_data: ptr(Eina.Binbuf);
}
}
}