1 /*****************************************************************************
2 * configuration.h management of the modules configuration
3 *****************************************************************************
4 * Copyright (C) 2007 the VideoLAN team
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.
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.
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 *****************************************************************************/
21 #if defined(__PLUGIN__) || defined(__BUILTIN__) || !defined(__LIBVLC__)
22 # error This header file can only be included from LibVLC.
25 #ifndef LIBVLC_CONFIGURATION_H
26 # define LIBVLC_CONFIGURATION_H 1
32 /* Internal configuration prototypes and structures */
34 int config_CreateDir( vlc_object_t
*, const char * );
35 int config_AutoSaveConfigFile( vlc_object_t
* );
37 void config_Free( module_t
* );
39 int config_LoadCmdLine ( vlc_object_t
*, int *, const char *[], bool );
40 int config_LoadConfigFile( vlc_object_t
*, const char * );
41 #define config_LoadCmdLine(a,b,c,d) config_LoadCmdLine(VLC_OBJECT(a),b,c,d)
42 #define config_LoadConfigFile(a,b) config_LoadConfigFile(VLC_OBJECT(a),b)
44 int config_SortConfig (void);
45 void config_UnsortConfig (void);
47 char *config_GetDataDirDefault( void );
49 int IsConfigStringType( int type
);
50 int IsConfigIntegerType (int type
);
51 static inline int IsConfigFloatType (int type
)
53 return type
== CONFIG_ITEM_FLOAT
;
56 uint_fast32_t ConfigStringToKey( const char * );
57 char *ConfigKeyToString( uint_fast32_t );
59 extern vlc_rwlock_t config_lock
;
61 /* The configuration file */
62 #define CONFIG_FILE "vlcrc"