summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine/events')
-rw-r--r--src/libs/engine/events/SetMetadataEvent.cpp30
-rw-r--r--src/libs/engine/events/SetMetadataEvent.hpp8
2 files changed, 27 insertions, 11 deletions
diff --git a/src/libs/engine/events/SetMetadataEvent.cpp b/src/libs/engine/events/SetMetadataEvent.cpp
index 3e41a510..b4ee00ff 100644
--- a/src/libs/engine/events/SetMetadataEvent.cpp
+++ b/src/libs/engine/events/SetMetadataEvent.cpp
@@ -28,12 +28,20 @@ using std::string;
namespace Ingen {
-SetMetadataEvent::SetMetadataEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& key, const Atom& value)
-: QueuedEvent(engine, responder, timestamp),
- _path(path),
- _key(key),
- _value(value),
- _object(NULL)
+SetMetadataEvent::SetMetadataEvent(
+ Engine& engine,
+ SharedPtr<Responder> responder,
+ SampleCount timestamp,
+ bool property,
+ const string& path,
+ const string& key,
+ const Atom& value)
+ : QueuedEvent(engine, responder, timestamp)
+ , _property(property)
+ , _path(path)
+ , _key(key)
+ , _value(value)
+ , _object(NULL)
{
}
@@ -47,7 +55,10 @@ SetMetadataEvent::pre_process()
return;
}
- _object->set_variable(_key, _value);
+ if (_property)
+ _object->set_property(_key, _value);
+ else
+ _object->set_variable(_key, _value);
QueuedEvent::pre_process();
}
@@ -70,7 +81,10 @@ SetMetadataEvent::post_process()
_responder->respond_error(msg);
} else {
_responder->respond_ok();
- _engine.broadcaster()->send_variable_change(_path, _key, _value);
+ if (_property)
+ _engine.broadcaster()->send_property_change(_path, _key, _value);
+ else
+ _engine.broadcaster()->send_variable_change(_path, _key, _value);
}
}
diff --git a/src/libs/engine/events/SetMetadataEvent.hpp b/src/libs/engine/events/SetMetadataEvent.hpp
index 457d3052..9707ce56 100644
--- a/src/libs/engine/events/SetMetadataEvent.hpp
+++ b/src/libs/engine/events/SetMetadataEvent.hpp
@@ -39,6 +39,7 @@ public:
SetMetadataEvent(Engine& engine,
SharedPtr<Responder> responder,
SampleCount timestamp,
+ bool property,
const string& path,
const string& key,
const Raul::Atom& value);
@@ -48,9 +49,10 @@ public:
void post_process();
private:
- string _path;
- string _key;
- Raul::Atom _value;
+ bool _property;
+ string _path;
+ string _key;
+ Raul::Atom _value;
GraphObjectImpl* _object;
};