summaryrefslogtreecommitdiff
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
parent3bddb2b6c4b3bfd8e812ed31a583c7593e44a4f3 (diff)
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
535} 535}
536 536
537EOLIAN static void 537EOLIAN static void
538_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) 538_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)
539{ 539{
540 unsigned int protocol[4]; 540 unsigned int protocol[4];
541 unsigned int protocol_length; 541 unsigned int protocol_length;
542 unsigned int section_length; 542 unsigned int section_length;
543 unsigned int size; 543 unsigned int size;
544 unsigned int length = 0;
545 const void *value = NULL;
544 char *tmp; 546 char *tmp;
545 547
546 if (!reply) return; 548 if (!reply) return;
547 if (!protocol_name) return; 549 if (!protocol_name) return;
548 if (!section) return; 550 if (!section) return;
549 551
552 if (section_data)
553 {
554 length = eina_binbuf_length_get(section_data);
555 value = eina_binbuf_string_get(section_data);
556 }
557
550 protocol_length = strlen(protocol_name) + 1; 558 protocol_length = strlen(protocol_name) + 1;
551 if (protocol_length == 1) return; 559 if (protocol_length == 1) return;
552 section_length = strlen(section) + 1; 560 section_length = strlen(section) + 1;
@@ -946,7 +954,9 @@ ecore_con_eet_send(Ecore_Con_Reply *reply, const char *name, void *value)
946EAPI void 954EAPI void
947ecore_con_eet_raw_send(Ecore_Con_Reply *reply, const char *protocol_name, const char *section, void *value, unsigned int length) 955ecore_con_eet_raw_send(Ecore_Con_Reply *reply, const char *protocol_name, const char *section, void *value, unsigned int length)
948{ 956{
949 ecore_con_eet_base_raw_send(reply->ece, reply, protocol_name, section, value, length); 957 Eina_Binbuf *buf = eina_binbuf_manage_new(value, length, 1);
958 ecore_con_eet_base_raw_send(reply->ece, reply, protocol_name, section, buf);
959 eina_binbuf_free(buf);
950} 960}
951 961
952#include "ecore_con_eet_base.eo.c" 962#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) {
83 to which the data has to be sent.]] 83 to which the data has to be sent.]]
84 protocol_name: string; [[The name of the eet stream.]] 84 protocol_name: string; [[The name of the eet stream.]]
85 section: string; [[Name of section in the eet descriptor.]] 85 section: string; [[Name of section in the eet descriptor.]]
86 value: void_ptr; [[The value of the section.]] 86 section_data: ptr(Eina.Binbuf);
87 length: uint; [[The length of the data that is being sent.]]
88 } 87 }
89 } 88 }
90 } 89 }