From 0c1576d21588ece4e226da04523f36adac3a14c3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 27 May 2009 18:22:56 +0000 Subject: Rename 'destroy' 'delete' ('del' in code) (WebDAV DELETE). Rename 'rename' 'move' (WebDAV MOVE). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2012 a436a847-0d15-0410-975c-d299462d15a1 --- src/bindings/Client.hpp | 4 +- src/client/ClientStore.cpp | 10 +- src/client/ClientStore.hpp | 6 +- src/client/HTTPEngineSender.cpp | 6 +- src/client/HTTPEngineSender.hpp | 6 +- src/client/OSCClientReceiver.cpp | 8 +- src/client/OSCClientReceiver.hpp | 2 +- src/client/OSCEngineSender.cpp | 8 +- src/client/OSCEngineSender.hpp | 6 +- src/client/ObjectModel.hpp | 4 +- src/client/SigClientInterface.hpp | 8 +- src/client/ThreadedSigClientInterface.hpp | 10 +- src/common/interface/CommonInterface.hpp | 8 +- src/engine/ClientBroadcaster.cpp | 6 +- src/engine/ClientBroadcaster.hpp | 2 +- src/engine/HTTPClientSender.cpp | 32 ++--- src/engine/HTTPClientSender.hpp | 6 +- src/engine/OSCClientSender.cpp | 8 +- src/engine/OSCClientSender.hpp | 6 +- src/engine/OSCEngineReceiver.cpp | 23 ++-- src/engine/OSCEngineReceiver.hpp | 5 +- src/engine/QueuedEngineInterface.cpp | 10 +- src/engine/QueuedEngineInterface.hpp | 6 +- src/engine/events.hpp | 4 +- src/engine/events/DeleteEvent.cpp | 213 ++++++++++++++++++++++++++++++ src/engine/events/DeleteEvent.hpp | 79 +++++++++++ src/engine/events/DestroyEvent.cpp | 213 ------------------------------ src/engine/events/DestroyEvent.hpp | 72 ---------- src/engine/events/MoveEvent.cpp | 142 ++++++++++++++++++++ src/engine/events/MoveEvent.hpp | 69 ++++++++++ src/engine/events/RenameEvent.cpp | 142 -------------------- src/engine/events/RenameEvent.hpp | 63 --------- src/engine/wscript | 8 +- src/gui/BreadCrumbBox.cpp | 2 +- src/gui/BreadCrumbBox.hpp | 2 +- src/gui/NodeModule.cpp | 2 +- src/gui/ObjectMenu.cpp | 2 +- src/gui/PatchCanvas.cpp | 4 +- src/gui/PatchTreeWindow.cpp | 2 +- src/gui/PatchTreeWindow.hpp | 2 +- src/gui/Port.cpp | 4 +- src/gui/Port.hpp | 2 +- src/gui/RenameWindow.cpp | 2 +- src/gui/SubpatchModule.cpp | 2 +- src/serialisation/Parser.cpp | 2 +- src/shared/ClashAvoider.cpp | 10 +- src/shared/ClashAvoider.hpp | 6 +- 47 files changed, 625 insertions(+), 614 deletions(-) create mode 100644 src/engine/events/DeleteEvent.cpp create mode 100644 src/engine/events/DeleteEvent.hpp delete mode 100644 src/engine/events/DestroyEvent.cpp delete mode 100644 src/engine/events/DestroyEvent.hpp create mode 100644 src/engine/events/MoveEvent.cpp create mode 100644 src/engine/events/MoveEvent.hpp delete mode 100644 src/engine/events/RenameEvent.cpp delete mode 100644 src/engine/events/RenameEvent.hpp diff --git a/src/bindings/Client.hpp b/src/bindings/Client.hpp index 5e9ed094..ca717df0 100644 --- a/src/bindings/Client.hpp +++ b/src/bindings/Client.hpp @@ -47,8 +47,8 @@ public: virtual void clear_patch(const std::string& path) {} - virtual void rename(const std::string& old_path, - const std::string& new_path) {} + virtual void move(const std::string& old_path, + const std::string& new_path) {} virtual void connect(const std::string& src_port_path, const std::string& dst_port_path) {} diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp index c28bdca0..3a1acc21 100644 --- a/src/client/ClientStore.cpp +++ b/src/client/ClientStore.cpp @@ -43,8 +43,8 @@ ClientStore::ClientStore(SharedPtr engine, SharedPtrsignal_object_destroyed.connect(sigc::mem_fun(this, &ClientStore::destroy)); - emitter->signal_object_renamed.connect(sigc::mem_fun(this, &ClientStore::rename)); + emitter->signal_object_destroyed.connect(sigc::mem_fun(this, &ClientStore::del)); + emitter->signal_object_moved.connect(sigc::mem_fun(this, &ClientStore::move)); emitter->signal_new_plugin.connect(sigc::mem_fun(this, &ClientStore::new_plugin)); emitter->signal_put.connect(sigc::mem_fun(this, &ClientStore::put)); emitter->signal_clear_patch.connect(sigc::mem_fun(this, &ClientStore::clear_patch)); @@ -205,7 +205,7 @@ ClientStore::add_plugin(SharedPtr pm) void -ClientStore::destroy(const Path& path) +ClientStore::del(const Path& path) { SharedPtr removed = remove_object(path); removed.reset(); @@ -213,14 +213,14 @@ ClientStore::destroy(const Path& path) } void -ClientStore::rename(const Path& old_path_str, const Path& new_path_str) +ClientStore::move(const Path& old_path_str, const Path& new_path_str) { Path old_path(old_path_str); Path new_path(new_path_str); iterator parent = find(old_path); if (parent == end()) { - cerr << "[Store] Failed to find object " << old_path << " to rename." << endl; + cerr << "[Store] Failed to find object " << old_path << " to move." << endl; return; } diff --git a/src/client/ClientStore.hpp b/src/client/ClientStore.hpp index 68b87889..6688bc23 100644 --- a/src/client/ClientStore.hpp +++ b/src/client/ClientStore.hpp @@ -70,14 +70,14 @@ public: void new_plugin(const Raul::URI& uri, const Raul::URI& type_uri, const Raul::Symbol& symbol); bool new_object(const Shared::GraphObject* object); void put(const Raul::Path& path, const Shared::Resource::Properties& properties); - void rename(const Raul::Path& old_path, const Raul::Path& new_path); + void move(const Raul::Path& old_path, const Raul::Path& new_path); void set_variable(const Raul::URI& subject_path, const Raul::URI& predicate, const Raul::Atom& value); void set_property(const Raul::URI& subject_path, const Raul::URI& predicate, const Raul::Atom& value); void set_port_value(const Raul::Path& port_path, const Raul::Atom& value); void set_voice_value(const Raul::Path& port_path, uint32_t voice, const Raul::Atom& value); 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 destroy(const Raul::Path& path); + void del(const Raul::Path& path); sigc::signal > signal_new_object; sigc::signal > signal_new_plugin; @@ -97,7 +97,7 @@ private: void bundle_end() {} // Slots for SigClientInterface signals - void object_renamed(const Raul::Path& old_path, const Raul::Path& new_path); + void object_moved(const Raul::Path& old_path, const Raul::Path& new_path); void clear_patch(const Raul::Path& path); void activity(const Raul::Path& path); diff --git a/src/client/HTTPEngineSender.cpp b/src/client/HTTPEngineSender.cpp index 596793f9..48b861d5 100644 --- a/src/client/HTTPEngineSender.cpp +++ b/src/client/HTTPEngineSender.cpp @@ -112,14 +112,14 @@ HTTPEngineSender::put(const Raul::Path& path, void -HTTPEngineSender::rename(const Path& old_path, - const Path& new_path) +HTTPEngineSender::move(const Path& old_path, + const Path& new_path) { } void -HTTPEngineSender::destroy(const Path& path) +HTTPEngineSender::del(const Path& path) { } diff --git a/src/client/HTTPEngineSender.hpp b/src/client/HTTPEngineSender.hpp index 41107cb0..c284995e 100644 --- a/src/client/HTTPEngineSender.hpp +++ b/src/client/HTTPEngineSender.hpp @@ -79,10 +79,10 @@ public: virtual void clear_patch(const Raul::Path& path); - virtual void destroy(const Raul::Path& path); + virtual void del(const Raul::Path& path); - virtual void rename(const Raul::Path& old_path, - const Raul::Path& new_path); + virtual void move(const Raul::Path& old_path, + const Raul::Path& new_path); virtual void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path); diff --git a/src/client/OSCClientReceiver.cpp b/src/client/OSCClientReceiver.cpp index e8b8c33b..9c94659a 100644 --- a/src/client/OSCClientReceiver.cpp +++ b/src/client/OSCClientReceiver.cpp @@ -146,7 +146,7 @@ OSCClientReceiver::setup_callbacks() lo_server_thread_add_method(_st, "/ingen/new_patch", "si", new_patch_cb, this); lo_server_thread_add_method(_st, "/ingen/destroyed", "s", destroyed_cb, this); lo_server_thread_add_method(_st, "/ingen/clear_patch", "s", clear_patch_cb, this); - lo_server_thread_add_method(_st, "/ingen/rename", "ss", rename_cb, this); + lo_server_thread_add_method(_st, "/ingen/move", "ss", move_cb, this); lo_server_thread_add_method(_st, "/ingen/new_connection", "ss", connection_cb, this); lo_server_thread_add_method(_st, "/ingen/disconnection", "ss", disconnection_cb, this); lo_server_thread_add_method(_st, "/ingen/new_port", "sisi", new_port_cb, this); @@ -172,7 +172,7 @@ OSCClientReceiver::_error_cb(const char* path, const char* types, lo_arg** argv, int OSCClientReceiver::_destroyed_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) { - _target->destroy((const char*)&argv[0]->s); + _target->del((const char*)&argv[0]->s); return 0; } @@ -186,9 +186,9 @@ OSCClientReceiver::_clear_patch_cb(const char* path, const char* types, lo_arg** int -OSCClientReceiver::_rename_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) +OSCClientReceiver::_move_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) { - _target->rename((const char*)&argv[0]->s, (const char*)&argv[1]->s); + _target->move((const char*)&argv[0]->s, (const char*)&argv[1]->s); return 0; } diff --git a/src/client/OSCClientReceiver.hpp b/src/client/OSCClientReceiver.hpp index 58f66836..4e788f08 100644 --- a/src/client/OSCClientReceiver.hpp +++ b/src/client/OSCClientReceiver.hpp @@ -86,7 +86,7 @@ private: LO_HANDLER(new_patch); LO_HANDLER(destroyed); LO_HANDLER(clear_patch); - LO_HANDLER(rename); + LO_HANDLER(move); LO_HANDLER(connection); LO_HANDLER(disconnection); LO_HANDLER(new_port); diff --git a/src/client/OSCEngineSender.cpp b/src/client/OSCEngineSender.cpp index 23a98934..3952b802 100644 --- a/src/client/OSCEngineSender.cpp +++ b/src/client/OSCEngineSender.cpp @@ -141,10 +141,10 @@ OSCEngineSender::put(const Raul::Path& path, void -OSCEngineSender::rename(const Path& old_path, - const Path& new_path) +OSCEngineSender::move(const Path& old_path, + const Path& new_path) { - send("/ingen/rename", "iss", + send("/ingen/move", "iss", next_id(), old_path.c_str(), new_path.c_str(), @@ -153,7 +153,7 @@ OSCEngineSender::rename(const Path& old_path, void -OSCEngineSender::destroy(const Path& path) +OSCEngineSender::del(const Path& path) { send("/ingen/destroy", "is", next_id(), diff --git a/src/client/OSCEngineSender.hpp b/src/client/OSCEngineSender.hpp index 2b02ca6e..a7479f70 100644 --- a/src/client/OSCEngineSender.hpp +++ b/src/client/OSCEngineSender.hpp @@ -82,10 +82,10 @@ public: virtual void clear_patch(const Raul::Path& path); - virtual void destroy(const Raul::Path& path); + virtual void del(const Raul::Path& path); - virtual void rename(const Raul::Path& old_path, - const Raul::Path& new_path); + virtual void move(const Raul::Path& old_path, + const Raul::Path& new_path); virtual void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path); diff --git a/src/client/ObjectModel.hpp b/src/client/ObjectModel.hpp index 8c7c631d..f47bdfa6 100644 --- a/src/client/ObjectModel.hpp +++ b/src/client/ObjectModel.hpp @@ -82,14 +82,14 @@ public: sigc::signal signal_variable; sigc::signal signal_property; sigc::signal signal_destroyed; - sigc::signal signal_renamed; + sigc::signal signal_moved; protected: friend class ClientStore; ObjectModel(const Raul::Path& path); - virtual void set_path(const Raul::Path& p) { _path = p; signal_renamed.emit(); } + virtual void set_path(const Raul::Path& p) { _path = p; signal_moved.emit(); } virtual void set_parent(SharedPtr p) { assert(p); _parent = p; } virtual void add_child(SharedPtr c) {} virtual bool remove_child(SharedPtr c) { return true; } diff --git a/src/client/SigClientInterface.hpp b/src/client/SigClientInterface.hpp index 7c3bee05..a95336d5 100644 --- a/src/client/SigClientInterface.hpp +++ b/src/client/SigClientInterface.hpp @@ -55,7 +55,7 @@ public: sigc::signal signal_new_port; sigc::signal signal_put; sigc::signal signal_clear_patch; - sigc::signal signal_object_renamed; + sigc::signal signal_object_moved; sigc::signal signal_object_destroyed; sigc::signal signal_connection; sigc::signal signal_disconnection; @@ -104,14 +104,14 @@ protected: void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path) { if (_enabled) signal_connection.emit(src_port_path, dst_port_path); } - void destroy(const Raul::Path& path) + void del(const Raul::Path& path) { if (_enabled) signal_object_destroyed.emit(path); } void clear_patch(const Raul::Path& path) { if (_enabled) signal_clear_patch.emit(path); } - void rename(const Raul::Path& old_path, const Raul::Path& new_path) - { if (_enabled) signal_object_renamed.emit(old_path, new_path); } + void move(const Raul::Path& old_path, const Raul::Path& new_path) + { if (_enabled) signal_object_moved.emit(old_path, new_path); } void disconnect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path) { if (_enabled) signal_disconnection.emit(src_port_path, dst_port_path); } diff --git a/src/client/ThreadedSigClientInterface.hpp b/src/client/ThreadedSigClientInterface.hpp index 7b7d11e2..f0fa5321 100644 --- a/src/client/ThreadedSigClientInterface.hpp +++ b/src/client/ThreadedSigClientInterface.hpp @@ -56,7 +56,7 @@ public: , connection_slot(signal_connection.make_slot()) , clear_patch_slot(signal_clear_patch.make_slot()) , object_destroyed_slot(signal_object_destroyed.make_slot()) - , object_renamed_slot(signal_object_renamed.make_slot()) + , object_moved_slot(signal_object_moved.make_slot()) , disconnection_slot(signal_disconnection.make_slot()) , variable_change_slot(signal_variable_change.make_slot()) , property_change_slot(signal_property_change.make_slot()) @@ -98,14 +98,14 @@ public: void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path) { push_sig(sigc::bind(connection_slot, src_port_path, dst_port_path)); } - void destroy(const Raul::Path& path) + void del(const Raul::Path& path) { push_sig(sigc::bind(object_destroyed_slot, path)); } void clear_patch(const Raul::Path& path) { push_sig(sigc::bind(clear_patch_slot, path)); } - void rename(const Raul::Path& old_path, const Raul::Path& new_path) - { push_sig(sigc::bind(object_renamed_slot, old_path, new_path)); } + 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)); } @@ -148,7 +148,7 @@ private: sigc::slot connection_slot; sigc::slot clear_patch_slot; sigc::slot object_destroyed_slot; - sigc::slot object_renamed_slot; + sigc::slot object_moved_slot; sigc::slot disconnection_slot; sigc::slot variable_change_slot; sigc::slot property_change_slot; diff --git a/src/common/interface/CommonInterface.hpp b/src/common/interface/CommonInterface.hpp index 3c81a4a3..89a96978 100644 --- a/src/common/interface/CommonInterface.hpp +++ b/src/common/interface/CommonInterface.hpp @@ -48,8 +48,10 @@ public: virtual void put(const Raul::Path& path, const Resource::Properties& properties) = 0; - virtual void rename(const Raul::Path& old_path, - const Raul::Path& new_path) = 0; + virtual void move(const Raul::Path& old_path, + const Raul::Path& new_path) = 0; + + virtual void del(const Raul::Path& path) = 0; virtual void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path) = 0; @@ -72,8 +74,6 @@ public: uint32_t voice, const Raul::Atom& value) = 0; - virtual void destroy(const Raul::Path& path) = 0; - virtual void clear_patch(const Raul::Path& patch_path) = 0; }; diff --git a/src/engine/ClientBroadcaster.cpp b/src/engine/ClientBroadcaster.cpp index 6fca9b17..beb08f22 100644 --- a/src/engine/ClientBroadcaster.cpp +++ b/src/engine/ClientBroadcaster.cpp @@ -135,7 +135,7 @@ void ClientBroadcaster::send_destroyed(const Path& path) { for (Clients::const_iterator i = _clients.begin(); i != _clients.end(); ++i) - (*i).second->destroy(path); + (*i).second->del(path); } @@ -223,10 +223,10 @@ ClientBroadcaster::send_object(const GraphObjectImpl* p, bool recursive) /** Sends notification of an GraphObject's renaming */ void -ClientBroadcaster::send_rename(const Path& old_path, const Path& new_path) +ClientBroadcaster::send_move(const Path& old_path, const Path& new_path) { for (Clients::const_iterator i = _clients.begin(); i != _clients.end(); ++i) - (*i).second->rename(old_path, new_path); + (*i).second->move(old_path, new_path); } diff --git a/src/engine/ClientBroadcaster.hpp b/src/engine/ClientBroadcaster.hpp index 18d7647f..a207b6d7 100644 --- a/src/engine/ClientBroadcaster.hpp +++ b/src/engine/ClientBroadcaster.hpp @@ -68,7 +68,7 @@ public: void send_clear_patch(const Raul::Path& patch_path); void send_connection(const SharedPtr connection); void send_disconnection(const Raul::Path& src_port_path, const Raul::Path& dst_port_path); - void send_rename(const Raul::Path& old_path, const Raul::Path& new_path); + void send_move(const Raul::Path& old_path, const Raul::Path& new_path); void send_variable_change(const Raul::URI& node_path, const Raul::URI& key, const Raul::Atom& value); void send_property_change(const Raul::URI& node_path, const Raul::URI& key, const Raul::Atom& value); void send_port_value(const Raul::Path& port_path, const Raul::Atom& value); diff --git a/src/engine/HTTPClientSender.cpp b/src/engine/HTTPClientSender.cpp index b3fd1bc0..83d3f1b2 100644 --- a/src/engine/HTTPClientSender.cpp +++ b/src/engine/HTTPClientSender.cpp @@ -50,15 +50,15 @@ HTTPClientSender::error(const std::string& msg) void -HTTPClientSender::put(const Raul::Path& path, - const Shared::Resource::Properties& properties) +HTTPClientSender::put(const Path& path, + const Shared::Resource::Properties& properties) { cerr << "HTTP CLIENT PUT " << path << endl; } void -HTTPClientSender::destroy(const Raul::Path& path) +HTTPClientSender::del(const Path& path) { assert(!path.is_root()); send_chunk(string("<").append(path.str()).append("> a .")); @@ -66,14 +66,14 @@ HTTPClientSender::destroy(const Raul::Path& path) void -HTTPClientSender::clear_patch(const Raul::Path& patch_path) +HTTPClientSender::clear_patch(const Path& patch_path) { send_chunk(string("<").append(patch_path.str()).append("> ingen:empty true .")); } void -HTTPClientSender::connect(const Raul::Path& src_path, const Raul::Path& dst_path) +HTTPClientSender::connect(const Path& src_path, const Path& dst_path) { string msg = string( "@prefix rdf: .\n" @@ -87,14 +87,14 @@ HTTPClientSender::connect(const Raul::Path& src_path, const Raul::Path& dst_path void -HTTPClientSender::disconnect(const Raul::Path& src_path, const Raul::Path& dst_path) +HTTPClientSender::disconnect(const Path& src_path, const Path& dst_path) { //send("/ingen/disconnection", "ss", src_path.c_str(), dst_path.c_str(), LO_ARGS_END); } void -HTTPClientSender::set_variable(const Raul::URI& path, const Raul::URI& key, const Atom& value) +HTTPClientSender::set_variable(const URI& path, const URI& key, const Atom& value) { Redland::Node node = AtomRDF::atom_to_node(*_engine.world()->rdf_world, value); string msg = string( @@ -109,7 +109,7 @@ HTTPClientSender::set_variable(const Raul::URI& path, const Raul::URI& key, cons void -HTTPClientSender::set_property(const Raul::URI& path, const Raul::URI& key, const Atom& value) +HTTPClientSender::set_property(const URI& path, const URI& key, const Atom& value) { Redland::Node node = AtomRDF::atom_to_node(*_engine.world()->rdf_world, value); string msg = string( @@ -125,7 +125,7 @@ HTTPClientSender::set_property(const Raul::URI& path, const Raul::URI& key, cons void -HTTPClientSender::set_port_value(const Raul::Path& port_path, const Raul::Atom& value) +HTTPClientSender::set_port_value(const Path& port_path, const Atom& value) { Redland::Node node = AtomRDF::atom_to_node(*_engine.world()->rdf_world, value); string msg = string( @@ -136,17 +136,17 @@ HTTPClientSender::set_port_value(const Raul::Path& port_path, const Raul::Atom& void -HTTPClientSender::set_voice_value(const Raul::Path& port_path, uint32_t voice, const Raul::Atom& value) +HTTPClientSender::set_voice_value(const Path& port_path, uint32_t voice, const Atom& value) { /*lo_message m = lo_message_new(); lo_message_add_string(m, port_path.c_str()); - Raul::AtomLiblo::lo_message_add_atom(m, value); + AtomLiblo::lo_message_add_atom(m, value); send_message("/ingen/set_port_value", m);*/ } void -HTTPClientSender::activity(const Raul::Path& path) +HTTPClientSender::activity(const Path& path) { string msg = string( "@prefix ingen: .\n\n<").append( @@ -174,9 +174,9 @@ HTTPClientSender::new_object(const Shared::GraphObject* object) void -HTTPClientSender::new_plugin(const Raul::URI& uri, - const Raul::URI& type_uri, - const Raul::Symbol& symbol) +HTTPClientSender::new_plugin(const URI& uri, + const URI& type_uri, + const Symbol& symbol) { /*lo_message m = lo_message_new(); lo_message_add_string(m, uri.c_str()); @@ -188,7 +188,7 @@ HTTPClientSender::new_plugin(const Raul::URI& uri, void -HTTPClientSender::rename(const Raul::Path& old_path, const Raul::Path& new_path) +HTTPClientSender::move(const Path& old_path, const Path& new_path) { string msg = string( "@prefix rdf: .\n" diff --git a/src/engine/HTTPClientSender.hpp b/src/engine/HTTPClientSender.hpp index e4a88112..fb045194 100644 --- a/src/engine/HTTPClientSender.hpp +++ b/src/engine/HTTPClientSender.hpp @@ -83,10 +83,10 @@ public: virtual void clear_patch(const Raul::Path& path); - virtual void destroy(const Raul::Path& path); + virtual void del(const Raul::Path& path); - virtual void rename(const Raul::Path& old_path, - const Raul::Path& new_path); + virtual void move(const Raul::Path& old_path, + const Raul::Path& new_path); virtual void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path); diff --git a/src/engine/OSCClientSender.cpp b/src/engine/OSCClientSender.cpp index 55a42e9f..c0a6b85b 100644 --- a/src/engine/OSCClientSender.cpp +++ b/src/engine/OSCClientSender.cpp @@ -133,7 +133,7 @@ OSCClientSender::put(const Raul::Path& path, * \arg \b path (string) - Path of object (which no longer exists)

\n \n */ void -OSCClientSender::destroy(const Path& path) +OSCClientSender::del(const Path& path) { send("/ingen/destroyed", "s", path.c_str(), LO_ARGS_END); } @@ -274,14 +274,14 @@ OSCClientSender::new_plugin(const URI& uri, /** \page client_osc_namespace - *

\b /ingen/rename - Notification of an object's renaming + *

\b /ingen/move - Notification of an object's renaming * \arg \b old-path (string) - Old path of object * \arg \b new-path (string) - New path of object

\n \n */ void -OSCClientSender::rename(const Path& old_path, const Path& new_path) +OSCClientSender::move(const Path& old_path, const Path& new_path) { - send("/ingen/rename", "ss", old_path.c_str(), new_path.c_str(), LO_ARGS_END); + send("/ingen/move", "ss", old_path.c_str(), new_path.c_str(), LO_ARGS_END); } diff --git a/src/engine/OSCClientSender.hpp b/src/engine/OSCClientSender.hpp index b66ff59d..4a0742eb 100644 --- a/src/engine/OSCClientSender.hpp +++ b/src/engine/OSCClientSender.hpp @@ -80,10 +80,10 @@ public: virtual void clear_patch(const Raul::Path& path); - virtual void destroy(const Raul::Path& path); + virtual void del(const Raul::Path& path); - virtual void rename(const Raul::Path& old_path, - const Raul::Path& new_path); + virtual void move(const Raul::Path& old_path, + const Raul::Path& new_path); virtual void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path); diff --git a/src/engine/OSCEngineReceiver.cpp b/src/engine/OSCEngineReceiver.cpp index 37a8132a..28509ad7 100644 --- a/src/engine/OSCEngineReceiver.cpp +++ b/src/engine/OSCEngineReceiver.cpp @@ -93,10 +93,9 @@ OSCEngineReceiver::OSCEngineReceiver(Engine& engine, size_t queue_size, uint16_t lo_server_add_method(_server, "/ingen/set_polyphony", "isi", set_polyphony_cb, this); lo_server_add_method(_server, "/ingen/set_polyphonic", "isT", set_polyphonic_cb, this); lo_server_add_method(_server, "/ingen/set_polyphonic", "isF", set_polyphonic_cb, this); - lo_server_add_method(_server, "/ingen/new_port", "issi", new_port_cb, this); - lo_server_add_method(_server, "/ingen/put", NULL, new_port_cb, this); - lo_server_add_method(_server, "/ingen/destroy", "is", destroy_cb, this); - lo_server_add_method(_server, "/ingen/rename", "iss", rename_cb, this); + lo_server_add_method(_server, "/ingen/put", NULL, put_cb, this); + lo_server_add_method(_server, "/ingen/move", "iss", move_cb, this); + lo_server_add_method(_server, "/ingen/del", "is", del_cb, this); lo_server_add_method(_server, "/ingen/connect", "iss", connect_cb, this); lo_server_add_method(_server, "/ingen/disconnect", "iss", disconnect_cb, this); lo_server_add_method(_server, "/ingen/disconnect_all", "iss", disconnect_all_cb, this); @@ -366,18 +365,18 @@ OSCEngineReceiver::_engine_deactivate_cb(const char* path, const char* types, lo /** \page engine_osc_namespace - *

\b /ingen/rename - Rename an Object (only Nodes, for now) + *

\b /ingen/move - Move (rename) an Object * \arg \b response-id (integer) * \arg \b old-path - Object's path * \arg \b new-path - Object's new path

\n \n */ int -OSCEngineReceiver::_rename_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) +OSCEngineReceiver::_move_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) { const char* old_path = &argv[1]->s; const char* new_path = &argv[2]->s; - rename(old_path, new_path); + move(old_path, new_path); return 0; } @@ -398,16 +397,16 @@ OSCEngineReceiver::_clear_patch_cb(const char* path, const char* types, lo_arg** /** \page engine_osc_namespace - *

\b /ingen/destroy - Removes (destroys) a Patch or a Node + *

\b /ingen/del - Delete a graph object * \arg \b response-id (integer) - * \arg \b node-path (string) - Full path of the object

\n \n + * \arg \b path (string) - Full path of the object

\n \n */ int -OSCEngineReceiver::_destroy_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) +OSCEngineReceiver::_del_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) { - const char* node_path = &argv[1]->s; + const char* obj_path = &argv[1]->s; - destroy(node_path); + del(obj_path); return 0; } diff --git a/src/engine/OSCEngineReceiver.hpp b/src/engine/OSCEngineReceiver.hpp index fada5a17..82541cc6 100644 --- a/src/engine/OSCEngineReceiver.hpp +++ b/src/engine/OSCEngineReceiver.hpp @@ -90,13 +90,12 @@ private: LO_HANDLER(engine_activate); LO_HANDLER(engine_deactivate); LO_HANDLER(new_patch); - LO_HANDLER(rename); - LO_HANDLER(new_port); LO_HANDLER(put); + LO_HANDLER(move); + LO_HANDLER(del); LO_HANDLER(clear_patch); LO_HANDLER(set_polyphony); LO_HANDLER(set_polyphonic); - LO_HANDLER(destroy); LO_HANDLER(connect); LO_HANDLER(disconnect); LO_HANDLER(disconnect_all); diff --git a/src/engine/QueuedEngineInterface.cpp b/src/engine/QueuedEngineInterface.cpp index a1192c03..7c9c2c1a 100644 --- a/src/engine/QueuedEngineInterface.cpp +++ b/src/engine/QueuedEngineInterface.cpp @@ -184,17 +184,17 @@ QueuedEngineInterface::put(const Path& path, void -QueuedEngineInterface::rename(const Path& old_path, - const Path& new_path) +QueuedEngineInterface::move(const Path& old_path, + const Path& new_path) { - push_queued(new RenameEvent(_engine, _responder, now(), old_path, new_path)); + push_queued(new MoveEvent(_engine, _responder, now(), old_path, new_path)); } void -QueuedEngineInterface::destroy(const Path& path) +QueuedEngineInterface::del(const Path& path) { - push_queued(new DestroyEvent(_engine, _responder, now(), this, path)); + push_queued(new DeleteEvent(_engine, _responder, now(), this, path)); } diff --git a/src/engine/QueuedEngineInterface.hpp b/src/engine/QueuedEngineInterface.hpp index f12a1b23..2a94abff 100644 --- a/src/engine/QueuedEngineInterface.hpp +++ b/src/engine/QueuedEngineInterface.hpp @@ -74,8 +74,8 @@ public: virtual void put(const Raul::Path& path, const Shared::Resource::Properties& properties); - virtual void rename(const Raul::Path& old_path, - const Raul::Path& new_path); + virtual void move(const Raul::Path& old_path, + const Raul::Path& new_path); virtual void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path); @@ -98,7 +98,7 @@ public: uint32_t voice, const Raul::Atom& value); - virtual void destroy(const Raul::Path& path); + virtual void del(const Raul::Path& path); virtual void clear_patch(const Raul::Path& patch_path); diff --git a/src/engine/events.hpp b/src/engine/events.hpp index ee8ab43e..8342fd45 100644 --- a/src/engine/events.hpp +++ b/src/engine/events.hpp @@ -27,7 +27,7 @@ #include "events/CreatePatchEvent.hpp" #include "events/CreatePortEvent.hpp" #include "events/DeactivateEvent.hpp" -#include "events/DestroyEvent.hpp" +#include "events/DeleteEvent.hpp" #include "events/DisconnectAllEvent.hpp" #include "events/DisconnectionEvent.hpp" #include "events/LoadPluginsEvent.hpp" @@ -35,7 +35,7 @@ #include "events/NoteEvent.hpp" #include "events/PingQueuedEvent.hpp" #include "events/RegisterClientEvent.hpp" -#include "events/RenameEvent.hpp" +#include "events/MoveEvent.hpp" #include "events/RequestAllObjectsEvent.hpp" #include "events/RequestMetadataEvent.hpp" #include "events/RequestObjectEvent.hpp" diff --git a/src/engine/events/DeleteEvent.cpp b/src/engine/events/DeleteEvent.cpp new file mode 100644 index 00000000..21058546 --- /dev/null +++ b/src/engine/events/DeleteEvent.cpp @@ -0,0 +1,213 @@ +/* This file is part of Ingen. + * Copyright (C) 2007-2009 Dave Robillard + * + * Ingen 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. + * + * Ingen 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 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., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "raul/Maid.hpp" +#include "raul/Path.hpp" +#include "DeleteEvent.hpp" +#include "Responder.hpp" +#include "Engine.hpp" +#include "PatchImpl.hpp" +#include "NodeBase.hpp" +#include "PluginImpl.hpp" +#include "AudioDriver.hpp" +#include "MidiDriver.hpp" +#include "DisconnectAllEvent.hpp" +#include "ClientBroadcaster.hpp" +#include "EngineStore.hpp" +#include "QueuedEventSource.hpp" +#include "PortImpl.hpp" + +using namespace std; + +namespace Ingen { + +using namespace Shared; + + +DeleteEvent::DeleteEvent(Engine& engine, SharedPtr responder, FrameTime time, QueuedEventSource* source, const Raul::Path& path) + : QueuedEvent(engine, responder, time, true, source) + , _path(path) + , _store_iterator(engine.engine_store()->end()) + , _driver_port(NULL) + , _patch_node_listnode(NULL) + , _patch_port_listnode(NULL) + , _ports_array(NULL) + , _compiled_patch(NULL) + , _disconnect_event(NULL) +{ + assert(_source); +} + + +DeleteEvent::~DeleteEvent() +{ + delete _disconnect_event; +} + + +void +DeleteEvent::pre_process() +{ + _store_iterator = _engine.engine_store()->find(_path); + + if (_store_iterator != _engine.engine_store()->end()) { + _node = PtrCast(_store_iterator->second); + + if (!_node) + _port = PtrCast(_store_iterator->second); + } + + if (_store_iterator != _engine.engine_store()->end()) { + _removed_table = _engine.engine_store()->remove(_store_iterator); + } + + if (_node != NULL && !_path.is_root()) { + assert(_node->parent_patch()); + _patch_node_listnode = _node->parent_patch()->remove_node(_path.name()); + if (_patch_node_listnode) { + assert(_patch_node_listnode->elem() == _node.get()); + + _disconnect_event = new DisconnectAllEvent(_engine, _node->parent_patch(), _node.get()); + _disconnect_event->pre_process(); + + if (_node->parent_patch()->enabled()) { + // FIXME: is this called multiple times? + _compiled_patch = _node->parent_patch()->compile(); +#ifndef NDEBUG + // Be sure node is removed from process order, so it can be destroyed + for (size_t i=0; i < _compiled_patch->size(); ++i) { + assert(_compiled_patch->at(i).node() != _node.get()); + // FIXME: check providers/dependants too + } +#endif + } + } + } else if (_port) { + assert(_port->parent_patch()); + _patch_port_listnode = _port->parent_patch()->remove_port(_path.name()); + if (_patch_port_listnode) { + assert(_patch_port_listnode->elem() == _port.get()); + + _disconnect_event = new DisconnectAllEvent(_engine, _port->parent_patch(), _port.get()); + _disconnect_event->pre_process(); + + if (_port->parent_patch()->enabled()) { + // FIXME: is this called multiple times? + _compiled_patch = _port->parent_patch()->compile(); + _ports_array = _port->parent_patch()->build_ports_array(); + assert(_ports_array->size() == _port->parent_patch()->num_ports()); + } + } + + } + + QueuedEvent::pre_process(); +} + + +void +DeleteEvent::execute(ProcessContext& context) +{ + QueuedEvent::execute(context); + + if (_patch_node_listnode) { + assert(_node); + + if (_disconnect_event) + _disconnect_event->execute(context); + + if (_node->parent_patch()->compiled_patch()) + _engine.maid()->push(_node->parent_patch()->compiled_patch()); + + _node->parent_patch()->compiled_patch(_compiled_patch); + + } else if (_patch_port_listnode) { + assert(_port); + + if (_disconnect_event) + _disconnect_event->execute(context); + + if (_port->parent_patch()->compiled_patch()) + _engine.maid()->push(_port->parent_patch()->compiled_patch()); + + _port->parent_patch()->compiled_patch(_compiled_patch); + + if (_port->parent_patch()->external_ports()) + _engine.maid()->push(_port->parent_patch()->external_ports()); + + _port->parent_patch()->external_ports(_ports_array); + + if ( ! _port->parent_patch()->parent()) { + if (_port->type() == DataType::AUDIO) + _driver_port = _engine.audio_driver()->remove_port(_port->path()); + else if (_port->type() == DataType::EVENT) + _driver_port = _engine.midi_driver()->remove_port(_port->path()); + + // Apparently this needs to be called in post_process?? + //if (_driver_port) + // _driver_port->elem()->unregister(); + } + } + + if (_source) + _source->unblock(); +} + + +void +DeleteEvent::post_process() +{ + if (!_node && !_port) { + if (_path.is_root()) { + _responder->respond_error("You can not destroy the root patch (/)"); + } else { + string msg = string("Could not find object ") + _path.str() + " to destroy"; + _responder->respond_error(msg); + } + } + + if (_patch_node_listnode) { + assert(_node); + _node->deactivate(); + _responder->respond_ok(); + _engine.broadcaster()->bundle_begin(); + if (_disconnect_event) + _disconnect_event->post_process(); + _engine.broadcaster()->send_destroyed(_path); + _engine.broadcaster()->bundle_end(); + _engine.maid()->push(_patch_node_listnode); + } else if (_patch_port_listnode) { + assert(_port); + _responder->respond_ok(); + _engine.broadcaster()->bundle_begin(); + if (_disconnect_event) + _disconnect_event->post_process(); + _engine.broadcaster()->send_destroyed(_path); + _engine.broadcaster()->bundle_end(); + _engine.maid()->push(_patch_port_listnode); + } else { + _responder->respond_error("Unable to destroy object"); + } + + if (_driver_port) { + _driver_port->elem()->destroy(); + _engine.maid()->push(_driver_port); + } +} + + +} // namespace Ingen diff --git a/src/engine/events/DeleteEvent.hpp b/src/engine/events/DeleteEvent.hpp new file mode 100644 index 00000000..d0fa43f1 --- /dev/null +++ b/src/engine/events/DeleteEvent.hpp @@ -0,0 +1,79 @@ +/* This file is part of Ingen. + * Copyright (C) 2007-2009 Dave Robillard + * + * Ingen 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. + * + * Ingen 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 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., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef DESTROYEVENT_H +#define DESTROYEVENT_H + +#include "QueuedEvent.hpp" +#include "EngineStore.hpp" +#include "PatchImpl.hpp" + +namespace Raul { + template class Array; + template class ListNode; +} + +namespace Ingen { + +class GraphObjectImpl; +class NodeImpl; +class PortImpl; +class DriverPort; +class DisconnectAllEvent; +class CompiledPatch; + + +/** Delete a graph object. + * WebDAV method DELETE (RFC4918 S9.6). + * + * \ingroup engine + */ +class DeleteEvent : public QueuedEvent +{ +public: + DeleteEvent( + Engine& engine, + SharedPtr responder, + FrameTime timestamp, + QueuedEventSource* source, + const Raul::Path& path); + + ~DeleteEvent(); + + void pre_process(); + void execute(ProcessContext& context); + void post_process(); + +private: + Raul::Path _path; + EngineStore::iterator _store_iterator; + SharedPtr _node; ///< Non-NULL iff a node + SharedPtr _port; ///< Non-NULL iff a port + Raul::List::Node* _driver_port; + PatchImpl::Nodes::Node* _patch_node_listnode; + Raul::List::Node* _patch_port_listnode; + Raul::Array* _ports_array; ///< New (external) ports for Patch + CompiledPatch* _compiled_patch; ///< Patch's new process order + DisconnectAllEvent* _disconnect_event; + + SharedPtr< Raul::Table > > _removed_table; +}; + + +} // namespace Ingen + +#endif // DESTROYEVENT_H diff --git a/src/engine/events/DestroyEvent.cpp b/src/engine/events/DestroyEvent.cpp deleted file mode 100644 index 2a2e4abd..00000000 --- a/src/engine/events/DestroyEvent.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007-2009 Dave Robillard - * - * Ingen 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. - * - * Ingen 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 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., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "raul/Maid.hpp" -#include "raul/Path.hpp" -#include "DestroyEvent.hpp" -#include "Responder.hpp" -#include "Engine.hpp" -#include "PatchImpl.hpp" -#include "NodeBase.hpp" -#include "PluginImpl.hpp" -#include "AudioDriver.hpp" -#include "MidiDriver.hpp" -#include "DisconnectAllEvent.hpp" -#include "ClientBroadcaster.hpp" -#include "EngineStore.hpp" -#include "QueuedEventSource.hpp" -#include "PortImpl.hpp" - -using namespace std; - -namespace Ingen { - -using namespace Shared; - - -DestroyEvent::DestroyEvent(Engine& engine, SharedPtr responder, FrameTime time, QueuedEventSource* source, const Raul::Path& path) - : QueuedEvent(engine, responder, time, true, source) - , _path(path) - , _store_iterator(engine.engine_store()->end()) - , _driver_port(NULL) - , _patch_node_listnode(NULL) - , _patch_port_listnode(NULL) - , _ports_array(NULL) - , _compiled_patch(NULL) - , _disconnect_event(NULL) -{ - assert(_source); -} - - -DestroyEvent::~DestroyEvent() -{ - delete _disconnect_event; -} - - -void -DestroyEvent::pre_process() -{ - _store_iterator = _engine.engine_store()->find(_path); - - if (_store_iterator != _engine.engine_store()->end()) { - _node = PtrCast(_store_iterator->second); - - if (!_node) - _port = PtrCast(_store_iterator->second); - } - - if (_store_iterator != _engine.engine_store()->end()) { - _removed_table = _engine.engine_store()->remove(_store_iterator); - } - - if (_node != NULL && !_path.is_root()) { - assert(_node->parent_patch()); - _patch_node_listnode = _node->parent_patch()->remove_node(_path.name()); - if (_patch_node_listnode) { - assert(_patch_node_listnode->elem() == _node.get()); - - _disconnect_event = new DisconnectAllEvent(_engine, _node->parent_patch(), _node.get()); - _disconnect_event->pre_process(); - - if (_node->parent_patch()->enabled()) { - // FIXME: is this called multiple times? - _compiled_patch = _node->parent_patch()->compile(); -#ifndef NDEBUG - // Be sure node is removed from process order, so it can be destroyed - for (size_t i=0; i < _compiled_patch->size(); ++i) { - assert(_compiled_patch->at(i).node() != _node.get()); - // FIXME: check providers/dependants too - } -#endif - } - } - } else if (_port) { - assert(_port->parent_patch()); - _patch_port_listnode = _port->parent_patch()->remove_port(_path.name()); - if (_patch_port_listnode) { - assert(_patch_port_listnode->elem() == _port.get()); - - _disconnect_event = new DisconnectAllEvent(_engine, _port->parent_patch(), _port.get()); - _disconnect_event->pre_process(); - - if (_port->parent_patch()->enabled()) { - // FIXME: is this called multiple times? - _compiled_patch = _port->parent_patch()->compile(); - _ports_array = _port->parent_patch()->build_ports_array(); - assert(_ports_array->size() == _port->parent_patch()->num_ports()); - } - } - - } - - QueuedEvent::pre_process(); -} - - -void -DestroyEvent::execute(ProcessContext& context) -{ - QueuedEvent::execute(context); - - if (_patch_node_listnode) { - assert(_node); - - if (_disconnect_event) - _disconnect_event->execute(context); - - if (_node->parent_patch()->compiled_patch()) - _engine.maid()->push(_node->parent_patch()->compiled_patch()); - - _node->parent_patch()->compiled_patch(_compiled_patch); - - } else if (_patch_port_listnode) { - assert(_port); - - if (_disconnect_event) - _disconnect_event->execute(context); - - if (_port->parent_patch()->compiled_patch()) - _engine.maid()->push(_port->parent_patch()->compiled_patch()); - - _port->parent_patch()->compiled_patch(_compiled_patch); - - if (_port->parent_patch()->external_ports()) - _engine.maid()->push(_port->parent_patch()->external_ports()); - - _port->parent_patch()->external_ports(_ports_array); - - if ( ! _port->parent_patch()->parent()) { - if (_port->type() == DataType::AUDIO) - _driver_port = _engine.audio_driver()->remove_port(_port->path()); - else if (_port->type() == DataType::EVENT) - _driver_port = _engine.midi_driver()->remove_port(_port->path()); - - // Apparently this needs to be called in post_process?? - //if (_driver_port) - // _driver_port->elem()->unregister(); - } - } - - if (_source) - _source->unblock(); -} - - -void -DestroyEvent::post_process() -{ - if (!_node && !_port) { - if (_path.is_root()) { - _responder->respond_error("You can not destroy the root patch (/)"); - } else { - string msg = string("Could not find object ") + _path.str() + " to destroy"; - _responder->respond_error(msg); - } - } - - if (_patch_node_listnode) { - assert(_node); - _node->deactivate(); - _responder->respond_ok(); - _engine.broadcaster()->bundle_begin(); - if (_disconnect_event) - _disconnect_event->post_process(); - _engine.broadcaster()->send_destroyed(_path); - _engine.broadcaster()->bundle_end(); - _engine.maid()->push(_patch_node_listnode); - } else if (_patch_port_listnode) { - assert(_port); - _responder->respond_ok(); - _engine.broadcaster()->bundle_begin(); - if (_disconnect_event) - _disconnect_event->post_process(); - _engine.broadcaster()->send_destroyed(_path); - _engine.broadcaster()->bundle_end(); - _engine.maid()->push(_patch_port_listnode); - } else { - _responder->respond_error("Unable to destroy object"); - } - - if (_driver_port) { - _driver_port->elem()->destroy(); - _engine.maid()->push(_driver_port); - } -} - - -} // namespace Ingen diff --git a/src/engine/events/DestroyEvent.hpp b/src/engine/events/DestroyEvent.hpp deleted file mode 100644 index 25d0b65b..00000000 --- a/src/engine/events/DestroyEvent.hpp +++ /dev/null @@ -1,72 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007-2009 Dave Robillard - * - * Ingen 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. - * - * Ingen 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 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., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef DESTROYEVENT_H -#define DESTROYEVENT_H - -#include "QueuedEvent.hpp" -#include "EngineStore.hpp" -#include "PatchImpl.hpp" - -namespace Raul { - template class Array; - template class ListNode; -} - -namespace Ingen { - -class GraphObjectImpl; -class NodeImpl; -class PortImpl; -class DriverPort; -class DisconnectAllEvent; -class CompiledPatch; - - -/** An event to remove and delete a Node. - * - * \ingroup engine - */ -class DestroyEvent : public QueuedEvent -{ -public: - DestroyEvent(Engine& engine, SharedPtr responder, FrameTime timestamp, QueuedEventSource* source, const Raul::Path& path); - ~DestroyEvent(); - - void pre_process(); - void execute(ProcessContext& context); - void post_process(); - -private: - Raul::Path _path; - EngineStore::iterator _store_iterator; - SharedPtr _node; ///< Non-NULL iff a node - SharedPtr _port; ///< Non-NULL iff a port - Raul::List::Node* _driver_port; - PatchImpl::Nodes::Node* _patch_node_listnode; - Raul::List::Node* _patch_port_listnode; - Raul::Array* _ports_array; ///< New (external) ports for Patch - CompiledPatch* _compiled_patch; ///< Patch's new process order - DisconnectAllEvent* _disconnect_event; - - SharedPtr< Raul::Table > > _removed_table; -}; - - -} // namespace Ingen - -#endif // DESTROYEVENT_H diff --git a/src/engine/events/MoveEvent.cpp b/src/engine/events/MoveEvent.cpp new file mode 100644 index 00000000..661bc4c1 --- /dev/null +++ b/src/engine/events/MoveEvent.cpp @@ -0,0 +1,142 @@ +/* This file is part of Ingen. + * Copyright (C) 2007-2009 Dave Robillard + * + * Ingen 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. + * + * Ingen 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 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., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "raul/Path.hpp" +#include "ClientBroadcaster.hpp" +#include "Engine.hpp" +#include "NodeImpl.hpp" +#include "EngineStore.hpp" +#include "PatchImpl.hpp" +#include "MoveEvent.hpp" +#include "Responder.hpp" +#include "AudioDriver.hpp" +#include "MidiDriver.hpp" + +using namespace std; +using namespace Raul; + +namespace Ingen { + +using namespace Shared; + + +MoveEvent::MoveEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const Path& path, const Path& new_path) + : QueuedEvent(engine, responder, timestamp) + , _old_path(path) + , _new_path(new_path) + , _parent_patch(NULL) + , _store_iterator(engine.engine_store()->end()) + , _error(NO_ERROR) +{ +} + + +MoveEvent::~MoveEvent() +{ +} + + +void +MoveEvent::pre_process() +{ + if (!_old_path.parent().is_parent_of(_new_path)) { + _error = PARENT_DIFFERS; + QueuedEvent::pre_process(); + return; + } + _store_iterator = _engine.engine_store()->find(_old_path); + if (_store_iterator == _engine.engine_store()->end()) { + _error = OBJECT_NOT_FOUND; + QueuedEvent::pre_process(); + return; + } + + if (_engine.engine_store()->find_object(_new_path)) { + _error = OBJECT_EXISTS; + QueuedEvent::pre_process(); + return; + } + + SharedPtr< Table > > removed + = _engine.engine_store()->remove(_store_iterator); + + assert(removed->size() > 0); + + for (Table >::iterator i = removed->begin(); i != removed->end(); ++i) { + const Path& child_old_path = i->first; + assert(Path::descendant_comparator(_old_path, child_old_path)); + + Path child_new_path; + if (child_old_path == _old_path) + child_new_path = _new_path; + else + child_new_path = Path(_new_path).base() + child_old_path.substr(_old_path.length()+1); + + PtrCast(i->second)->set_path(child_new_path); + i->first = child_new_path; + } + + _engine.engine_store()->add(*removed.get()); + + QueuedEvent::pre_process(); +} + + +void +MoveEvent::execute(ProcessContext& context) +{ + QueuedEvent::execute(context); + + SharedPtr port = PtrCast(_store_iterator->second); + if (port && port->parent()->parent() == NULL) { + DriverPort* driver_port = NULL; + + if (port->type() == DataType::AUDIO) + driver_port = _engine.audio_driver()->driver_port(_new_path); + else if (port->type() == DataType::EVENT) + driver_port = _engine.midi_driver()->driver_port(_new_path); + + if (driver_port) + driver_port->set_name(_new_path.str()); + } +} + + +void +MoveEvent::post_process() +{ + string msg = "Unable to rename object - "; + + if (_error == NO_ERROR) { + _responder->respond_ok(); + _engine.broadcaster()->send_move(_old_path, _new_path); + } else { + if (_error == OBJECT_EXISTS) + msg.append("Object already exists at ").append(_new_path.str()); + else if (_error == OBJECT_NOT_FOUND) + msg.append("Could not find object ").append(_old_path.str()); + else if (_error == OBJECT_NOT_RENAMABLE) + msg.append(_old_path.str()).append(" is not renamable"); + else if (_error == PARENT_DIFFERS) + msg.append(_new_path.str()).append(" is a child of a different patch"); + + _responder->respond_error(msg); + } +} + + +} // namespace Ingen diff --git a/src/engine/events/MoveEvent.hpp b/src/engine/events/MoveEvent.hpp new file mode 100644 index 00000000..f55d70b1 --- /dev/null +++ b/src/engine/events/MoveEvent.hpp @@ -0,0 +1,69 @@ +/* This file is part of Ingen. + * Copyright (C) 2007-2009 Dave Robillard + * + * Ingen 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. + * + * Ingen 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 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., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef RENAMEEVENT_H +#define RENAMEEVENT_H + +#include "raul/Path.hpp" +#include "QueuedEvent.hpp" +#include "EngineStore.hpp" + +namespace Ingen { + +class PatchImpl; + + +/** Move a graph object to a new path. + * WebDAV method MOVE (RFC4918 S9.9). + * + * \ingroup engine + */ +class MoveEvent : public QueuedEvent +{ +public: + MoveEvent( + Engine& engine, + SharedPtr responder, + SampleCount timestamp, + const Raul::Path& old_path, + const Raul::Path& new_path); + ~MoveEvent(); + + void pre_process(); + void execute(ProcessContext& context); + void post_process(); + +private: + enum ErrorType { + NO_ERROR, + OBJECT_NOT_FOUND, + OBJECT_EXISTS, + OBJECT_NOT_RENAMABLE, + PARENT_DIFFERS + }; + + Raul::Path _old_path; + Raul::Path _new_path; + PatchImpl* _parent_patch; + EngineStore::iterator _store_iterator; + ErrorType _error; +}; + + +} // namespace Ingen + +#endif // RENAMEEVENT_H diff --git a/src/engine/events/RenameEvent.cpp b/src/engine/events/RenameEvent.cpp deleted file mode 100644 index 73379a0c..00000000 --- a/src/engine/events/RenameEvent.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007-2009 Dave Robillard - * - * Ingen 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. - * - * Ingen 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 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., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "raul/Path.hpp" -#include "ClientBroadcaster.hpp" -#include "Engine.hpp" -#include "NodeImpl.hpp" -#include "EngineStore.hpp" -#include "PatchImpl.hpp" -#include "RenameEvent.hpp" -#include "Responder.hpp" -#include "AudioDriver.hpp" -#include "MidiDriver.hpp" - -using namespace std; -using namespace Raul; - -namespace Ingen { - -using namespace Shared; - - -RenameEvent::RenameEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const Path& path, const Path& new_path) - : QueuedEvent(engine, responder, timestamp) - , _old_path(path) - , _new_path(new_path) - , _parent_patch(NULL) - , _store_iterator(engine.engine_store()->end()) - , _error(NO_ERROR) -{ -} - - -RenameEvent::~RenameEvent() -{ -} - - -void -RenameEvent::pre_process() -{ - if (!_old_path.parent().is_parent_of(_new_path)) { - _error = PARENT_DIFFERS; - QueuedEvent::pre_process(); - return; - } - _store_iterator = _engine.engine_store()->find(_old_path); - if (_store_iterator == _engine.engine_store()->end()) { - _error = OBJECT_NOT_FOUND; - QueuedEvent::pre_process(); - return; - } - - if (_engine.engine_store()->find_object(_new_path)) { - _error = OBJECT_EXISTS; - QueuedEvent::pre_process(); - return; - } - - SharedPtr< Table > > removed - = _engine.engine_store()->remove(_store_iterator); - - assert(removed->size() > 0); - - for (Table >::iterator i = removed->begin(); i != removed->end(); ++i) { - const Path& child_old_path = i->first; - assert(Path::descendant_comparator(_old_path, child_old_path)); - - Path child_new_path; - if (child_old_path == _old_path) - child_new_path = _new_path; - else - child_new_path = Path(_new_path).base() + child_old_path.substr(_old_path.length()+1); - - PtrCast(i->second)->set_path(child_new_path); - i->first = child_new_path; - } - - _engine.engine_store()->add(*removed.get()); - - QueuedEvent::pre_process(); -} - - -void -RenameEvent::execute(ProcessContext& context) -{ - QueuedEvent::execute(context); - - SharedPtr port = PtrCast(_store_iterator->second); - if (port && port->parent()->parent() == NULL) { - DriverPort* driver_port = NULL; - - if (port->type() == DataType::AUDIO) - driver_port = _engine.audio_driver()->driver_port(_new_path); - else if (port->type() == DataType::EVENT) - driver_port = _engine.midi_driver()->driver_port(_new_path); - - if (driver_port) - driver_port->set_name(_new_path.str()); - } -} - - -void -RenameEvent::post_process() -{ - string msg = "Unable to rename object - "; - - if (_error == NO_ERROR) { - _responder->respond_ok(); - _engine.broadcaster()->send_rename(_old_path, _new_path); - } else { - if (_error == OBJECT_EXISTS) - msg.append("Object already exists at ").append(_new_path.str()); - else if (_error == OBJECT_NOT_FOUND) - msg.append("Could not find object ").append(_old_path.str()); - else if (_error == OBJECT_NOT_RENAMABLE) - msg.append(_old_path.str()).append(" is not renamable"); - else if (_error == PARENT_DIFFERS) - msg.append(_new_path.str()).append(" is a child of a different patch"); - - _responder->respond_error(msg); - } -} - - -} // namespace Ingen diff --git a/src/engine/events/RenameEvent.hpp b/src/engine/events/RenameEvent.hpp deleted file mode 100644 index 2fa9d897..00000000 --- a/src/engine/events/RenameEvent.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007-2009 Dave Robillard - * - * Ingen 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. - * - * Ingen 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 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., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef RENAMEEVENT_H -#define RENAMEEVENT_H - -#include "raul/Path.hpp" -#include "QueuedEvent.hpp" -#include "EngineStore.hpp" - -namespace Ingen { - -class PatchImpl; - - -/** An event to change the name of an GraphObjectImpl. - * - * \ingroup engine - */ -class RenameEvent : public QueuedEvent -{ -public: - RenameEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const Raul::Path& old_path, const Raul::Path& new_path); - ~RenameEvent(); - - void pre_process(); - void execute(ProcessContext& context); - void post_process(); - -private: - enum ErrorType { - NO_ERROR, - OBJECT_NOT_FOUND, - OBJECT_EXISTS, - OBJECT_NOT_RENAMABLE, - PARENT_DIFFERS - }; - - Raul::Path _old_path; - Raul::Path _new_path; - PatchImpl* _parent_patch; - EngineStore::iterator _store_iterator; - ErrorType _error; -}; - - -} // namespace Ingen - -#endif // RENAMEEVENT_H diff --git a/src/engine/wscript b/src/engine/wscript index 4365cfa9..157708e8 100644 --- a/src/engine/wscript +++ b/src/engine/wscript @@ -54,29 +54,29 @@ def build(bld): obj = bld.new_task_gen('cxx', 'shlib') obj.source = ''' - events/SetPortValueEvent.cpp - QueuedEventSource.cpp QueuedEngineInterface.cpp + QueuedEventSource.cpp events/AllNotesOffEvent.cpp events/ClearPatchEvent.cpp events/ConnectionEvent.cpp events/CreateNodeEvent.cpp events/CreatePatchEvent.cpp events/CreatePortEvent.cpp - events/DestroyEvent.cpp + events/DeleteEvent.cpp events/DisconnectAllEvent.cpp events/DisconnectionEvent.cpp events/LoadPluginsEvent.cpp events/MidiLearnEvent.cpp + events/MoveEvent.cpp events/NoteEvent.cpp events/RegisterClientEvent.cpp - events/RenameEvent.cpp events/RequestAllObjectsEvent.cpp events/RequestMetadataEvent.cpp events/RequestObjectEvent.cpp events/RequestPluginEvent.cpp events/RequestPluginsEvent.cpp events/SetMetadataEvent.cpp + events/SetPortValueEvent.cpp events/UnregisterClientEvent.cpp ''' obj.export_incdirs = ['.'] diff --git a/src/gui/BreadCrumbBox.cpp b/src/gui/BreadCrumbBox.cpp index 0213e84e..4fab5628 100644 --- a/src/gui/BreadCrumbBox.cpp +++ b/src/gui/BreadCrumbBox.cpp @@ -199,7 +199,7 @@ BreadCrumbBox::object_destroyed(const Path& path) void -BreadCrumbBox::object_renamed(const Path& old_path, const Path& new_path) +BreadCrumbBox::object_moved(const Path& old_path, const Path& new_path) { for (std::list::iterator i = _breadcrumbs.begin(); i != _breadcrumbs.end(); ++i) { if ((*i)->path() == old_path) diff --git a/src/gui/BreadCrumbBox.hpp b/src/gui/BreadCrumbBox.hpp index d8084b66..6938c154 100644 --- a/src/gui/BreadCrumbBox.hpp +++ b/src/gui/BreadCrumbBox.hpp @@ -56,7 +56,7 @@ private: void breadcrumb_clicked(BreadCrumb* crumb); void object_destroyed(const Raul::Path& path); - void object_renamed(const Raul::Path& old_path, const Raul::Path& new_path); + void object_moved(const Raul::Path& old_path, const Raul::Path& new_path); Raul::Path _active_path; Raul::Path _full_path; diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp index 74276301..74f3bc9e 100644 --- a/src/gui/NodeModule.cpp +++ b/src/gui/NodeModule.cpp @@ -54,7 +54,7 @@ NodeModule::NodeModule(boost::shared_ptr canvas, SharedPtrsignal_removed_port.connect(sigc::hide_return(sigc::mem_fun(this, &NodeModule::remove_port))); node->signal_variable.connect(sigc::mem_fun(this, &NodeModule::set_property)); node->signal_property.connect(sigc::mem_fun(this, &NodeModule::set_property)); - node->signal_renamed.connect(sigc::mem_fun(this, &NodeModule::rename)); + node->signal_moved.connect(sigc::mem_fun(this, &NodeModule::rename)); } diff --git a/src/gui/ObjectMenu.cpp b/src/gui/ObjectMenu.cpp index 88614264..6096ec7c 100644 --- a/src/gui/ObjectMenu.cpp +++ b/src/gui/ObjectMenu.cpp @@ -98,7 +98,7 @@ ObjectMenu::variable_changed(const URI& predicate, const Atom& value) void ObjectMenu::on_menu_destroy() { - App::instance().engine()->destroy(_object->path()); + App::instance().engine()->del(_object->path()); } diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp index 9f676303..6bc9cbad 100644 --- a/src/gui/PatchCanvas.cpp +++ b/src/gui/PatchCanvas.cpp @@ -596,11 +596,11 @@ PatchCanvas::destroy_selection() for (list >::iterator m = _selected_items.begin(); m != _selected_items.end(); ++m) { boost::shared_ptr module = boost::dynamic_pointer_cast(*m); if (module) { - App::instance().engine()->destroy(module->node()->path()); + App::instance().engine()->del(module->node()->path()); } else { boost::shared_ptr port_module = boost::dynamic_pointer_cast(*m); if (port_module) - App::instance().engine()->destroy(port_module->port()->path()); + App::instance().engine()->del(port_module->port()->path()); } } } diff --git a/src/gui/PatchTreeWindow.cpp b/src/gui/PatchTreeWindow.cpp index 8c271d81..efbbd78f 100644 --- a/src/gui/PatchTreeWindow.cpp +++ b/src/gui/PatchTreeWindow.cpp @@ -219,7 +219,7 @@ PatchTreeWindow::patch_variable_changed(const URI& key, const Atom& value, const void -PatchTreeWindow::patch_renamed(const Path& old_path, const Path& new_path) +PatchTreeWindow::patch_moved(const Path& old_path, const Path& new_path) { _enable_signal = false; diff --git a/src/gui/PatchTreeWindow.hpp b/src/gui/PatchTreeWindow.hpp index 12c37378..915b11d4 100644 --- a/src/gui/PatchTreeWindow.hpp +++ b/src/gui/PatchTreeWindow.hpp @@ -47,7 +47,7 @@ public: void new_object(SharedPtr object); void patch_variable_changed(const Raul::URI& key, const Raul::Atom& value, const Raul::Path& path); - void patch_renamed(const Raul::Path& old_path, const Raul::Path& new_path); + void patch_moved(const Raul::Path& old_path, const Raul::Path& new_path); void add_patch(SharedPtr pm); void remove_patch(const Raul::Path& path); diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp index 8ae512d9..6283df86 100644 --- a/src/gui/Port.cpp +++ b/src/gui/Port.cpp @@ -55,7 +55,7 @@ Port::Port( delete _menu; _menu = NULL; - pm->signal_renamed.connect(sigc::mem_fun(this, &Port::renamed)); + pm->signal_moved.connect(sigc::mem_fun(this, &Port::moved)); if (pm->type().is_control()) { set_toggled(pm->is_toggle()); @@ -97,7 +97,7 @@ Port::create_menu() void -Port::renamed() +Port::moved() { set_name(model()->path().name()); module().lock()->resize(); diff --git a/src/gui/Port.hpp b/src/gui/Port.hpp index cdd64f0a..763cfd7b 100644 --- a/src/gui/Port.hpp +++ b/src/gui/Port.hpp @@ -60,7 +60,7 @@ private: void variable_changed(const Raul::URI& key, const Raul::Atom& value); - void renamed(); + void moved(); WeakPtr _port_model; bool _flipped; diff --git a/src/gui/RenameWindow.cpp b/src/gui/RenameWindow.cpp index 9819bfac..a13ffd48 100644 --- a/src/gui/RenameWindow.cpp +++ b/src/gui/RenameWindow.cpp @@ -121,7 +121,7 @@ RenameWindow::ok_clicked() assert(name.length() > 0); assert(name.find("/") == string::npos); - App::instance().engine()->rename(_object->path(), _object->path().parent().base() + name); + App::instance().engine()->move(_object->path(), _object->path().parent().base() + name); hide(); } diff --git a/src/gui/SubpatchModule.cpp b/src/gui/SubpatchModule.cpp index 672a5d93..e25e7068 100644 --- a/src/gui/SubpatchModule.cpp +++ b/src/gui/SubpatchModule.cpp @@ -87,7 +87,7 @@ SubpatchModule::show_dialog() void SubpatchModule::menu_remove() { - App::instance().engine()->destroy(_patch->path()); + App::instance().engine()->del(_patch->path()); } } // namespace GUI diff --git a/src/serialisation/Parser.cpp b/src/serialisation/Parser.cpp index f290de5f..3b1e2d47 100644 --- a/src/serialisation/Parser.cpp +++ b/src/serialisation/Parser.cpp @@ -213,7 +213,7 @@ Parser::parse_update( for (Redland::Query::Results::iterator i = results.begin(); i != results.end(); ++i) { const Redland::Node& object = (*i)["o"]; - target->destroy(object.to_string()); + target->del(object.to_string()); } // Variable settings diff --git a/src/shared/ClashAvoider.cpp b/src/shared/ClashAvoider.cpp index e553364b..c7e08269 100644 --- a/src/shared/ClashAvoider.cpp +++ b/src/shared/ClashAvoider.cpp @@ -151,10 +151,10 @@ ClashAvoider::put(const Raul::Path& path, void -ClashAvoider::rename(const Raul::Path& old_path, - const Raul::Path& new_path) +ClashAvoider::move(const Raul::Path& old_path, + const Raul::Path& new_path) { - _target.rename(map_path(old_path), map_path(new_path)); + _target.move(map_path(old_path), map_path(new_path)); } @@ -210,9 +210,9 @@ ClashAvoider::set_voice_value(const Raul::Path& port_path, void -ClashAvoider::destroy(const Raul::Path& path) +ClashAvoider::del(const Raul::Path& path) { - _target.destroy(map_path(path)); + _target.del(map_path(path)); } diff --git a/src/shared/ClashAvoider.hpp b/src/shared/ClashAvoider.hpp index 007331bc..2fc4b13b 100644 --- a/src/shared/ClashAvoider.hpp +++ b/src/shared/ClashAvoider.hpp @@ -51,8 +51,8 @@ public: virtual void put(const Raul::Path& path, const Resource::Properties& properties); - virtual void rename(const Raul::Path& old_path, - const Raul::Path& new_path); + virtual void move(const Raul::Path& old_path, + const Raul::Path& new_path); virtual void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path); @@ -75,7 +75,7 @@ public: uint32_t voice, const Raul::Atom& value); - virtual void destroy(const Raul::Path& path); + virtual void del(const Raul::Path& path); virtual void clear_patch(const Raul::Path& patch_path); -- cgit v1.2.1