From 4b04a51fc7a7dbd1ea62f81691d4ef923278fb1d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 14 Oct 2016 21:31:48 -0400 Subject: Never store ingen:activity properties --- src/Resource.cpp | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'src') 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& -- cgit v1.2.1