* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
-#if defined(__PLUGIN__) || defined(__BUILTIN__) || !defined(__LIBVLC__)
-# error This header file can only be included from LibVLC.
-#endif
-
#ifndef LIBVLC_CONFIGURATION_H
# define LIBVLC_CONFIGURATION_H 1
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 *[], bool );
-int config_LoadConfigFile( vlc_object_t *, const char * );
+int config_LoadCmdLine ( vlc_object_t *, int, const char *[], int * );
+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 );
-int IsConfigStringType( int type );
-int IsConfigIntegerType (int type);
-static inline int IsConfigFloatType (int type)
+#define CONFIG_CLASS(x) ((x) & ~0x1F)
+
+static inline bool IsConfigStringType(unsigned type)
{
- return type == CONFIG_ITEM_FLOAT;
+ return (type & CONFIG_ITEM_STRING) != 0;
}
-uint_fast32_t ConfigStringToKey( const char * );
-char *ConfigKeyToString( uint_fast32_t );
+static inline bool IsConfigIntegerType (int type)
+{
+ return (type & CONFIG_ITEM_INTEGER) != 0;
+}
+
+static inline bool IsConfigFloatType (int type)
+{
+ return type == CONFIG_ITEM_FLOAT;
+}
extern vlc_rwlock_t config_lock;
+bool config_IsSafe (const char *);
+
/* The configuration file */
#define CONFIG_FILE "vlcrc"