VLC  4.0.0-dev
Data Structures | Typedefs | Functions
vlc_http.h File Reference
Include dependency graph for vlc_http.h:

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

VLC_EXPORT void vlc_http_auth_Init (vlc_http_auth_t *)
 
VLC_EXPORT void vlc_http_auth_Deinit (vlc_http_auth_t *)
 
VLC_EXPORT void vlc_http_auth_ParseWwwAuthenticateHeader (vlc_object_t *, vlc_http_auth_t *, const char *)
 
VLC_EXPORT int vlc_http_auth_ParseAuthenticationInfoHeader (vlc_object_t *, vlc_http_auth_t *, const char *, const char *, const char *, const char *, const char *)
 
VLC_EXPORT char * vlc_http_auth_FormatAuthorizationHeader (vlc_object_t *, vlc_http_auth_t *, const char *, const char *, const char *, const char *)
 
VLC_EXPORT vlc_http_cookie_jar_tvlc_http_cookies_new (void)
 
VLC_EXPORT void vlc_http_cookies_destroy (vlc_http_cookie_jar_t *p_jar)
 
VLC_EXPORT 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. More...
 
VLC_EXPORT 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. More...
 

Detailed Description

This file defines functions, structures, enums and macros shared between HTTP clients.

Typedef Documentation

◆ vlc_http_auth_t

◆ vlc_http_cookie_jar_t

Function Documentation

◆ vlc_http_auth_Deinit()

VLC_EXPORT void vlc_http_auth_Deinit ( vlc_http_auth_t )

◆ vlc_http_auth_FormatAuthorizationHeader()

VLC_EXPORT char* vlc_http_auth_FormatAuthorizationHeader ( vlc_object_t ,
vlc_http_auth_t ,
const char *  ,
const char *  ,
const char *  ,
const char *   
)

◆ vlc_http_auth_Init()

VLC_EXPORT void vlc_http_auth_Init ( vlc_http_auth_t )

◆ vlc_http_auth_ParseAuthenticationInfoHeader()

VLC_EXPORT int vlc_http_auth_ParseAuthenticationInfoHeader ( vlc_object_t ,
vlc_http_auth_t ,
const char *  ,
const char *  ,
const char *  ,
const char *  ,
const char *   
)

◆ vlc_http_auth_ParseWwwAuthenticateHeader()

VLC_EXPORT void vlc_http_auth_ParseWwwAuthenticateHeader ( vlc_object_t ,
vlc_http_auth_t ,
const char *   
)

◆ vlc_http_cookies_destroy()

VLC_EXPORT void vlc_http_cookies_destroy ( vlc_http_cookie_jar_t p_jar)

◆ vlc_http_cookies_fetch()

VLC_EXPORT 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.

Parameters
p_jara cookie jar
p_urlthe URL for which the cookies are returned
Returns
A string consisting of semicolon-separated cookie NAME=VALUE pairs.

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_cookies_new()

VLC_EXPORT vlc_http_cookie_jar_t* vlc_http_cookies_new ( void  )

◆ vlc_http_cookies_store()

VLC_EXPORT 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.

Parameters
jarcookie jar object
cookieheader field value of Set-Cookie
Returns
true, if the cookie was added, false otherwise

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().