#define SUBCAT_PLAYLIST_SD 702
#define SUBCAT_PLAYLIST_EXPORT 703
+#define CAT_OSD 8
+ #define SUBCAT_OSD_IMPORT 801
+
struct config_category_t
{
int i_id;
VLC_EXPORT( void, __config_ResetAll, ( vlc_object_t * ) );
VLC_EXPORT( module_config_t *, config_FindConfig,( vlc_object_t *, const char * ) );
-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, ( 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)
#define config_PutInt(a,b,c) __config_PutInt(VLC_OBJECT(a),b,c)
#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)
+
+typedef enum vlc_config_properties
+{
+ /* DO NOT EVER REMOVE, INSERT OR REPLACE ANY ITEM! It would break the ABI!
+ * Append new items at the end ONLY. */
+ VLC_CONFIG_NAME, /* command line name (args=const char *, vlc_callback_t) */
+ VLC_CONFIG_DESC, /* description (args=const char *, const char *) */
+ VLC_CONFIG_VALUE, /* actual value (args=<type>) */
+ VLC_CONFIG_RANGE, /* minimum value (args=<type>, <type>) */
+ VLC_CONFIG_STEP, /* interval value (args=<type>) */
+ VLC_CONFIG_ADVANCED, /* enable advanced flag (args=none) */
+ VLC_CONFIG_VOLATILE, /* don't write variable to storage (args=none) */
+ VLC_CONFIG_PRIVATE, /* hide from user (args=none) */
+} vlc_config_t;
+
+
+VLC_EXPORT( int, vlc_config_set, (module_config_t *, vlc_config_t, ...) );
/*****************************************************************************
* Macros used to build the configuration structure.
#define add_typedesc_inner( type, text, longtext ) \
add_type_inner( type ); \
- p_config[i_config].psz_text = text; \
- p_config[i_config].psz_longtext = longtext
+ vlc_config_set (p_config + i_config, VLC_CONFIG_DESC, \
+ (const char *)(text), (const char *)(longtext))
#define add_typeadv_inner( type, text, longtext, advc ) \
add_typedesc_inner( type, text, longtext ); \
#define add_typename_inner( type, name, text, longtext, advc, cb ) \
add_typeadv_inner( type, text, longtext, advc ); \
- p_config[i_config].psz_name = name; \
- p_config[i_config].pf_callback = cb
+ vlc_config_set (p_config + i_config, VLC_CONFIG_NAME, \
+ (const char *)(name), (vlc_callback_t)(cb))
#define add_string_inner( type, name, text, longtext, advc, cb, v ) \
add_typename_inner( type, name, text, longtext, advc, cb ); \
p_config[i_config].value.psz = v
-#define add_password_inner( type, name, text, longtext, advc, cb, v ) \
- add_typename_inner( type, name, text, longtext, advc, cb ); \
- p_config[i_config].value.psz = v
-
#define add_int_inner( type, name, text, longtext, advc, cb, v ) \
add_typename_inner( type, name, text, longtext, advc, cb ); \
p_config[i_config].value.i = v
add_string_inner( CONFIG_ITEM_STRING, name, text, longtext, advc, p_callback, value )
#define add_password( name, value, p_callback, text, longtext, advc ) \
- add_password_inner( CONFIG_ITEM_PASSWORD, name, text, longtext, advc, p_callback, value )
+ 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 )
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