set latency of sidechain port
[ardour.git] / libs / ardour / ardour / progress.h
index 891af22059476e2a401175d84a56ca2bfca86c84..79043a31eef3549c963deffe9735f0204cc6ebca 100644 (file)
 
 */
 
+#ifndef __ardour_progress_h__
+#define __ardour_progress_h__
+
 #include <list>
 
+#include "ardour/libardour_visibility.h"
+
 namespace ARDOUR {
 
-/** A class to handle reporting of progress of something */    
-class Progress
+/** A class to handle reporting of progress of something */
+class LIBARDOUR_API Progress
 {
 public:
        Progress ();
@@ -32,6 +37,11 @@ public:
        void ascend ();
        void descend (float);
 
+       bool cancelled () const;
+
+protected:
+       void cancel ();
+
 private:
        /** Report overall progress.
         *  @param p Current progress (from 0 to 1)
@@ -40,12 +50,15 @@ private:
 
        struct Level {
                Level (float a) : allocation (a), normalised (0) {}
-               
+
                float allocation;
                float normalised;
        };
 
        std::list<Level> _stack;
+       bool _cancelled;
 };
 
 }
+
+#endif