pull from trunk
[ardour.git] / libs / ardour / ardour / state_manager.h
index 9dc2ea66ad80d3c21be159f54a5aecfb9e56d3c8..99bfcfc3ceed22055d93be3a364791deab644db6 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <list>
 #include <string>
+#include <set>
 
 #include <sigc++/signal.h>
 
@@ -12,8 +13,7 @@ namespace ARDOUR {
 
 typedef uint32_t state_id_t;
 
-
- class StateManager : virtual public sigc::trackable
+class StateManager : public sigc::trackable
 {
   public:
        struct State {
@@ -35,7 +35,15 @@ typedef uint32_t state_id_t;
 
        state_id_t _current_state_id;
 
+       virtual bool should_save_state () const { return true; }
+
+       static void prohibit_save ();
+       static void allow_save (const char* why, bool dosave);
+
   protected:
+       static bool _allow_save;
+       static sigc::signal<void,const char*> SaveAllowed;
+
        StateMap   states;
 
        virtual Change   restore_state (State&) = 0;