00001 /***************************************************************************** 00002 * vlc_http.h: Shared code for HTTP clients 00003 ***************************************************************************** 00004 * Copyright (C) 2001-2008 VLC authors and VideoLAN 00005 * $Id: ddde13efed1e11a15632f17e1da4437f59750988 $ 00006 * 00007 * Authors: Laurent Aimar <fenrir@via.ecp.fr> 00008 * Christophe Massiot <massiot@via.ecp.fr> 00009 * Rémi Denis-Courmont <rem # videolan.org> 00010 * Antoine Cellerier <dionoea at videolan dot org> 00011 * 00012 * This program is free software; you can redistribute it and/or modify it 00013 * under the terms of the GNU Lesser General Public License as published by 00014 * the Free Software Foundation; either version 2.1 of the License, or 00015 * (at your option) any later version. 00016 * 00017 * This program is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU Lesser General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU Lesser General Public License 00023 * along with this program; if not, write to the Free Software Foundation, 00024 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 00025 *****************************************************************************/ 00026 00027 #ifndef VLC_HTTP_H 00028 #define VLC_HTTP_H 1 00029 00030 /** 00031 * \file 00032 * This file defines functions, structures, enums and macros shared between 00033 * HTTP clients. 00034 */ 00035 00036 /* RFC 2617: Basic and Digest Access Authentication */ 00037 typedef struct http_auth_t 00038 { 00039 char *psz_realm; 00040 char *psz_domain; 00041 char *psz_nonce; 00042 char *psz_opaque; 00043 char *psz_stale; 00044 char *psz_algorithm; 00045 char *psz_qop; 00046 int i_nonce; 00047 char *psz_cnonce; 00048 char *psz_HA1; /* stored H(A1) value if algorithm = "MD5-sess" */ 00049 } http_auth_t; 00050 00051 00052 VLC_API void http_auth_Init( http_auth_t * ); 00053 VLC_API void http_auth_Reset( http_auth_t * ); 00054 VLC_API void http_auth_ParseWwwAuthenticateHeader 00055 ( vlc_object_t *, http_auth_t * , 00056 const char * ); 00057 VLC_API int http_auth_ParseAuthenticationInfoHeader 00058 ( vlc_object_t *, http_auth_t *, 00059 const char *, const char *, 00060 const char *, const char *, 00061 const char * ); 00062 VLC_API char *http_auth_FormatAuthorizationHeader 00063 ( vlc_object_t *, http_auth_t *, 00064 const char *, const char *, 00065 const char *, const char * ) VLC_USED; 00066 00067 #endif /* VLC_HTTP_H */
1.7.1