On Thu, 25 Feb 2010 06:05:28 +0100 (CET) Vincent Torri <vto...@univ-evry.fr>
said:

that's a good q. as it is now - it means you can get all the platform specific
info about your connection... BUT this is platform-specific. the other
option is a whole bunch of calls or a big struct we fill in from addrinfo that
is at least a superset of all possible addrinfo fields.
 
> 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
> 
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to