Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_ipc
Modified Files:
Ecore_Ipc.h ecore_ipc.c
Log Message:
add calls to get ip addr of client or server (NULL for created servers of
course) and comments/docs
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_ipc/Ecore_Ipc.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- Ecore_Ipc.h 13 Mar 2006 08:50:26 -0000 1.15
+++ Ecore_Ipc.h 20 Mar 2006 07:45:58 -0000 1.16
@@ -299,7 +299,8 @@
EAPI void ecore_ipc_server_client_limit_set(Ecore_Ipc_Server
*svr, int client_limit, char reject_excess_clients);
EAPI void ecore_ipc_server_data_size_max_set(Ecore_Ipc_Server
*srv, int size);
EAPI int ecore_ipc_server_data_size_max_get(Ecore_Ipc_Server
*srv);
-
+ EAPI char *ecore_ipc_server_ip_get(Ecore_Ipc_Server *svr);
+
/* FIXME: this needs to become an ipc message */
EAPI int ecore_ipc_client_send(Ecore_Ipc_Client *cl, int
major, int minor, int ref, int ref_to, int response, void *data, int size);
EAPI Ecore_Ipc_Server *ecore_ipc_client_server_get(Ecore_Ipc_Client *cl);
@@ -308,6 +309,7 @@
EAPI void *ecore_ipc_client_data_get(Ecore_Ipc_Client *cl);
EAPI void ecore_ipc_client_data_size_max_set(Ecore_Ipc_Client
*cl, int size);
EAPI int ecore_ipc_client_data_size_max_get(Ecore_Ipc_Client
*cl);
+ EAPI char *ecore_ipc_client_ip_get(Ecore_Ipc_Client *cl);
EAPI int ecore_ipc_ssl_available_get(void);
/* FIXME: need to add a callback to "ok" large ipc messages greater than */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_ipc/ecore_ipc.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- ecore_ipc.c 20 Mar 2006 05:59:21 -0000 1.29
+++ ecore_ipc.c 20 Mar 2006 07:45:58 -0000 1.30
@@ -612,6 +612,13 @@
ecore_con_server_client_limit_set(svr->server, client_limit,
reject_excess_clients);
}
+/**
+ * Sets the max data payload size for an Ipc message in bytes
+ *
+ * @param svr The given server.
+ * @param size The maximum data payload size in bytes.
+ * @ingroup Ecore_Ipc_Server_Group
+ */
EAPI void
ecore_ipc_server_data_size_max_set(Ecore_Ipc_Server *svr, int size)
{
@@ -624,6 +631,13 @@
svr->max_buf_size = size;
}
+/**
+ * Gets the max data payload size for an Ipc message in bytes
+ *
+ * @param svr The given server.
+ * @return The maximum data payload in bytes.
+ * @ingroup Ecore_Ipc_Server_Group
+ */
EAPI int
ecore_ipc_server_data_size_max_get(Ecore_Ipc_Server *svr)
{
@@ -636,6 +650,28 @@
return svr->max_buf_size;
}
+/**
+ * Gets the IP address of a server that has been connected to.
+ *
+ * @param svr The given server.
+ * @return A pointer to an internal string that contains the IP address of
+ * the connected server in the form "XXX.YYY.ZZZ.AAA" IP notation.
+ * This string should not be modified or trusted to stay valid after
+ * deletion for the @p svr object. If no IP is known NULL is returned.
+ * @ingroup Ecore_Ipc_Server_Group
+ */
+EAPI char *
+ecore_ipc_server_ip_get(Ecore_Ipc_Server *svr)
+{
+ if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_IPC_SERVER))
+ {
+ ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_IPC_SERVER,
+ "ecore_con_server_ip_get");
+ return NULL;
+ }
+ return ecore_con_server_ip_get(svr->server);
+}
+
#define CLENC(_member) \
d = _ecore_ipc_dlt_int(msg._member, cl->prev.o._member, &md); \
@@ -822,6 +858,13 @@
return cl->data;
}
+/**
+ * Sets the max data payload size for an Ipc message in bytes
+ *
+ * @param client The given client.
+ * @param size The maximum data payload size in bytes.
+ * @ingroup Ecore_Ipc_Client_Group
+ */
EAPI void
ecore_ipc_client_data_size_max_set(Ecore_Ipc_Client *cl, int size)
{
@@ -834,6 +877,13 @@
cl->max_buf_size = size;
}
+/**
+ * Sets the max data payload size for an Ipc message in bytes
+ *
+ * @param cl The given client.
+ * @param size The maximum data payload size in bytes.
+ * @ingroup Ecore_Ipc_Client_Group
+ */
EAPI int
ecore_ipc_client_data_size_max_get(Ecore_Ipc_Client *cl)
{
@@ -847,6 +897,28 @@
}
/**
+ * Gets the IP address of a client that has been connected to.
+ *
+ * @param cl The given client.
+ * @return A pointer to an internal string that contains the IP address of
+ * the connected server in the form "XXX.YYY.ZZZ.AAA" IP notation.
+ * This string should not be modified or trusted to stay valid after
+ * deletion for the @p cl object. If no IP is known NULL is returned.
+ * @ingroup Ecore_Ipc_Client_Group
+ */
+EAPI char *
+ecore_ipc_client_ip_get(Ecore_Ipc_Client *cl)
+{
+ if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_IPC_CLIENT))
+ {
+ ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_IPC_CLIENT,
+ "ecore_con_client_ip_get");
+ return NULL;
+ }
+ return ecore_con_client_ip_get(cl->client);
+}
+
+/**
* Returns if SSL support is available
* @return 1 if SSL is available, 0 if it is not.
* @ingroup Ecore_Con_Client_Group
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs