From: Vincent T. <vt...@un...> - 2010-02-25 05:05:38
|
Hey, in Ecore_Con.h, the function ecore_con_info_get() has a parameter of type a pointer to struct addrinfo Shouldn't we pass instead parameter of "standard" types instead of such struct ? something like: EAPI int ecore_con_info_get(Ecore_Con_Server *svr, Ecore_Con_Info_Cb done_cb, void *data, int *protocol, int *flag); Another solution would be to define our own types (i don't mention typdef's): enum _Ecore_Con_Socket_Flag { ECORE_CON_SOCKET_FLAG_CONNECT, ECORE_CON_SOCKET_FLAG_LISTEN }; enum _Ecore_Con_Socket_Protocol { ECORE_CON_SOCKET_PROTOCOL_TCP, ECORE_CON_SOCKET_PROTOCOL_UDP, }; struct _Ecore_Con_Socket_Info { Ecore_Con_Socket_Protocol protocol; Ecore_Con_Socket_Flag flag; }; The function would then be: EAPI int ecore_con_info_get(Ecore_Con_Server *svr, Ecore_Con_Info_Cb done_cb, void *data, Ecore_Con_Socket_Info *info) What do you think ? Btw, I think that we should see if no other exported header files have such API. Vincent |