fixes for destructive track offsets of various kinds; move from jack_nframes_t -...
[ardour.git] / libs / ardour / ardour / state_manager.h
index 105ca38dccd34d762b7540eb52d3d699c1c6710d..99bfcfc3ceed22055d93be3a364791deab644db6 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <list>
 #include <string>
-#include <vector>
+#include <set>
 
 #include <sigc++/signal.h>
 
@@ -13,7 +13,6 @@ namespace ARDOUR {
 
 typedef uint32_t state_id_t;
 
-
 class StateManager : public sigc::trackable
 {
   public:
@@ -36,13 +35,14 @@ class StateManager : public sigc::trackable
 
        state_id_t _current_state_id;
 
-       static void set_allow_save (bool);
-       static bool allow_save ();
+       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;
-       typedef std::pair<StateManager*,std::string> DeferredSave;
-       static std::vector<DeferredSave> deferred;
+       static sigc::signal<void,const char*> SaveAllowed;
 
        StateMap   states;