Commit 7355193f authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Helper to get the capability of a module and its score.

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 4dd6f937
...@@ -50,6 +50,8 @@ VLC_EXPORT( const char *, module_get_object, ( const module_t *m ) ); ...@@ -50,6 +50,8 @@ VLC_EXPORT( const char *, module_get_object, ( const module_t *m ) );
VLC_EXPORT( const char *, module_get_name, ( 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_get_name( m, true ) #define module_GetLongName( m ) module_get_name( m, true )
VLC_EXPORT( const char *, module_get_help, ( const module_t *m ) ); VLC_EXPORT( const char *, module_get_help, ( const module_t *m ) );
VLC_EXPORT( const char *, module_get_capability, ( const module_t *m ) );
VLC_EXPORT( int, module_get_score, ( const module_t *m ) );
static inline module_t *module_get_main (void) static inline module_t *module_get_main (void)
{ {
......
...@@ -213,9 +213,11 @@ module_config_free ...@@ -213,9 +213,11 @@ module_config_free
module_config_get module_config_get
module_exists module_exists
module_find module_find
module_get_capability
module_get_help module_get_help
module_get_name module_get_name
module_get_object module_get_object
module_get_score
module_hold module_hold
module_list_free module_list_free
module_list_get module_list_get
......
...@@ -317,6 +317,28 @@ const char *module_get_help( const module_t *m ) ...@@ -317,6 +317,28 @@ const char *module_get_help( const module_t *m )
return m->psz_help; return m->psz_help;
} }
/**
* Get the capability for a module
*
* \param m the module
* return the capability
*/
const char *module_get_capability( const module_t *m )
{
return m->psz_capability;
}
/**
* Get the score for a module
*
* \param m the module
* return the score for the capability
*/
int module_get_score( const module_t *m )
{
return m->i_score;
}
module_t *module_hold (module_t *m) module_t *module_hold (module_t *m)
{ {
vlc_hold (&m->vlc_gc_data); vlc_hold (&m->vlc_gc_data);
......
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