diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-10-31 18:24:43 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-10-31 18:24:43 +0000 |
commit | 8ab17e96312f1a61c014c50687e15430d5ae786b (patch) | |
tree | eefb889cd64d48058a608f0c19185b2a56d73399 /libs/ardour/ardour/jack_port.h | |
parent | 1b0f6b1d69bcad74c6127690cebc1c14486e8c1d (diff) |
new port design, probably about 90% done (i.e it mostly works and this commit is to stop anyone else from stomping on my changes :)
git-svn-id: svn://localhost/ardour2/trunk@2579 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/jack_port.h')
-rw-r--r-- | libs/ardour/ardour/jack_port.h | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/libs/ardour/ardour/jack_port.h b/libs/ardour/ardour/jack_port.h index d973ed2cab..3fa0008e17 100644 --- a/libs/ardour/ardour/jack_port.h +++ b/libs/ardour/ardour/jack_port.h @@ -32,30 +32,44 @@ class Buffer; /** Abstract class representing JACK ports */ -class JackPort : public virtual Port { +class JackPort : public virtual Port, public PortConnectableByName { public: ~JackPort(); - std::string short_name() { + std::string short_name() const { return jack_port_short_name (_port); } - int set_name (std::string str); + int set_name (const std::string& str); - int connected () const { + bool connected () const { return jack_port_connected (_port); } int reestablish (); - + int reconnect (); + + int connect (Port& other) { + return connect (other.name()); + } + + int disconnect (Port& other) { + return disconnect (other.name()); + } + + int disconnect_all (); + + // connect-by-name API + + int connect (const std::string& other_name); + int disconnect (const std::string& other_name); + bool connected_to (const std::string& portname) const { return jack_port_connected_to (_port, portname.c_str()); } - const char ** get_connections () const { - return jack_port_get_connections (_port); - } + int get_connections (std::vector<std::string>& names) const; bool monitoring_input () const { return jack_port_monitoring_input (_port); @@ -90,8 +104,7 @@ class JackPort : public virtual Port { int disconnect (); void recompute_total_latency() const; - static void set_engine (AudioEngine*); - static AudioEngine* engine; + std::set<std::string> _named_connections; }; } // namespace ARDOUR |