]> git.sesse.net Git - vlc/commitdiff
Helper to get the capability of a module and its score.
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 28 Dec 2008 19:59:32 +0000 (20:59 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 30 Dec 2008 12:19:33 +0000 (13:19 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
include/vlc_modules.h
src/libvlccore.sym
src/modules/modules.c

index 867fbf2c4f69c98a635f3a2ffcca73bff5e909bf..8c91e71a8a1de2528271d6e626616bfee2a76dcc 100644 (file)
@@ -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 ) );
 #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_capability, ( const module_t *m ) );
+VLC_EXPORT( int, module_get_score, ( const module_t *m ) );
 
 static inline module_t *module_get_main (void)
 {
index a2627c16824c1a4e4d6bece6a36050cbea1cf09c..228abdb6680661efa985c56876601c1dbf8211c1 100644 (file)
@@ -213,9 +213,11 @@ module_config_free
 module_config_get
 module_exists
 module_find
+module_get_capability
 module_get_help
 module_get_name
 module_get_object
+module_get_score
 module_hold
 module_list_free
 module_list_get
index 0f39d63904f5a7b63bb5b7629b643d7688527f89..07ae7dbfac7046597e557034f74026c84f409313 100644 (file)
@@ -317,6 +317,28 @@ const char *module_get_help( const module_t *m )
     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)
 {
     vlc_hold (&m->vlc_gc_data);