The attached patch adds a new function called ecore_con_server_name_get.
All it does is return the name field of the given Ecore_Con_Server object.
Since we are in this alpha state I was unsure if such an addition was
possible, but I think it can be useful. Without this I will have to store a
copy of the server string in my own code and send it around with the server
object which will be a pain as well as a waste.
Index: src/lib/ecore_con/Ecore_Con.h
===
--- src/lib/ecore_con/Ecore_Con.h (revision 51669)
+++ src/lib/ecore_con/Ecore_Con.h (working copy)
@@ -366,6 +366,7 @@
void *data);
EAPI int ecore_con_server_connected_get(Ecore_Con_Server *svr);
EAPI Eina_List * ecore_con_server_clients_get(Ecore_Con_Server *svr);
+EAPI const char * ecore_con_server_name_get(Ecore_Con_Server *svr);
EAPI int ecore_con_server_send(Ecore_Con_Server *svr,
const void *data,
int size);
Index: src/lib/ecore_con/ecore_con.c
===
--- src/lib/ecore_con/ecore_con.c (revision 51669)
+++ src/lib/ecore_con/ecore_con.c (working copy)
@@ -511,6 +511,24 @@
}
/**
+ * Retrieves the name of server.
+ * @param svr The given server.
+ * @return The name of the server.
+ */
+EAPI const char *
+ecore_con_server_name_get(Ecore_Con_Server *svr)
+{
+ if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_CON_SERVER))
+ {
+ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_CON_SERVER,
+ ecore_con_server_name_get);
+return NULL;
+ }
+
+ return svr-name;
+}
+
+/**
* Sends the given data to the given server.
* @param svr The given server.
* @param data The given data.
--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel