#include "modules/configuration.h"
#include "libvlc.h"
-#include "vlc_interface.h"
-#include "vlc_playlist.h"
-
-#include "vlc_stream.h"
-#include "vlc_access.h"
-#include "vlc_demux.h"
-#include "vlc_codec.h"
-
-#include "vlc_vout.h"
-#include "vlc_vout_synchro.h"
-
-#include "vlc_aout.h"
-
-#include "vlc_sout.h"
-#include "vlc_httpd.h"
-#include "vlc_acl.h"
-#include "vlc_tls.h"
-#include "vlc_md5.h"
-#include "vlc_xml.h"
-#include "vlc_url.h"
-
-#include "iso_lang.h"
#include "vlc_charset.h"
-#include "vlc_block.h"
-
-#include "vlc_vlm.h"
-
-#include "vlc_image.h"
-#include "vlc_osd.h"
-
-#include "vlc_update.h"
-#include "vlc_strings.h"
-#include "vlc_streaming.h"
-
#include "modules/modules.h"
#include "modules/builtin.h"
-#include "vlc_network.h"
-
#if defined( WIN32 ) || defined( UNDER_CE )
/* Avoid name collisions */
# define LoadModule(a,b,c) LoadVlcModule(a,b,c)
{
if( long_name && ( m->psz_longname != NULL) )
return m->psz_longname;
-
+
return m->psz_shortname ?: m->psz_object_name;
}
psz_ret[count] = NULL;
vlc_list_release( p_list );
-
+
return psz_ret;
}
*****************************************************************************/
static void CacheLoad( vlc_object_t *p_this )
{
- char *psz_filename, *psz_homedir;
+ char *psz_filename, *psz_cachedir;
FILE *file;
int i, j, i_size, i_read;
char p_cachestring[sizeof(PLUGINSCACHE_DIR COPYRIGHT_MESSAGE)];
int32_t i_file_size, i_marker;
libvlc_global_data_t *p_libvlc_global = vlc_global();
- psz_homedir = p_this->p_libvlc->psz_homedir;
- if( !psz_homedir )
+ psz_cachedir = p_this->p_libvlc->psz_cachedir;
+ if( !psz_cachedir ) /* XXX: this should never happen */
{
- msg_Err( p_this, "psz_homedir is null" );
+ msg_Err( p_this, "Unable to get cache directory" );
return;
}
- i_size = asprintf( &psz_filename, "%s"DIR_SEP"%s"DIR_SEP"%s"DIR_SEP"%s",
- psz_homedir, CONFIG_DIR, PLUGINSCACHE_DIR, CacheName() );
+ i_size = asprintf( &psz_filename, "%s"DIR_SEP"%s"DIR_SEP"%s",
+ psz_cachedir, PLUGINSCACHE_DIR, CacheName() );
if( i_size <= 0 )
{
msg_Err( p_this, "out of memory" );
"# For information about cache directory tags, see:\r\n"
"# http://www.brynosaurus.com/cachedir/\r\n";
- char *psz_filename, *psz_homedir;
+ char *psz_filename, *psz_cachedir;
FILE *file;
int i, j, i_cache;
module_cache_t **pp_cache;
int32_t i_file_size = 0;
libvlc_global_data_t *p_libvlc_global = vlc_global();
- psz_homedir = p_this->p_libvlc->psz_homedir;
- if( !psz_homedir )
+ psz_cachedir = p_this->p_libvlc->psz_cachedir;
+ if( !psz_cachedir ) /* XXX: this should never happen */
{
- msg_Err( p_this, "psz_homedir is null" );
+ msg_Err( p_this, "Unable to get cache directory" );
return;
}
+
psz_filename =
- (char *)malloc( sizeof(DIR_SEP CONFIG_DIR DIR_SEP PLUGINSCACHE_DIR DIR_SEP ) +
- strlen(psz_homedir) + strlen(CacheName()) );
+ (char *)malloc( sizeof(DIR_SEP PLUGINSCACHE_DIR DIR_SEP ) +
+ strlen(psz_cachedir) + strlen(CacheName()) );
if( !psz_filename )
{
return;
}
- sprintf( psz_filename, "%s"DIR_SEP"%s", psz_homedir, CONFIG_DIR );
+ sprintf( psz_filename, "%s", psz_cachedir );
config_CreateDir( p_this, psz_filename );
fclose( file );
}
- sprintf( psz_filename, "%s"DIR_SEP"%s"DIR_SEP"%s"DIR_SEP"%s", psz_homedir, CONFIG_DIR,
+ sprintf( psz_filename, "%s"DIR_SEP"%s"DIR_SEP"%s", psz_cachedir,
PLUGINSCACHE_DIR, CacheName() );
msg_Dbg( p_this, "saving plugins cache file %s", psz_filename );