summaryrefslogtreecommitdiffstats
path: root/src/client/ClientStore.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-28 23:11:21 +0000
committerDavid Robillard <d@drobilla.net>2009-05-28 23:11:21 +0000
commitb3c31c94eb572063ec97f24a89e5f7f98d5eae41 (patch)
tree1b8096a810fb56798c69e43e85938f059da18622 /src/client/ClientStore.cpp
parenta1b651326087ffce165635af4fba1c70c16b5b31 (diff)
downloadingen-b3c31c94eb572063ec97f24a89e5f7f98d5eae41.tar.gz
ingen-b3c31c94eb572063ec97f24a89e5f7f98d5eae41.tar.bz2
ingen-b3c31c94eb572063ec97f24a89e5f7f98d5eae41.zip
Working engine->client plugin information communication via HTTP.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2044 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client/ClientStore.cpp')
-rw-r--r--src/client/ClientStore.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp
index cdfeb276..bb501079 100644
--- a/src/client/ClientStore.cpp
+++ b/src/client/ClientStore.cpp
@@ -365,24 +365,26 @@ ClientStore::clear_patch(const Path& path)
void
-ClientStore::set_property(const URI& subject_path, const URI& predicate, const Atom& value)
+ClientStore::set_property(const URI& subject_uri, const URI& predicate, const Atom& value)
{
- SharedPtr<Resource> subject = resource(subject_path);
+ SharedPtr<Resource> subject = resource(subject_uri);
- size_t hash = subject_path.find("#");
+ size_t hash = subject_uri.find("#");
if (!value.is_valid()) {
cerr << "ERROR: property '" << predicate << "' is invalid" << endl;
} else if (subject) {
subject->set_property(predicate, value);
- } else if (hash != string::npos) {
- cerr << "META OBJECT " << subject_path << " PROPERTY " << predicate << endl;
- Path instance_path = string("/") + subject_path.chop_start("#");
+ } else if (subject_uri.substr(0, 6) == "meta:#") {
+ Path instance_path = string("/") + subject_uri.substr(hash + 1);
SharedPtr<ObjectModel> om = PtrCast<ObjectModel>(subject);
if (om)
om->meta().set_property(predicate, value);
} else {
- //add_property_orphan(subject_path, predicate, value);
- cerr << "WARNING: property '" << predicate << "' for unknown object " << subject_path << endl;
+ SharedPtr<PluginModel> plugin = this->plugin(subject_uri);
+ if (plugin)
+ plugin->set_property(predicate, value);
+ else
+ cerr << "WARNING: property '" << predicate << "' for unknown object " << subject_uri << endl;
}
}