summaryrefslogtreecommitdiffstats
path: root/src/libs/client/ClientStore.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-08-17 03:10:58 +0000
committerDavid Robillard <d@drobilla.net>2008-08-17 03:10:58 +0000
commitd6823fa9b29bcff74ca180e6d389d8a21cf88d1f (patch)
treeb79dcfd907f83f035d657964d26b578c85ef0de2 /src/libs/client/ClientStore.cpp
parent694b31089c8060fc6b908b146b12c0e340d004c7 (diff)
downloadingen-d6823fa9b29bcff74ca180e6d389d8a21cf88d1f.tar.gz
ingen-d6823fa9b29bcff74ca180e6d389d8a21cf88d1f.tar.bz2
ingen-d6823fa9b29bcff74ca180e6d389d8a21cf88d1f.zip
There!
Loader uses only CommonInterface and is now able to parse into a client or engine. Proper OSC serialisation of boolean atoms. Remove patch_enabled and patch_disabled calls/signals/etc in favour of new generic "property" mechanism (courtesy of which much more killed API is to come). git-svn-id: http://svn.drobilla.net/lad/ingen@1410 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client/ClientStore.cpp')
-rw-r--r--src/libs/client/ClientStore.cpp37
1 files changed, 17 insertions, 20 deletions
diff --git a/src/libs/client/ClientStore.cpp b/src/libs/client/ClientStore.cpp
index 39908eb5..1fb00eea 100644
--- a/src/libs/client/ClientStore.cpp
+++ b/src/libs/client/ClientStore.cpp
@@ -43,13 +43,12 @@ ClientStore::ClientStore(SharedPtr<EngineInterface> engine, SharedPtr<SigClientI
emitter->signal_new_node.connect(sigc::mem_fun(this, &ClientStore::new_node_event));
emitter->signal_new_port.connect(sigc::mem_fun(this, &ClientStore::new_port_event));
emitter->signal_polyphonic.connect(sigc::mem_fun(this, &ClientStore::polyphonic_event));
- emitter->signal_patch_enabled.connect(sigc::mem_fun(this, &ClientStore::patch_enabled_event));
- emitter->signal_patch_disabled.connect(sigc::mem_fun(this, &ClientStore::patch_disabled_event));
emitter->signal_patch_polyphony.connect(sigc::mem_fun(this, &ClientStore::patch_polyphony_event));
emitter->signal_patch_cleared.connect(sigc::mem_fun(this, &ClientStore::patch_cleared_event));
emitter->signal_connection.connect(sigc::mem_fun(this, &ClientStore::connection_event));
emitter->signal_disconnection.connect(sigc::mem_fun(this, &ClientStore::disconnection_event));
emitter->signal_variable_change.connect(sigc::mem_fun(this, &ClientStore::variable_change_event));
+ emitter->signal_property_change.connect(sigc::mem_fun(this, &ClientStore::property_change_event));
emitter->signal_port_value.connect(sigc::mem_fun(this, &ClientStore::port_value_event));
emitter->signal_port_activity.connect(sigc::mem_fun(this, &ClientStore::port_activity_event));
}
@@ -453,24 +452,6 @@ ClientStore::polyphonic_event(const Path& path, bool polyphonic)
void
-ClientStore::patch_enabled_event(const Path& path)
-{
- SharedPtr<PatchModel> patch = PtrCast<PatchModel>(object(path));
- if (patch)
- patch->enable();
-}
-
-
-void
-ClientStore::patch_disabled_event(const Path& path)
-{
- SharedPtr<PatchModel> patch = PtrCast<PatchModel>(object(path));
- if (patch)
- patch->disable();
-}
-
-
-void
ClientStore::patch_polyphony_event(const Path& path, uint32_t poly)
{
SharedPtr<PatchModel> patch = PtrCast<PatchModel>(object(path));
@@ -522,6 +503,22 @@ ClientStore::variable_change_event(const Path& subject_path, const string& predi
}
}
+
+void
+ClientStore::property_change_event(const Path& subject_path, const string& predicate, const Atom& value)
+{
+ SharedPtr<ObjectModel> subject = object(subject_path);
+
+ if (!value.is_valid()) {
+ cerr << "ERROR: property '" << predicate << "' has no type" << endl;
+ } else if (subject) {
+ subject->set_property(predicate, value);
+ } else {
+ cerr << "WARNING: property for unknown object " << subject_path
+ << " lost. Client must refresh!" << endl;
+ }
+}
+
void
ClientStore::port_value_event(const Path& port_path, const Raul::Atom& value)