summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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
-rw-r--r--src/engine/ClientBroadcaster.hpp6
-rw-r--r--src/engine/HTTPClientSender.cpp3
-rw-r--r--src/engine/HTTPClientSender.hpp4
-rw-r--r--src/engine/OSCClientSender.cpp6
-rw-r--r--src/engine/OSCClientSender.hpp4
-rw-r--r--src/engine/QueuedEngineInterface.cpp12
-rw-r--r--src/engine/QueuedEngineInterface.hpp4
-rw-r--r--src/engine/events/DisconnectAll.hpp4
-rw-r--r--src/shared/ClashAvoider.cpp6
-rw-r--r--src/shared/ClashAvoider.hpp4
19 files changed, 61 insertions, 46 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;
diff --git a/src/engine/ClientBroadcaster.hpp b/src/engine/ClientBroadcaster.hpp
index 6c371a50..c72cdeec 100644
--- a/src/engine/ClientBroadcaster.hpp
+++ b/src/engine/ClientBroadcaster.hpp
@@ -93,9 +93,9 @@ public:
BROADCAST(connect, src_port_path, dst_port_path);
}
- void disconnect(const Raul::Path& src_port_path,
- const Raul::Path& dst_port_path) {
- BROADCAST(disconnect, src_port_path, dst_port_path);
+ void disconnect(const Raul::URI& src,
+ const Raul::URI& dst) {
+ BROADCAST(disconnect, src, dst);
}
void disconnect_all(const Raul::Path& parent_patch_path,
diff --git a/src/engine/HTTPClientSender.cpp b/src/engine/HTTPClientSender.cpp
index 8a03e2bd..21dc11a3 100644
--- a/src/engine/HTTPClientSender.cpp
+++ b/src/engine/HTTPClientSender.cpp
@@ -96,7 +96,8 @@ HTTPClientSender::connect(const Path& src_path, const Path& dst_path)
}
void
-HTTPClientSender::disconnect(const Path& src_path, const Path& dst_path)
+HTTPClientSender::disconnect(const URI& src,
+ const URI& dst)
{
}
diff --git a/src/engine/HTTPClientSender.hpp b/src/engine/HTTPClientSender.hpp
index 501343a9..5b3cdc73 100644
--- a/src/engine/HTTPClientSender.hpp
+++ b/src/engine/HTTPClientSender.hpp
@@ -82,8 +82,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/engine/OSCClientSender.cpp b/src/engine/OSCClientSender.cpp
index 88b979bf..bcd3be10 100644
--- a/src/engine/OSCClientSender.cpp
+++ b/src/engine/OSCClientSender.cpp
@@ -185,10 +185,10 @@ OSCClientSender::connect(const Path& src_port_path,
* Notification a connection has been unmade.
*/
void
-OSCClientSender::disconnect(const Path& src_port_path,
- const Path& dst_port_path)
+OSCClientSender::disconnect(const URI& src,
+ const URI& dst)
{
- send("/disconnect", "ss", src_port_path.c_str(), dst_port_path.c_str(), LO_ARGS_END);
+ send("/disconnect", "ss", src.c_str(), dst.c_str(), LO_ARGS_END);
}
/** @page client_osc_namespace
diff --git a/src/engine/OSCClientSender.hpp b/src/engine/OSCClientSender.hpp
index a3031258..96263263 100644
--- a/src/engine/OSCClientSender.hpp
+++ b/src/engine/OSCClientSender.hpp
@@ -85,8 +85,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/engine/QueuedEngineInterface.cpp b/src/engine/QueuedEngineInterface.cpp
index 456a32ff..24042b27 100644
--- a/src/engine/QueuedEngineInterface.cpp
+++ b/src/engine/QueuedEngineInterface.cpp
@@ -156,10 +156,16 @@ QueuedEngineInterface::connect(const Path& src_port_path,
}
void
-QueuedEngineInterface::disconnect(const Path& src_port_path,
- const Path& dst_port_path)
+QueuedEngineInterface::disconnect(const URI& src,
+ const URI& dst)
{
- push_queued(new Events::Disconnect(_engine, _request, now(), src_port_path, dst_port_path));
+ if (!Path::is_path(src) && !Path::is_path(dst)) {
+ std::cerr << "Bad disconnect request " << src << " => " << dst << std::endl;
+ return;
+ }
+
+ push_queued(new Events::Disconnect(_engine, _request, now(),
+ Path(src.str()), Path(dst.str())));
}
void
diff --git a/src/engine/QueuedEngineInterface.hpp b/src/engine/QueuedEngineInterface.hpp
index 3cabf0a9..b9f4f7b7 100644
--- a/src/engine/QueuedEngineInterface.hpp
+++ b/src/engine/QueuedEngineInterface.hpp
@@ -79,8 +79,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 set_property(const Raul::URI& subject_path,
const Raul::URI& predicate,
diff --git a/src/engine/events/DisconnectAll.hpp b/src/engine/events/DisconnectAll.hpp
index c4f6e6b6..b5dc258c 100644
--- a/src/engine/events/DisconnectAll.hpp
+++ b/src/engine/events/DisconnectAll.hpp
@@ -48,8 +48,8 @@ public:
Engine& engine,
SharedPtr<Request> request,
SampleCount timestamp,
- const Raul::Path& parent_path,
- const Raul::Path& node_path);
+ const Raul::Path& parent,
+ const Raul::Path& object);
DisconnectAll(
Engine& engine,
diff --git a/src/shared/ClashAvoider.cpp b/src/shared/ClashAvoider.cpp
index 0e44ef85..f2232554 100644
--- a/src/shared/ClashAvoider.cpp
+++ b/src/shared/ClashAvoider.cpp
@@ -172,10 +172,10 @@ ClashAvoider::connect(const Raul::Path& src_port_path,
}
void
-ClashAvoider::disconnect(const Raul::Path& src_port_path,
- const Raul::Path& dst_port_path)
+ClashAvoider::disconnect(const Raul::URI& src,
+ const Raul::URI& dst)
{
- _target.disconnect(map_path(src_port_path), map_path(dst_port_path));
+ _target.disconnect(map_uri(src), map_uri(dst));
}
diff --git a/src/shared/ClashAvoider.hpp b/src/shared/ClashAvoider.hpp
index 4322957c..e6f2704a 100644
--- a/src/shared/ClashAvoider.hpp
+++ b/src/shared/ClashAvoider.hpp
@@ -61,8 +61,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);