Commit 5ace50e9 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove unneeded psz_program hack.

(Modules that would still depend on module_config_t are not going to like this, but it's not like you weren't warned a long time ahead)
parent a58afe8e
......@@ -59,11 +59,6 @@ struct module_t
const char *psz_longname; /**< Module descriptive name */
const char *psz_help; /**< Long help string for "special" modules */
/*
* Variables set by the module to tell us what it can do
*/
const char *psz_program; /**< Program name which will activate the module */
/** Shortcuts to the module */
const char *pp_shortcuts[ MODULE_SHORTCUT_MAX ];
......
......@@ -167,10 +167,6 @@ E_(vlc_entry) ( module_t *p_module );
(void *)(intptr_t)(score))) \
goto error
#define set_program( program ) \
if (vlc_module_set (p_submodule, VLC_MODULE_PROGRAM, (void *)(program))) \
goto error
#define set_callbacks( activate, deactivate ) \
if (vlc_module_set (p_submodule, VLC_MODULE_CB_OPEN, (void *)(activate)) \
|| vlc_module_set (p_submodule, VLC_MODULE_CB_CLOSE, \
......
......@@ -192,7 +192,6 @@ vlc_module_begin();
add_string( "rc-host", 0, NULL, HOST_TEXT, HOST_LONGTEXT, VLC_TRUE );
set_capability( "interface", 20 );
set_program( "rvlc" );
set_callbacks( Activate, Deactivate );
vlc_module_end();
......
......@@ -114,7 +114,6 @@ vlc_module_begin();
set_category( CAT_INTERFACE );
set_subcategory( SUBCAT_INTERFACE_MAIN );
set_callbacks( Open, Close );
set_program( "nvlc" );
add_shortcut( "curses" );
add_directory( "browse-dir", NULL, NULL, BROWSE_TEXT, BROWSE_LONGTEXT, VLC_FALSE );
vlc_module_end();
......
......@@ -121,7 +121,6 @@ vlc_module_begin();
set_capability( "interface", 151 );
set_callbacks( Open, Close );
set_program( "qvlc" );
add_shortcut("qt");
add_submodule();
......
......@@ -467,7 +467,6 @@ vlc_module_begin();
set_capability( "interface", 30 );
set_callbacks( Open, Close );
add_shortcut( "skins" );
set_program( "svlc" );
add_submodule();
set_description( _("Skins loader demux") );
......
......@@ -61,7 +61,6 @@ vlc_module_begin();
set_capability( "interface", 100 );
set_callbacks( Open, Close );
add_shortcut( "wince" );
set_program( "wcevlc" );
add_bool( "wince-embed", 1, NULL,
EMBED_TEXT, EMBED_LONGTEXT, VLC_FALSE );
......
......@@ -123,7 +123,6 @@ vlc_module_begin();
add_shortcut( "wxwin" );
add_shortcut( "wx" );
add_shortcut( "wxwidgets" );
set_program( "wxvlc" );
add_bool( "wx-embed", 1, NULL,
EMBED_TEXT, EMBED_LONGTEXT, VLC_FALSE );
......
......@@ -57,7 +57,6 @@ vlc_module_begin();
set_description( _("Dummy interface function") );
set_capability( "interface", 0 );
add_shortcut( "vlc" );
set_program( "cvlc" );
set_callbacks( E_(OpenIntf), NULL );
#ifdef WIN32
set_section( N_( "Dummy Interface" ), NULL );
......
......@@ -1809,14 +1809,6 @@ static void ListModules( libvlc_int_t *p_this, vlc_bool_t b_verbose )
p_parser->psz_capability,
p_parser->i_score );
}
if( p_parser->psz_program )
{
if( b_color )
utf8_fprintf( stdout, YELLOW " p %s\n"GRAY,
p_parser->psz_program );
else
utf8_fprintf( stdout, " p %s\n", p_parser->psz_program );
}
}
psz_spaces[i] = ' ';
......
......@@ -64,7 +64,6 @@ module_t *vlc_submodule_create (module_t *module)
submodule->psz_object_name = module->psz_object_name;
submodule->psz_shortname = module->psz_shortname;
submodule->psz_longname = module->psz_longname;
submodule->psz_program = module->psz_program;
submodule->psz_capability = module->psz_capability;
submodule->i_score = module->i_score;
submodule->i_cpu = module->i_cpu;
......@@ -112,10 +111,6 @@ int vlc_module_set (module_t *module, int propid, void *value)
module->i_score = (intptr_t)value;
break;
case VLC_MODULE_PROGRAM:
module->psz_program = (char *)value;
break;
case VLC_MODULE_CB_OPEN:
module->pf_activate = (int (*) (vlc_object_t *))value;
break;
......@@ -134,6 +129,10 @@ int vlc_module_set (module_t *module, int propid, void *value)
module->psz_longname = (char *)value;
break;
case VLC_MODULE_PROGRAM:
msg_Warn (module, "deprecated module property %d", propid);
return 0;
default:
msg_Err (module, "unknown module property %d", propid);
msg_Err (module, "LibVLC might be too old to use this module.");
......
......@@ -402,7 +402,6 @@ module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability,
vlc_list_t *p_all;
int i_which_module, i_index = 0;
vlc_bool_t b_intf = VLC_FALSE;
module_t *p_module;
......@@ -535,25 +534,6 @@ module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability,
found_shortcut:
/* Special case: test if we requested a particular intf plugin */
if( !i_shortcuts && p_module->psz_program
&& !strcmp( psz_capability, "interface" )
&& !strcmp( p_module->psz_program,
p_this->p_libvlc->psz_object_name ) )
{
if( !b_intf )
{
/* Remove previous non-matching plugins */
i_index = 0;
b_intf = VLC_TRUE;
}
}
else if( b_intf )
{
/* This one doesn't match */
continue;
}
/* Store this new module */
p_list[ i_index ].p_module = p_module;
p_list[ i_index ].i_score = p_module->i_score + i_shortcut_bonus;
......@@ -1235,11 +1215,6 @@ static void DupModule( module_t *p_module )
p_module->psz_help = p_module->psz_help ? strdup( p_module->psz_help )
: NULL;
if( p_module->psz_program != NULL )
{
p_module->psz_program = strdup( p_module->psz_program );
}
for( i_submodule = 0; i_submodule < p_module->i_children; i_submodule++ )
{
DupModule( (module_t*)p_module->pp_children[ i_submodule ] );
......@@ -1271,7 +1246,6 @@ static void UndupModule( module_t *p_module )
free( (void*)p_module->psz_shortname );
free( (void*)p_module->psz_longname );
free( (void*)p_module->psz_help );
free( (void*)p_module->psz_program );
}
#endif /* HAVE_DYNAMIC_PLUGINS */
......@@ -1836,7 +1810,6 @@ static void CacheLoad( vlc_object_t *p_this )
LOAD_STRING( pp_cache[i]->p_module->psz_shortname );
LOAD_STRING( pp_cache[i]->p_module->psz_longname );
LOAD_STRING( pp_cache[i]->p_module->psz_help );
LOAD_STRING( pp_cache[i]->p_module->psz_program );
for( j = 0; j < MODULE_SHORTCUT_MAX; j++ )
{
LOAD_STRING( pp_cache[i]->p_module->pp_shortcuts[j] ); // FIX
......@@ -1863,7 +1836,6 @@ static void CacheLoad( vlc_object_t *p_this )
LOAD_STRING( p_module->psz_shortname );
LOAD_STRING( p_module->psz_longname );
LOAD_STRING( p_module->psz_help );
LOAD_STRING( p_module->psz_program );
for( j = 0; j < MODULE_SHORTCUT_MAX; j++ )
{
LOAD_STRING( p_module->pp_shortcuts[j] ); // FIX
......@@ -2107,7 +2079,6 @@ static void CacheSave( vlc_object_t *p_this )
SAVE_STRING( pp_cache[i]->p_module->psz_shortname );
SAVE_STRING( pp_cache[i]->p_module->psz_longname );
SAVE_STRING( pp_cache[i]->p_module->psz_help );
SAVE_STRING( pp_cache[i]->p_module->psz_program );
for( j = 0; j < MODULE_SHORTCUT_MAX; j++ )
{
SAVE_STRING( pp_cache[i]->p_module->pp_shortcuts[j] ); // FIX
......@@ -2137,7 +2108,6 @@ static void CacheSave( vlc_object_t *p_this )
SAVE_STRING( p_module->psz_shortname );
SAVE_STRING( p_module->psz_longname );
SAVE_STRING( p_module->psz_help );
SAVE_STRING( p_module->psz_program );
for( j = 0; j < MODULE_SHORTCUT_MAX; j++ )
{
SAVE_STRING( p_module->pp_shortcuts[j] ); // FIX
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment