diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/AtomReader.cpp | 12 | ||||
-rw-r--r-- | src/AtomWriter.cpp | 11 | ||||
-rw-r--r-- | src/client/ClientStore.cpp | 2 | ||||
-rw-r--r-- | src/gui/BreadCrumbs.cpp | 2 | ||||
-rw-r--r-- | src/gui/BreadCrumbs.hpp | 2 | ||||
-rw-r--r-- | src/server/Broadcaster.hpp | 5 | ||||
-rw-r--r-- | src/server/ClientUpdate.cpp | 2 | ||||
-rw-r--r-- | src/server/ClientUpdate.hpp | 3 | ||||
-rw-r--r-- | src/server/EventWriter.cpp | 4 | ||||
-rw-r--r-- | src/server/EventWriter.hpp | 3 | ||||
-rw-r--r-- | src/server/events/Delete.cpp | 12 | ||||
-rw-r--r-- | src/server/events/Delete.hpp | 12 |
12 files changed, 44 insertions, 26 deletions
diff --git a/src/AtomReader.cpp b/src/AtomReader.cpp index 18b5877c..60662209 100644 --- a/src/AtomReader.cpp +++ b/src/AtomReader.cpp @@ -171,13 +171,13 @@ AtomReader::write(const LV2_Atom* msg, int32_t default_id) const LV2_Atom_Object* body = NULL; lv2_atom_object_get(obj, (LV2_URID)_uris.patch_body, &body, 0); + Ingen::Properties props; + if (body) { + get_props(body, props); + } + if (subject_uri && !body) { _iface.del(*subject_uri); - return true; - } else if (obj->body.otype == _uris.ingen_BundleStart) { - _iface.bundle_begin(); - } else if (obj->body.otype == _uris.ingen_BundleEnd) { - _iface.bundle_end(); } else if (body && body->body.otype == _uris.ingen_Arc) { const LV2_Atom* tail = NULL; const LV2_Atom* head = NULL; @@ -200,6 +200,8 @@ AtomReader::write(const LV2_Atom* msg, int32_t default_id) _log.warn("Delete of unknown object\n"); return false; } + } else if (!subject_uri && body) { + _iface.del(_uris.patch_wildcard, props); } } else if (obj->body.otype == _uris.patch_Put) { const LV2_Atom_Object* body = NULL; diff --git a/src/AtomWriter.cpp b/src/AtomWriter.cpp index 54dcd0a2..786ff820 100644 --- a/src/AtomWriter.cpp +++ b/src/AtomWriter.cpp @@ -363,12 +363,21 @@ AtomWriter::move(const Raul::Path& old_path, * @endcode */ void -AtomWriter::del(const Raul::URI& uri) +AtomWriter::del(const Raul::URI& uri, const Properties& properties) { LV2_Atom_Forge_Frame msg; forge_request(&msg, _uris.patch_Delete); lv2_atom_forge_key(&_forge, _uris.patch_subject); forge_uri(uri); + + if (!properties.empty()) { + LV2_Atom_Forge_Frame body; + lv2_atom_forge_key(&_forge, _uris.patch_body); + lv2_atom_forge_object(&_forge, &body, 0, 0); + forge_properties(properties); + lv2_atom_forge_pop(&_forge, &body); + } + lv2_atom_forge_pop(&_forge, &msg); finish_msg(); } diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp index 9f84f660..169fe2de 100644 --- a/src/client/ClientStore.cpp +++ b/src/client/ClientStore.cpp @@ -207,7 +207,7 @@ ClientStore::add_plugin(SPtr<PluginModel> pm) /* ****** Signal Handlers ******** */ void -ClientStore::del(const Raul::URI& uri) +ClientStore::del(const Raul::URI& uri, const Properties& properties) { if (uri_is_path(uri)) { remove_object(uri_to_path(uri)); diff --git a/src/gui/BreadCrumbs.cpp b/src/gui/BreadCrumbs.cpp index 447b06ba..ac89e4a2 100644 --- a/src/gui/BreadCrumbs.cpp +++ b/src/gui/BreadCrumbs.cpp @@ -180,7 +180,7 @@ BreadCrumbs::breadcrumb_clicked(BreadCrumb* crumb) } void -BreadCrumbs::object_destroyed(const Raul::URI& uri) +BreadCrumbs::object_destroyed(const Raul::URI& uri, const Properties& properties) { for (auto i = _breadcrumbs.begin(); i != _breadcrumbs.end(); ++i) { if ((*i)->path() == uri.c_str()) { diff --git a/src/gui/BreadCrumbs.hpp b/src/gui/BreadCrumbs.hpp index e58b2c0f..59460b1c 100644 --- a/src/gui/BreadCrumbs.hpp +++ b/src/gui/BreadCrumbs.hpp @@ -103,7 +103,7 @@ private: void breadcrumb_clicked(BreadCrumb* crumb); - void object_destroyed(const Raul::URI& uri); + void object_destroyed(const Raul::URI& uri, const Properties& properties); void object_moved(const Raul::Path& old_path, const Raul::Path& new_path); Raul::Path _active_path; diff --git a/src/server/Broadcaster.hpp b/src/server/Broadcaster.hpp index fd8d3996..8ffc25c3 100644 --- a/src/server/Broadcaster.hpp +++ b/src/server/Broadcaster.hpp @@ -122,8 +122,9 @@ public: BROADCAST(move, old_path, new_path); } - void del(const Raul::URI& uri) { - BROADCAST(del, uri); + void del(const Raul::URI& uri, + const Properties& properties = Properties()) { + BROADCAST(del, uri, properties); } void connect(const Raul::Path& tail, diff --git a/src/server/ClientUpdate.cpp b/src/server/ClientUpdate.cpp index e4d9c08f..49a3b22a 100644 --- a/src/server/ClientUpdate.cpp +++ b/src/server/ClientUpdate.cpp @@ -118,7 +118,7 @@ ClientUpdate::put_preset(const URIs& uris, } void -ClientUpdate::del(const Raul::URI& subject) +ClientUpdate::del(const Raul::URI& subject, const Properties& properties) { dels.push_back(subject); } diff --git a/src/server/ClientUpdate.hpp b/src/server/ClientUpdate.hpp index ea11c2b8..027a250b 100644 --- a/src/server/ClientUpdate.hpp +++ b/src/server/ClientUpdate.hpp @@ -55,7 +55,8 @@ struct ClientUpdate { const Raul::URI& preset, const std::string& label); - void del(const Raul::URI& subject); + void del(const Raul::URI& subject, + const Properties& properties = Properties()); void send(Interface* dest); diff --git a/src/server/EventWriter.cpp b/src/server/EventWriter.cpp index 28a8d319..5c528238 100644 --- a/src/server/EventWriter.cpp +++ b/src/server/EventWriter.cpp @@ -110,10 +110,10 @@ EventWriter::move(const Raul::Path& old_path, } void -EventWriter::del(const Raul::URI& uri) +EventWriter::del(const Raul::URI& uri, const Properties& properties) { _engine.enqueue_event( - new Events::Delete(_engine, _respondee, _request_id, now(), uri), + new Events::Delete(_engine, _respondee, _request_id, now(), uri, properties), _event_mode); } diff --git a/src/server/EventWriter.hpp b/src/server/EventWriter.hpp index 18e98421..dbcc1fa4 100644 --- a/src/server/EventWriter.hpp +++ b/src/server/EventWriter.hpp @@ -83,7 +83,8 @@ public: const Atom& value, Resource::Graph ctx = Resource::Graph::DEFAULT); - virtual void del(const Raul::URI& uri); + virtual void del(const Raul::URI& uri, + const Properties& properties = Properties()); virtual void disconnect_all(const Raul::Path& graph, const Raul::Path& path); diff --git a/src/server/events/Delete.cpp b/src/server/events/Delete.cpp index 5683f3a4..a6ade2c9 100644 --- a/src/server/events/Delete.cpp +++ b/src/server/events/Delete.cpp @@ -35,13 +35,15 @@ namespace Ingen { namespace Server { namespace Events { -Delete::Delete(Engine& engine, - SPtr<Interface> client, - int32_t id, - FrameTime time, - const Raul::URI& uri) +Delete::Delete(Engine& engine, + SPtr<Interface> client, + int32_t id, + FrameTime time, + const Raul::URI& uri, + const Properties& properties) : Event(engine, client, id, time) , _uri(uri) + , _properties(properties) , _engine_port(NULL) , _disconnect_event(NULL) { diff --git a/src/server/events/Delete.hpp b/src/server/events/Delete.hpp index 224cad3b..e1c762ca 100644 --- a/src/server/events/Delete.hpp +++ b/src/server/events/Delete.hpp @@ -46,11 +46,12 @@ class DisconnectAll; class Delete : public Event { public: - Delete(Engine& engine, - SPtr<Interface> client, - int32_t id, - FrameTime timestamp, - const Raul::URI& uri); + Delete(Engine& engine, + SPtr<Interface> client, + int32_t id, + FrameTime timestamp, + const Raul::URI& uri, + const Properties& properties); ~Delete(); @@ -62,6 +63,7 @@ public: private: Raul::URI _uri; Raul::Path _path; + Properties _properties; SPtr<BlockImpl> _block; ///< Non-NULL iff a block SPtr<DuplexPort> _port; ///< Non-NULL iff a port EnginePort* _engine_port; |