VLC 4.0.0-dev
Loading...
Searching...
No Matches
vlc_http.h
Go to the documentation of this file.
1/*****************************************************************************
2 * vlc_http.h: Shared code for HTTP clients
3 *****************************************************************************
4 * Copyright (C) 2001-2008 VLC authors and VideoLAN
5 *
6 * Authors: Laurent Aimar <fenrir@via.ecp.fr>
7 * Christophe Massiot <massiot@via.ecp.fr>
8 * RĂ©mi Denis-Courmont
9 * Antoine Cellerier <dionoea at videolan dot org>
10 *
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU Lesser General Public License as published by
13 * the Free Software Foundation; either version 2.1 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * along with this program; if not, write to the Free Software Foundation,
23 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
24 *****************************************************************************/
25
26#ifndef VLC_HTTP_H
27#define VLC_HTTP_H 1
28
29/**
30 * \file
31 * This file defines functions, structures, enums and macros shared between
32 * HTTP clients.
33 */
34
35#include <vlc_url.h>
36#include <vlc_arrays.h>
37
38/* RFC 2617: Basic and Digest Access Authentication */
39typedef struct vlc_http_auth_t
41 char *psz_realm;
43 char *psz_nonce;
45 char *psz_stale;
47 char *psz_qop;
50 char *psz_HA1; /* stored H(A1) value if algorithm = "MD5-sess" */
53
57 ( vlc_object_t *, vlc_http_auth_t * , const char * );
60 const char *, const char *,
61 const char *, const char *,
62 const char * );
65 const char *, const char *,
66 const char *, const char * ) VLC_USED;
67
68/* RFC 6265: cookies */
69
74
75/**
76 * Parse a value of an incoming Set-Cookie header and append the
77 * cookie to the cookie jar if appropriate.
78 *
79 * @param jar cookie jar object
80 * @param cookie header field value of Set-Cookie
81 * @param host the hostname to store the cookie for
82 * @param path the name of the cookie to store
83 * @return true, if the cookie was added, false otherwise
84 */
86 const char *cookie, const char *host, const char *path );
87
88/**
89 * Returns a cookie value that match the given URL.
90 *
91 * @param jar a cookie jar
92 * @param secure whether a secure connection will be used or not
93 * @param host the hostname for which the cookie was stored
94 * @param path the cookie name to fetch
95 * @return A string consisting of semicolon-separated cookie NAME=VALUE pairs.
96 */
98 const char *host, const char *path );
99
100#endif /* VLC_HTTP_H */
#define VLC_USED
Definition fourcc_gen.c:32
#define VLC_API
Definition fourcc_gen.c:31
Definition vlc_http.h:41
char * psz_qop
Definition vlc_http.h:48
char * psz_domain
Definition vlc_http.h:43
char * psz_nonce
Definition vlc_http.h:44
char * psz_realm
Definition vlc_http.h:42
char * psz_opaque
Definition vlc_http.h:45
char * psz_algorithm
Definition vlc_http.h:47
char * psz_stale
Definition vlc_http.h:46
int i_nonce
Definition vlc_http.h:49
char * psz_cnonce
Definition vlc_http.h:50
char * psz_HA1
Definition vlc_http.h:51
VLC object common members.
Definition vlc_objects.h:53
This file defines functions, structures and macros for handling arrays in vlc.
This file is a collection of common definitions and types.
void vlc_http_auth_Deinit(vlc_http_auth_t *)
Definition http_auth.c:473
vlc_http_cookie_jar_t * vlc_http_cookies_new(void)
Definition httpcookies.c:273
void vlc_http_auth_ParseWwwAuthenticateHeader(vlc_object_t *, vlc_http_auth_t *, const char *)
Definition http_auth.c:210
void vlc_http_cookies_destroy(vlc_http_cookie_jar_t *p_jar)
Definition httpcookies.c:285
int vlc_http_auth_ParseAuthenticationInfoHeader(vlc_object_t *, vlc_http_auth_t *, const char *, const char *, const char *, const char *, const char *)
Definition http_auth.c:288
char * vlc_http_auth_FormatAuthorizationHeader(vlc_object_t *, vlc_http_auth_t *, const char *, const char *, const char *, const char *)
Definition http_auth.c:367
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.
Definition httpcookies.c:353
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...
Definition httpcookies.c:298
void vlc_http_auth_Init(vlc_http_auth_t *)
Definition http_auth.c:468