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

More access functions around module_t

parent cc39378d
...@@ -46,6 +46,7 @@ typedef shl_t module_handle_t; ...@@ -46,6 +46,7 @@ typedef shl_t module_handle_t;
/** /**
* Module descriptor * Module descriptor
*/ */
#ifndef __PLUGIN__
/* FIXME: scheduled for privatization */ /* FIXME: scheduled for privatization */
struct module_t struct module_t
{ {
...@@ -96,6 +97,7 @@ struct module_t ...@@ -96,6 +97,7 @@ struct module_t
vlc_bool_t b_builtin; /* Set to true if the module is built in */ vlc_bool_t b_builtin; /* Set to true if the module is built in */
vlc_bool_t b_loaded; /* Set to true if the dll is loaded */ vlc_bool_t b_loaded; /* Set to true if the dll is loaded */
}; };
#endif
/***************************************************************************** /*****************************************************************************
* Exported functions. * Exported functions.
...@@ -129,4 +131,7 @@ enum vlc_module_properties ...@@ -129,4 +131,7 @@ enum vlc_module_properties
VLC_MODULE_NAME VLC_MODULE_NAME
}; };
VLC_EXPORT( vlc_bool_t, module_IsCapable, ( const module_t *, const char *cap ) ); VLC_EXPORT( vlc_bool_t, module_IsCapable, ( const module_t *m, const char *cap ) );
VLC_EXPORT( const char *, module_GetObjName, ( const module_t *m ) );
VLC_EXPORT( const char *, module_GetName, ( const module_t *m, vlc_bool_t long_name ) );
...@@ -178,6 +178,8 @@ __module_Exists ...@@ -178,6 +178,8 @@ __module_Exists
__module_Need __module_Need
__module_Unneed __module_Unneed
module_IsCapable module_IsCapable
module_GetObjName
module_GetName
__msg_Dbg __msg_Dbg
__msg_Err __msg_Err
__msg_Generic __msg_Generic
......
...@@ -391,6 +391,25 @@ vlc_bool_t module_IsCapable( const module_t *m, const char *cap ) ...@@ -391,6 +391,25 @@ vlc_bool_t module_IsCapable( const module_t *m, const char *cap )
return !strcmp( m->psz_capability, cap ); return !strcmp( m->psz_capability, cap );
} }
/*****************************************************************************
* module_GetObjName: internal name of a module.
*****************************************************************************/
const char *module_GetObjName( const module_t *m )
{
return m->psz_object_name;
}
/*****************************************************************************
* module_GetName: human-friendly name of a module.
*****************************************************************************/
const char *module_GetName(const module_t *m, vlc_bool_t long_name )
{
if( long_name && ( m->psz_longname != NULL) )
return m->psz_longname;
return m->psz_shortname ?: m->psz_object_name;
}
/***************************************************************************** /*****************************************************************************
* module_Need: return the best module function, given a capability list. * module_Need: return the best module function, given a capability list.
***************************************************************************** *****************************************************************************
......
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