]> git.sesse.net Git - vlc/blobdiff - src/config/configuration.h
Remove useless <unistd.h> inclusion in core
[vlc] / src / config / configuration.h
index c754c8b0eaa1536083b27eb5c234059667dc644a..459a4bbef9bf0d43ef41e3b7661776aaa889afd7 100644 (file)
  * 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
 
@@ -34,42 +30,41 @@ 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 * );
+#define config_LoadCmdLine(a,b,c,d) config_LoadCmdLine(VLC_OBJECT(a),b,c,d)
+#define config_LoadConfigFile(a) config_LoadConfigFile(VLC_OBJECT(a))
+bool config_PrintHelp (vlc_object_t *);
 
-void config_SetCallbacks( module_config_t *, module_config_t *, size_t );
-void config_UnsetCallbacks( module_config_t *, size_t );
+int config_SortConfig (void);
+void config_UnsortConfig (void);
 
-#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)
+char *config_GetDataDirDefault( void );
+
+#define CONFIG_CLASS(x) ((x) & ~0x1F)
+
+static inline bool IsConfigStringType(unsigned type)
+{
+    return (type & CONFIG_ITEM_STRING) != 0;
+}
 
-int __config_LoadCmdLine   ( vlc_object_t *, int *, const char *[], bool );
-char *config_GetHomeDir    ( void );
-char *config_GetConfigDir  ( libvlc_int_t * );
-char *config_GetUserDataDir( libvlc_int_t * );
-char *config_GetCacheDir   ( libvlc_int_t * );
-char *config_GetConfigFile ( libvlc_int_t * );
-char *config_GetCustomConfigFile( libvlc_int_t * );
-int __config_LoadConfigFile( vlc_object_t *, const char * );
+static inline bool IsConfigIntegerType (int type)
+{
+    return (type & CONFIG_ITEM_INTEGER) != 0;
+}
 
-int IsConfigStringType( int type );
-int IsConfigIntegerType (int type);
-static inline int IsConfigFloatType (int type)
+static inline bool IsConfigFloatType (int type)
 {
     return type == CONFIG_ITEM_FLOAT;
 }
 
-int ConfigStringToKey( const char * );
-
-/* The configuration file and directory */
-#if defined (SYS_BEOS)
-#  define CONFIG_DIR                    "config/settings/VideoLAN Client"
-#elif defined (__APPLE__)
-#  define CONFIG_DIR                    "Library/Preferences/VLC"
-#elif defined( WIN32 ) || defined( UNDER_CE )
-#  define CONFIG_DIR                    "vlc"
-#else
-#  define CONFIG_DIR                    ".vlc"
-#endif
+extern vlc_rwlock_t config_lock;
+
+bool config_IsSafe (const char *);
+
+/* The configuration file */
 #define CONFIG_FILE                     "vlcrc"
 
 # ifdef __cplusplus