diff options
author | David Robillard <d@drobilla.net> | 2010-02-13 22:07:26 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-02-13 22:07:26 +0000 |
commit | ad07c414d557629251b2f4ea4078c22f241cc865 (patch) | |
tree | dafecc5dd8758e0273105bb2a2a8d481509d19fb /src/engine/QueuedEngineInterface.cpp | |
parent | b8cf49d04a2600f83767ddda46929d4d47adc3fd (diff) | |
download | ingen-ad07c414d557629251b2f4ea4078c22f241cc865.tar.gz ingen-ad07c414d557629251b2f4ea4078c22f241cc865.tar.bz2 ingen-ad07c414d557629251b2f4ea4078c22f241cc865.zip |
Learn and remove bindings exclusively through property interface.
Note this commit breaks some aspects of OSC and HTTP control for now.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2442 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/QueuedEngineInterface.cpp')
-rw-r--r-- | src/engine/QueuedEngineInterface.cpp | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/src/engine/QueuedEngineInterface.cpp b/src/engine/QueuedEngineInterface.cpp index dbbc0099..6122c80d 100644 --- a/src/engine/QueuedEngineInterface.cpp +++ b/src/engine/QueuedEngineInterface.cpp @@ -160,17 +160,23 @@ QueuedEngineInterface::put(const URI& uri, bool meta = ResourceImpl::is_meta_uri(uri); URI subject(meta ? (string("path:/") + uri.substr(6)) : uri.str()); - LOG(debug) << "PUT " << subject << " {" << endl; - typedef Resource::Properties::const_iterator iterator; - for (iterator i = properties.begin(); i != properties.end(); ++i) - LOG(debug) << " " << i->first << " = " << i->second << " :: " << i->second.type() << endl; - LOG(debug) << "}" << endl; - push_queued(new Events::SetMetadata(_engine, _request, now(), true, meta, subject, properties)); } void +QueuedEngineInterface::delta(const URI& uri, + const Shared::Resource::Properties& remove, + const Shared::Resource::Properties& add) +{ + bool meta = ResourceImpl::is_meta_uri(uri); + URI subject(meta ? (string("path:/") + uri.substr(6)) : uri.str()); + + push_queued(new Events::SetMetadata(_engine, _request, now(), false, meta, subject, add, remove)); +} + + +void QueuedEngineInterface::move(const Path& old_path, const Path& new_path) { @@ -220,13 +226,6 @@ QueuedEngineInterface::set_voice_value(const Path& port_path, void -QueuedEngineInterface::learn(const Path& path) -{ - push_queued(new Events::Learn(_engine, _request, now(), path)); -} - - -void QueuedEngineInterface::set_property(const URI& uri, const URI& predicate, const Atom& value) @@ -234,9 +233,11 @@ QueuedEngineInterface::set_property(const URI& uri, size_t hash = uri.find("#"); bool meta = (hash != string::npos); Path path = meta ? (string("/") + path.chop_start("/")) : uri.str(); - Resource::Properties properties; - properties.insert(make_pair(predicate, value)); - push_queued(new Events::SetMetadata(_engine, _request, now(), true, meta, path, properties)); + Resource::Properties remove; + remove.insert(make_pair(predicate, Shared::LV2URIMap::instance().wildcard)); + Resource::Properties add; + add.insert(make_pair(predicate, value)); + push_queued(new Events::SetMetadata(_engine, _request, now(), false, meta, path, add, remove)); } // Requests // |