VLC  3.0.15
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

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

void vlc_http_auth_Deinit ( vlc_http_auth_t )

◆ vlc_http_auth_FormatAuthorizationHeader()

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

◆ vlc_http_auth_Init()

void vlc_http_auth_Init ( vlc_http_auth_t )

◆ vlc_http_auth_ParseAuthenticationInfoHeader()

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

void vlc_http_auth_ParseWwwAuthenticateHeader ( vlc_object_t ,
vlc_http_auth_t ,
const char *   
)

◆ vlc_http_cookies_destroy()

void vlc_http_cookies_destroy ( vlc_http_cookie_jar_t p_jar)

◆ vlc_http_cookies_fetch()

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_http_cookie_jar_t* vlc_http_cookies_new ( void  )

◆ vlc_http_cookies_store()

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