diff options
author | George Hazan <george.hazan@gmail.com> | 2013-11-10 21:43:18 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-11-10 21:43:18 +0000 |
commit | 530102b3b16fdc6f008cdf312e5977a878f295db (patch) | |
tree | 3159eb3d5712151a33d796b7a0039ae9a4d00e09 /plugins/FTPFileYM/curl/lib/pingpong.h | |
parent | e40ecc70a7db28bdf78dad5d804e07d08a77159c (diff) |
libcurl update
git-svn-id: http://svn.miranda-ng.org/main/trunk@6864 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FTPFileYM/curl/lib/pingpong.h')
-rw-r--r-- | plugins/FTPFileYM/curl/lib/pingpong.h | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/plugins/FTPFileYM/curl/lib/pingpong.h b/plugins/FTPFileYM/curl/lib/pingpong.h index b48c1ed61a..b925ab98e1 100644 --- a/plugins/FTPFileYM/curl/lib/pingpong.h +++ b/plugins/FTPFileYM/curl/lib/pingpong.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -32,6 +32,13 @@ /* forward-declaration, this is defined in urldata.h */ struct connectdata; +typedef enum { + FTPTRANSFER_BODY, /* yes do transfer a body */ + FTPTRANSFER_INFO, /* do still go through to get info/headers */ + FTPTRANSFER_NONE, /* don't get anything and don't get info */ + FTPTRANSFER_LAST /* end of list marker, never used */ +} curl_pp_transfer; + /* * 'pingpong' is the generic struct used for protocols doing server<->client * conversations in a back-and-forth style such as FTP, IMAP, POP3, SMTP etc. @@ -64,23 +71,17 @@ struct pingpong { CURLcode (*statemach_act)(struct connectdata *conn); - int (*endofresp)(struct pingpong *pp, int *code); + bool (*endofresp)(struct connectdata *conn, char *ptr, size_t len, + int *code); }; /* - * Curl_pp_multi_statemach() - * - * called repeatedly until done when the multi interface is used. - */ -CURLcode Curl_pp_multi_statemach(struct pingpong *pp); - -/* - * Curl_pp_easy_statemach() + * Curl_pp_statemach() * - * called repeatedly until done when the easy interface is used. + * called repeatedly until done. Set 'wait' to make it wait a while on the + * socket if there's no traffic. */ -CURLcode Curl_pp_easy_statemach(struct pingpong *pp); - +CURLcode Curl_pp_statemach(struct pingpong *pp, bool block); /* initialize stuff to prepare for reading a fresh new response */ void Curl_pp_init(struct pingpong *pp); @@ -136,4 +137,14 @@ CURLcode Curl_pp_disconnect(struct pingpong *pp); int Curl_pp_getsock(struct pingpong *pp, curl_socket_t *socks, int numsocks); + +/*********************************************************************** + * + * Curl_pp_moredata() + * + * Returns whether there are still more data in the cache and so a call + * to Curl_pp_readresp() will not block. + */ +bool Curl_pp_moredata(struct pingpong *pp); + #endif /* HEADER_CURL_PINGPONG_H */ |