]> git.sesse.net Git - vlc/commitdiff
Add "safe" config item property
authorRémi Denis-Courmont <rem@videolan.org>
Wed, 26 Dec 2007 12:13:56 +0000 (12:13 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Wed, 26 Dec 2007 12:13:56 +0000 (12:13 +0000)
include/vlc_configuration.h
src/modules/entry.c

index ac427a80975d6f3ecee31a691b179143d26d7e64..169a95f81ec2a3c802ea3c38d486cbd3bd60a9d5 100644 (file)
@@ -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:
  ****************************************************************************/
index c9d149924128d0d25067750278f3e98ade892097..ded237248d3f32a4cda637eaa655c67cb47f3af1 100644 (file)
@@ -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);