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

lower case the module_* functions

parent d72063d6
...@@ -533,7 +533,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */ ...@@ -533,7 +533,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */
/* Object properties */ \ /* Object properties */ \
volatile bool b_error; /**< set by the object */ \ volatile bool b_error; /**< set by the object */ \
volatile bool b_die; /**< set by the outside */ \ volatile bool b_die; /**< set by the outside */ \
bool b_force; /**< set by the outside (eg. module_Need()) */ \ bool b_force; /**< set by the outside (eg. module_need()) */ \
\ \
/** Just a reminder so that people don't cast garbage */ \ /** Just a reminder so that people don't cast garbage */ \
bool be_sure_to_add_VLC_COMMON_MEMBERS_to_struct; \ bool be_sure_to_add_VLC_COMMON_MEMBERS_to_struct; \
......
...@@ -30,18 +30,18 @@ ...@@ -30,18 +30,18 @@
* Exported functions. * Exported functions.
*****************************************************************************/ *****************************************************************************/
#define module_Need(a,b,c,d) __module_Need(VLC_OBJECT(a),b,c,d) #define module_need(a,b,c,d) __module_need(VLC_OBJECT(a),b,c,d)
VLC_EXPORT( module_t *, __module_Need, ( vlc_object_t *, const char *, const char *, bool ) ); VLC_EXPORT( module_t *, __module_need, ( vlc_object_t *, const char *, const char *, bool ) );
#define module_Unneed(a,b) __module_Unneed(VLC_OBJECT(a),b) #define module_unneed(a,b) __module_unneed(VLC_OBJECT(a),b)
VLC_EXPORT( void, __module_Unneed, ( vlc_object_t *, module_t * ) ); VLC_EXPORT( void, __module_unneed, ( vlc_object_t *, module_t * ) );
#define module_Exists(a,b) __module_Exists(VLC_OBJECT(a),b) #define module_exists(a,b) __module_exists(VLC_OBJECT(a),b)
VLC_EXPORT( bool, __module_Exists, ( vlc_object_t *, const char * ) ); VLC_EXPORT( bool, __module_exists, ( vlc_object_t *, const char * ) );
#define module_Find(a,b) __module_Find(VLC_OBJECT(a),b) #define module_find(a,b) __module_find(VLC_OBJECT(a),b)
VLC_EXPORT( module_t *, __module_Find, ( vlc_object_t *, const char * ) ); VLC_EXPORT( module_t *, __module_find, ( vlc_object_t *, const char * ) );
VLC_EXPORT( module_config_t *, module_GetConfig, ( const module_t *, unsigned * ) ); VLC_EXPORT( module_config_t *, module_config_get, ( const module_t *, unsigned * ) );
VLC_EXPORT( void, module_PutConfig, ( module_config_t * ) ); VLC_EXPORT( void, module_config_free, ( module_config_t * ) );
VLC_EXPORT( module_t *, module_hold, (module_t *module) ); VLC_EXPORT( module_t *, module_hold, (module_t *module) );
VLC_EXPORT( void, module_release, (module_t *module) ); VLC_EXPORT( void, module_release, (module_t *module) );
...@@ -57,20 +57,20 @@ VLC_EXPORT(char **, __module_GetModulesNamesForCapability, ...@@ -57,20 +57,20 @@ VLC_EXPORT(char **, __module_GetModulesNamesForCapability,
( vlc_object_t *p_this, const char * psz_capability, ( vlc_object_t *p_this, const char * psz_capability,
char ***psz_longname ) ); char ***psz_longname ) );
VLC_EXPORT( bool, module_IsCapable, ( const module_t *m, const char *cap ) ); VLC_EXPORT( bool, module_provides, ( const module_t *m, const char *cap ) );
VLC_EXPORT( const char *, module_GetObjName, ( const module_t *m ) ); VLC_EXPORT( const char *, module_get_object, ( const module_t *m ) );
VLC_EXPORT( const char *, module_GetName, ( const module_t *m, bool long_name ) ); VLC_EXPORT( const char *, module_get_name, ( const module_t *m, bool long_name ) );
#define module_GetLongName( m ) module_GetName( m, true ) #define module_GetLongName( m ) module_get_name( m, true )
VLC_EXPORT( const char *, module_GetHelp, ( const module_t *m ) ); VLC_EXPORT( const char *, module_get_help, ( const module_t *m ) );
#define module_GetMainModule(a) __module_GetMainModule(VLC_OBJECT(a)) #define module_get_main(a) __module_get_main(VLC_OBJECT(a))
static inline module_t * __module_GetMainModule( vlc_object_t * p_this ) static inline module_t * __module_get_main( vlc_object_t * p_this )
{ {
return module_Find( p_this, "main" ); return module_find( p_this, "main" );
} }
static inline bool module_IsMainModule( const module_t * p_module ) static inline bool module_is_main( const module_t * p_module )
{ {
return !strcmp( module_GetObjName( p_module ), "main" ); return !strcmp( module_get_object( p_module ), "main" );
} }
...@@ -350,7 +350,7 @@ void RenderCursor( demux_t *p_demux, int i_x, int i_y, ...@@ -350,7 +350,7 @@ void RenderCursor( demux_t *p_demux, int i_x, int i_y,
p_sys->p_blend->fmt_in.video = p_sys->p_mouse->format; p_sys->p_blend->fmt_in.video = p_sys->p_mouse->format;
p_sys->p_blend->fmt_out = p_sys->fmt; p_sys->p_blend->fmt_out = p_sys->fmt;
p_sys->p_blend->p_module = p_sys->p_blend->p_module =
module_Need( p_sys->p_blend, "video blending", 0, 0 ); module_need( p_sys->p_blend, "video blending", 0, 0 );
if( !p_sys->p_blend->p_module ) if( !p_sys->p_blend->p_module )
{ {
msg_Err( p_demux, "Could not load video blending module" ); msg_Err( p_demux, "Could not load video blending module" );
......
...@@ -108,7 +108,7 @@ int screen_CloseCapture( demux_t *p_demux ) ...@@ -108,7 +108,7 @@ int screen_CloseCapture( demux_t *p_demux )
XCloseDisplay( p_display ); XCloseDisplay( p_display );
if( p_sys->p_blend ) if( p_sys->p_blend )
{ {
module_Unneed( p_sys->p_blend, p_sys->p_blend->p_module ); module_unneed( p_sys->p_blend, p_sys->p_blend->p_module );
vlc_object_detach( p_sys->p_blend ); vlc_object_detach( p_sys->p_blend );
vlc_object_release( p_sys->p_blend ); vlc_object_release( p_sys->p_blend );
} }
......
...@@ -95,7 +95,7 @@ int VCDInit ( vlc_object_t *p_this ) ...@@ -95,7 +95,7 @@ int VCDInit ( vlc_object_t *p_this )
} }
p_input->p_private = (void*)&p_demux->mpeg; p_input->p_private = (void*)&p_demux->mpeg;
p_demux->p_module = module_Need( p_input, "mpeg-system", NULL, 0 ); p_demux->p_module = module_need( p_input, "mpeg-system", NULL, 0 );
if( p_demux->p_module == NULL ) if( p_demux->p_module == NULL )
{ {
free( p_input->p_demux_data ); free( p_input->p_demux_data );
...@@ -134,7 +134,7 @@ void VCDEnd ( vlc_object_t *p_this ) ...@@ -134,7 +134,7 @@ void VCDEnd ( vlc_object_t *p_this )
p_vcd->p_intf = NULL; p_vcd->p_intf = NULL;
module_Unneed( p_input, p_input->p_demux_data->p_module ); module_unneed( p_input, p_input->p_demux_data->p_module );
free( p_input->p_demux_data ); free( p_input->p_demux_data );
} }
......
...@@ -144,7 +144,7 @@ static int OpenDecoder( vlc_object_t *p_this ) ...@@ -144,7 +144,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* HACK: Don't use this codec if we don't have an mpga audio filter */ /* HACK: Don't use this codec if we don't have an mpga audio filter */
if( p_dec->i_object_type == VLC_OBJECT_DECODER && if( p_dec->i_object_type == VLC_OBJECT_DECODER &&
!module_Exists( p_this, "mpgatofixed32" ) ) !module_exists( p_this, "mpgatofixed32" ) )
{ {
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -519,7 +519,7 @@ static int ParseImageAttachments( decoder_t *p_dec ) ...@@ -519,7 +519,7 @@ static int ParseImageAttachments( decoder_t *p_dec )
fmt_out.i_chroma = VLC_FOURCC('Y','U','V','A'); fmt_out.i_chroma = VLC_FOURCC('Y','U','V','A');
/* Find a suitable decoder module */ /* Find a suitable decoder module */
if( module_Exists( p_dec, "sdl_image" ) ) if( module_exists( p_dec, "sdl_image" ) )
{ {
/* ffmpeg thinks it can handle bmp properly but it can't (at least /* ffmpeg thinks it can handle bmp properly but it can't (at least
* not all of them), so use sdl_image if it is available */ * not all of them), so use sdl_image if it is available */
......
...@@ -344,11 +344,11 @@ mvar_t *mvar_ObjectSetNew( intf_thread_t *p_intf, char *psz_name, ...@@ -344,11 +344,11 @@ mvar_t *mvar_ObjectSetNew( intf_thread_t *p_intf, char *psz_name,
for( i = 0; i < p_list->i_count; i++ ) for( i = 0; i < p_list->i_count; i++ )
{ {
module_t *p_parser = (module_t *)p_list->p_values[i].p_object; module_t *p_parser = (module_t *)p_list->p_values[i].p_object;
if( module_IsCapable( p_parser, psz_capability ) ) if( module_provides( p_parser, psz_capability ) )
{ {
mvar_t *sd = mvar_New( "sd", module_GetObjName( p_parser ) ); mvar_t *sd = mvar_New( "sd", module_get_object( p_parser ) );
mvar_AppendNewVar( sd, "name", mvar_AppendNewVar( sd, "name",
module_GetName( p_parser, true ) ); module_get_name( p_parser, true ) );
mvar_AppendVar( s, sd ); mvar_AppendVar( s, sd );
} }
} }
......
...@@ -547,7 +547,7 @@ static int OpenBlending( intf_thread_t *p_intf ) ...@@ -547,7 +547,7 @@ static int OpenBlending( intf_thread_t *p_intf )
VLC_FOURCC('Y','U','V','A'); VLC_FOURCC('Y','U','V','A');
p_intf->p_sys->p_blend->p_module = p_intf->p_sys->p_blend->p_module =
module_Need( p_intf->p_sys->p_blend, "video blending", 0, 0 ); module_need( p_intf->p_sys->p_blend, "video blending", 0, 0 );
if( !p_intf->p_sys->p_blend->p_module ) if( !p_intf->p_sys->p_blend->p_module )
return VLC_EGENERIC; return VLC_EGENERIC;
...@@ -560,7 +560,7 @@ static void CloseBlending( intf_thread_t *p_intf ) ...@@ -560,7 +560,7 @@ static void CloseBlending( intf_thread_t *p_intf )
if( p_intf->p_sys->p_blend ) if( p_intf->p_sys->p_blend )
{ {
if( p_intf->p_sys->p_blend->p_module ) if( p_intf->p_sys->p_blend->p_module )
module_Unneed( p_intf->p_sys->p_blend, module_unneed( p_intf->p_sys->p_blend,
p_intf->p_sys->p_blend->p_module ); p_intf->p_sys->p_blend->p_module );
vlc_object_detach( p_intf->p_sys->p_blend ); vlc_object_detach( p_intf->p_sys->p_blend );
...@@ -590,13 +590,13 @@ static int OpenTextRenderer( intf_thread_t *p_intf ) ...@@ -590,13 +590,13 @@ static int OpenTextRenderer( intf_thread_t *p_intf )
if( psz_modulename && *psz_modulename ) if( psz_modulename && *psz_modulename )
{ {
p_intf->p_sys->p_text->p_module = p_intf->p_sys->p_text->p_module =
module_Need( p_intf->p_sys->p_text, "text renderer", module_need( p_intf->p_sys->p_text, "text renderer",
psz_modulename, true ); psz_modulename, true );
} }
if( !p_intf->p_sys->p_text->p_module ) if( !p_intf->p_sys->p_text->p_module )
{ {
p_intf->p_sys->p_text->p_module = p_intf->p_sys->p_text->p_module =
module_Need( p_intf->p_sys->p_text, "text renderer", 0, 0 ); module_need( p_intf->p_sys->p_text, "text renderer", 0, 0 );
} }
free( psz_modulename ); free( psz_modulename );
...@@ -611,7 +611,7 @@ static void CloseTextRenderer( intf_thread_t *p_intf ) ...@@ -611,7 +611,7 @@ static void CloseTextRenderer( intf_thread_t *p_intf )
if( p_intf->p_sys->p_text ) if( p_intf->p_sys->p_text )
{ {
if( p_intf->p_sys->p_text->p_module ) if( p_intf->p_sys->p_text->p_module )
module_Unneed( p_intf->p_sys->p_text, module_unneed( p_intf->p_sys->p_text,
p_intf->p_sys->p_text->p_module ); p_intf->p_sys->p_text->p_module );
vlc_object_detach( p_intf->p_sys->p_text ); vlc_object_detach( p_intf->p_sys->p_text );
......
...@@ -405,9 +405,9 @@ static VLCInfo *_o_sharedInstance = nil; ...@@ -405,9 +405,9 @@ static VLCInfo *_o_sharedInstance = nil;
PL_LOCK; PL_LOCK;
p_playlist->p_private = &p_export; p_playlist->p_private = &p_export;
module_t *p_mod = module_Need( p_playlist, "meta writer", NULL, 0 ); module_t *p_mod = module_need( p_playlist, "meta writer", NULL, 0 );
if( p_mod ) if( p_mod )
module_Unneed( p_playlist, p_mod ); module_unneed( p_playlist, p_mod );
PL_UNLOCK; PL_UNLOCK;
val.b_bool = true; val.b_bool = true;
......
...@@ -315,7 +315,7 @@ static VLCTreeItem *o_root_item = nil; ...@@ -315,7 +315,7 @@ static VLCTreeItem *o_root_item = nil;
int i = 0; int i = 0;
if( [[self name] isEqualToString: @"main"] ) if( [[self name] isEqualToString: @"main"] )
{ {
p_main_module = module_GetMainModule( p_intf ); p_main_module = module_get_main( p_intf );
assert( p_main_module ); assert( p_main_module );
/* We found the main module */ /* We found the main module */
...@@ -323,7 +323,7 @@ static VLCTreeItem *o_root_item = nil; ...@@ -323,7 +323,7 @@ static VLCTreeItem *o_root_item = nil;
* generate their config panel them when it is asked by the user. */ * generate their config panel them when it is asked by the user. */
VLCTreeItem *p_last_category = NULL; VLCTreeItem *p_last_category = NULL;
unsigned int i_confsize; unsigned int i_confsize;
p_items = module_GetConfig( p_main_module, &i_confsize ); p_items = module_config_get( p_main_module, &i_confsize );
o_children = [[NSMutableArray alloc] initWithCapacity:10]; o_children = [[NSMutableArray alloc] initWithCapacity:10];
for( int i = 0; i < i_confsize; i++ ) for( int i = 0; i < i_confsize; i++ )
{ {
...@@ -401,12 +401,12 @@ static VLCTreeItem *o_root_item = nil; ...@@ -401,12 +401,12 @@ static VLCTreeItem *o_root_item = nil;
p_module = (module_t *)p_list->p_values[i].p_object; p_module = (module_t *)p_list->p_values[i].p_object;
/* Exclude the main module */ /* Exclude the main module */
if( module_IsMainModule( p_module ) ) if( module_is_main( p_module ) )
continue; continue;
/* Exclude empty plugins (submodules don't have config */ /* Exclude empty plugins (submodules don't have config */
/* options, they are stored in the parent module) */ /* options, they are stored in the parent module) */
p_items = module_GetConfig( p_module, &confsize ); p_items = module_config_get( p_module, &confsize );
unsigned int j; unsigned int j;
...@@ -465,7 +465,7 @@ static VLCTreeItem *o_root_item = nil; ...@@ -465,7 +465,7 @@ static VLCTreeItem *o_root_item = nil;
[p_subcategory_item->o_children addObject:[[VLCTreeItem alloc] [p_subcategory_item->o_children addObject:[[VLCTreeItem alloc]
initWithName:[[VLCMain sharedInstance] initWithName:[[VLCMain sharedInstance]
localizedString: module_GetName( p_module, false ) ] localizedString: module_get_name( p_module, false ) ]
withTitle:[[VLCMain sharedInstance] withTitle:[[VLCMain sharedInstance]
localizedString: module_GetLongName( p_module ) ] localizedString: module_GetLongName( p_module ) ]
withHelp: @"" withHelp: @""
...@@ -527,10 +527,10 @@ static VLCTreeItem *o_root_item = nil; ...@@ -527,10 +527,10 @@ static VLCTreeItem *o_root_item = nil;
{ {
p_parser = (module_t *)p_list->p_values[i_index].p_object ; p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( !strcmp( module_GetObjName( p_parser ), psz_module_name ) ) if( !strcmp( module_get_object( p_parser ), psz_module_name ) )
{ {
unsigned int confsize; unsigned int confsize;
module_GetConfig( p_parser, &confsize ); module_config_get( p_parser, &confsize );
BOOL b_has_prefs = confsize != 0; BOOL b_has_prefs = confsize != 0;
vlc_list_release( p_list ); vlc_list_release( p_list );
return( b_has_prefs ); return( b_has_prefs );
...@@ -572,7 +572,7 @@ static VLCTreeItem *o_root_item = nil; ...@@ -572,7 +572,7 @@ static VLCTreeItem *o_root_item = nil;
p_module = (module_t *) [self vlcObject]; p_module = (module_t *) [self vlcObject];
assert( p_module ); assert( p_module );
p_items = module_GetConfig( p_module, &confsize ); p_items = module_config_get( p_module, &confsize );
for( unsigned int i = 0; i < confsize; i++ ) for( unsigned int i = 0; i < confsize; i++ )
{ {
...@@ -602,12 +602,12 @@ static VLCTreeItem *o_root_item = nil; ...@@ -602,12 +602,12 @@ static VLCTreeItem *o_root_item = nil;
} }
else else
{ {
p_main_module = module_GetMainModule( p_intf ); p_main_module = module_get_main( p_intf );
assert( p_main_module ); assert( p_main_module );
module_config_t *p_items; module_config_t *p_items;
unsigned int i, confsize; unsigned int i, confsize;
p_items = module_GetConfig( p_main_module, &confsize ); p_items = module_config_get( p_main_module, &confsize );
/* We need to first, find the right (sub)category, /* We need to first, find the right (sub)category,
* and then abort when we find a new (sub)category. Part of the Ugliness. */ * and then abort when we find a new (sub)category. Part of the Ugliness. */
......
...@@ -1289,14 +1289,14 @@ ...@@ -1289,14 +1289,14 @@
if( p_item->i_type == CONFIG_ITEM_MODULE ) if( p_item->i_type == CONFIG_ITEM_MODULE )
{ {
if( module_IsCapable( p_parser, p_item->psz_type ) ) if( module_provides( p_parser, p_item->psz_type ) )
{ {
NSString *o_description = [[VLCMain sharedInstance] NSString *o_description = [[VLCMain sharedInstance]
localizedString: module_GetLongName( p_parser )]; localizedString: module_GetLongName( p_parser )];
[o_popup addItemWithTitle: o_description]; [o_popup addItemWithTitle: o_description];
if( p_item->value.psz && if( p_item->value.psz &&
!strcmp( p_item->value.psz, module_GetObjName( p_parser ) ) ) !strcmp( p_item->value.psz, module_get_object( p_parser ) ) )
[o_popup selectItem:[o_popup lastItem]]; [o_popup selectItem:[o_popup lastItem]];
} }
} }
...@@ -1304,14 +1304,14 @@ ...@@ -1304,14 +1304,14 @@
{ {
int i; int i;
if( !strcmp( module_GetObjName( p_parser ), "main" ) ) if( !strcmp( module_get_object( p_parser ), "main" ) )
continue; continue;
unsigned int confsize; unsigned int confsize;
unsigned int unused; unsigned int unused;
module_GetConfig( p_parser, &confsize ); module_config_get( p_parser, &confsize );
for ( i = 0; i < confsize; i++ ) for ( i = 0; i < confsize; i++ )
{ {
module_config_t *p_config = module_GetConfig( p_parser, &unused ) + i; module_config_t *p_config = module_config_get( p_parser, &unused ) + i;
/* Hack: required subcategory is stored in i_min */ /* Hack: required subcategory is stored in i_min */
if( p_config->i_type == CONFIG_SUBCATEGORY && if( p_config->i_type == CONFIG_SUBCATEGORY &&
p_config->value.i == p_item->min.i ) p_config->value.i == p_item->min.i )
...@@ -1321,7 +1321,7 @@ ...@@ -1321,7 +1321,7 @@
[o_popup addItemWithTitle: o_description]; [o_popup addItemWithTitle: o_description];
if( p_item->value.psz && !strcmp(p_item->value.psz, if( p_item->value.psz && !strcmp(p_item->value.psz,
module_GetObjName( p_parser )) ) module_get_object( p_parser )) )
[o_popup selectItem:[o_popup lastItem]]; [o_popup selectItem:[o_popup lastItem]];
} }
} }
...@@ -1368,13 +1368,13 @@ ...@@ -1368,13 +1368,13 @@
if( p_item->i_type == CONFIG_ITEM_MODULE ) if( p_item->i_type == CONFIG_ITEM_MODULE )
{ {
if( module_IsCapable( p_parser, p_item->psz_type ) ) if( module_provides( p_parser, p_item->psz_type ) )
{ {
NSString *o_description = [[VLCMain sharedInstance] NSString *o_description = [[VLCMain sharedInstance]
localizedString: module_GetLongName( p_parser )]; localizedString: module_GetLongName( p_parser )];
if( [newval isEqualToString: o_description] ) if( [newval isEqualToString: o_description] )
{ {
returnval = strdup( module_GetObjName( p_parser )); returnval = strdup( module_get_object( p_parser ));
break; break;
} }
} }
...@@ -1383,13 +1383,13 @@ ...@@ -1383,13 +1383,13 @@
{ {
int i; int i;
if( !strcmp( module_GetObjName( p_parser ), "main" ) ) if( !strcmp( module_get_object( p_parser ), "main" ) )
continue; continue;
unsigned int confsize, unused; unsigned int confsize, unused;
module_GetConfig( p_parser, &confsize ); module_config_get( p_parser, &confsize );
for ( i = 0; i < confsize; i++ ) for ( i = 0; i < confsize; i++ )
{ {
module_config_t *p_config = module_GetConfig( p_parser, &unused ) + i; module_config_t *p_config = module_config_get( p_parser, &unused ) + i;
/* Hack: required subcategory is stored in i_min */ /* Hack: required subcategory is stored in i_min */
if( p_config->i_type == CONFIG_SUBCATEGORY && if( p_config->i_type == CONFIG_SUBCATEGORY &&
p_config->value.i == p_item->min.i ) p_config->value.i == p_item->min.i )
...@@ -1398,7 +1398,7 @@ ...@@ -1398,7 +1398,7 @@
localizedString: module_GetLongName( p_parser )]; localizedString: module_GetLongName( p_parser )];
if( [newval isEqualToString: o_description] ) if( [newval isEqualToString: o_description] )
{ {
returnval = strdup(module_GetObjName( p_parser )); returnval = strdup(module_get_object( p_parser ));
break; break;
} }
} }
...@@ -2057,16 +2057,16 @@ if( _p_item->i_type == CONFIG_ITEM_MODULE_LIST ) ...@@ -2057,16 +2057,16 @@ if( _p_item->i_type == CONFIG_ITEM_MODULE_LIST )
int i; int i;
p_parser = (module_t *)p_list->p_values[i_module_index].p_object; p_parser = (module_t *)p_list->p_values[i_module_index].p_object;
if( !strcmp( module_GetObjName( p_parser ), "main" ) ) if( !strcmp( module_get_object( p_parser ), "main" ) )
continue; continue;
unsigned int confsize; unsigned int confsize;
module_GetConfig( p_parser, &confsize ); module_config_get( p_parser, &confsize );
for ( i = 0; i < confsize; i++ ) for ( i = 0; i < confsize; i++ )
{ {
unsigned int unused; unsigned int unused;
module_config_t *p_config = module_GetConfig( p_parser, &unused ) + i; module_config_t *p_config = module_config_get( p_parser, &unused ) + i;
NSString *o_modulelongname, *o_modulename; NSString *o_modulelongname, *o_modulename;
NSNumber *o_moduleenabled = nil; NSNumber *o_moduleenabled = nil;
...@@ -2077,10 +2077,10 @@ if( _p_item->i_type == CONFIG_ITEM_MODULE_LIST ) ...@@ -2077,10 +2077,10 @@ if( _p_item->i_type == CONFIG_ITEM_MODULE_LIST )
o_modulelongname = [NSString stringWithUTF8String: o_modulelongname = [NSString stringWithUTF8String:
module_GetLongName( p_parser )]; module_GetLongName( p_parser )];
o_modulename = [NSString stringWithUTF8String: o_modulename = [NSString stringWithUTF8String:
module_GetObjName( p_parser )]; module_get_object( p_parser )];
if( _p_item->value.psz && if( _p_item->value.psz &&
strstr( _p_item->value.psz, module_GetObjName( p_parser ) ) ) strstr( _p_item->value.psz, module_get_object( p_parser ) ) )
o_moduleenabled = [NSNumber numberWithBool:YES]; o_moduleenabled = [NSNumber numberWithBool:YES];
else else
o_moduleenabled = [NSNumber numberWithBool:NO]; o_moduleenabled = [NSNumber numberWithBool:NO];
......
...@@ -382,10 +382,10 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des ...@@ -382,10 +382,10 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
for( int i_index = 0; i_index < p_list->i_count; i_index++ ) for( int i_index = 0; i_index < p_list->i_count; i_index++ )
{ {
p_parser = (module_t *)p_list->p_values[i_index].p_object; p_parser = (module_t *)p_list->p_values[i_index].p_object;
if( p_parser && module_IsCapable( p_parser, p_item->psz_type ) ) if( p_parser && module_provides( p_parser, p_item->psz_type ) )
{ {
[object addItemWithTitle: [NSString stringWithUTF8String: module_GetLongName( p_parser ) ?: ""]]; [object addItemWithTitle: [NSString stringWithUTF8String: module_GetLongName( p_parser ) ?: ""]];
if( p_item->value.psz && !strcmp( p_item->value.psz, module_GetObjName( p_parser ) ) ) if( p_item->value.psz && !strcmp( p_item->value.psz, module_get_object( p_parser ) ) )
[object selectItem: [object lastItem]]; [object selectItem: [object lastItem]];
} }
} }
...@@ -434,7 +434,7 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des ...@@ -434,7 +434,7 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
[self setupButton: o_audio_visual_pop forModuleList: "audio-visual"]; [self setupButton: o_audio_visual_pop forModuleList: "audio-visual"];
/* Last.FM is optional */ /* Last.FM is optional */
if( module_Exists( p_intf, "audioscrobbler" ) ) if( module_exists( p_intf, "audioscrobbler" ) )
{ {
[o_audio_lastuser_fld setStringValue: [NSString stringWithUTF8String: config_GetPsz( p_intf, "lastfm-username" ) ?: ""]]; [o_audio_lastuser_fld setStringValue: [NSString stringWithUTF8String: config_GetPsz( p_intf, "lastfm-username" ) ?: ""]];
[o_audio_lastpwd_sfld setStringValue: [NSString stringWithUTF8String: config_GetPsz( p_intf, "lastfm-password" ) ?: ""]]; [o_audio_lastpwd_sfld setStringValue: [NSString stringWithUTF8String: config_GetPsz( p_intf, "lastfm-password" ) ?: ""]];
...@@ -535,9 +535,9 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des ...@@ -535,9 +535,9 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
int i_cache = config_GetInt( p_intf, "file-caching"); int i_cache = config_GetInt( p_intf, "file-caching");
TestCaC( "udp-caching" ); TestCaC( "udp-caching" );
if( module_Exists (p_intf, "dvdread") ) if( module_exists (p_intf, "dvdread") )
TestCaC( "dvdread-caching" ); TestCaC( "dvdread-caching" );
if( module_Exists (p_intf, "dvdnav") ) if( module_exists (p_intf, "dvdnav") )
TestCaC( "dvdnav-caching" ); TestCaC( "dvdnav-caching" );
TestCaC( "tcp-caching" ); TestCaC( "tcp-caching" );
TestCaC( "fake-caching" ); TestCaC( "fake-caching" );
...@@ -547,7 +547,7 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des ...@@ -547,7 +547,7 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
TestCaCi( "rtsp-caching", 4 ); TestCaCi( "rtsp-caching", 4 );
TestCaCi( "ftp-caching", 2 ); TestCaCi( "ftp-caching", 2 );
TestCaCi( "http-caching", 4 ); TestCaCi( "http-caching", 4 );
if(module_Exists (p_intf, "access_realrtsp")) if(module_exists (p_intf, "access_realrtsp"))
TestCaCi( "realrtsp-caching", 10 ); TestCaCi( "realrtsp-caching", 10 );
TestCaCi( "mms-caching", 19 ); TestCaCi( "mms-caching", 19 );
if( b_cache_equal ) if( b_cache_equal )
...@@ -685,11 +685,11 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch ...@@ -685,11 +685,11 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
{ {
p_parser = (module_t *)p_list->p_values[i_module_index].p_object; p_parser = (module_t *)p_list->p_values[i_module_index].p_object;
if( p_item->i_type == CONFIG_ITEM_MODULE && module_IsCapable( p_parser, p_item->psz_type ) ) if( p_item->i_type == CONFIG_ITEM_MODULE && module_provides( p_parser, p_item->psz_type ) )
{ {
if( [[[object selectedItem] title] isEqualToString: _NS( module_GetLongName( p_parser ) )] ) if( [[[object selectedItem] title] isEqualToString: _NS( module_GetLongName( p_parser ) )] )
{ {
config_PutPsz( p_intf, name, strdup( module_GetObjName( p_parser ))); config_PutPsz( p_intf, name, strdup( module_get_object( p_parser )));
break; break;
} }
} }
...@@ -772,7 +772,7 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch ...@@ -772,7 +772,7 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
SaveModuleList( o_audio_visual_pop, "audio-visual" ); SaveModuleList( o_audio_visual_pop, "audio-visual" );
/* Last.FM is optional */ /* Last.FM is optional */
if( module_Exists( p_intf, "audioscrobbler" ) ) if( module_exists( p_intf, "audioscrobbler" ) )
{ {
[o_audio_last_ckb setEnabled: YES]; [o_audio_last_ckb setEnabled: YES];
if( [o_audio_last_ckb state] == NSOnState ) if( [o_audio_last_ckb state] == NSOnState )
...@@ -852,12 +852,12 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch ...@@ -852,12 +852,12 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
#define CaC( name ) CaCi( name, 1 ) #define CaC( name ) CaCi( name, 1 )
msg_Dbg( p_intf, "Adjusting all cache values to: %i", [[o_input_cachelevel_pop selectedItem] tag] ); msg_Dbg( p_intf, "Adjusting all cache values to: %i", [[o_input_cachelevel_pop selectedItem] tag] );
CaC( "udp-caching" ); CaC( "udp-caching" );
if( module_Exists (p_intf, "dvdread" ) ) if( module_exists (p_intf, "dvdread" ) )
{ {
CaC( "dvdread-caching" ); CaC( "dvdread-caching" );
i = i + config_SaveConfigFile( p_intf, "dvdread" ); i = i + config_SaveConfigFile( p_intf, "dvdread" );
} }
if( module_Exists (p_intf, "dvdnav" ) ) if( module_exists (p_intf, "dvdnav" ) )
{ {
CaC( "dvdnav-caching" ); CaC( "dvdnav-caching" );
i = i + config_SaveConfigFile( p_intf, "dvdnav" ); i = i + config_SaveConfigFile( p_intf, "dvdnav" );
...@@ -867,7 +867,7 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch ...@@ -867,7 +867,7 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch