revert incorrect include path changes and removal of export macros for two libardour...
[ardour.git] / libs / pbd / pbd / stateful.h
index 506d05877337ff96089336e9a8993cd628999556..ab09b7aa84d79b1efd8981cbc17af7f3b3f78dd5 100644 (file)
@@ -24,6 +24,7 @@
 #include <list>
 #include <cassert>
 
+#include "pbd/libpbd_visibility.h"
 #include "pbd/id.h"
 #include "pbd/xml++.h"
 #include "pbd/property_basics.h"
@@ -41,7 +42,7 @@ class PropertyList;
 class OwnedPropertyList;
 
 /** Base class for objects with saveable and undoable state */
-class Stateful {
+class LIBPBD_API Stateful {
   public:
        Stateful ();
        virtual ~Stateful();
@@ -91,12 +92,12 @@ class Stateful {
        virtual void suspend_property_changes ();
        virtual void resume_property_changes ();
 
-        bool property_changes_suspended() const { return g_atomic_int_get (&_stateful_frozen) > 0; }
+        bool property_changes_suspended() const { return g_atomic_int_get (const_cast<gint*>(&_stateful_frozen)) > 0; }
         
   protected:
 
-       void add_instant_xml (XMLNode&, const sys::path& directory_path);
-       XMLNode *instant_xml (const std::string& str, const sys::path& directory_path);
+       void add_instant_xml (XMLNode&, const std::string& directory_path);
+       XMLNode *instant_xml (const std::string& str, const std::string& directory_path);
        void add_properties (XMLNode &);
 
        PropertyChange set_values (XMLNode const &);
@@ -110,7 +111,7 @@ class Stateful {
        XMLNode *_extra_xml;
        XMLNode *_instant_xml;
        PBD::PropertyChange     _pending_changed;
-        Glib::Mutex _lock;
+        Glib::Threads::Mutex _lock;
 
        std::string _xml_node_name; ///< name of node to use for this object in XML
        OwnedPropertyList* _properties;
@@ -123,7 +124,7 @@ class Stateful {
 
   private:
        PBD::ID  _id;
-        int32_t  _stateful_frozen;
+        gint     _stateful_frozen;
 };
 
 } // namespace PBD