VLC 4.0.0-dev
|
This file defines functions, structures, enums and macros shared between HTTP clients. More...
Go to the source code of this file.
Data Structures | |
struct | vlc_http_auth_t |
Typedefs | |
typedef struct vlc_http_auth_t | vlc_http_auth_t |
typedef struct vlc_http_cookie_jar_t | vlc_http_cookie_jar_t |
Functions | |
void | vlc_http_auth_Init (vlc_http_auth_t *) |
void | vlc_http_auth_Deinit (vlc_http_auth_t *) |
void | vlc_http_auth_ParseWwwAuthenticateHeader (vlc_object_t *, vlc_http_auth_t *, const char *) |
int | vlc_http_auth_ParseAuthenticationInfoHeader (vlc_object_t *, vlc_http_auth_t *, const char *, const char *, const char *, const char *, const char *) |
char * | vlc_http_auth_FormatAuthorizationHeader (vlc_object_t *, vlc_http_auth_t *, const char *, const char *, const char *, const char *) |
vlc_http_cookie_jar_t * | vlc_http_cookies_new (void) |
void | vlc_http_cookies_destroy (vlc_http_cookie_jar_t *p_jar) |
bool | vlc_http_cookies_store (vlc_http_cookie_jar_t *jar, const char *cookie, const char *host, const char *path) |
Parse a value of an incoming Set-Cookie header and append the cookie to the cookie jar if appropriate. | |
char * | vlc_http_cookies_fetch (vlc_http_cookie_jar_t *jar, bool secure, const char *host, const char *path) |
Returns a cookie value that match the given URL. | |
This file defines functions, structures, enums and macros shared between HTTP clients.
typedef struct vlc_http_auth_t vlc_http_auth_t |
typedef struct vlc_http_cookie_jar_t vlc_http_cookie_jar_t |
void vlc_http_auth_Deinit | ( | vlc_http_auth_t * | p_auth | ) |
char * vlc_http_auth_FormatAuthorizationHeader | ( | vlc_object_t * | p_this, |
vlc_http_auth_t * | p_auth, | ||
const char * | psz_method, | ||
const char * | psz_path, | ||
const char * | psz_username, | ||
const char * | psz_password | ||
) |
void vlc_http_auth_Init | ( | vlc_http_auth_t * | p_auth | ) |
int vlc_http_auth_ParseAuthenticationInfoHeader | ( | vlc_object_t * | p_this, |
vlc_http_auth_t * | p_auth, | ||
const char * | psz_header, | ||
const char * | psz_method, | ||
const char * | psz_path, | ||
const char * | psz_username, | ||
const char * | psz_password | ||
) |
void vlc_http_auth_ParseWwwAuthenticateHeader | ( | vlc_object_t * | p_this, |
vlc_http_auth_t * | p_auth, | ||
const char * | psz_header | ||
) |
void vlc_http_cookies_destroy | ( | vlc_http_cookie_jar_t * | p_jar | ) |
References cookie_destroy(), vlc_http_cookie_jar_t::cookies, vlc_array_clear(), vlc_array_count(), and vlc_array_item_at_index.
Referenced by vlc_player_Delete().
char * vlc_http_cookies_fetch | ( | vlc_http_cookie_jar_t * | jar, |
bool | secure, | ||
const char * | host, | ||
const char * | path | ||
) |
Returns a cookie value that match the given URL.
jar | a cookie jar |
secure | whether a secure connection will be used or not |
host | the hostname for which the cookie was stored |
path | the cookie name to fetch |
References asprintf(), cookie_should_be_sent(), vlc_http_cookie_jar_t::cookies, vlc_http_cookie_jar_t::lock, http_cookie_t::psz_name, http_cookie_t::psz_value, vlc_array_count(), vlc_array_item_at_index, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by vlc_http_msg_add_cookies().
vlc_http_cookie_jar_t * vlc_http_cookies_new | ( | void | ) |
References vlc_http_cookie_jar_t::cookies, vlc_http_cookie_jar_t::lock, unlikely, vlc_array_init(), and vlc_mutex_init().
Referenced by vlc_player_New().
bool vlc_http_cookies_store | ( | vlc_http_cookie_jar_t * | jar, |
const char * | cookie, | ||
const char * | host, | ||
const char * | path | ||
) |
Parse a value of an incoming Set-Cookie header and append the cookie to the cookie jar if appropriate.
jar | cookie jar object |
cookie | header field value of Set-Cookie |
host | the hostname to store the cookie for |
path | the name of the cookie to store |
References cookie_destroy(), cookie_domain_matches(), cookie_parse(), vlc_http_cookie_jar_t::cookies, vlc_http_cookie_jar_t::lock, http_cookie_t::psz_domain, http_cookie_t::psz_name, http_cookie_t::psz_path, vlc_array_append(), vlc_array_count(), vlc_array_item_at_index, vlc_array_remove(), vlc_ascii_strcasecmp(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by vlc_http_msg_get_cookies().