From 3ddbf4b2f6643f4396ba1bac7f139e08e1a9d4ba Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Wed, 26 Dec 2007 12:13:56 +0000 Subject: [PATCH] Add "safe" config item property --- include/vlc_configuration.h | 7 +++++++ src/modules/entry.c | 5 +++++ 2 files changed, 12 insertions(+) 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); -- 2.39.5