summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2011-09-12 08:30:22 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2011-09-12 08:30:22 +0000
commite98287527714fea8575ac5273372a9dc6e278a19 (patch)
treecbfbd148129eeecdbdd32a10cfa9c1ef371bc9fe /legacy
parentc032eb32eeddacec59e7aee097d4c6f57a430a2a (diff)
more useless ecore-con functions: ecore_con_server_fd_get and ecore_con_client_fd_get
SVN revision: 63344
Diffstat (limited to 'legacy')
-rw-r--r--legacy/ecore/ChangeLog4
-rw-r--r--legacy/ecore/src/lib/ecore_con/Ecore_Con.h24
-rw-r--r--legacy/ecore/src/lib/ecore_con/ecore_con.c23
3 files changed, 51 insertions, 0 deletions
diff --git a/legacy/ecore/ChangeLog b/legacy/ecore/ChangeLog
index 24744cba20..87d5b96c1e 100644
--- a/legacy/ecore/ChangeLog
+++ b/legacy/ecore/ChangeLog
@@ -287,3 +287,7 @@
287 * Add ecore_thread_main_loop_begin and ecore_thread_main_loop_end. 287 * Add ecore_thread_main_loop_begin and ecore_thread_main_loop_end.
288 Usefull to protect EFL call from another thread. 288 Usefull to protect EFL call from another thread.
289 289
2902011-09-12 Mike Blumenkrantz
291
292 * Add ecore_con_server_fd_get, ecore_con_client_fd_get for manipulating
293 server file descriptors.
diff --git a/legacy/ecore/src/lib/ecore_con/Ecore_Con.h b/legacy/ecore/src/lib/ecore_con/Ecore_Con.h
index e6653e12b9..645e835c4f 100644
--- a/legacy/ecore/src/lib/ecore_con/Ecore_Con.h
+++ b/legacy/ecore/src/lib/ecore_con/Ecore_Con.h
@@ -958,6 +958,30 @@ EAPI void ecore_con_server_timeout_set(Ecore_Con_Server *svr, doubl
958EAPI double ecore_con_server_timeout_get(Ecore_Con_Server *svr); 958EAPI double ecore_con_server_timeout_get(Ecore_Con_Server *svr);
959 959
960/** 960/**
961 * Get the fd that the server is connected to
962 *
963 * @param svr The server object
964 * @return The fd, or -1 on failure
965 *
966 * This function returns the fd which is used by the underlying server connection.
967 * It should not be tampered with unless you REALLY know what you are doing.
968 * @note This function is only valid for servers created with ecore_con_server_connect()
969 * @since 1.1
970 */
971EAPI int ecore_con_server_fd_get(Ecore_Con_Server *svr);
972
973/**
974 * Get the fd that the client is connected to
975 *
976 * @param cl The client object
977 * @return The fd, or -1 on failure
978 *
979 * This function returns the fd which is used by the underlying client connection.
980 * It should not be tampered with unless you REALLY know what you are doing.
981 * @since 1.1
982 */
983EAPI int ecore_con_client_fd_get(Ecore_Con_Client *cl);
984/**
961 * @} 985 * @}
962 */ 986 */
963 987
diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con.c b/legacy/ecore/src/lib/ecore_con/ecore_con.c
index 7f46c5ddff..0d2657e620 100644
--- a/legacy/ecore/src/lib/ecore_con/ecore_con.c
+++ b/legacy/ecore/src/lib/ecore_con/ecore_con.c
@@ -888,6 +888,29 @@ ecore_con_client_flush(Ecore_Con_Client *cl)
888 _ecore_con_client_flush(cl); 888 _ecore_con_client_flush(cl);
889} 889}
890 890
891EAPI int
892ecore_con_server_fd_get(Ecore_Con_Server *svr)
893{
894 if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_CON_SERVER))
895 {
896 ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_CON_SERVER, __func__);
897 return -1;
898 }
899 if (svr->created) return -1;
900 return ecore_main_fd_handler_fd_get(svr->fd_handler);
901}
902
903EAPI int
904ecore_con_client_fd_get(Ecore_Con_Client *cl)
905{
906 if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_CON_CLIENT))
907 {
908 ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_CON_CLIENT, __func__);
909 return -1;
910 }
911 return ecore_main_fd_handler_fd_get(cl->fd_handler);
912}
913
891/** 914/**
892 * @} 915 * @}
893 */ 916 */