vlc_modules.h 2.88 KB
Newer Older
1
/*****************************************************************************
2
 * modules.h : Module descriptor and load functions
3
 *****************************************************************************
4
 * Copyright (C) 2001 the VideoLAN team
5
 * $Id$
6 7 8 9 10 11 12
 *
 * Authors: Samuel Hocevar <sam@zoy.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
13
 *
14 15 16 17 18 19 20
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
Antoine Cellerier's avatar
Antoine Cellerier committed
21
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 23
 *****************************************************************************/

24 25 26 27 28
/**
 * \file
 * This file defines functions for modules in vlc
 */

29 30 31
/*****************************************************************************
 * Exported functions.
 *****************************************************************************/
32

33 34 35 36
VLC_EXPORT( module_t *, module_need, ( vlc_object_t *, const char *, const char *, bool ) );
#define module_need(a,b,c,d) module_need(VLC_OBJECT(a),b,c,d)
VLC_EXPORT( void, module_unneed, ( vlc_object_t *, module_t * ) );
#define module_unneed(a,b) module_unneed(VLC_OBJECT(a),b)
37 38
VLC_EXPORT( bool,  module_exists, (const char *) );
VLC_EXPORT( module_t *, module_find, (const char *) );
39

40 41
VLC_EXPORT( module_config_t *, module_config_get, ( const module_t *, unsigned * ) );
VLC_EXPORT( void, module_config_free, ( module_config_t * ) );
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
42

43 44
VLC_EXPORT( module_t *, module_hold, (module_t *module) );
VLC_EXPORT( void, module_release, (module_t *module) );
45 46 47
VLC_EXPORT( void, module_list_free, (module_t **) );
VLC_EXPORT( module_t **, module_list_get, (size_t *n) );

48 49 50 51 52
VLC_EXPORT( bool, module_provides, ( const module_t *m, const char *cap ) );
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 ) );
53 54
VLC_EXPORT( const char *, module_get_capability, ( const module_t *m ) );
VLC_EXPORT( int, module_get_score, ( const module_t *m ) );
55
VLC_EXPORT( const char *, module_gettext, ( const module_t *, const char * ) );
56

57
static inline module_t *module_get_main (void)
58
{
59
    return module_find ("main");
60
}
61
#define module_get_main(a) module_get_main()
62

63
static inline bool module_is_main( const module_t * p_module )
64
{
65
    return !strcmp( module_get_object( p_module ), "main" );
66
}