vlc_url.h 1.88 KB
Newer Older
1 2 3
/*****************************************************************************
 * vlc_url.h: URL related macros
 *****************************************************************************
Jean-Baptiste Kempf's avatar
LGPL  
Jean-Baptiste Kempf committed
4
 * Copyright (C) 2002-2006 VLC authors and VideoLAN
5 6 7 8 9
 * $Id$
 *
 * Authors: Christophe Massiot <massiot@via.ecp.fr>
 *          Rémi Denis-Courmont <rem # videolan.org>
 *
Jean-Baptiste Kempf's avatar
LGPL  
Jean-Baptiste Kempf committed
10 11 12
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or
13 14 15 16
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Jean-Baptiste Kempf's avatar
LGPL  
Jean-Baptiste Kempf committed
17 18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
19
 *
Jean-Baptiste Kempf's avatar
LGPL  
Jean-Baptiste Kempf committed
20 21 22
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 24
 *****************************************************************************/

25 26
#ifndef VLC_URL_H
# define VLC_URL_H
27

28 29 30 31 32
/**
 * \file
 * This file defines functions for manipulating URL in vlc
 */

33 34
VLC_API char *vlc_path2uri (const char *path, const char *scheme) VLC_MALLOC;

35
struct vlc_url_t
36 37 38 39 40
{
    char *psz_protocol;
    char *psz_username;
    char *psz_password;
    char *psz_host;
41
    unsigned i_port;
42 43 44 45
    char *psz_path;
    char *psz_option;

    char *psz_buffer; /* to be freed */
46
};
47

48
VLC_API char * decode_URI_duplicate( const char *psz ) VLC_MALLOC;
49
VLC_API char * decode_URI( char *psz );
50 51
VLC_API char * encode_URI_component( const char *psz ) VLC_MALLOC;
VLC_API char * make_path( const char *url ) VLC_MALLOC;
52

53
VLC_API void vlc_UrlParse (vlc_url_t *, const char *);
54
VLC_API void vlc_UrlClean (vlc_url_t *);
55
#endif