From e5675ebfeb93175e16762d0a078bd51d15d05f63 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 13 Sep 2006 06:11:25 +0000 Subject: Heavy-duty redesign of client library and GUI (now fully signal driven with clean Model/View separation). Smarter, centralized window creation/management (should make window unification easy (panes?)). Typed metadata system, no more fugly string conversion of floats. Supports OSC fundamental types string, int, float, blob for now (though blob isn't working over the wire yet). git-svn-id: http://svn.drobilla.net/lad/ingen@131 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/events/DSSIConfigureEvent.cpp | 2 +- src/libs/engine/events/RequestMetadataEvent.cpp | 5 ++--- src/libs/engine/events/RequestMetadataEvent.h | 6 +++--- src/libs/engine/events/SetMetadataEvent.cpp | 2 +- src/libs/engine/events/SetMetadataEvent.h | 9 +++++---- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/libs/engine/events') diff --git a/src/libs/engine/events/DSSIConfigureEvent.cpp b/src/libs/engine/events/DSSIConfigureEvent.cpp index fb9dc727..9a26de0c 100644 --- a/src/libs/engine/events/DSSIConfigureEvent.cpp +++ b/src/libs/engine/events/DSSIConfigureEvent.cpp @@ -64,7 +64,7 @@ DSSIConfigureEvent::post_process() } else { string key = "dssi-configure--"; key += m_key; - _engine.broadcaster()->send_metadata_update(m_node_path, key, m_val); + _engine.broadcaster()->send_metadata_update(m_node_path, key, Atom(m_val.c_str())); } } diff --git a/src/libs/engine/events/RequestMetadataEvent.cpp b/src/libs/engine/events/RequestMetadataEvent.cpp index f6f1bdf9..aaea89c6 100644 --- a/src/libs/engine/events/RequestMetadataEvent.cpp +++ b/src/libs/engine/events/RequestMetadataEvent.cpp @@ -31,7 +31,6 @@ RequestMetadataEvent::RequestMetadataEvent(Engine& engine, CountedPtr : QueuedEvent(engine, responder, timestamp), m_path(node_path), m_key(key), - m_value(""), m_object(NULL), m_client(CountedPtr()) { @@ -61,8 +60,8 @@ void RequestMetadataEvent::post_process() { if (m_client) { - if (m_value == "") { - string msg = "Unable to find object "; + if (!m_object) { + string msg = "Unable to find metadata subject "; msg += m_path; _responder->respond_error(msg); } else { diff --git a/src/libs/engine/events/RequestMetadataEvent.h b/src/libs/engine/events/RequestMetadataEvent.h index 4f99e023..f4296ac2 100644 --- a/src/libs/engine/events/RequestMetadataEvent.h +++ b/src/libs/engine/events/RequestMetadataEvent.h @@ -19,7 +19,7 @@ #include #include "QueuedEvent.h" - +#include "util/Atom.h" using std::string; namespace Ingen { @@ -45,8 +45,8 @@ public: private: string m_path; string m_key; - string m_value; - GraphObject* m_object; + Atom m_value; + GraphObject* m_object; CountedPtr m_client; }; diff --git a/src/libs/engine/events/SetMetadataEvent.cpp b/src/libs/engine/events/SetMetadataEvent.cpp index db8e0118..c4937df5 100644 --- a/src/libs/engine/events/SetMetadataEvent.cpp +++ b/src/libs/engine/events/SetMetadataEvent.cpp @@ -27,7 +27,7 @@ using std::string; namespace Ingen { -SetMetadataEvent::SetMetadataEvent(Engine& engine, CountedPtr responder, SampleCount timestamp, const string& path, const string& key, const string& value) +SetMetadataEvent::SetMetadataEvent(Engine& engine, CountedPtr responder, SampleCount timestamp, const string& path, const string& key, const Atom& value) : QueuedEvent(engine, responder, timestamp), m_path(path), m_key(key), diff --git a/src/libs/engine/events/SetMetadataEvent.h b/src/libs/engine/events/SetMetadataEvent.h index 855aeb62..b78f2502 100644 --- a/src/libs/engine/events/SetMetadataEvent.h +++ b/src/libs/engine/events/SetMetadataEvent.h @@ -19,6 +19,7 @@ #include #include "QueuedEvent.h" +#include "util/Atom.h" using std::string; @@ -34,16 +35,16 @@ class GraphObject; class SetMetadataEvent : public QueuedEvent { public: - SetMetadataEvent(Engine& engine, CountedPtr responder, SampleCount timestamp, const string& path, const string& key, const string& value); + SetMetadataEvent(Engine& engine, CountedPtr responder, SampleCount timestamp, const string& path, const string& key, const Atom& value); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); void post_process(); private: - string m_path; - string m_key; - string m_value; + string m_path; + string m_key; + Atom m_value; GraphObject* m_object; }; -- cgit v1.2.1