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: e810f87f4e58ae5a78a24a0c948b0847be9af613 $
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  * \file
00026  * This file defines functions for modules in vlc
00027  */
00028 
00029 /*****************************************************************************
00030  * Exported functions.
00031  *****************************************************************************/
00032 
00033 VLC_EXPORT( module_t *, module_need, ( vlc_object_t *, const char *, const char *, bool ) );
00034 #define module_need(a,b,c,d) module_need(VLC_OBJECT(a),b,c,d)
00035 VLC_EXPORT( void, module_unneed, ( vlc_object_t *, module_t * ) );
00036 #define module_unneed(a,b) module_unneed(VLC_OBJECT(a),b)
00037 VLC_EXPORT( bool,  module_exists, (const char *) );
00038 VLC_EXPORT( module_t *, module_find, (const char *) );
00039 
00040 int module_start(vlc_object_t *, module_t *);
00041 #define module_start(o, m) module_start(VLC_OBJECT(o),m)
00042 void module_stop(vlc_object_t *, module_t *);
00043 #define module_stop(o, m) module_stop(VLC_OBJECT(o),m)
00044 
00045 VLC_EXPORT( module_config_t *, module_config_get, ( const module_t *, unsigned * ) );
00046 VLC_EXPORT( void, module_config_free, ( module_config_t * ) );
00047 
00048 VLC_EXPORT( module_t *, module_hold, (module_t *module) );
00049 VLC_EXPORT( void, module_release, (module_t *module) );
00050 VLC_EXPORT( void, module_list_free, (module_t **) );
00051 VLC_EXPORT( module_t **, module_list_get, (size_t *n) );
00052 
00053 VLC_EXPORT( bool, module_provides, ( const module_t *m, const char *cap ) );
00054 VLC_EXPORT( const char *, module_get_object, ( const module_t *m ) );
00055 VLC_EXPORT( const char *, module_get_name, ( const module_t *m, bool long_name ) );
00056 #define module_GetLongName( m ) module_get_name( m, true )
00057 VLC_EXPORT( const char *, module_get_help, ( const module_t *m ) );
00058 VLC_EXPORT( const char *, module_get_capability, ( const module_t *m ) );
00059 VLC_EXPORT( int, module_get_score, ( const module_t *m ) );
00060 VLC_EXPORT( const char *, module_gettext, ( const module_t *, const char * ) );
00061 
00062 static inline module_t *module_get_main (void)
00063 {
00064     return module_find ("main");
00065 }
00066 #define module_get_main(a) module_get_main()
00067 
00068 static inline bool module_is_main( const module_t * p_module )
00069 {
00070     return !strcmp( module_get_object( p_module ), "main" );
00071 }

Generated on Mon Nov 22 07:55:20 2010 for VLC by  doxygen 1.5.6