1 /*****************************************************************************
2 * main.h: access to all program variables
4 *****************************************************************************
5 * Declaration and extern access to global program object.
6 *****************************************************************************/
8 /*****************************************************************************
9 * main_t, p_main (global variable)
10 *****************************************************************************
11 * This structure has an unique instance, declared in main and pointed by the
12 * only global variable of the program. It should allow access to any variable
13 * of the program, for user-interface purposes or more easier call of interface
14 * and common functions (example: the intf_*Msg functions). Please avoid using
15 * it when you can access the members you need in an other way. In fact, it
16 * should only be used by interface thread.
17 *****************************************************************************/
20 /* Global properties */
21 int i_argc; /* command line arguments count */
22 char ** ppsz_argv; /* command line arguments */
23 char ** ppsz_env; /* environment variables */
25 /* Generic settings */
26 boolean_t b_audio; /* is audio output allowed ? */
27 boolean_t b_video; /* is video output allowed ? */
28 boolean_t b_vlans; /* are vlans supported ? */
31 p_aout_thread_t p_aout; /* audio output thread */
32 p_intf_thread_t p_intf; /* main interface thread */
34 /* Shared data - these structures are accessed directly from p_main by
36 p_intf_msg_t p_msg; /* messages interface data */
37 p_input_vlan_t p_vlan; /* vlan library data */
40 extern main_t *p_main;
42 /*****************************************************************************
43 * Prototypes - these methods are used to get default values for some threads
45 *****************************************************************************/
46 int main_GetIntVariable( char *psz_name, int i_default );
47 char * main_GetPszVariable( char *psz_name, char *psz_default );
48 void main_PutIntVariable( char *psz_name, int i_value );
49 void main_PutPszVariable( char *psz_name, char *psz_value );