summaryrefslogtreecommitdiffstats
path: root/src
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
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')
-rw-r--r--src/client/HTTPEngineSender.cpp6
-rw-r--r--src/client/HTTPEngineSender.hpp1
-rw-r--r--src/client/OSCEngineSender.cpp11
-rw-r--r--src/client/OSCEngineSender.hpp1
-rw-r--r--src/common/interface/EngineInterface.hpp3
-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
-rw-r--r--src/gui/NodeControlWindow.cpp2
10 files changed, 18 insertions, 47 deletions
diff --git a/src/client/HTTPEngineSender.cpp b/src/client/HTTPEngineSender.cpp
index 0a9428e5..41b87524 100644
--- a/src/client/HTTPEngineSender.cpp
+++ b/src/client/HTTPEngineSender.cpp
@@ -196,12 +196,6 @@ HTTPEngineSender::request_object(const URI& uri)
void
-HTTPEngineSender::request_variable(const URI& object_path, const URI& key)
-{
-}
-
-
-void
HTTPEngineSender::request_property(const URI& object_path, const URI& key)
{
}
diff --git a/src/client/HTTPEngineSender.hpp b/src/client/HTTPEngineSender.hpp
index 7ec4fac8..26a2addd 100644
--- a/src/client/HTTPEngineSender.hpp
+++ b/src/client/HTTPEngineSender.hpp
@@ -110,7 +110,6 @@ public:
// Requests //
void ping();
void request_object(const Raul::URI& uri);
- void request_variable(const Raul::URI& path, const Raul::URI& key);
void request_property(const Raul::URI& path, const Raul::URI& key);
void request_plugins();
void request_all_objects();
diff --git a/src/client/OSCEngineSender.cpp b/src/client/OSCEngineSender.cpp
index bcc39430..dfec86fe 100644
--- a/src/client/OSCEngineSender.cpp
+++ b/src/client/OSCEngineSender.cpp
@@ -290,17 +290,6 @@ OSCEngineSender::request_object(const URI& uri)
void
-OSCEngineSender::request_variable(const URI& object_path, const URI& key)
-{
- send("/ingen/request_variable", "iss",
- next_id(),
- object_path.c_str(),
- key.c_str(),
- LO_ARGS_END);
-}
-
-
-void
OSCEngineSender::request_property(const URI& object_path, const URI& key)
{
send("/ingen/request_property", "iss",
diff --git a/src/client/OSCEngineSender.hpp b/src/client/OSCEngineSender.hpp
index 3f11f96c..becf1ccb 100644
--- a/src/client/OSCEngineSender.hpp
+++ b/src/client/OSCEngineSender.hpp
@@ -113,7 +113,6 @@ public:
// Requests //
void ping();
void request_object(const Raul::URI& uri);
- void request_variable(const Raul::URI& path, const Raul::URI& key);
void request_property(const Raul::URI& path, const Raul::URI& key);
void request_plugins();
void request_all_objects();
diff --git a/src/common/interface/EngineInterface.hpp b/src/common/interface/EngineInterface.hpp
index b8852a91..e22ebfb3 100644
--- a/src/common/interface/EngineInterface.hpp
+++ b/src/common/interface/EngineInterface.hpp
@@ -66,9 +66,6 @@ public:
virtual void request_object(const Raul::URI& uri) = 0;
- virtual void request_variable(const Raul::URI& path,
- const Raul::URI& key) = 0;
-
virtual void request_property(const Raul::URI& path,
const Raul::URI& key) = 0;
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();
diff --git a/src/gui/NodeControlWindow.cpp b/src/gui/NodeControlWindow.cpp
index cd381f4b..167d7255 100644
--- a/src/gui/NodeControlWindow.cpp
+++ b/src/gui/NodeControlWindow.cpp
@@ -117,7 +117,7 @@ NodeControlWindow::on_show()
for (NodeModel::Ports::const_iterator i = _node->ports().begin();
i != _node->ports().end(); ++i)
if ((*i)->type().is_control() && (*i)->is_input())
- App::instance().engine()->request_variable((*i)->path(), "ingen:value");
+ App::instance().engine()->request_property((*i)->path(), "ingen:value");
if (_position_stored)
move(_x, _y);