summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/client')
-rw-r--r--src/libs/client/SigClientInterface.h5
-rw-r--r--src/libs/client/Store.cpp18
-rw-r--r--src/libs/client/Store.h1
3 files changed, 21 insertions, 3 deletions
diff --git a/src/libs/client/SigClientInterface.h b/src/libs/client/SigClientInterface.h
index a28b1a1d..cab1fd78 100644
--- a/src/libs/client/SigClientInterface.h
+++ b/src/libs/client/SigClientInterface.h
@@ -32,12 +32,15 @@ namespace Client {
* This simply emits an sigc signal for every event (eg OSC message) coming from
* the engine. Use Store (which extends this) if you want a nice client-side
* model of the engine.
+ *
+ * The signals here match the calls to ClientInterface exactly. See the
+ * documentation for ClientInterface for meanings of signal parameters.
*/
class SigClientInterface : virtual public Ingen::Shared::ClientInterface, public sigc::trackable
{
public:
- // See the corresponding emitting functions below for parameter meanings
+ // Signal parameters math up directly with ClientInterface calls
sigc::signal<void, int32_t, bool, string> response_sig;
sigc::signal<void> bundle_begin_sig;
diff --git a/src/libs/client/Store.cpp b/src/libs/client/Store.cpp
index 64824b39..f30240fb 100644
--- a/src/libs/client/Store.cpp
+++ b/src/libs/client/Store.cpp
@@ -38,6 +38,7 @@ Store::Store(CountedPtr<SigClientInterface> emitter)
emitter->new_port_sig.connect(sigc::mem_fun(this, &Store::new_port_event));
emitter->patch_enabled_sig.connect(sigc::mem_fun(this, &Store::patch_enabled_event));
emitter->patch_disabled_sig.connect(sigc::mem_fun(this, &Store::patch_disabled_event));
+ emitter->patch_cleared_sig.connect(sigc::mem_fun(this, &Store::patch_cleared_event));
emitter->connection_sig.connect(sigc::mem_fun(this, &Store::connection_event));
emitter->disconnection_sig.connect(sigc::mem_fun(this, &Store::disconnection_event));
emitter->metadata_update_sig.connect(sigc::mem_fun(this, &Store::metadata_update_event));
@@ -264,8 +265,8 @@ Store::destruction_event(const Path& path)
removed.reset();
- cerr << "Store removed object " << path
- << ", count: " << removed.use_count();
+ //cerr << "Store removed object " << path
+ // << ", count: " << removed.use_count();
}
void
@@ -339,6 +340,19 @@ Store::patch_disabled_event(const Path& path)
void
+Store::patch_cleared_event(const Path& path)
+{
+ CountedPtr<PatchModel> patch = PtrCast<PatchModel>(object(path));
+ if (patch) {
+ NodeModelMap children = patch->nodes(); // take a copy
+ for (NodeModelMap::iterator i = children.begin(); i != children.end(); ++i) {
+ destruction_event(i->second->path());
+ }
+ }
+}
+
+
+void
Store::metadata_update_event(const Path& subject_path, const string& predicate, const Atom& value)
{
CountedPtr<ObjectModel> subject = object(subject_path);
diff --git a/src/libs/client/Store.h b/src/libs/client/Store.h
index cd27e5d6..ff617d37 100644
--- a/src/libs/client/Store.h
+++ b/src/libs/client/Store.h
@@ -83,6 +83,7 @@ private:
void new_port_event(const Path& path, const string& data_type, bool is_output);
void patch_enabled_event(const Path& path);
void patch_disabled_event(const Path& path);
+ void patch_cleared_event(const Path& path);
void metadata_update_event(const Path& subject_path, const string& predicate, const Atom& value);
void control_change_event(const Path& port_path, float value);
void connection_event(const Path& src_port_path, const Path& dst_port_path);