summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/slavable.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-04-24 21:46:14 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-05-31 15:30:41 -0400
commit84a0386f9c7718d55f9c4dc4230df74372288d44 (patch)
tree1b46771d5fe2c2df99a2a24999257fac6272b61b /libs/ardour/ardour/slavable.h
parentb4c43f08785b8b971d09a1f543415e81395f4231 (diff)
new files
Diffstat (limited to 'libs/ardour/ardour/slavable.h')
-rw-r--r--libs/ardour/ardour/slavable.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/libs/ardour/ardour/slavable.h b/libs/ardour/ardour/slavable.h
new file mode 100644
index 0000000000..ae53caef38
--- /dev/null
+++ b/libs/ardour/ardour/slavable.h
@@ -0,0 +1,61 @@
+/*
+ Copyright (C) 2016 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __ardour_slavable_h__
+#define __ardour_slavable_h__
+
+#include <set>
+#include <string>
+#include <stdint.h>
+
+#include <boost/shared_ptr.hpp>
+
+class XMLNode;
+
+namespace ARDOUR {
+
+class VCA;
+class Session;
+
+class Slavable
+{
+ public:
+ Slavable ();
+ virtual ~Slavable() {}
+
+ XMLNode& state () const;
+ int assign (Session& s, XMLNode const&);
+
+ void assign (boost::shared_ptr<VCA>);
+ void unassign (boost::shared_ptr<VCA>);
+
+ static std::string xml_node_name;
+
+ protected:
+ virtual int assign_controls (boost::shared_ptr<VCA>) = 0;
+ virtual int unassign_controls (boost::shared_ptr<VCA>) = 0;
+
+ private:
+ mutable Glib::Threads::RWLock master_lock;
+ std::set<uint32_t> _masters;
+};
+
+} // namespace ARDOUR
+
+#endif /* __ardour_slavable_h__ */