Commit Graph

95 Commits

Author SHA1 Message Date
Cedric BAIL 06b65c3627 ecore: add @since .
SVN revision: 57453
2011-03-01 10:12:33 +00:00
Cedric BAIL 40edc9ccb1 ecore: add ecore_con_url_ssl_verify_peer_set patch by Raoul Hecky.
SVN revision: 57448
2011-03-01 09:51:51 +00:00
Carsten Haitzler 754351b353 default 300sec fix from raoul
SVN revision: 57204
2011-02-21 06:38:36 +00:00
Davide Andreoli ecf4379680 ok, sorry, there was a reason: shutting up gcc warnings. spank myself :P
SVN revision: 56612
2011-01-31 18:57:13 +00:00
Davide Andreoli 080b978c88 :/ setting a const char * param to NULL ?? and after the return ?? :O
random spank

SVN revision: 56611
2011-01-31 18:48:50 +00:00
Carsten Haitzler 51c7fa56c0 re-enable progress callbacks.
SVN revision: 56339
2011-01-28 02:46:27 +00:00
Carsten Haitzler a450497a08 ecore_con_url_get needs no args.
SVN revision: 56338
2011-01-28 02:24:24 +00:00
Mike Blumenkrantz 88a8651acb I think someone meant to set it like this originally but was confused by the double negative.
ecore_con_url no longer shows progress bars


SVN revision: 56239
2011-01-20 09:27:19 +00:00
Eduardo de Barros Lima adff898079 Add basic cookie support to Ecore_Con_Url.
This commit adds some simple wrapper functions for libcurl
cookie-related code to Ecore_Con_Url.

It is now possible to enable the cookie engine, clear cookies and
dump/load them from files.

Cookies in both HTTP header-style and cookie-jar are supported.

Patch by Raphael Kubo da Costa <kubo@profusion.mobi>



SVN revision: 55934
2011-01-06 16:10:38 +00:00
Carsten Haitzler b60120b26b ok rafael/rui - i've deprecated send and made a get and post call that
will explicitly do a get or a post. send is still there (deprecated)
and it just does what it did before - it guesses effectively. please
comment. :)



SVN revision: 55926
2011-01-06 06:33:25 +00:00
Carsten Haitzler d19ff43b6e if data is NULL for curl... make postfieldsize 0.
SVN revision: 55583
2010-12-16 08:35:29 +00:00
Rui Seabra 5315577722 http auth was implemented way back in r48715 (one less item in FIXMEs).
SVN revision: 55557
2010-12-14 22:30:53 +00:00
Carsten Haitzler 5c3b45bf65 so... why.. do.. we .. not init.. all? :) how do we expect https and
friends to work... if we dont want them initted :)



SVN revision: 55079
2010-11-30 09:39:23 +00:00
Mike Blumenkrantz ddd151bf37 reformat using ecrustify because uncrustify dicked it up previously
SVN revision: 54128
2010-11-03 17:58:37 +00:00
Raphael Kubo da Costa a07b93ab49 From: Raphael Kubo da Costa <kubo@profusion.mobi>
This signature change follows libcurl's behaviour more closely:
CURLOPT_POSTFIELDSIZE expects a long, and a value of -1 means that
content length calculation is forwarded to libcurl, which performs a
strlen() on CURLOPT_POSTFIELD.



SVN revision: 53845
2010-10-25 02:53:06 +00:00
Cedric BAIL 515f06978b * ecore: time to cleanup ecore_con_url time.
Patch by Patch by Raphael Kubo da Costa <kubo@profusion.mobi>

	As discussed on the development mailing list, we should accept a
	double instead of a time_t for consistency with the rest of the API.
	Some apidox has been added too, and as a result
	ECORE_CON_URL_TIME_LASTMOD has been removed, since it does not make
	much sense (it is an HTTP response header).


SVN revision: 53572
2010-10-18 16:39:12 +00:00
Cedric BAIL 7100d4ac62 * ecore: remove now useless structure.
Patch by Raphael Kubo da Costa <kubo@profusion.mobi>


SVN revision: 53570
2010-10-18 13:49:06 +00:00
Cedric BAIL 680fa431b3 * ecore: remove ecore_con_url_http_post_send as it expose CURL
API and is not useful to someone.


SVN revision: 53566
2010-10-18 12:52:46 +00:00
Mike Blumenkrantz a880b29c6e <discomfitor> ecore_con_url.c: In function 'ecore_con_url_ftp_upload':
<discomfitor> ecore_con_url.c:963:14: warning: too few arguments for format
<rakuco> ah, missing a , filename there
<rakuco> can you commit that


SVN revision: 53334
2010-10-13 03:04:53 +00:00
Lucas De Marchi fcad2a9244 Check for libcurl's return codes when appropriate.
Depending on the option being set by curl_easy_setopt, a return value
different from CURL_OK can be returned (the same applies to curl_multi_*
and CURLM_OK).

This commit checks the return value from those calls and usually
displays an error message with ERR() and returns -- in some cases, an
error is shown but the function does not immediately return.

A few lines of code have also been moved around in order to make
returning from functions as harmless as possible.

By: Raphael Kubo da Costa <kubo@profusion.mobi>



SVN revision: 53275
2010-10-11 19:13:12 +00:00
Lucas De Marchi 8912b4aa1d Simplify the checks in ecore_con_url_http_post_send.
By checking for the validity of the Ecore_Con_Url struct before anything
else and merging some if's, the code can get much cleaner.

By: Raphael Kubo da Costa <kubo@profusion.mobi>



SVN revision: 53274
2010-10-11 19:12:26 +00:00
Lucas De Marchi f39cdf2666 Always use ecore_con_url_ftp_use_epsv_set's parameters.
unused_warning--

By: Raphael Kubo da Costa <kubo@profusion.mobi>



SVN revision: 53273
2010-10-11 19:12:09 +00:00
Lucas De Marchi bd92321ff1 Simplify if clause.
There is no need for an else here, as the return is the last
instruction.

By: Raphael Kubo da Costa <kubo@profusion.mobi>



SVN revision: 53272
2010-10-11 19:11:54 +00:00
Lucas De Marchi c468b8c64b Fix some indentation problems in ecore_con_url.
* Indent blocks inside EINA_LIST_* macros.
* Use sane indentation in ecore_con_url_ftp_upload().

By: Raphael Kubo da Costa <kubo@profusion.mobi>



SVN revision: 53271
2010-10-11 19:11:26 +00:00
Lucas De Marchi b4e6e97808 Add a missing leading underscore to static variables.
By: Raphael Kubo da Costa <kubo@profusion.mobi>



SVN revision: 53270
2010-10-11 19:11:02 +00:00
Lucas De Marchi c74eece7d1 Remove erroneus __UNUSED__ mark.
data is indeed used by _ecore_con_url_idler_handler.

By: Raphael Kubo da Costa <kubo@profusion.mobi>



SVN revision: 53269
2010-10-11 19:10:43 +00:00
Gustavo Lima Chaves 6656e77c9c Yet another int -> Eina_Bool fix, similar to the one done to
ecore_con_url_verbose_set.

Patch by Rafael Kubo.



SVN revision: 53197
2010-10-08 18:41:49 +00:00
Bruno Dilly 13883b21f4 Document ecore_con_url_verbose_set's behaviour.
Author: Raphael Kubo da Costa <kubo@profusion.mobi>



SVN revision: 53191
2010-10-08 15:22:09 +00:00
Bruno Dilly 1a6d3a3eb7 unused_warning--
Author: Raphael Kubo da Costa <kubo@profusion.mobi>



SVN revision: 53190
2010-10-08 15:19:48 +00:00
Bruno Dilly b26732d09c In practice, it was already being treated as an Eina_Bool, so let us
declare it as such and simplify the code.

Author: Raphael Kubo da Costa <kubo@profusion.mobi>



SVN revision: 53189
2010-10-08 15:17:01 +00:00
Mike Blumenkrantz ad3ecd489a ecore_con_url_destroy -> ecore_con_url_free
also some small function rearranging


SVN revision: 52534
2010-09-21 06:49:07 +00:00
Mike Blumenkrantz 6121edec86 this should have gone in with r52531...
SVN revision: 52533
2010-09-21 05:34:49 +00:00
Mike Blumenkrantz f62bcf1ff1 switch private struct members from char bitfields to Eina_Bool bitfields
no noticeable difference


SVN revision: 52399
2010-09-18 06:30:13 +00:00
Lucas De Marchi 5a8a8c9014 Convert (hopefully) all comparisons to NULL
Apply badzero.cocci, badnull.coci and badnull2.cocci

This should convert all cases where there's a comparison to NULL to simpler
forms. This patch applies the following transformations:

code before patch               ||code after patch
===============================================================

return a == NULL;                 return !a;

return a != NULL;                 return !!a;

func(a == NULL);                  func(!a);

func(a != NULL);                  func(!!a);

b = a == NULL;                    b = !a;

b = a != NULL;                    b = !!a;

b = a == NULL ? c : d;            b = !a ? c : d;

b = a != NULL ? c : d;            b = a ? c : d;


other cases:

a == NULL                         !a
a != NULL                         a




SVN revision: 51487
2010-08-21 13:52:25 +00:00
Lucas De Marchi 0a4617ae38 FORMATTING
* Remove vim modelines:
 find . -name '*.[chx]' -exec sed -i '/\/\*$/ {N;N;/ \* vim:ts/d}' \{\} \;
 find . -name '*.[chx]' -exec sed -i '/\/[\*\/] *vim:/d' \{\} \;

* Remove leading blank lines:
 find . -name '*.[cxh]' -exec sed -i '/./,$!d'

If you use vim, use this in your .vimrc:
set ts=8 sw=3 sts=8 expandtab cino=>5n-3f0^-2{2(0W1st0



SVN revision: 50816
2010-08-04 16:57:32 +00:00
Naruto TAKAHASHI b7b6e3c585 From: Naruto TAKAHASHI <tnaruto@gmail.com>
Subject: [E-devel] [PATCH] ecore_con_url_httpauth_set()

Hi all,

I attach a tiny Patch for ecore_con_url_httpauth_set().

CURLOPT_USERNAME and CURLOPT_PASSWORD is declared in enum, so those
options isn't able to be used #ifdef macro's argument.

This patch checks that LIBCURLVERSION_NUM is 0x071301(v7.19.1) and
over.  Because CURLOPT_USERNAME and CURLOPT_PASSWORD was added at
7.19.1.

thanks to confirm this patch.



SVN revision: 50539
2010-07-27 10:29:58 +00:00
Mike Blumenkrantz f0053045e4 add full ssl certificate support to ecore_con: call ecore_con_ssl_cert_add("/path/to/cert.pem") and then create the server object with the ECORE_CON_LOAD_CERT flag
also may have accidentally ruined the formatting on a couple files and started an hour-long discussion over efl formatting scripts to conceal the fact that I used uncrustify to reformat everything


SVN revision: 50529
2010-07-27 06:30:27 +00:00
Mike Blumenkrantz 021fe34df8 big doxy update
SVN revision: 50526
2010-07-27 01:00:24 +00:00
Cedric BAIL fbe9064310 * ecore: Ecore callback really should return Eina_Bool.
SVN revision: 49829
2010-06-24 16:15:56 +00:00
Sebastian Dransfeld 0f4eb30d82 ecore_con: remove unused variable
SVN revision: 48821
2010-05-13 20:24:16 +00:00
Carsten Haitzler 8abda5cb05 only do auth stuff if there in curl.
SVN revision: 48749
2010-05-11 12:10:29 +00:00
Rui Seabra b923e09da0 This commit implements http auth support; in order to avoid exposing too much of curl's internal workings, I opted to have a safety parameter in order to choose between CURLAUTH_ANY and CURLAUTH_ANYSAFE.
SVN revision: 48715
2010-05-09 15:06:06 +00:00
Hannes Janetzek 9dc6c78922 added fuction to send httposts created with curl formadd.
SVN revision: 48651
2010-05-06 20:18:39 +00:00
Carsten Haitzler ea3dace944 handle url set better
SVN revision: 48358
2010-04-27 10:53:25 +00:00
Christopher Michael 300d53a4f4 Patch from Brian Wang to fix the TRUE/FALSE --> EINA_TRUE/EINA_FALSE mess.
(NB: Win32/CE people may need to fix some TRUE/FALSE parts...couldn't test
those).

Thanks Brian :)



SVN revision: 46503
2010-02-26 05:56:49 +00:00
Vincent Torri 4d11d31e3d * instead of including headers wrt to the OS, include them if
they are available
 * compilation on Windows XP minimum only

SVN revision: 46338
2010-02-20 19:12:52 +00:00
Vincent Torri 3499767ddb First steps towards the Windows port of ecore_con.
ecore_con_dns will be hard to port (fork+exec).

SVN revision: 46337
2010-02-20 18:01:50 +00:00
Vincent Torri a4b0afb1e4 * move structures from ecore_private.h to the corresponding source files
* add 2 internal ecore_exe functions as ecore_signak.c uses Ecore_Exe members
   no test is done in those 2 functions
 * remove standard headers from ecore_private.h



SVN revision: 44862
2010-01-03 21:55:50 +00:00
Cedric BAIL d8e1895350 * ecore: Use eina_log.
Patch from Mathieu Taillefumier.


SVN revision: 44637
2009-12-21 17:32:19 +00:00
Cedric BAIL d78f1d48cf * ecore_con_url: When download was broken in the middle, you could
have a status of 200 without all data being downloaded. This should
	fix this case.


SVN revision: 43805
2009-11-19 18:45:51 +00:00