1 /*****************************************************************************
2 * xurl.h: URL manipulation functions (header file)
3 *****************************************************************************
4 * Copyright (C) 2003-2004 Commonwealth Scientific and Industrial Research
5 * Organisation (CSIRO) Australia
6 * Copyright (C) 2004 the VideoLAN team
10 * Authors: Andre Pang <Andre.Pang@csiro.au>
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
25 *****************************************************************************/
32 /* Specialise boolean definitions to VLC's boolean types */
33 typedef vlc_bool_t XURL_Bool;
34 #define XURL_FALSE VLC_FALSE
35 #define XURL_TRUE VLC_TRUE
37 /* Specialise general C functions to VLC's standards */
38 #define xurl_malloc malloc
39 #define xurl_free free
41 /* Use DOS/Windows path separators? */
43 # define XURL_WIN32_PATHING
45 # undef XURL_WIN32_PATHING
51 char * XURL_Join ( char *psz_url1, char *psz_url2 );
52 char * XURL_Concat ( char *psz_url, char *psz_append );
54 XURL_Bool XURL_IsAbsolute ( char *psz_url );
55 XURL_Bool XURL_HasAbsolutePath ( char *psz_url );
56 XURL_Bool XURL_IsFileURL ( char *psz_url );
57 XURL_Bool XURL_HasFragment ( char *psz_url );
59 char * XURL_GetHostname ( char *psz_url );
60 char * XURL_GetSchemeAndHostname ( char *psz_url );
61 char * XURL_GetScheme ( char *psz_url );
62 char * XURL_GetPath ( char *psz_url );
63 char * XURL_GetWithoutFragment ( char *psz_url );
65 char * XURL_GetHead ( const char *psz_path );
67 #endif /* __XURL_H__ */