Enlightenment CVS committal Author : bangersnmash74 Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_con Modified Files: Ecore_Con.h Makefile.am ecore_con_private.h Added Files: ecore_con_url.c Log Message: Generic ecore_con_url implementation based on CURL =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_con/Ecore_Con.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- Ecore_Con.h 29 Apr 2005 04:51:31 -0000 1.8 +++ Ecore_Con.h 24 Jun 2005 13:38:27 -0000 1.9 @@ -57,6 +57,7 @@ #ifndef _ECORE_CON_PRIVATE_H typedef void Ecore_Con_Server; /**< A connection handle */ typedef void Ecore_Con_Client; /**< A connection handle */ + typedef void Ecore_Con_Url; typedef enum _Ecore_Con_Type { @@ -74,6 +75,8 @@ typedef struct _Ecore_Con_Event_Server_Del Ecore_Con_Event_Server_Del; typedef struct _Ecore_Con_Event_Client_Data Ecore_Con_Event_Client_Data; typedef struct _Ecore_Con_Event_Server_Data Ecore_Con_Event_Server_Data; + typedef struct _Ecore_Con_Event_Url_Data Ecore_Con_Event_Url_Data; + typedef struct _Ecore_Con_Event_Url_Complete Ecore_Con_Event_Url_Complete; struct _Ecore_Con_Event_Client_Add { @@ -109,12 +112,27 @@ int size; }; + struct _Ecore_Con_Event_Url_Data + { + Ecore_Con_Url *url_con; + void *data; + int size; + }; + + struct _Ecore_Con_Event_Url_Complete + { + Ecore_Con_Url *url_con; + int status; + }; + extern int ECORE_CON_EVENT_CLIENT_ADD; extern int ECORE_CON_EVENT_CLIENT_DEL; extern int ECORE_CON_EVENT_SERVER_ADD; extern int ECORE_CON_EVENT_SERVER_DEL; extern int ECORE_CON_EVENT_CLIENT_DATA; extern int ECORE_CON_EVENT_SERVER_DATA; + extern int ECORE_CON_EVENT_URL_DATA; + extern int ECORE_CON_EVENT_URL_COMPLETE; EAPI int ecore_con_init(void); EAPI int ecore_con_shutdown(void); @@ -136,7 +154,13 @@ EAPI int ecore_con_ssl_available_get(void); - + EAPI int ecore_con_url_init(void); + EAPI int ecore_con_url_shutdown(void); + EAPI Ecore_Con_Url *ecore_con_url_new(const char *url); + EAPI void ecore_con_url_destroy(Ecore_Con_Url *url_con); + EAPI int ecore_con_url_url_set(Ecore_Con_Url *url_con, const char *url); + EAPI int ecore_con_url_send(Ecore_Con_Url *url_con, void *data, size_t length, char *content_type); + #ifdef __cplusplus } #endif =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_con/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- Makefile.am 10 Mar 2005 15:19:36 -0000 1.9 +++ Makefile.am 24 Jun 2005 13:38:27 -0000 1.10 @@ -5,7 +5,7 @@ -I$(top_builddir)/src/lib/ecore_con \ -I$(top_srcdir)/src/lib/ecore \ -I$(top_srcdir)/src/lib/ecore_con \ [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ @curl_cflags@ libecore_con_la_LDFLAGS = -version-info 1:0:0 \ -L$(top_builddir)/src/lib/ecore/.libs @@ -18,11 +18,12 @@ libecore_con_la_SOURCES = \ ecore_con.c \ +ecore_con_url.c \ ecore_con_private.h libecore_con_la_LIBADD = \ $(top_builddir)/src/lib/ecore/libecore.la \ [EMAIL PROTECTED]@ @winsock_libs@ [EMAIL PROTECTED]@ @winsock_libs@ @curl_libs@ libecore_con_la_DEPENDENCIES = \ $(top_builddir)/src/lib/ecore/libecore.la @@ -31,4 +32,5 @@ EXTRA_DIST = \ ecore_con.c \ +ecore_con_url.c \ ecore_con_private.h =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_con/ecore_con_private.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- ecore_con_private.h 29 Apr 2005 04:51:31 -0000 1.7 +++ ecore_con_private.h 24 Jun 2005 13:38:27 -0000 1.8 @@ -7,11 +7,19 @@ #if USE_OPENSSL #include <openssl/ssl.h> #endif +#ifdef HAVE_CURL +#include <curl/curl.h> +#endif #define READBUFSIZ 65536 typedef struct _Ecore_Con_Client Ecore_Con_Client; typedef struct _Ecore_Con_Server Ecore_Con_Server; +#ifdef HAVE_CURL +typedef struct _Ecore_Con_Url Ecore_Con_Url; +#else +typedef void Ecore_Con_Url; +#endif typedef enum _Ecore_Con_Type { @@ -64,4 +72,15 @@ #endif }; +#ifdef HAVE_CURL +struct _Ecore_Con_Url +{ + /* FIXME: ECORE_MAGIC ? */ + CURL *curl_easy; + char *url; + struct curl_slist *headers; + Ecore_Fd_Handler *fd_handler; + char active : 1; +}; +#endif #endif ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs