| 1 | #ifndef HEADER_CURL_URL_H |
| 2 | #define |
| 3 | /*************************************************************************** |
| 4 | * _ _ ____ _ |
| 5 | * Project ___| | | | _ \| | |
| 6 | * / __| | | | |_) | | |
| 7 | * | (__| |_| | _ <| |___ |
| 8 | * \___|\___/|_| \_\_____| |
| 9 | * |
| 10 | * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. |
| 11 | * |
| 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 https://curl.se/docs/copyright.html. |
| 15 | * |
| 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 |
| 18 | * furnished to do so, under the terms of the COPYING file. |
| 19 | * |
| 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 21 | * KIND, either express or implied. |
| 22 | * |
| 23 | ***************************************************************************/ |
| 24 | #include "curl_setup.h" |
| 25 | |
| 26 | /* |
| 27 | * Prototypes for library-wide functions provided by url.c |
| 28 | */ |
| 29 | |
| 30 | CURLcode Curl_init_do(struct Curl_easy *data, struct connectdata *conn); |
| 31 | CURLcode Curl_open(struct Curl_easy **curl); |
| 32 | CURLcode Curl_init_userdefined(struct Curl_easy *data); |
| 33 | |
| 34 | void Curl_freeset(struct Curl_easy *data); |
| 35 | CURLcode Curl_uc_to_curlcode(CURLUcode uc); |
| 36 | CURLcode Curl_close(struct Curl_easy **datap); /* opposite of curl_open() */ |
| 37 | CURLcode Curl_connect(struct Curl_easy *, bool *async, bool *protocol_connect); |
| 38 | CURLcode Curl_disconnect(struct Curl_easy *data, |
| 39 | struct connectdata *, bool dead_connection); |
| 40 | CURLcode Curl_setup_conn(struct Curl_easy *data, |
| 41 | bool *protocol_done); |
| 42 | void Curl_free_request_state(struct Curl_easy *data); |
| 43 | CURLcode Curl_parse_login_details(const char *login, const size_t len, |
| 44 | char **userptr, char **passwdptr, |
| 45 | char **optionsptr); |
| 46 | |
| 47 | const struct Curl_handler *Curl_builtin_scheme(const char *scheme); |
| 48 | |
| 49 | bool Curl_is_ASCII_name(const char *hostname); |
| 50 | CURLcode Curl_idnconvert_hostname(struct Curl_easy *data, |
| 51 | struct hostname *host); |
| 52 | void Curl_free_idnconverted_hostname(struct hostname *host); |
| 53 | |
| 54 | #define CURL_DEFAULT_PROXY_PORT 1080 /* default proxy port unless specified */ |
| 55 | #define CURL_DEFAULT_HTTPS_PROXY_PORT 443 /* default https proxy port unless |
| 56 | specified */ |
| 57 | |
| 58 | #ifdef CURL_DISABLE_VERBOSE_STRINGS |
| 59 | #define Curl_verboseconnect(x,y) Curl_nop_stmt |
| 60 | #else |
| 61 | void Curl_verboseconnect(struct Curl_easy *data, struct connectdata *conn); |
| 62 | #endif |
| 63 | |
| 64 | #ifdef CURL_DISABLE_PROXY |
| 65 | #define CONNECT_PROXY_SSL() FALSE |
| 66 | #else |
| 67 | |
| 68 | #define CONNECT_PROXY_SSL()\ |
| 69 | (conn->http_proxy.proxytype == CURLPROXY_HTTPS &&\ |
| 70 | !conn->bits.proxy_ssl_connected[sockindex]) |
| 71 | |
| 72 | #define CONNECT_FIRSTSOCKET_PROXY_SSL()\ |
| 73 | (conn->http_proxy.proxytype == CURLPROXY_HTTPS &&\ |
| 74 | !conn->bits.proxy_ssl_connected[FIRSTSOCKET]) |
| 75 | |
| 76 | #define CONNECT_SECONDARYSOCKET_PROXY_SSL()\ |
| 77 | (conn->http_proxy.proxytype == CURLPROXY_HTTPS &&\ |
| 78 | !conn->bits.proxy_ssl_connected[SECONDARYSOCKET]) |
| 79 | #endif /* !CURL_DISABLE_PROXY */ |
| 80 | |
| 81 | #endif /* HEADER_CURL_URL_H */ |
| 82 | |