]> git.sesse.net Git - vlc/blob - src/config/configuration.h
Load the whole config file all the time
[vlc] / src / config / configuration.h
1 /*****************************************************************************
2  * configuration.h management of the modules configuration
3  *****************************************************************************
4  * Copyright (C) 2007 the VideoLAN team
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19  *****************************************************************************/
20
21 #ifndef LIBVLC_CONFIGURATION_H
22 # define LIBVLC_CONFIGURATION_H 1
23
24 # ifdef __cplusplus
25 extern "C" {
26 # endif
27
28 /* Internal configuration prototypes and structures */
29
30 int  config_CreateDir( vlc_object_t *, const char * );
31 int  config_AutoSaveConfigFile( vlc_object_t * );
32
33 void config_Free( module_t * );
34
35 int config_LoadCmdLine   ( vlc_object_t *, int, const char *[], int * );
36 int config_LoadConfigFile( vlc_object_t * );
37 #define config_LoadCmdLine(a,b,c,d) config_LoadCmdLine(VLC_OBJECT(a),b,c,d)
38 #define config_LoadConfigFile(a) config_LoadConfigFile(VLC_OBJECT(a))
39
40 int config_SortConfig (void);
41 void config_UnsortConfig (void);
42
43 char *config_GetDataDirDefault( void );
44
45 int IsConfigStringType( int type );
46 int IsConfigIntegerType (int type);
47 static inline int IsConfigFloatType (int type)
48 {
49     return type == CONFIG_ITEM_FLOAT;
50 }
51
52 uint_fast32_t ConfigStringToKey( const char * );
53 char *ConfigKeyToString( uint_fast32_t );
54
55 extern vlc_rwlock_t config_lock;
56
57 /* The configuration file */
58 #define CONFIG_FILE                     "vlcrc"
59
60 # ifdef __cplusplus
61 }
62 # endif
63 #endif