diff options
author | David Robillard <d@drobilla.net> | 2016-10-14 21:31:48 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2016-10-14 21:31:48 -0400 |
commit | 4b04a51fc7a7dbd1ea62f81691d4ef923278fb1d (patch) | |
tree | 1ed3cfff81b94cd0009f8f79a8715ad8a372dbf6 /src | |
parent | 259ee4cbdb65e4ad3078618a8f09c30fef8a6308 (diff) | |
download | ingen-4b04a51fc7a7dbd1ea62f81691d4ef923278fb1d.tar.gz ingen-4b04a51fc7a7dbd1ea62f81691d4ef923278fb1d.tar.bz2 ingen-4b04a51fc7a7dbd1ea62f81691d4ef923278fb1d.zip |
Never store ingen:activity properties
Diffstat (limited to 'src')
-rw-r--r-- | src/Resource.cpp | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/Resource.cpp b/src/Resource.cpp index f1cb12a1..18d02a69 100644 --- a/src/Resource.cpp +++ b/src/Resource.cpp @@ -39,8 +39,15 @@ Resource::add_property(const Raul::URI& uri, } } - const Atom& v = _properties.insert(make_pair(uri, Property(value, ctx)))->second; - on_property(uri, v); + if (uri != _uris.ingen_activity) { + // Insert new property + const Atom& v = _properties.insert(make_pair(uri, Property(value, ctx)))->second; + on_property(uri, v); + } else { + // Announce ephemeral activity, but do not store + on_property(uri, value); + } + return true; } @@ -62,10 +69,16 @@ Resource::set_property(const Raul::URI& uri, i = next; } - // Insert new property - const Atom& v = _properties.insert(make_pair(uri, Property(value, ctx)))->second; - on_property(uri, v); - return v; + if (uri != _uris.ingen_activity) { + // Insert new property + const Atom& v = _properties.insert(make_pair(uri, Property(value, ctx)))->second; + on_property(uri, v); + return v; + } else { + // Announce ephemeral activity, but do not store + on_property(uri, value); + return value; + } } const Atom& |