]> git.sesse.net Git - vlc/blob - include/main.h
. autod�tection des plugins
[vlc] / include / main.h
1 /*****************************************************************************
2  * main.h: access to all program variables
3  * Declaration and extern access to global program object.
4  *****************************************************************************
5  * Copyright (C) 1999, 2000 VideoLAN
6  *
7  * Authors:
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., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22  *****************************************************************************/
23
24 /*****************************************************************************
25  * main_t, p_main (global variable)
26  *****************************************************************************
27  * This structure has an unique instance, declared in main and pointed by the
28  * only global variable of the program. It should allow access to any variable
29  * of the program, for user-interface purposes or more easier call of interface
30  * and common functions (example: the intf_*Msg functions). Please avoid using
31  * it when you can access the members you need in an other way. In fact, it
32  * should only be used by interface thread.
33  *****************************************************************************/
34
35 typedef struct
36 {
37     /* Global properties */
38     int                    i_argc;           /* command line arguments count */
39     char **                ppsz_argv;              /* command line arguments */
40     char **                ppsz_env;                /* environment variables */
41     char *                 psz_arg0;         /* program name (whithout path) */
42
43     /* Generic settings */
44     boolean_t              b_audio;             /* is audio output allowed ? */
45     boolean_t              b_video;             /* is video output allowed ? */
46     boolean_t              b_vlans;                 /* are vlans supported ? */
47
48     /* Unique threads */
49     p_aout_thread_t        p_aout;                    /* audio output thread */
50     p_intf_thread_t        p_intf;                  /* main interface thread */
51
52     /* Shared data - these structures are accessed directly from p_main by
53      * several modules */
54     p_plugin_bank_t        p_bank;                            /* plugin bank */
55     p_playlist_t           p_playlist;                        /* plugin bank */
56     p_intf_msg_t           p_msg;                 /* messages interface data */
57     p_input_vlan_t         p_vlan;                      /* vlan library data */
58 } main_t;
59
60 extern main_t *p_main;
61
62 /*****************************************************************************
63  * Prototypes - these methods are used to get default values for some threads
64  * and modules.
65  *****************************************************************************/
66 int    main_GetIntVariable( char *psz_name, int i_default );
67 char * main_GetPszVariable( char *psz_name, char *psz_default );
68 void   main_PutIntVariable( char *psz_name, int i_value );
69 void   main_PutPszVariable( char *psz_name, char *psz_value );
70