X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fconfig%2Fconfiguration.h;h=dd02c7f4af2f267fe6788cb718397454030c7cf9;hb=34e54feea7de9f75e6b2085df4a12235a516571a;hp=eb7fba7a80162a6fae9eb1ad98eda121c66e558a;hpb=da0a29883736b514db54bfd9479b6335d0957dc8;p=vlc diff --git a/src/config/configuration.h b/src/config/configuration.h index eb7fba7a80..dd02c7f4af 100644 --- a/src/config/configuration.h +++ b/src/config/configuration.h @@ -1,21 +1,21 @@ /***************************************************************************** * configuration.h management of the modules configuration ***************************************************************************** - * Copyright (C) 2007 the VideoLAN team + * Copyright (C) 2007 VLC authors and VideoLAN * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ #ifndef LIBVLC_CONFIGURATION_H @@ -30,29 +30,30 @@ extern "C" { int config_CreateDir( vlc_object_t *, const char * ); int config_AutoSaveConfigFile( vlc_object_t * ); -void config_Free( module_t * ); +void config_Free (module_config_t *, size_t); int config_LoadCmdLine ( vlc_object_t *, int, const char *[], int * ); -int config_LoadConfigFile( vlc_object_t *, const char * ); +int config_LoadConfigFile( vlc_object_t * ); #define config_LoadCmdLine(a,b,c,d) config_LoadCmdLine(VLC_OBJECT(a),b,c,d) -#define config_LoadConfigFile(a,b) config_LoadConfigFile(VLC_OBJECT(a),b) +#define config_LoadConfigFile(a) config_LoadConfigFile(VLC_OBJECT(a)) +bool config_PrintHelp (vlc_object_t *); int config_SortConfig (void); void config_UnsortConfig (void); -char *config_GetDataDirDefault( void ); +#define CONFIG_CLASS(x) ((x) & ~0x1F) -int IsConfigStringType( int type ); -int IsConfigIntegerType (int type); -static inline int IsConfigFloatType (int type) -{ - return type == CONFIG_ITEM_FLOAT; -} - -uint_fast32_t ConfigStringToKey( const char * ); -char *ConfigKeyToString( uint_fast32_t ); +#define IsConfigStringType(type) \ + (((type) & CONFIG_ITEM_STRING) != 0) +#define IsConfigIntegerType(type) \ + (((type) & CONFIG_ITEM_INTEGER) != 0) +#define IsConfigFloatType(type) \ + ((type) == CONFIG_ITEM_FLOAT) extern vlc_rwlock_t config_lock; +extern bool config_dirty; + +bool config_IsSafe (const char *); /* The configuration file */ #define CONFIG_FILE "vlcrc"