ecore_con_server_clients_get
authorcodewarrior <codewarrior>
Thu, 30 Mar 2006 06:48:45 +0000 (06:48 +0000)
committercodewarrior <codewarrior@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 30 Mar 2006 06:48:45 +0000 (06:48 +0000)
SVN revision: 21597

legacy/ecore/src/lib/ecore_con/Ecore_Con.h
legacy/ecore/src/lib/ecore_con/ecore_con.c

index 24a5a9a62e16a954bc3ead33a1d9ace9919eb519..e17c2a61ead107efd55553474b5158d83e22fe24 100644 (file)
@@ -23,6 +23,7 @@
 #endif
 
 #include <netdb.h>
+#include <Ecore_Data.h>
 
 /**
  * @file Ecore_Con.h
@@ -149,6 +150,7 @@ extern "C" {
    EAPI void             *ecore_con_server_del(Ecore_Con_Server *svr);
    EAPI void             *ecore_con_server_data_get(Ecore_Con_Server *svr);
    EAPI int               ecore_con_server_connected_get(Ecore_Con_Server *svr);
+   EAPI Ecore_List       *ecore_con_server_clients_get(Ecore_Con_Server *svr);
    EAPI int               ecore_con_server_send(Ecore_Con_Server *svr, void *data, int size);
    EAPI void              ecore_con_server_client_limit_set(Ecore_Con_Server *svr, int client_limit, char reject_excess_clients);
    EAPI char             *ecore_con_server_ip_get(Ecore_Con_Server *svr);
index 6378db5e1c62b73e5c8c6560630a1e6abf53d810..3b611a335d944b3a482a24adad484804e081a03c 100644 (file)
@@ -549,6 +549,24 @@ ecore_con_server_connected_get(Ecore_Con_Server *svr)
    return 1;
 }
 
+/**
+ * Retrieves the current list of clients.
+ * @param   svr The given server.
+ * @return  The list of clients on this server.
+ * @ingroup Ecore_Con_Server_Group
+ */
+EAPI Ecore_List*
+ecore_con_server_clients_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_clients_get");
+       return NULL;
+     }   
+   return svr->clients;
+}
+
 /**
  * Sends the given data to the given server.
  * @param   svr  The given server.