summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-09-08 06:23:25 +0000
committerDavid Robillard <d@drobilla.net>2006-09-08 06:23:25 +0000
commit43d51948ccae71b8f0a1c1710e25cf36da8d7d7c (patch)
treef81e18174cf0a798a908afb954f6595d6c0b72ab /src/libs/client
parent48f87f1f1649fb7e169fdaac2cd38370e8a4a1fa (diff)
downloadingen-43d51948ccae71b8f0a1c1710e25cf36da8d7d7c.tar.gz
ingen-43d51948ccae71b8f0a1c1710e25cf36da8d7d7c.tar.bz2
ingen-43d51948ccae71b8f0a1c1710e25cf36da8d7d7c.zip
Renamed communications classes for consistency.
Removed engine dependency on OSC (mostly). git-svn-id: http://svn.drobilla.net/lad/ingen@120 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client')
-rw-r--r--src/libs/client/Makefile.am8
-rw-r--r--src/libs/client/ModelEngineInterface.h1
-rw-r--r--src/libs/client/OSCClientReceiver.cpp (renamed from src/libs/client/OSCListener.cpp)62
-rw-r--r--src/libs/client/OSCClientReceiver.h (renamed from src/libs/client/OSCListener.h)19
-rw-r--r--src/libs/client/OSCEngineSender.cpp (renamed from src/libs/client/OSCEngineInterface.cpp)60
-rw-r--r--src/libs/client/OSCEngineSender.h (renamed from src/libs/client/OSCEngineInterface.h)12
-rw-r--r--src/libs/client/OSCModelEngineInterface.cpp4
-rw-r--r--src/libs/client/OSCModelEngineInterface.h13
-rw-r--r--src/libs/client/Store.cpp2
9 files changed, 86 insertions, 95 deletions
diff --git a/src/libs/client/Makefile.am b/src/libs/client/Makefile.am
index 01cff357..f8a9a1cf 100644
--- a/src/libs/client/Makefile.am
+++ b/src/libs/client/Makefile.am
@@ -7,12 +7,12 @@ libomclient_la_CXXFLAGS = -I$(top_srcdir)/src/common -DPKGDATADIR=\"$(pkgdatadir
libomclient_la_SOURCES = \
ClientInterface.h \
- OSCEngineInterface.h \
- OSCEngineInterface.cpp \
+ OSCEngineSender.h \
+ OSCEngineSender.cpp \
OSCModelEngineInterface.h \
OSCModelEngineInterface.cpp \
- OSCListener.h \
- OSCListener.cpp \
+ OSCClientReceiver.h \
+ OSCClientReceiver.cpp \
SigClientInterface.h \
DirectSigClientInterface.h \
ThreadedSigClientInterface.h \
diff --git a/src/libs/client/ModelEngineInterface.h b/src/libs/client/ModelEngineInterface.h
index 763cdc69..2bc5db14 100644
--- a/src/libs/client/ModelEngineInterface.h
+++ b/src/libs/client/ModelEngineInterface.h
@@ -31,7 +31,6 @@ namespace Client {
class NodeModel;
class PresetModel;
class PatchModel;
-class OSCListener;
class ModelClientInterface;
diff --git a/src/libs/client/OSCListener.cpp b/src/libs/client/OSCClientReceiver.cpp
index c63ffd85..56d8ea14 100644
--- a/src/libs/client/OSCListener.cpp
+++ b/src/libs/client/OSCClientReceiver.cpp
@@ -14,7 +14,7 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "OSCListener.h"
+#include "OSCClientReceiver.h"
//#include "NodeModel.h"
//#include "PluginModel.h"
#include <list>
@@ -27,10 +27,10 @@ namespace Ingen {
namespace Client {
-/** Construct a OSCListener with a user-provided ModelClientInterface object for notification
+/** Construct a OSCClientReceiver with a user-provided ModelClientInterface object for notification
* of engine events.
*/
-OSCListener::OSCListener(int listen_port)
+OSCClientReceiver::OSCClientReceiver(int listen_port)
: _listen_port(listen_port),
_st(NULL)//,
// _receiving_node(false),
@@ -42,14 +42,14 @@ OSCListener::OSCListener(int listen_port)
}
-OSCListener::~OSCListener()
+OSCClientReceiver::~OSCClientReceiver()
{
stop();
}
void
-OSCListener::start()
+OSCClientReceiver::start()
{
if (_st != NULL)
return;
@@ -64,10 +64,10 @@ OSCListener::start()
}
if (_st == NULL) {
- cerr << "[OSCListener] Could not start OSC listener. Aborting." << endl;
+ cerr << "[OSCClientReceiver] Could not start OSC listener. Aborting." << endl;
exit(EXIT_FAILURE);
} else {
- cout << "[OSCListener] Started OSC listener on port " << lo_server_thread_get_port(_st) << endl;
+ cout << "[OSCClientReceiver] Started OSC listener on port " << lo_server_thread_get_port(_st) << endl;
}
// FIXME
@@ -86,7 +86,7 @@ OSCListener::start()
void
-OSCListener::stop()
+OSCClientReceiver::stop()
{
if (_st != NULL) {
//unregister_client();
@@ -97,7 +97,7 @@ OSCListener::stop()
int
-OSCListener::generic_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data, void* user_data)
+OSCClientReceiver::generic_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data, void* user_data)
{
printf("[OSCMsg] %s (%s)\t", path, types);
@@ -119,7 +119,7 @@ OSCListener::generic_cb(const char* path, const char* types, lo_arg** argv, int
void
-OSCListener::error_cb(int num, const char* msg, const char* path)
+OSCClientReceiver::error_cb(int num, const char* msg, const char* path)
{
cerr << "Got error from server: " << msg << endl;
}
@@ -127,7 +127,7 @@ OSCListener::error_cb(int num, const char* msg, const char* path)
int
-OSCListener::unknown_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data, void* user_data)
+OSCClientReceiver::unknown_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data, void* user_data)
{
string msg = "Received unknown OSC message: ";
msg += path;
@@ -139,7 +139,7 @@ OSCListener::unknown_cb(const char* path, const char* types, lo_arg** argv, int
void
-OSCListener::setup_callbacks()
+OSCClientReceiver::setup_callbacks()
{
lo_server_thread_add_method(_st, "/om/num_plugins", "i", num_plugins_cb, this);
lo_server_thread_add_method(_st, "/om/plugin", "sss", plugin_cb, this);
@@ -163,7 +163,7 @@ OSCListener::setup_callbacks()
/** Catches errors that aren't a direct result of a client request.
*/
int
-OSCListener::m_error_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::m_error_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
cerr << "ERROR: " << argv[0]->s << endl;
// FIXME
@@ -173,7 +173,7 @@ OSCListener::m_error_cb(const char* path, const char* types, lo_arg** argv, int
int
-OSCListener::m_new_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::m_new_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
new_patch(&argv[0]->s, argv[1]->i); // path, poly
return 0;
@@ -181,7 +181,7 @@ OSCListener::m_new_patch_cb(const char* path, const char* types, lo_arg** argv,
int
-OSCListener::m_destroyed_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::m_destroyed_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
object_destroyed((const char*)&argv[0]->s);
return 0;
@@ -189,7 +189,7 @@ OSCListener::m_destroyed_cb(const char* path, const char* types, lo_arg** argv,
int
-OSCListener::m_patch_enabled_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::m_patch_enabled_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
patch_enabled((const char*)&argv[0]->s);
return 0;
@@ -197,7 +197,7 @@ OSCListener::m_patch_enabled_cb(const char* path, const char* types, lo_arg** ar
int
-OSCListener::m_patch_disabled_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::m_patch_disabled_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
patch_disabled((const char*)&argv[0]->s);
return 0;
@@ -205,7 +205,7 @@ OSCListener::m_patch_disabled_cb(const char* path, const char* types, lo_arg** a
int
-OSCListener::m_patch_cleared_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::m_patch_cleared_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
patch_cleared((const char*)&argv[0]->s);
return 0;
@@ -213,7 +213,7 @@ OSCListener::m_patch_cleared_cb(const char* path, const char* types, lo_arg** ar
int
-OSCListener::m_object_renamed_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::m_object_renamed_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
object_renamed((const char*)&argv[0]->s, (const char*)&argv[1]->s);
return 0;
@@ -221,7 +221,7 @@ OSCListener::m_object_renamed_cb(const char* path, const char* types, lo_arg** a
int
-OSCListener::m_connection_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::m_connection_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* const src_port_path = &argv[0]->s;
const char* const dst_port_path = &argv[1]->s;
@@ -233,7 +233,7 @@ OSCListener::m_connection_cb(const char* path, const char* types, lo_arg** argv,
int
-OSCListener::m_disconnection_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::m_disconnection_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* src_port_path = &argv[0]->s;
const char* dst_port_path = &argv[1]->s;
@@ -247,7 +247,7 @@ OSCListener::m_disconnection_cb(const char* path, const char* types, lo_arg** ar
/** Notification of a new node creation.
*/
int
-OSCListener::m_new_node_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::m_new_node_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* type = &argv[0]->s;
const char* uri = &argv[1]->s;
@@ -274,7 +274,7 @@ OSCListener::m_new_node_cb(const char* path, const char* types, lo_arg** argv, i
/** Notification of a new port creation.
*/
int
-OSCListener::m_new_port_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::m_new_port_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* port_path = &argv[0]->s;
const char* type = &argv[1]->s;
@@ -291,13 +291,13 @@ OSCListener::m_new_port_cb(const char* path, const char* types, lo_arg** argv, i
if (!strcmp(type, "AUDIO")) ptype = PortModel::AUDIO;
else if (!strcmp(type, "CONTROL")) ptype = PortModel::CONTROL;
else if (!strcmp(type, "MIDI")) ptype = PortModel::MIDI;
- else cerr << "[OSCListener] WARNING: Unknown port type received (" << type << ")" << endl;
+ else cerr << "[OSCClientReceiver] WARNING: Unknown port type received (" << type << ")" << endl;
#if 0
PortModel::Direction pdir = PortModel::INPUT;
if (!strcmp(direction, "INPUT")) pdir = PortModel::INPUT;
else if (!strcmp(direction, "OUTPUT")) pdir = PortModel::OUTPUT;
- else cerr << "[OSCListener] WARNING: Unknown port direction received (" << direction << ")" << endl;
+ else cerr << "[OSCClientReceiver] WARNING: Unknown port direction received (" << direction << ")" << endl;
#endif
PortModel::Direction pdir = is_output ? PortModel::OUTPUT : PortModel::INPUT;
@@ -334,7 +334,7 @@ OSCListener::m_new_port_cb(const char* path, const char* types, lo_arg** argv, i
/** Notification of a new or updated piece of metadata.
*/
int
-OSCListener::m_metadata_update_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::m_metadata_update_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* obj_path = &argv[0]->s;
const char* key = &argv[1]->s;
@@ -347,7 +347,7 @@ OSCListener::m_metadata_update_cb(const char* path, const char* types, lo_arg**
int
-OSCListener::m_control_change_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::m_control_change_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* const port_path = &argv[0]->s;
const float value = argv[1]->f;
@@ -362,7 +362,7 @@ OSCListener::m_control_change_cb(const char* path, const char* types, lo_arg** a
* to a /om/send_plugins
*/
int
-OSCListener::m_num_plugins_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::m_num_plugins_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
/** Not worth it implementing a ModelClientInterface callback for this (?)
* Or I'm just lazy. FIXME? */
@@ -375,7 +375,7 @@ OSCListener::m_num_plugins_cb(const char* path, const char* types, lo_arg** argv
/** A plugin info response from the server, in response to a /send_plugins
*/
int
-OSCListener::m_plugin_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::m_plugin_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
assert(argc == 3 && !strcmp(types, "sss"));
new_plugin(&argv[0]->s, &argv[1]->s, &argv[2]->s); // type, uri
@@ -385,7 +385,7 @@ OSCListener::m_plugin_cb(const char* path, const char* types, lo_arg** argv, int
int
-OSCListener::m_program_add_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::m_program_add_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* node_path = &argv[0]->s;
int32_t bank = argv[1]->i;
@@ -399,7 +399,7 @@ OSCListener::m_program_add_cb(const char* path, const char* types, lo_arg** argv
int
-OSCListener::m_program_remove_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::m_program_remove_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* node_path = &argv[0]->s;
int32_t bank = argv[1]->i;
diff --git a/src/libs/client/OSCListener.h b/src/libs/client/OSCClientReceiver.h
index 3e9d165d..60fa9495 100644
--- a/src/libs/client/OSCListener.h
+++ b/src/libs/client/OSCClientReceiver.h
@@ -14,9 +14,8 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
-#ifndef OSCLISTENER_H
-#define OSCLISTENER_H
+#ifndef OSCCLIENTRECEIVER_H
+#define OSCCLIENTRECEIVER_H
#include <cstdlib>
#include <lo/lo.h>
@@ -39,7 +38,7 @@ namespace Client {
#define LO_HANDLER(name) \
int m_##name##_cb (LO_HANDLER_ARGS);\
inline static int name##_cb(LO_HANDLER_ARGS, void* osc_listener)\
-{ return ((OSCListener*)osc_listener)->m_##name##_cb(path, types, argv, argc, msg); }
+{ return ((OSCClientReceiver*)osc_listener)->m_##name##_cb(path, types, argv, argc, msg); }
/** Callbacks for "notification band" OSC messages.
@@ -55,11 +54,11 @@ inline static int name##_cb(LO_HANDLER_ARGS, void* osc_listener)\
*
* \ingroup IngenClient
*/
-class OSCListener : virtual public Ingen::Shared::ClientInterface
+class OSCClientReceiver : virtual public Ingen::Shared::ClientInterface
{
public:
- OSCListener(int listen_port);
- ~OSCListener();
+ OSCClientReceiver(int listen_port);
+ ~OSCClientReceiver();
void start();
void stop();
@@ -69,8 +68,8 @@ public:
private:
// Prevent copies
- OSCListener(const OSCListener& copy);
- OSCListener& operator=(const OSCListener& copy);
+ OSCClientReceiver(const OSCClientReceiver& copy);
+ OSCClientReceiver& operator=(const OSCClientReceiver& copy);
void setup_callbacks();
@@ -118,4 +117,4 @@ private:
} // namespace Ingen
-#endif // OSCLISTENER_H
+#endif // OSCCLIENTRECEIVER_H
diff --git a/src/libs/client/OSCEngineInterface.cpp b/src/libs/client/OSCEngineSender.cpp
index b747e2e4..cc70dc8e 100644
--- a/src/libs/client/OSCEngineInterface.cpp
+++ b/src/libs/client/OSCEngineSender.cpp
@@ -14,7 +14,7 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "OSCEngineInterface.h"
+#include "OSCEngineSender.h"
#include "interface/ClientKey.h"
namespace Ingen {
@@ -24,7 +24,7 @@ namespace Client {
* from the most recently created server, so create the OSC listener before
* this to have it all happen on the same port. Yeah, this is a big magic :/
*/
-OSCEngineInterface::OSCEngineInterface(const string& engine_url)
+OSCEngineSender::OSCEngineSender(const string& engine_url)
: _engine_url(engine_url)
, _engine_addr(lo_address_new_from_url(engine_url.c_str()))
, _id(0)
@@ -32,7 +32,7 @@ OSCEngineInterface::OSCEngineInterface(const string& engine_url)
}
-OSCEngineInterface::~OSCEngineInterface()
+OSCEngineSender::~OSCEngineSender()
{
lo_address_free(_engine_addr);
}
@@ -48,7 +48,7 @@ OSCEngineInterface::~OSCEngineInterface()
* traversal. It is a parameter to remain compatible with EngineInterface.
*/
void
-OSCEngineInterface::register_client(ClientKey key, CountedPtr<ClientInterface> client)
+OSCEngineSender::register_client(ClientKey key, CountedPtr<ClientInterface> client)
{
// FIXME: use parameters.. er, somehow.
assert(_engine_addr);
@@ -57,7 +57,7 @@ OSCEngineInterface::register_client(ClientKey key, CountedPtr<ClientInterface> c
void
-OSCEngineInterface::unregister_client(ClientKey key)
+OSCEngineSender::unregister_client(ClientKey key)
{
assert(_engine_addr);
lo_send(_engine_addr, "/om/engine/unregister_client", "i", next_id());
@@ -67,7 +67,7 @@ OSCEngineInterface::unregister_client(ClientKey key)
// Engine commands
void
-OSCEngineInterface::load_plugins()
+OSCEngineSender::load_plugins()
{
assert(_engine_addr);
lo_send(_engine_addr, "/om/engine/load_plugins", "i", next_id());
@@ -75,7 +75,7 @@ OSCEngineInterface::load_plugins()
void
-OSCEngineInterface::activate()
+OSCEngineSender::activate()
{
assert(_engine_addr);
lo_send(_engine_addr, "/om/engine/activate", "i", next_id());
@@ -83,7 +83,7 @@ OSCEngineInterface::activate()
void
-OSCEngineInterface::deactivate()
+OSCEngineSender::deactivate()
{
assert(_engine_addr);
lo_send(_engine_addr, "/om/engine/deactivate", "i", next_id());
@@ -91,7 +91,7 @@ OSCEngineInterface::deactivate()
void
-OSCEngineInterface::quit()
+OSCEngineSender::quit()
{
assert(_engine_addr);
lo_send(_engine_addr, "/om/engine/quit", "i", next_id());
@@ -102,7 +102,7 @@ OSCEngineInterface::quit()
// Object commands
void
-OSCEngineInterface::create_patch(const string& path,
+OSCEngineSender::create_patch(const string& path,
uint32_t poly)
{
assert(_engine_addr);
@@ -114,7 +114,7 @@ OSCEngineInterface::create_patch(const string& path,
void
-OSCEngineInterface::create_port(const string& path,
+OSCEngineSender::create_port(const string& path,
const string& data_type,
bool is_output)
{
@@ -128,7 +128,7 @@ OSCEngineInterface::create_port(const string& path,
void
-OSCEngineInterface::create_node(const string& path,
+OSCEngineSender::create_node(const string& path,
const string& plugin_type,
const string& plugin_uri,
bool polyphonic)
@@ -144,7 +144,7 @@ OSCEngineInterface::create_node(const string& path,
void
-OSCEngineInterface::rename(const string& old_path,
+OSCEngineSender::rename(const string& old_path,
const string& new_name)
{
assert(_engine_addr);
@@ -156,7 +156,7 @@ OSCEngineInterface::rename(const string& old_path,
void
-OSCEngineInterface::destroy(const string& path)
+OSCEngineSender::destroy(const string& path)
{
assert(_engine_addr);
lo_send(_engine_addr, "/om/synth/destroy", "is",
@@ -166,7 +166,7 @@ OSCEngineInterface::destroy(const string& path)
void
-OSCEngineInterface::clear_patch(const string& patch_path)
+OSCEngineSender::clear_patch(const string& patch_path)
{
assert(_engine_addr);
lo_send(_engine_addr, "/om/synth/clear_patch", "is",
@@ -176,7 +176,7 @@ OSCEngineInterface::clear_patch(const string& patch_path)
void
-OSCEngineInterface::enable_patch(const string& patch_path)
+OSCEngineSender::enable_patch(const string& patch_path)
{
assert(_engine_addr);
lo_send(_engine_addr, "/om/synth/enable_patch", "is",
@@ -186,7 +186,7 @@ OSCEngineInterface::enable_patch(const string& patch_path)
void
-OSCEngineInterface::disable_patch(const string& patch_path)
+OSCEngineSender::disable_patch(const string& patch_path)
{
assert(_engine_addr);
lo_send(_engine_addr, "/om/synth/disable_patch", "is",
@@ -196,7 +196,7 @@ OSCEngineInterface::disable_patch(const string& patch_path)
void
-OSCEngineInterface::connect(const string& src_port_path,
+OSCEngineSender::connect(const string& src_port_path,
const string& dst_port_path)
{
assert(_engine_addr);
@@ -208,7 +208,7 @@ OSCEngineInterface::connect(const string& src_port_path,
void
-OSCEngineInterface::disconnect(const string& src_port_path,
+OSCEngineSender::disconnect(const string& src_port_path,
const string& dst_port_path)
{
assert(_engine_addr);
@@ -220,7 +220,7 @@ OSCEngineInterface::disconnect(const string& src_port_path,
void
-OSCEngineInterface::disconnect_all(const string& node_path)
+OSCEngineSender::disconnect_all(const string& node_path)
{
assert(_engine_addr);
lo_send(_engine_addr, "/om/synth/disconnect_all", "is",
@@ -230,7 +230,7 @@ OSCEngineInterface::disconnect_all(const string& node_path)
void
-OSCEngineInterface::set_port_value(const string& port_path,
+OSCEngineSender::set_port_value(const string& port_path,
float val)
{
assert(_engine_addr);
@@ -242,7 +242,7 @@ OSCEngineInterface::set_port_value(const string& port_path,
void
-OSCEngineInterface::set_port_value(const string& port_path,
+OSCEngineSender::set_port_value(const string& port_path,
uint32_t voice,
float val)
{
@@ -256,7 +256,7 @@ OSCEngineInterface::set_port_value(const string& port_path,
void
-OSCEngineInterface::set_port_value_queued(const string& port_path,
+OSCEngineSender::set_port_value_queued(const string& port_path,
float val)
{
assert(_engine_addr);
@@ -268,7 +268,7 @@ OSCEngineInterface::set_port_value_queued(const string& port_path,
void
-OSCEngineInterface::set_program(const string& node_path,
+OSCEngineSender::set_program(const string& node_path,
uint32_t bank,
uint32_t program)
{
@@ -282,7 +282,7 @@ OSCEngineInterface::set_program(const string& node_path,
void
-OSCEngineInterface::midi_learn(const string& node_path)
+OSCEngineSender::midi_learn(const string& node_path)
{
assert(_engine_addr);
lo_send(_engine_addr, "/om/synth/midi_learn", "is",
@@ -292,7 +292,7 @@ OSCEngineInterface::midi_learn(const string& node_path)
void
-OSCEngineInterface::set_metadata(const string& obj_path,
+OSCEngineSender::set_metadata(const string& obj_path,
const string& predicate,
const string& value)
{
@@ -308,7 +308,7 @@ OSCEngineInterface::set_metadata(const string& obj_path,
// Requests //
void
-OSCEngineInterface::ping()
+OSCEngineSender::ping()
{
assert(_engine_addr);
lo_send(_engine_addr, "/om/ping", "i", next_id());
@@ -316,7 +316,7 @@ OSCEngineInterface::ping()
void
-OSCEngineInterface::request_port_value(const string& port_path)
+OSCEngineSender::request_port_value(const string& port_path)
{
assert(_engine_addr);
lo_send(_engine_addr, "/om/request/port_value", "is",
@@ -326,7 +326,7 @@ OSCEngineInterface::request_port_value(const string& port_path)
void
-OSCEngineInterface::request_plugins()
+OSCEngineSender::request_plugins()
{
assert(_engine_addr);
lo_send(_engine_addr, "/om/request/plugins", "i", next_id());
@@ -334,7 +334,7 @@ OSCEngineInterface::request_plugins()
void
-OSCEngineInterface::request_all_objects()
+OSCEngineSender::request_all_objects()
{
assert(_engine_addr);
lo_send(_engine_addr, "/om/request/all_objects", "i", next_id());
diff --git a/src/libs/client/OSCEngineInterface.h b/src/libs/client/OSCEngineSender.h
index 4405438c..184c0569 100644
--- a/src/libs/client/OSCEngineInterface.h
+++ b/src/libs/client/OSCEngineSender.h
@@ -14,8 +14,8 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef OSCENGINEINTERFACE_H
-#define OSCENGINEINTERFACE_H
+#ifndef OSCENGINESENDER_H
+#define OSCENGINESENDER_H
#include <inttypes.h>
#include <string>
@@ -37,12 +37,12 @@ namespace Client {
*
* \ingroup IngenClient
*/
-class OSCEngineInterface : public EngineInterface
+class OSCEngineSender : public EngineInterface
{
public:
- OSCEngineInterface(const string& engine_url);
+ OSCEngineSender(const string& engine_url);
- ~OSCEngineInterface();
+ ~OSCEngineSender();
string engine_url() { return _engine_url; }
@@ -141,5 +141,5 @@ protected:
} // namespace Client
} // namespace Ingen
-#endif // OSCENGINEINTERFACE_H
+#endif // OSCENGINESENDER_H
diff --git a/src/libs/client/OSCModelEngineInterface.cpp b/src/libs/client/OSCModelEngineInterface.cpp
index 2e831705..14f2fe3a 100644
--- a/src/libs/client/OSCModelEngineInterface.cpp
+++ b/src/libs/client/OSCModelEngineInterface.cpp
@@ -21,7 +21,7 @@
#include <cstring>
#include <iostream>
#include <unistd.h>
-#include "OSCListener.h"
+#include "OSCClientReceiver.h"
#include "PatchModel.h"
#include "ConnectionModel.h"
#include "PresetModel.h"
@@ -39,7 +39,7 @@ namespace Client {
* of engine events.
*/
OSCModelEngineInterface::OSCModelEngineInterface(const string& engine_url)
-: OSCEngineInterface(engine_url),
+: OSCEngineSender(engine_url),
m_request_id(0),
m_is_attached(false),
m_is_registered(false)
diff --git a/src/libs/client/OSCModelEngineInterface.h b/src/libs/client/OSCModelEngineInterface.h
index a2172e23..f600fb8f 100644
--- a/src/libs/client/OSCModelEngineInterface.h
+++ b/src/libs/client/OSCModelEngineInterface.h
@@ -21,7 +21,7 @@
#include <lo/lo.h>
#include "util/Semaphore.h"
#include "interface/EngineInterface.h"
-#include "OSCEngineInterface.h"
+#include "OSCEngineSender.h"
#include "ModelEngineInterface.h"
using std::string;
@@ -34,29 +34,22 @@ namespace Client {
class NodeModel;
class PresetModel;
class PatchModel;
-class OSCListener;
class ModelClientInterface;
/** Old model-based OSC engine command interface.
*
* This is an old class from before when the well-defined interfaces between
- * engine and client were defined. I've wrapped it around OSCEngineInterface
+ * engine and client were defined. I've wrapped it around OSCEngineSender
* so all the common functions are implemented there, and implemented the
* remaining functions using those, for compatibility. Hopefully something
* better gets figured out and this can go away completely, but for now this
* gets the existing clients working through EngineInterface in the easiest
* way possible. This class needs to die.
*
- * Old comment:
- * Handles all OSC communication on the "control band". For the time being,
- * manages the OSCListener which handles the "notification band", but this
- * will change in the future (for complete separation). See OSC namespace
- * documentation for more details.
- *
* \ingroup IngenClient
*/
-class OSCModelEngineInterface : public OSCEngineInterface, public ModelEngineInterface
+class OSCModelEngineInterface : public OSCEngineSender, public ModelEngineInterface
{
public:
//OSCModelEngineInterface(ModelClientInterface* const client_hooks, const string& engine_url);
diff --git a/src/libs/client/Store.cpp b/src/libs/client/Store.cpp
index 403264f2..219ea13f 100644
--- a/src/libs/client/Store.cpp
+++ b/src/libs/client/Store.cpp
@@ -297,7 +297,7 @@ Store::new_port_event(const string& path, const string& type, bool is_output)
if (type == "AUDIO") ptype = PortModel::AUDIO;
else if (type == "CONTROL") ptype = PortModel::CONTROL;
else if (type== "MIDI") ptype = PortModel::MIDI;
- else cerr << "[OSCListener] WARNING: Unknown port type received (" << type << ")" << endl;
+ else cerr << "[Store] WARNING: Unknown port type received (" << type << ")" << endl;
PortModel::Direction pdir = is_output ? PortModel::OUTPUT : PortModel::INPUT;