summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/client/ClientStore.cpp3
-rw-r--r--src/client/PluginModel.cpp4
-rw-r--r--src/client/PluginModel.hpp5
3 files changed, 8 insertions, 4 deletions
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp
index e4cd604e..0079010c 100644
--- a/src/client/ClientStore.cpp
+++ b/src/client/ClientStore.cpp
@@ -278,8 +278,7 @@ ClientStore::put(const URI& uri, const Resource::Properties& properties)
if (!(is_path || is_meta)) {
const URI& type_uri = properties.find("rdf:type")->second.get_uri();
- SharedPtr<PluginModel> p(new PluginModel(uri, type_uri));
- p->set_properties(properties);
+ SharedPtr<PluginModel> p(new PluginModel(uri, type_uri, properties));
add_plugin(p);
return;
}
diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp
index fd484df4..0627326d 100644
--- a/src/client/PluginModel.cpp
+++ b/src/client/PluginModel.cpp
@@ -38,10 +38,12 @@ SLV2Plugins PluginModel::_slv2_plugins = NULL;
Redland::World* PluginModel::_rdf_world = NULL;
-PluginModel::PluginModel(const URI& uri, const URI& type_uri)
+PluginModel::PluginModel(const URI& uri, const URI& type_uri, const Resource::Properties& properties)
: ResourceImpl(uri)
, _type(type_from_uri(_rdf_world->prefixes().qualify(type_uri.str())))
{
+ add_properties(properties);
+
Glib::Mutex::Lock lock(_rdf_world->mutex());
assert(_rdf_world);
add_property("rdf:type", Raul::Atom(Raul::Atom::URI, this->type_uri()));
diff --git a/src/client/PluginModel.hpp b/src/client/PluginModel.hpp
index 19499be0..bc7271b9 100644
--- a/src/client/PluginModel.hpp
+++ b/src/client/PluginModel.hpp
@@ -46,7 +46,10 @@ class PluginModel : public Ingen::Shared::Plugin
, public Ingen::Shared::ResourceImpl
{
public:
- PluginModel(const Raul::URI& uri, const Raul::URI& type_uri);
+ PluginModel(
+ const Raul::URI& uri,
+ const Raul::URI& type_uri,
+ const Shared::Resource::Properties& properties);
Type type() const { return _type; }