From: RĂ©mi Denis-Courmont Date: Wed, 26 Dec 2007 12:13:56 +0000 (+0000) Subject: Add "safe" config item property X-Git-Tag: 0.9.0-test0~3857 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=3ddbf4b2f6643f4396ba1bac7f139e08e1a9d4ba;p=vlc Add "safe" config item property --- diff --git a/include/vlc_configuration.h b/include/vlc_configuration.h index ac427a8097..169a95f81e 100644 --- a/include/vlc_configuration.h +++ b/include/vlc_configuration.h @@ -190,6 +190,8 @@ struct module_config_t /* Option values loaded from config file */ vlc_bool_t b_autosave; /* Config will be auto-saved at exit time */ vlc_bool_t b_unsaveable; /* Config should be saved */ + + vlc_bool_t b_safe; }; /***************************************************************************** @@ -279,6 +281,8 @@ enum vlc_config_properties VLC_CONFIG_OLDNAME, /* former option name (args=const char *) */ + + VLC_CONFIG_SAFE, }; @@ -467,6 +471,9 @@ VLC_EXPORT( int, vlc_config_set, (module_config_t *, int, ...) ); #define change_unsaveable() \ vlc_config_set (p_config, VLC_CONFIG_VOLATILE) +#define change_safe() \ + vlc_config_set (p_config, VLC_CONFIG_SAFE) + /**************************************************************************** * config_chain_t: ****************************************************************************/ diff --git a/src/modules/entry.c b/src/modules/entry.c index c9d1499241..ded237248d 100644 --- a/src/modules/entry.c +++ b/src/modules/entry.c @@ -406,6 +406,11 @@ int vlc_config_set (module_config_t *restrict item, int id, ...) ret = 0; break; } + + case VLC_CONFIG_SAFE: + item->b_safe = VLC_TRUE; + ret = 0; + break; } va_end (ap);