configuration.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * configuration.h management of the modules configuration
00003  *****************************************************************************
00004  * Copyright (C) 2007 VLC authors and VideoLAN
00005  *
00006  * This program is free software; you can redistribute it and/or modify it
00007  * under the terms of the GNU Lesser General Public License as published by
00008  * the Free Software Foundation; either version 2.1 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014  * GNU Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public License
00017  * along with this program; if not, write to the Free Software Foundation,
00018  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00019  *****************************************************************************/
00020 
00021 #ifndef LIBVLC_CONFIGURATION_H
00022 # define LIBVLC_CONFIGURATION_H 1
00023 
00024 # ifdef __cplusplus
00025 extern "C" {
00026 # endif
00027 
00028 /* Internal configuration prototypes and structures */
00029 
00030 int  config_CreateDir( vlc_object_t *, const char * );
00031 int  config_AutoSaveConfigFile( vlc_object_t * );
00032 
00033 void config_Free (module_config_t *, size_t);
00034 
00035 int config_LoadCmdLine   ( vlc_object_t *, int, const char *[], int * );
00036 int config_LoadConfigFile( vlc_object_t * );
00037 #define config_LoadCmdLine(a,b,c,d) config_LoadCmdLine(VLC_OBJECT(a),b,c,d)
00038 #define config_LoadConfigFile(a) config_LoadConfigFile(VLC_OBJECT(a))
00039 bool config_PrintHelp (vlc_object_t *);
00040 
00041 int config_SortConfig (void);
00042 void config_UnsortConfig (void);
00043 
00044 #define CONFIG_CLASS(x) ((x) & ~0x1F)
00045 
00046 #define IsConfigStringType(type) \
00047     (((type) & CONFIG_ITEM_STRING) != 0)
00048 #define IsConfigIntegerType(type) \
00049     (((type) & CONFIG_ITEM_INTEGER) != 0)
00050 #define IsConfigFloatType(type) \
00051     ((type) == CONFIG_ITEM_FLOAT)
00052 
00053 extern vlc_rwlock_t config_lock;
00054 extern bool config_dirty;
00055 
00056 bool config_IsSafe (const char *);
00057 
00058 /* The configuration file */
00059 #define CONFIG_FILE                     "vlcrc"
00060 
00061 # ifdef __cplusplus
00062 }
00063 # endif
00064 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines