summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-04-20 15:27:34 +0000
committerDavid Robillard <d@drobilla.net>2011-04-20 15:27:34 +0000
commit1f1758f4dda0ddaf01c0b1d3a756f9db8ddc979d (patch)
treebf97929a31ac38acc158aef045921ad1954acc9d /src/client
parentbe78a679a950f1d1b07f8f16c358c33ac1ccda66 (diff)
downloadingen-1f1758f4dda0ddaf01c0b1d3a756f9db8ddc979d.tar.gz
ingen-1f1758f4dda0ddaf01c0b1d3a756f9db8ddc979d.tar.bz2
ingen-1f1758f4dda0ddaf01c0b1d3a756f9db8ddc979d.zip
Make disconnect take URI parameters (for wildcare URI towards killing disconnect_all).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3183 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client')
-rw-r--r--src/client/ClientStore.cpp12
-rw-r--r--src/client/ClientStore.hpp4
-rw-r--r--src/client/HTTPEngineSender.cpp4
-rw-r--r--src/client/HTTPEngineSender.hpp4
-rw-r--r--src/client/OSCClientReceiver.cpp6
-rw-r--r--src/client/OSCEngineSender.cpp8
-rw-r--r--src/client/OSCEngineSender.hpp4
-rw-r--r--src/client/SigClientInterface.hpp6
-rw-r--r--src/client/ThreadedSigClientInterface.hpp6
9 files changed, 31 insertions, 23 deletions
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp
index be7d4186..48fa0d1e 100644
--- a/src/client/ClientStore.cpp
+++ b/src/client/ClientStore.cpp
@@ -459,9 +459,17 @@ ClientStore::connect(const Path& src_path,
}
void
-ClientStore::disconnect(const Path& src_path,
- const Path& dst_path)
+ClientStore::disconnect(const URI& src,
+ const URI& dst)
{
+ if (!Path::is_path(src) && !Path::is_path(dst)) {
+ std::cerr << "Bad disconnect notification " << src << " => " << dst << std::endl;
+ return;
+ }
+
+ const Path src_path(src.str());
+ const Path dst_path(dst.str());
+
SharedPtr<PortModel> src_port = PtrCast<PortModel>(object(src_path));
SharedPtr<PortModel> dst_port = PtrCast<PortModel>(object(dst_path));
diff --git a/src/client/ClientStore.hpp b/src/client/ClientStore.hpp
index c5dc023a..d904cbf2 100644
--- a/src/client/ClientStore.hpp
+++ b/src/client/ClientStore.hpp
@@ -94,8 +94,8 @@ public:
void connect(const Raul::Path& src_port_path,
const Raul::Path& dst_port_path);
- void disconnect(const Raul::Path& src_port_path,
- const Raul::Path& dst_port_path);
+ void disconnect(const Raul::URI& src,
+ const Raul::URI& dst);
void disconnect_all(const Raul::Path& parent_patch_path,
const Raul::Path& path);
diff --git a/src/client/HTTPEngineSender.cpp b/src/client/HTTPEngineSender.cpp
index ceb60162..d9b477a6 100644
--- a/src/client/HTTPEngineSender.cpp
+++ b/src/client/HTTPEngineSender.cpp
@@ -137,8 +137,8 @@ HTTPEngineSender::connect(const Path& src_port_path,
}
void
-HTTPEngineSender::disconnect(const Path& src_port_path,
- const Path& dst_port_path)
+HTTPEngineSender::disconnect(const URI& src,
+ const URI& dst)
{
LOG(warn) << "TODO: HTTP disconnect" << endl;
}
diff --git a/src/client/HTTPEngineSender.hpp b/src/client/HTTPEngineSender.hpp
index b5653273..75e2a2f7 100644
--- a/src/client/HTTPEngineSender.hpp
+++ b/src/client/HTTPEngineSender.hpp
@@ -90,8 +90,8 @@ public:
virtual void connect(const Raul::Path& src_port_path,
const Raul::Path& dst_port_path);
- virtual void disconnect(const Raul::Path& src_port_path,
- const Raul::Path& dst_port_path);
+ virtual void disconnect(const Raul::URI& src,
+ const Raul::URI& dst);
virtual void disconnect_all(const Raul::Path& parent_patch_path,
const Raul::Path& path);
diff --git a/src/client/OSCClientReceiver.cpp b/src/client/OSCClientReceiver.cpp
index 31c0aa2a..d0119987 100644
--- a/src/client/OSCClientReceiver.cpp
+++ b/src/client/OSCClientReceiver.cpp
@@ -200,10 +200,10 @@ OSCClientReceiver::_connection_cb(const char* path, const char* types, lo_arg**
int
OSCClientReceiver::_disconnection_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
- const char* src_port_path = &argv[0]->s;
- const char* dst_port_path = &argv[1]->s;
+ const char* src_uri = &argv[0]->s;
+ const char* dst_uri = &argv[1]->s;
- _target->disconnect(src_port_path, dst_port_path);
+ _target->disconnect(src_uri, dst_uri);
return 0;
}
diff --git a/src/client/OSCEngineSender.cpp b/src/client/OSCEngineSender.cpp
index 9de1192a..51e6f8c9 100644
--- a/src/client/OSCEngineSender.cpp
+++ b/src/client/OSCEngineSender.cpp
@@ -156,13 +156,13 @@ OSCEngineSender::connect(const Path& src_port_path,
}
void
-OSCEngineSender::disconnect(const Path& src_port_path,
- const Path& dst_port_path)
+OSCEngineSender::disconnect(const URI& src,
+ const URI& dst)
{
send("/disconnect", "iss",
next_id(),
- src_port_path.c_str(),
- dst_port_path.c_str(),
+ src.c_str(),
+ dst.c_str(),
LO_ARGS_END);
}
diff --git a/src/client/OSCEngineSender.hpp b/src/client/OSCEngineSender.hpp
index 98d2d40c..041a16b8 100644
--- a/src/client/OSCEngineSender.hpp
+++ b/src/client/OSCEngineSender.hpp
@@ -91,8 +91,8 @@ public:
virtual void connect(const Raul::Path& src_port_path,
const Raul::Path& dst_port_path);
- virtual void disconnect(const Raul::Path& src_port_path,
- const Raul::Path& dst_port_path);
+ virtual void disconnect(const Raul::URI& src,
+ const Raul::URI& dst);
virtual void disconnect_all(const Raul::Path& parent_patch_path,
const Raul::Path& path);
diff --git a/src/client/SigClientInterface.hpp b/src/client/SigClientInterface.hpp
index 7d968524..fc5201e1 100644
--- a/src/client/SigClientInterface.hpp
+++ b/src/client/SigClientInterface.hpp
@@ -57,7 +57,7 @@ public:
sigc::signal<void, Raul::Path, Raul::Path> signal_object_moved;
sigc::signal<void, Raul::URI> signal_object_deleted;
sigc::signal<void, Raul::Path, Raul::Path> signal_connection;
- sigc::signal<void, Raul::Path, Raul::Path> signal_disconnection;
+ sigc::signal<void, Raul::URI, Raul::URI> signal_disconnection;
sigc::signal<void, Raul::Path, Raul::Path> signal_disconnect_all;
sigc::signal<void, Raul::URI, Raul::URI, Raul::Atom> signal_variable_change;
sigc::signal<void, Raul::URI, Raul::URI, Raul::Atom> signal_property_change;
@@ -107,8 +107,8 @@ protected:
void move(const Raul::Path& old_path, const Raul::Path& new_path)
{ EMIT(object_moved, old_path, new_path); }
- void disconnect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path)
- { EMIT(disconnection, src_port_path, dst_port_path); }
+ void disconnect(const Raul::URI& src, const Raul::URI& dst)
+ { EMIT(disconnection, src, dst); }
void disconnect_all(const Raul::Path& parent_patch_path, const Raul::Path& path)
{ EMIT(disconnect_all, parent_patch_path, path); }
diff --git a/src/client/ThreadedSigClientInterface.hpp b/src/client/ThreadedSigClientInterface.hpp
index d9f89503..87c2f1a5 100644
--- a/src/client/ThreadedSigClientInterface.hpp
+++ b/src/client/ThreadedSigClientInterface.hpp
@@ -101,8 +101,8 @@ public:
void move(const Raul::Path& old_path, const Raul::Path& new_path)
{ push_sig(sigc::bind(object_moved_slot, old_path, new_path)); }
- void disconnect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path)
- { push_sig(sigc::bind(disconnection_slot, src_port_path, dst_port_path)); }
+ void disconnect(const Raul::URI& src, const Raul::URI& dst)
+ { push_sig(sigc::bind(disconnection_slot, src, dst)); }
void disconnect_all(const Raul::Path& parent_patch_path, const Raul::Path& path)
{ push_sig(sigc::bind(disconnect_all_slot, parent_patch_path, path)); }
@@ -138,7 +138,7 @@ private:
sigc::slot<void, Raul::Path, Raul::Path> connection_slot;
sigc::slot<void, Raul::URI> object_deleted_slot;
sigc::slot<void, Raul::Path, Raul::Path> object_moved_slot;
- sigc::slot<void, Raul::Path, Raul::Path> disconnection_slot;
+ sigc::slot<void, Raul::URI, Raul::URI> disconnection_slot;
sigc::slot<void, Raul::Path, Raul::Path> disconnect_all_slot;
sigc::slot<void, Raul::URI, Raul::URI, Raul::Atom> variable_change_slot;
sigc::slot<void, Raul::URI, Raul::URI, Raul::Atom> property_change_slot;