]> git.sesse.net Git - vlc/blob - src/config/configuration.h
update module LIST file.
[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 #if defined(__PLUGIN__) || defined(__BUILTIN__) || !defined(__LIBVLC__)
22 # error This header file can only be included from LibVLC.
23 #endif
24
25 #ifndef LIBVLC_CONFIGURATION_H
26 # define LIBVLC_CONFIGURATION_H 1
27
28 # ifdef __cplusplus
29 extern "C" {
30 # endif
31
32 /* Internal configuration prototypes and structures */
33
34 int  config_CreateDir( vlc_object_t *, const char * );
35 int  config_AutoSaveConfigFile( vlc_object_t * );
36
37 void config_Free( module_t * );
38
39 void config_SetCallbacks( module_config_t *, module_config_t *, size_t );
40 void config_UnsetCallbacks( module_config_t *, size_t );
41
42 #define config_LoadCmdLine(a,b,c,d) __config_LoadCmdLine(VLC_OBJECT(a),b,c,d)
43 #define config_LoadConfigFile(a,b) __config_LoadConfigFile(VLC_OBJECT(a),b)
44
45 int __config_LoadCmdLine   ( vlc_object_t *, int *, const char *[], vlc_bool_t );
46 char *config_GetHomeDir    ( void );
47 char *config_GetConfigDir  ( libvlc_int_t * );
48 char *config_GetUserDataDir( libvlc_int_t * );
49 char *config_GetCacheDir   ( libvlc_int_t * );
50 char *config_GetConfigFile ( libvlc_int_t * );
51 char *config_GetCustomConfigFile( libvlc_int_t * );
52 int __config_LoadConfigFile( vlc_object_t *, const char * );
53
54 int IsConfigStringType( int type );
55 int IsConfigIntegerType (int type);
56 static inline int IsConfigFloatType (int type)
57 {
58     return type == CONFIG_ITEM_FLOAT;
59 }
60
61 int ConfigStringToKey( const char * );
62
63 /* The configuration file and directory */
64 #if defined (SYS_BEOS)
65 #  define CONFIG_DIR                    "config/settings/VideoLAN Client"
66 #elif defined (__APPLE__)
67 #  define CONFIG_DIR                    "Library/Preferences/VLC"
68 #elif defined( WIN32 ) || defined( UNDER_CE )
69 #  define CONFIG_DIR                    "vlc"
70 #else
71 #  define CONFIG_DIR                    ".vlc"
72 #endif
73 #define CONFIG_FILE                     "vlcrc"
74
75 # ifdef __cplusplus
76 }
77 # endif
78 #endif