00001 /***************************************************************************** 00002 * xurl.h: URL manipulation functions (header file) 00003 ***************************************************************************** 00004 * Copyright (C) 2003-2004 Commonwealth Scientific and Industrial Research 00005 * Organisation (CSIRO) Australia 00006 * Copyright (C) 2004 the VideoLAN team 00007 * 00008 * $Id: xurl.h 11664 2005-07-09 06:17:09Z courmisch $ 00009 * 00010 * Authors: Andre Pang <[email protected]> 00011 * 00012 * This program is free software; you can redistribute it and/or modify 00013 * it under the terms of the GNU General Public License as published by 00014 * the Free Software Foundation; either version 2 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 General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU General Public License 00023 * along with this program; if not, write to the Free Software 00024 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. 00025 *****************************************************************************/ 00026 00027 #ifndef __XURL_H__ 00028 #define __XURL_H__ 00029 00030 #include <vlc/vlc.h> 00031 00032 /* Specialise boolean definitions to VLC's boolean types */ 00033 typedef vlc_bool_t XURL_Bool; 00034 #define XURL_FALSE VLC_FALSE 00035 #define XURL_TRUE VLC_TRUE 00036 00037 /* Specialise general C functions to VLC's standards */ 00038 #define xurl_malloc malloc 00039 #define xurl_free free 00040 00041 /* Use DOS/Windows path separators? */ 00042 #ifdef WIN32 00043 # define XURL_WIN32_PATHING 00044 #else 00045 # undef XURL_WIN32_PATHING 00046 #endif 00047 00048 /* Debugging */ 00049 #undef XURL_DEBUG 00050 00051 char * XURL_Join ( char *psz_url1, char *psz_url2 ); 00052 char * XURL_Concat ( char *psz_url, char *psz_append ); 00053 00054 XURL_Bool XURL_IsAbsolute ( char *psz_url ); 00055 XURL_Bool XURL_HasAbsolutePath ( char *psz_url ); 00056 XURL_Bool XURL_IsFileURL ( char *psz_url ); 00057 XURL_Bool XURL_HasFragment ( char *psz_url ); 00058 00059 char * XURL_GetHostname ( char *psz_url ); 00060 char * XURL_GetSchemeAndHostname ( char *psz_url ); 00061 char * XURL_GetScheme ( char *psz_url ); 00062 char * XURL_GetPath ( char *psz_url ); 00063 char * XURL_GetWithoutFragment ( char *psz_url ); 00064 00065 char * XURL_GetHead ( const char *psz_path ); 00066 00067 #endif /* __XURL_H__ */ 00068