]> git.sesse.net Git - vlc/blobdiff - include/vlc_modules.h
* implemented the generic VLC media player Help window on OSX to match the QT4 interf...
[vlc] / include / vlc_modules.h
index 9b4caa94e1d53e96ef97011ceb87caeb49a62e72..ccecc3f8e560d536ea5d2e6bf813c6d13ef686af 100644 (file)
@@ -46,6 +46,8 @@ typedef shl_t module_handle_t;
 /**
  * Module descriptor
  */
+#ifndef __PLUGIN__FIXME___
+/* FIXME: scheduled for privatization */
 struct module_t
 {
     VLC_COMMON_MEMBERS
@@ -65,7 +67,7 @@ struct module_t
     /** Shortcuts to the module */
     const char *pp_shortcuts[ MODULE_SHORTCUT_MAX ];
 
-    const char    *psz_capability;                           /**< Capability */
+    char    *psz_capability;                                 /**< Capability */
     int      i_score;                          /**< Score for the capability */
     uint32_t i_cpu;                           /**< Required CPU capabilities */
 
@@ -94,12 +96,8 @@ struct module_t
 
     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 */
-
-    /*
-     * Symbol table we send to the module so that it can access vlc symbols
-     */
-    module_symbols_t *p_symbols;
 };
+#endif
 
 /*****************************************************************************
  * Exported functions.
@@ -108,5 +106,45 @@ struct module_t
 VLC_EXPORT( module_t *, __module_Need, ( vlc_object_t *, const char *, const char *, vlc_bool_t ) );
 #define module_Unneed(a,b) __module_Unneed(VLC_OBJECT(a),b)
 VLC_EXPORT( void, __module_Unneed, ( vlc_object_t *, module_t * ) );
-#define module_Exist(a,b) __module_Exists(VLC_OBJECT(a),b)
+#define module_Exists(a,b) __module_Exists(VLC_OBJECT(a),b)
 VLC_EXPORT( vlc_bool_t,  __module_Exists, ( vlc_object_t *, const char * ) );
+
+/* Use only if you know what you're doing... */
+#define module_FindName(a,b) __module_FindName(VLC_OBJECT(a),b)
+VLC_EXPORT( module_t *, __module_FindName, ( vlc_object_t *, const char * ) );
+
+/* Return a NULL terminated array with the names of the modules that have a
+ * certain capability.
+ * Free after uses both the string and the table. */
+ #define module_GetModulesNamesForCapability(a,b) \
+                    __module_GetModulesNamesForCapability(VLC_OBJECT(a),b)
+VLC_EXPORT(char **, __module_GetModulesNamesForCapability,
+                    ( vlc_object_t *p_this, const char * psz_capability ) );
+
+VLC_EXPORT( module_t *, vlc_module_create, ( vlc_object_t * ) );
+VLC_EXPORT( module_t *, vlc_submodule_create, ( module_t * ) );
+VLC_EXPORT( int, vlc_module_set, (module_t *module, int propid, void *value) );
+
+enum vlc_module_properties
+{
+    /* DO NOT EVER REMOVE, INSERT OR REPLACE ANY ITEM! It would break the ABI!
+     * Append new items at the end ONLY. */
+    VLC_MODULE_CPU_REQUIREMENT,
+    VLC_MODULE_SHORTCUT,
+    VLC_MODULE_SHORTNAME,
+    VLC_MODULE_DESCRIPTION,
+    VLC_MODULE_HELP,
+    VLC_MODULE_CAPABILITY,
+    VLC_MODULE_SCORE,
+    VLC_MODULE_PROGRAM,
+    VLC_MODULE_CB_OPEN,
+    VLC_MODULE_CB_CLOSE,
+    VLC_MODULE_UNLOADABLE,
+    VLC_MODULE_NAME
+};
+
+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 ) );
+#define module_GetLongName( m ) module_GetName( m, VLC_TRUE )
+VLC_EXPORT( const char *, module_GetHelp, ( const module_t *m ) );