]> git.sesse.net Git - vlc/blob - src/modules/modules.h
Move libvlc module stuff to their own subdirectory
[vlc] / src / modules / modules.h
1 /*****************************************************************************
2  * modules.h : Module management functions.
3  *****************************************************************************
4  * Copyright (C) 2001 the VideoLAN team
5  * $Id: modules.h 17958 2006-11-22 17:13:24Z courmisch $
6  *
7  * Authors: Samuel Hocevar <sam@zoy.org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 /* Number of tries before we unload an unused module */
25 #define MODULE_HIDE_DELAY 50
26
27 /*****************************************************************************
28  * module_bank_t: the module bank
29  *****************************************************************************
30  * This variable is accessed by any function using modules.
31  *****************************************************************************/
32 struct module_bank_t
33 {
34     VLC_COMMON_MEMBERS
35
36     int              i_usage;
37 #ifndef HAVE_SHARED_LIBVLC
38     module_symbols_t symbols;
39 #endif
40
41     vlc_bool_t       b_main;
42     vlc_bool_t       b_builtins;
43     vlc_bool_t       b_plugins;
44
45     /* Plugins cache */
46     vlc_bool_t     b_cache;
47     vlc_bool_t     b_cache_dirty;
48     vlc_bool_t     b_cache_delete;
49
50     int            i_cache;
51     module_cache_t **pp_cache;
52
53     int            i_loaded_cache;
54     module_cache_t **pp_loaded_cache;
55 };
56
57 /*****************************************************************************
58  * Module cache description structure
59  *****************************************************************************/
60 struct module_cache_t
61 {
62     /* Mandatory cache entry header */
63     char       *psz_file;
64     int64_t    i_time;
65     int64_t    i_size;
66     vlc_bool_t b_junk;
67
68     /* Optional extra data */
69     module_t *p_module;
70     vlc_bool_t b_used;
71 };
72
73 #define module_InitBank(a)     __module_InitBank(VLC_OBJECT(a))
74 void  __module_InitBank        ( vlc_object_t * );
75 #define module_LoadBuiltins(a) __module_LoadBuiltins(VLC_OBJECT(a))
76 void  __module_LoadBuiltins    ( vlc_object_t * );
77 #define module_LoadPlugins(a)  __module_LoadPlugins(VLC_OBJECT(a))
78 void  __module_LoadPlugins     ( vlc_object_t * );
79 #define module_EndBank(a)      __module_EndBank(VLC_OBJECT(a))
80 void  __module_EndBank         ( vlc_object_t * );
81 #define module_ResetBank(a)    __module_ResetBank(VLC_OBJECT(a))
82 void  __module_ResetBank       ( vlc_object_t * );