]> git.sesse.net Git - vlc/blobdiff - include/vlc_configuration.h
Qt4 - Prefs, cleanig again.
[vlc] / include / vlc_configuration.h
index a0235d5ddf6ea0ca492dd6bc84cf5962c3936aec..a37830ebcaca44f17d9d2cd0d1b898faa4cb5abf 100644 (file)
@@ -66,6 +66,7 @@ extern "C" {
 #define CONFIG_ITEM_MODULE_LIST             0x00A0  /* Module option */
 #define CONFIG_ITEM_MODULE_LIST_CAT         0x00B0  /* Module option */
 #define CONFIG_ITEM_FONT                    0x00C0  /* Font option */
+#define CONFIG_ITEM_PASSWORD                0x00D0  /* Password option (*) */
 
 #define CONFIG_ITEM                         0x00F0
 
@@ -210,7 +211,11 @@ VLC_EXPORT( module_t *, config_FindModule,( vlc_object_t *, const char * ) );
 
 VLC_EXPORT( int, config_Duplicate,( module_t *, const module_config_t *, size_t ));
 
-VLC_EXPORT(const char *, config_GetDataDir, ( const vlc_object_t * ));
+VLC_EXPORT(const char *, config_GetDataDir, ( void ));
+
+VLC_EXPORT( void,       __config_AddIntf,    ( vlc_object_t *, const char * ) );
+VLC_EXPORT( void,       __config_RemoveIntf, ( vlc_object_t *, const char * ) );
+VLC_EXPORT( vlc_bool_t, __config_ExistIntf,  ( vlc_object_t *, const char * ) );
 
 #define config_GetType(a,b) __config_GetType(VLC_OBJECT(a),b)
 #define config_GetInt(a,b) __config_GetInt(VLC_OBJECT(a),b)
@@ -220,6 +225,10 @@ VLC_EXPORT(const char *, config_GetDataDir, ( const vlc_object_t * ));
 #define config_GetPsz(a,b) __config_GetPsz(VLC_OBJECT(a),b)
 #define config_PutPsz(a,b,c) __config_PutPsz(VLC_OBJECT(a),b,c)
 
+#define config_AddIntf(a,b) __config_AddIntf(VLC_OBJECT(a),b)
+#define config_RemoveIntf(a,b) __config_RemoveIntf(VLC_OBJECT(a),b)
+#define config_ExistIntf(a,b) __config_ExistIntf(VLC_OBJECT(a),b)
+
 
 /*****************************************************************************
  * Macros used to build the configuration structure.
@@ -294,6 +303,9 @@ VLC_EXPORT(const char *, config_GetDataDir, ( const vlc_object_t * ));
 #define add_string( name, value, p_callback, text, longtext, advc ) \
     add_string_inner( CONFIG_ITEM_STRING, name, text, longtext, advc, p_callback, value )
 
+#define add_password( name, value, p_callback, text, longtext, advc ) \
+    add_string_inner( CONFIG_ITEM_PASSWORD, name, text, longtext, advc, p_callback, value )
+
 #define add_file( name, value, p_callback, text, longtext, advc ) \
     add_string_inner( CONFIG_ITEM_FILE, name, text, longtext, advc, p_callback, value )
 
@@ -339,32 +351,32 @@ VLC_EXPORT(const char *, config_GetDataDir, ( const vlc_object_t * ));
     p_config[i_config].value.i = v
 
 /* For renamed option */
-#define add_deprecated( name, strict ) \
+#define add_deprecated_alias( name ) \
     add_config_inner( ); \
     p_config[ i_config ].i_type = p_config[ i_config -1 ].i_type; \
     p_config[ i_config ].psz_name = name; \
-    p_config[i_config].b_strict = strict; \
-    p_config[ i_config ].psz_current = p_config[ i_config-1].psz_current \
+    p_config[i_config].b_strict = VLC_FALSE; \
+    p_config[ i_config ].psz_current = p_config[ i_config-1 ].psz_current \
         ? p_config[ i_config-1 ].psz_current \
         : p_config[ i_config-1 ].psz_name;
 
 /* For removed option */
-#define add_suppressed_inner( name, type ) \
+#define add_obsolete_inner( name, type ) \
     add_type_inner( type ); \
     p_config[ i_config ].psz_name = name; \
     p_config[ i_config ].psz_current = "SUPPRESSED";
 
-#define add_suppressed_bool( name ) \
-        add_suppressed_inner( name, CONFIG_ITEM_BOOL )
+#define add_obsolete_bool( name ) \
+        add_obsolete_inner( name, CONFIG_ITEM_BOOL )
 
-#define add_suppressed_integer( name ) \
-        add_suppressed_inner( name, CONFIG_ITEM_INTEGER )
+#define add_obsolete_integer( name ) \
+        add_obsolete_inner( name, CONFIG_ITEM_INTEGER )
 
-#define add_suppressed_float( name ) \
-        add_suppressed_inner( name, CONFIG_ITEM_FLOAT )
+#define add_obsolete_float( name ) \
+        add_obsolete_inner( name, CONFIG_ITEM_FLOAT )
 
-#define add_suppressed_string( name ) \
-        add_suppressed_inner( name, CONFIG_ITEM_STRING )
+#define add_obsolete_string( name ) \
+        add_obsolete_inner( name, CONFIG_ITEM_STRING )
 
 /* Modifier macros for the config options (used for fine tuning) */
 #define change_short( ch ) \
@@ -427,35 +439,10 @@ struct config_chain_t
 };
 
 #define config_ChainParse( a, b, c, d ) __config_ChainParse( VLC_OBJECT(a), b, c, d )
-VLC_EXPORT( void,   __config_ChainParse, ( vlc_object_t *, const char *psz_prefix, const char **ppsz_options, config_chain_t * ) );
+VLC_EXPORT( void,   __config_ChainParse, ( vlc_object_t *, const char *psz_prefix, const char *const *ppsz_options, config_chain_t * ) );
 VLC_EXPORT( char *, config_ChainCreate, ( char **, config_chain_t **, const char * ) );
 VLC_EXPORT( void, config_ChainDestroy, ( config_chain_t * ) );
 
-static inline config_chain_t *config_chain_find( config_chain_t *p_cfg, const char *psz_name )
-{
-    while( p_cfg && strcmp( p_cfg->psz_name, psz_name ) )
-    {
-        p_cfg = p_cfg->p_next;
-    }
-
-    return p_cfg;
-}
-
-static inline char *config_chain_find_value( config_chain_t *p_cfg, const char *psz_name )
-{
-    while( p_cfg && strcmp( p_cfg->psz_name, psz_name ) )
-    {
-        p_cfg = p_cfg->p_next;
-    }
-
-    if( p_cfg && p_cfg->psz_value )
-    {
-        return( p_cfg->psz_value );
-    }
-
-    return NULL;
-}
-
 # ifdef __cplusplus
 }
 # endif