vlc_modules.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * modules.h : Module descriptor and load functions
00003  *****************************************************************************
00004  * Copyright (C) 2001 the VideoLAN team
00005  * $Id$
00006  *
00007  * Authors: Samuel Hocevar <sam@zoy.org>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00022  *****************************************************************************/
00023 
00024 /*****************************************************************************
00025  * Exported functions.
00026  *****************************************************************************/
00027 
00028 #define module_Need(a,b,c,d) __module_Need(VLC_OBJECT(a),b,c,d)
00029 VLC_EXPORT( module_t *, __module_Need, ( vlc_object_t *, const char *, const char *, bool ) );
00030 #define module_Unneed(a,b) __module_Unneed(VLC_OBJECT(a),b)
00031 VLC_EXPORT( void, __module_Unneed, ( vlc_object_t *, module_t * ) );
00032 #define module_Exists(a,b) __module_Exists(VLC_OBJECT(a),b)
00033 VLC_EXPORT( bool,  __module_Exists, ( vlc_object_t *, const char * ) );
00034 
00035 #define module_Find(a,b) __module_Find(VLC_OBJECT(a),b)
00036 VLC_EXPORT( module_t *, __module_Find, ( vlc_object_t *, const char * ) );
00037 VLC_EXPORT( void, module_Put, ( module_t *module ) );
00038 
00039 VLC_EXPORT( module_config_t *, module_GetConfig, ( const module_t *, unsigned * ) );
00040 VLC_EXPORT( void, module_PutConfig, ( module_config_t * ) );
00041 
00042 /* Return a NULL terminated array with the names of the modules that have a
00043  * certain capability.
00044  * Free after uses both the string and the table. */
00045  #define module_GetModulesNamesForCapability(a,b,c) \
00046                     __module_GetModulesNamesForCapability(VLC_OBJECT(a),b,c)
00047 VLC_EXPORT(char **, __module_GetModulesNamesForCapability,
00048                     ( vlc_object_t *p_this, const char * psz_capability,
00049                       char ***psz_longname ) );
00050 
00051 VLC_EXPORT( bool, module_IsCapable, ( const module_t *m, const char *cap ) );
00052 VLC_EXPORT( const char *, module_GetObjName, ( const module_t *m ) );
00053 VLC_EXPORT( const char *, module_GetName, ( const module_t *m, bool long_name ) );
00054 #define module_GetLongName( m ) module_GetName( m, true )
00055 VLC_EXPORT( const char *, module_GetHelp, ( const module_t *m ) );
00056 
00057 
00058 #define module_GetMainModule(a) __module_GetMainModule(VLC_OBJECT(a))
00059 static inline module_t * __module_GetMainModule( vlc_object_t * p_this )
00060 {
00061     return module_Find( p_this, "main" );
00062 }
00063 
00064 static inline bool module_IsMainModule( const module_t * p_module )
00065 {
00066     return !strcmp( module_GetObjName( p_module ), "main" );
00067 }

Generated on Wed Aug 13 08:02:37 2008 for VLC by  doxygen 1.5.1