summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-28 14:48:27 +0000
committerDavid Robillard <d@drobilla.net>2009-05-28 14:48:27 +0000
commit41a3a7891b94628cf37cc3e1412be63f12b6f674 (patch)
tree29fb8fc12f728b9a66bd683e2bec8af09f12bb23 /src/engine
parent46b2e1598ed75319735893ed039ac669aca2d8a7 (diff)
downloadingen-41a3a7891b94628cf37cc3e1412be63f12b6f674.tar.gz
ingen-41a3a7891b94628cf37cc3e1412be63f12b6f674.tar.bz2
ingen-41a3a7891b94628cf37cc3e1412be63f12b6f674.zip
Remove single property SetMetadataEvent constructor.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2020 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/Event.cpp28
-rw-r--r--src/engine/QueuedEngineInterface.cpp4
-rw-r--r--src/engine/events/SetMetadataEvent.cpp23
-rw-r--r--src/engine/events/SetMetadataEvent.hpp33
4 files changed, 26 insertions, 62 deletions
diff --git a/src/engine/Event.cpp b/src/engine/Event.cpp
index f79c975a..e48d32a2 100644
--- a/src/engine/Event.cpp
+++ b/src/engine/Event.cpp
@@ -26,34 +26,6 @@
* HTTP and WebDAV standards as closely as possible.</p>
*/
-
-/** \page methods
- * <h2>POST</h2>
- * As per HTTP (RFC2616 S9.5).
- *
- * Append properties to a graph object.
- *
- * An object can have several properties with a single predicate.
- * POST appends properties without modifying or removing existing properties.
- */
-
-
-/** \page methods
- * <h2>PUT</h2>
- * As per HTTP (RFC2616 S9.6).
- *
- * Set properties of a graph object, or create an object.
- *
- * An object can have several properties with a single predicate.
- * \li If the object does not yet exist, the message must contain sufficient
- * information to create the object (e.g. known rdf:type properties, etc.)
- * \li If the object does exist, a PUT removes all existing object properties
- * with predicates that match any property in the message, then adds all
- * properties from the message.
- */
-
-
-
namespace Ingen {
diff --git a/src/engine/QueuedEngineInterface.cpp b/src/engine/QueuedEngineInterface.cpp
index 7d9a8dcc..7c989723 100644
--- a/src/engine/QueuedEngineInterface.cpp
+++ b/src/engine/QueuedEngineInterface.cpp
@@ -269,7 +269,9 @@ 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();
- push_queued(new SetMetadataEvent(_engine, _responder, now(), meta, path, predicate, value));
+ Resource::Properties properties;
+ properties.insert(make_pair(predicate, value));
+ push_queued(new SetMetadataEvent(_engine, _responder, now(), meta, path, properties));
}
// Requests //
diff --git a/src/engine/events/SetMetadataEvent.cpp b/src/engine/events/SetMetadataEvent.cpp
index a88490d6..e04b9cea 100644
--- a/src/engine/events/SetMetadataEvent.cpp
+++ b/src/engine/events/SetMetadataEvent.cpp
@@ -34,29 +34,6 @@ namespace Ingen {
SetMetadataEvent::SetMetadataEvent(
- Engine& engine,
- SharedPtr<Responder> responder,
- SampleCount timestamp,
- bool meta,
- const URI& subject,
- const URI& key,
- const Atom& value)
- : QueuedEvent(engine, responder, timestamp)
- , _error(NO_ERROR)
- , _subject(subject)
- , _object(NULL)
- , _patch(NULL)
- , _compiled_patch(NULL)
- , _is_meta(meta)
- , _success(false)
-{
- cerr << "SET " << subject << " : " << key << " = " << value << endl;
- assert(value.type() != Atom::URI || strcmp(value.get_uri(), "lv2:ControlPort"));
- _properties.insert(make_pair(key, value));
-}
-
-
-SetMetadataEvent::SetMetadataEvent(
Engine& engine,
SharedPtr<Responder> responder,
SampleCount timestamp,
diff --git a/src/engine/events/SetMetadataEvent.hpp b/src/engine/events/SetMetadataEvent.hpp
index e43b1e9f..92b540ff 100644
--- a/src/engine/events/SetMetadataEvent.hpp
+++ b/src/engine/events/SetMetadataEvent.hpp
@@ -30,24 +30,37 @@ class GraphObjectImpl;
class PatchImpl;
class CompiledPatch;
+/** \page methods
+ * <h2>POST</h2>
+ * As per HTTP (RFC2616 S9.5).
+ *
+ * Append properties to a graph object.
+ *
+ * An object can have several properties with a single predicate.
+ * POST appends properties without modifying or removing existing properties.
+ */
-/** An event to set a piece of variable for an GraphObjectImpl.
+/** \page methods
+ * <h2>PUT</h2>
+ * As per HTTP (RFC2616 S9.6).
+ *
+ * Set properties of a graph object, or create an object.
*
+ * An object can have several properties with a single predicate.
+ * \li If the object does not yet exist, the message must contain sufficient
+ * information to create the object (e.g. known rdf:type properties, etc.)
+ * \li If the object does exist, a PUT removes all existing object properties
+ * with predicates that match any property in the message, then adds all
+ * properties from the message.
+ */
+
+/** Set properties of a graph object.
* \ingroup engine
*/
class SetMetadataEvent : public QueuedEvent
{
public:
SetMetadataEvent(
- Engine& engine,
- SharedPtr<Responder> responder,
- SampleCount timestamp,
- bool meta,
- const Raul::URI& subject,
- const Raul::URI& key,
- const Raul::Atom& value);
-
- SetMetadataEvent(
Engine& engine,
SharedPtr<Responder> responder,
SampleCount timestamp,