Skip to content
Newer
Older
100644 70 lines (62 sloc) 3.07 KB
e09eda9 @bagder download and highlevel are replaced with transfer
bagder authored
1 #ifndef __TRANSFER_H
2 #define __TRANSFER_H
ba4e69b @bagder updated source code boilerplate/header
bagder authored
3 /***************************************************************************
fd802db @bagder initial support for "uploading" to file:// URLs
bagder authored
4 * _ _ ____ _
5 * Project ___| | | | _ \| |
6 * / __| | | | |_) | |
7 * | (__| |_| | _ <| |___
ae1912c @bagder Initial revision
bagder authored
8 * \___|\___/|_| \_\_____|
9 *
b903186 @bagder source cleanup: unify look, style and indent levels
bagder authored
10 * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
ae1912c @bagder Initial revision
bagder authored
11 *
ba4e69b @bagder updated source code boilerplate/header
bagder authored
12 * This software is licensed as described in the file COPYING, which
13 * you should have received as part of this distribution. The terms
14 * are also available at http://curl.haxx.se/docs/copyright.html.
fd802db @bagder initial support for "uploading" to file:// URLs
bagder authored
15 *
24dee48 @bagder dual-license fix
bagder authored
16 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 * copies of the Software, and permit persons to whom the Software is
ba4e69b @bagder updated source code boilerplate/header
bagder authored
18 * furnished to do so, under the terms of the COPYING file.
ae1912c @bagder Initial revision
bagder authored
19 *
24dee48 @bagder dual-license fix
bagder authored
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
ae1912c @bagder Initial revision
bagder authored
22 *
ba4e69b @bagder updated source code boilerplate/header
bagder authored
23 ***************************************************************************/
0ece1b5 @bagder Major rename and redesign of the internal "backbone" structs. Details…
bagder authored
24 CURLcode Curl_perform(struct SessionHandle *data);
8b6314c @bagder merged the multi-dev branch back into MAIN again
bagder authored
25 CURLcode Curl_pretransfer(struct SessionHandle *data);
0a3065a @bagder Rename Curl_pretransfersec() to *_second_connect() since it does not …
bagder authored
26 CURLcode Curl_second_connect(struct connectdata *conn);
8b6314c @bagder merged the multi-dev branch back into MAIN again
bagder authored
27 CURLcode Curl_posttransfer(struct SessionHandle *data);
8529898 @bagder - To make it easier for applications that want lots of magic stuff do…
bagder authored
28
29 typedef enum {
30 FOLLOW_NONE, /* not used within the function, just a placeholder to
31 allow initing to this */
32 FOLLOW_FAKE, /* only records stuff, not actually following */
33 FOLLOW_RETRY, /* set if this is a request retry as opposed to a real
34 redirect following */
35 FOLLOW_REDIR, /* a full true redirect */
36 FOLLOW_LAST /* never used */
37 } followtype;
38
b903186 @bagder source cleanup: unify look, style and indent levels
bagder authored
39 CURLcode Curl_follow(struct SessionHandle *data, char *newurl,
40 followtype type);
8529898 @bagder - To make it easier for applications that want lots of magic stuff do…
bagder authored
41
42
8b6314c @bagder merged the multi-dev branch back into MAIN again
bagder authored
43 CURLcode Curl_readwrite(struct connectdata *conn, bool *done);
8cf0814 @dfandrich Fixed some minor type mismatches and missing consts mainly found by s…
dfandrich authored
44 int Curl_single_getsock(const struct connectdata *conn,
686d907 @bagder First curl_multi_socket() commit. Should primarily be considered as a…
bagder authored
45 curl_socket_t *socks,
46 int numsocks);
3e1caa6 @bagder HTTP "auth done right". See lib/README.httpauth
bagder authored
47 CURLcode Curl_readrewind(struct connectdata *conn);
8e28721 @bagder The read callback can now return CURL_READFUNC_ABORT to stop a transfer.
bagder authored
48 CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp);
1048043 @bagder - Lots of good work by Krister Johansen, mostly related to pipelining:
bagder authored
49 CURLcode Curl_reconnect_request(struct connectdata **connp);
8b5102c @bagder - Andre Guibert de Bruet pointed out a missing return code check for a
bagder authored
50 CURLcode Curl_retry_request(struct connectdata *conn, char **url);
8511b64 transfer: avoid insane conversion of time_t
Stefan Krause authored
51 bool Curl_meets_timecondition(struct SessionHandle *data, time_t timeofdoc);
b7eeb6e @bagder Major overhaul introducing http pipelining support and shared connection
bagder authored
52
1efec65 @bagder curl_transfer became Curl_perform() to better match the public name and
bagder authored
53 /* This sets up a forthcoming transfer */
c011146 @bagder Curl_setup_transfer: no longer returns anything
bagder authored
54 void
b7eeb6e @bagder Major overhaul introducing http pipelining support and shared connection
bagder authored
55 Curl_setup_transfer (struct connectdata *data,
39af394 @bagder removed tabs and trailing whitespace from source
bagder authored
56 int sockindex, /* socket index to read from or -1 */
57 curl_off_t size, /* -1 if unknown at this point */
58 bool getheader, /* TRUE if header parsing is wanted */
59 curl_off_t *bytecountp, /* return number of bytes read */
60 int writesockindex, /* socket index to write to, it may
7225b14 @bagder curl_socket_t mistakes cleanup
bagder authored
61 very well be the same we read from.
62 -1 disables */
b791e15 @bagder use curl_off_t instead of off_t!
bagder authored
63 curl_off_t *writecountp /* return number of bytes written */
ae1912c @bagder Initial revision
bagder authored
64 );
7de44e0 @greearb Make rate-limitation logic smoother
greearb authored
65
66 long Curl_sleep_time(curl_off_t rate_bps, curl_off_t cur_rate_bps,
67 int pkt_size);
68
ae1912c @bagder Initial revision
bagder authored
69 #endif
Something went wrong with that request. Please try again.