summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-28 20:38:11 +0000
committerDavid Robillard <d@drobilla.net>2009-05-28 20:38:11 +0000
commit64a40ac2323cda14ecbce4e41618d6db32fd3573 (patch)
tree58559bc1ee6384f432f439fec45b29fd442a1595 /src/engine
parentfeb1df3476eb29fe2469bfda8726a11c6b9a4d9d (diff)
downloadingen-64a40ac2323cda14ecbce4e41618d6db32fd3573.tar.gz
ingen-64a40ac2323cda14ecbce4e41618d6db32fd3573.tar.bz2
ingen-64a40ac2323cda14ecbce4e41618d6db32fd3573.zip
Remove vestigial request_variable interface.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2033 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/OSCEngineReceiver.cpp21
-rw-r--r--src/engine/OSCEngineReceiver.hpp5
-rw-r--r--src/engine/QueuedEngineInterface.cpp14
-rw-r--r--src/engine/QueuedEngineInterface.hpp1
4 files changed, 17 insertions, 24 deletions
diff --git a/src/engine/OSCEngineReceiver.cpp b/src/engine/OSCEngineReceiver.cpp
index 912a2969..c1c1feac 100644
--- a/src/engine/OSCEngineReceiver.cpp
+++ b/src/engine/OSCEngineReceiver.cpp
@@ -103,11 +103,10 @@ OSCEngineReceiver::OSCEngineReceiver(Engine& engine, size_t queue_size, uint16_t
lo_server_add_method(_server, "/ingen/note_off", "isi", note_off_cb, this);
lo_server_add_method(_server, "/ingen/all_notes_off", "isi", all_notes_off_cb, this);
lo_server_add_method(_server, "/ingen/midi_learn", "is", midi_learn_cb, this);
- lo_server_add_method(_server, "/ingen/set_variable", NULL, variable_set_cb, this);
- lo_server_add_method(_server, "/ingen/set_property", NULL, property_set_cb, this);
+ lo_server_add_method(_server, "/ingen/set_property", NULL, set_property_cb, this);
// Queries
- lo_server_add_method(_server, "/ingen/request_variable", "iss", variable_get_cb, this);
+ lo_server_add_method(_server, "/ingen/request_property", "iss", request_property_cb, this);
lo_server_add_method(_server, "/ingen/request_object", "is", request_object_cb, this);
lo_server_add_method(_server, "/ingen/request_plugins", "i", request_plugins_cb, this);
lo_server_add_method(_server, "/ingen/request_all_objects", "i", request_all_objects_cb, this);
@@ -644,14 +643,14 @@ OSCEngineReceiver::_midi_learn_cb(const char* path, const char* types, lo_arg**
/** \page engine_osc_namespace
* <h2>/ingen/set_property</h2>
* \arg \b response-id (integer)
- * \arg \b object-path (string) - Full path of object to associate variable with
+ * \arg \b object-path (string) - Full path of object to associate property with
* \arg \b key (string) - URI/QName for predicate of this property (e.g. "ingen:enabled")
* \arg \b value (string) - Value of property
*
* Set a property on a graph object.
*/
int
-OSCEngineReceiver::_property_set_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_set_property_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
if (argc != 4 || types[0] != 'i' || types[1] != 's' || types[2] != 's')
return 1;
@@ -667,20 +666,20 @@ OSCEngineReceiver::_property_set_cb(const char* path, const char* types, lo_arg*
/** \page engine_osc_namespace
- * <h2>/ingen/request_variable</h2>
+ * <h2>/ingen/request_property</h2>
* \arg \b response-id (integer)
- * \arg \b object-path (string) - Full path of object variable is associated with
- * \arg \b key (string) - Key (index) for piece of variable
+ * \arg \b uri (string) - Subject
+ * \arg \b key (string) - Predicate
*
- * Request the value of a variable on a graph object.
+ * Request the value of a property on an object.
*/
int
-OSCEngineReceiver::_variable_get_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_request_property_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* object_path = &argv[1]->s;
const char* key = &argv[2]->s;
- request_variable(object_path, key);
+ request_property(object_path, key);
return 0;
}
diff --git a/src/engine/OSCEngineReceiver.hpp b/src/engine/OSCEngineReceiver.hpp
index a4d25c29..dc450f18 100644
--- a/src/engine/OSCEngineReceiver.hpp
+++ b/src/engine/OSCEngineReceiver.hpp
@@ -101,11 +101,10 @@ private:
LO_HANDLER(note_off);
LO_HANDLER(all_notes_off);
LO_HANDLER(midi_learn);
- LO_HANDLER(variable_get);
- LO_HANDLER(variable_set);
+ LO_HANDLER(set_property);
LO_HANDLER(property_set);
LO_HANDLER(request_object);
- LO_HANDLER(request_variable);
+ LO_HANDLER(request_property);
LO_HANDLER(request_plugins);
LO_HANDLER(request_all_objects);
diff --git a/src/engine/QueuedEngineInterface.cpp b/src/engine/QueuedEngineInterface.cpp
index 3608ceaf..1ac9a1f1 100644
--- a/src/engine/QueuedEngineInterface.cpp
+++ b/src/engine/QueuedEngineInterface.cpp
@@ -275,16 +275,12 @@ QueuedEngineInterface::request_object(const URI& uri)
void
-QueuedEngineInterface::request_variable(const URI& object_path, const URI& key)
+QueuedEngineInterface::request_property(const URI& uri, const URI& key)
{
- push_queued(new RequestMetadataEvent(_engine, _responder, now(), false, object_path, key));
-}
-
-
-void
-QueuedEngineInterface::request_property(const URI& object_path, const URI& key)
-{
- push_queued(new RequestMetadataEvent(_engine, _responder, now(), true, object_path, key));
+ size_t hash = uri.find("#");
+ bool meta = (hash != string::npos);
+ Path path = meta ? (string("/") + path.chop_start("/")) : uri.str();
+ push_queued(new RequestMetadataEvent(_engine, _responder, now(), meta, path, key));
}
diff --git a/src/engine/QueuedEngineInterface.hpp b/src/engine/QueuedEngineInterface.hpp
index b4fb8912..556c8049 100644
--- a/src/engine/QueuedEngineInterface.hpp
+++ b/src/engine/QueuedEngineInterface.hpp
@@ -109,7 +109,6 @@ public:
virtual void ping();
virtual void request_object(const Raul::URI& uri);
- virtual void request_variable(const Raul::URI& object_path, const Raul::URI& key);
virtual void request_property(const Raul::URI& object_path, const Raul::URI& key);
virtual void request_plugins();
virtual void request_all_objects();