98 lines
3.8 KiB
C
Raw Normal View History

2015-04-27 22:25:09 +02:00
#ifndef HEADER_CURL_URL_H
#define HEADER_CURL_URL_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
2023-07-02 19:51:09 +02:00
* Copyright (C) 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
2021-09-14 00:13:48 +02:00
* are also available at https://curl.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
2022-11-16 20:14:03 +01:00
* SPDX-License-Identifier: curl
*
***************************************************************************/
2015-04-27 22:25:09 +02:00
#include "curl_setup.h"
/*
* Prototypes for library-wide functions provided by url.c
*/
2016-09-11 17:22:32 +02:00
CURLcode Curl_init_do(struct Curl_easy *data, struct connectdata *conn);
CURLcode Curl_open(struct Curl_easy **curl);
2018-04-23 21:13:27 +02:00
CURLcode Curl_init_userdefined(struct Curl_easy *data);
2018-11-29 20:27:00 +01:00
2020-08-30 11:54:41 +02:00
void Curl_freeset(struct Curl_easy *data);
2018-11-29 20:27:00 +01:00
CURLcode Curl_uc_to_curlcode(CURLUcode uc);
2020-08-30 11:54:41 +02:00
CURLcode Curl_close(struct Curl_easy **datap); /* opposite of curl_open() */
2019-11-11 23:01:05 +01:00
CURLcode Curl_connect(struct Curl_easy *, bool *async, bool *protocol_connect);
2024-11-11 15:18:55 +01:00
bool Curl_on_disconnect(struct Curl_easy *data,
struct connectdata *, bool aborted);
2021-09-14 00:13:48 +02:00
CURLcode Curl_setup_conn(struct Curl_easy *data,
2015-04-27 22:25:09 +02:00
bool *protocol_done);
2024-11-11 15:18:55 +01:00
void Curl_conn_free(struct Curl_easy *data, struct connectdata *conn);
2018-04-23 21:13:27 +02:00
CURLcode Curl_parse_login_details(const char *login, const size_t len,
char **userptr, char **passwdptr,
char **optionsptr);
2018-11-29 20:27:00 +01:00
2024-04-14 22:45:38 +02:00
/* Get protocol handler for a URI scheme
* @param scheme URI scheme, case-insensitive
* @return NULL of handler not found
*/
const struct Curl_handler *Curl_get_scheme_handler(const char *scheme);
const struct Curl_handler *Curl_getn_scheme_handler(const char *scheme,
size_t len);
2015-04-27 22:25:09 +02:00
#define CURL_DEFAULT_PROXY_PORT 1080 /* default proxy port unless specified */
2017-07-20 19:35:53 +02:00
#define CURL_DEFAULT_HTTPS_PROXY_PORT 443 /* default https proxy port unless
specified */
2015-04-27 22:25:09 +02:00
#ifdef CURL_DISABLE_VERBOSE_STRINGS
2024-07-09 14:46:46 +02:00
#define Curl_verboseconnect(x,y,z) Curl_nop_stmt
2015-04-27 22:25:09 +02:00
#else
2024-07-09 14:46:46 +02:00
void Curl_verboseconnect(struct Curl_easy *data, struct connectdata *conn,
int sockindex);
#endif
2015-04-27 22:25:09 +02:00
2024-11-11 15:18:55 +01:00
/**
* Return TRUE iff the given connection is considered dead.
* @param nowp NULL or pointer to time being checked against.
*/
bool Curl_conn_seems_dead(struct connectdata *conn,
struct Curl_easy *data,
struct curltime *nowp);
/**
* Perform upkeep operations on the connection.
*/
CURLcode Curl_conn_upkeep(struct Curl_easy *data,
struct connectdata *conn,
struct curltime *now);
2023-07-02 19:51:09 +02:00
#if defined(USE_HTTP2) || defined(USE_HTTP3)
void Curl_data_priority_clear_state(struct Curl_easy *data);
#else
#define Curl_data_priority_clear_state(x)
#endif /* !(defined(USE_HTTP2) || defined(USE_HTTP3)) */
#ifdef USE_NGHTTP2
CURLcode Curl_data_priority_add_child(struct Curl_easy *parent,
struct Curl_easy *child,
bool exclusive);
#else
#define Curl_data_priority_add_child(x, y, z) CURLE_NOT_BUILT_IN
#endif
2015-04-27 22:25:09 +02:00
#endif /* HEADER_CURL_URL_H */