From b853b3dde1f7028dd275f78433a6ad9b5b9f61c7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 8 Sep 2006 23:15:42 +0000 Subject: More cleanups git-svn-id: http://svn.drobilla.net/lad/ingen@122 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/client/OSCModelEngineInterface.h | 85 +++---------------------------- 1 file changed, 7 insertions(+), 78 deletions(-) (limited to 'src/libs/client/OSCModelEngineInterface.h') diff --git a/src/libs/client/OSCModelEngineInterface.h b/src/libs/client/OSCModelEngineInterface.h index f600fb8f..1ca263fa 100644 --- a/src/libs/client/OSCModelEngineInterface.h +++ b/src/libs/client/OSCModelEngineInterface.h @@ -14,99 +14,28 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef OSCCONTROLLER_H -#define OSCCONTROLLER_H +#ifndef OSCMODELENGINEINTERFACE_H +#define OSCMODELENGINEINTERFACE_H #include -#include -#include "util/Semaphore.h" -#include "interface/EngineInterface.h" #include "OSCEngineSender.h" #include "ModelEngineInterface.h" -using std::string; -/** \defgroup IngenClient Client Library - */ +using std::string; +/** \defgroup IngenClient Client Library */ namespace Ingen { namespace Client { -class NodeModel; -class PresetModel; -class PatchModel; -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 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. - * - * \ingroup IngenClient - */ class OSCModelEngineInterface : public OSCEngineSender, public ModelEngineInterface { public: - //OSCModelEngineInterface(ModelClientInterface* const client_hooks, const string& engine_url); - OSCModelEngineInterface(const string& engine_url); - ~OSCModelEngineInterface(); - - void attach(bool block = true); - void detach(); - - bool is_attached() { return m_is_attached; } - - // FIXME: reimplement - void set_wait_response_id(int32_t id) {} - bool wait_for_response() { return false; } - int get_next_request_id() { return m_request_id++; } - - /* *** Model alternatives to EngineInterface functions below *** */ - - void create_patch_from_model(const PatchModel* pm); - void create_node_from_model(const NodeModel* nm); - - void set_all_metadata(const NodeModel* nm); - void set_preset(const string& patch_path, const PresetModel* const pm); - -protected: - void start_listen_thread(); - - int m_request_id; - - bool m_is_attached; - bool m_is_registered; - /* - bool m_blocking; - bool m_waiting_for_response; - int m_wait_response_id; - bool m_response_received; - bool m_wait_response_was_affirmative; - - Semaphore m_response_semaphore; - */ -private: - // Prevent copies - OSCModelEngineInterface(const OSCModelEngineInterface& copy); - OSCModelEngineInterface& operator=(const OSCModelEngineInterface& copy); + OSCModelEngineInterface(const string& engine_url) : OSCEngineSender(engine_url) {} }; -/* -inline int -OSCModelEngineInterface::om_response_ok_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data, void* comm) { - return ((OSCModelEngineInterface*)comm)->m_om_response_ok_cb(path, types, argv, argc, data); -} -inline int -OSCModelEngineInterface::om_response_error_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data, void* comm) { - return ((OSCModelEngineInterface*)comm)->m_om_response_error_cb(path, types, argv, argc, data); -} -*/ + } // namespace Client } // namespace Ingen -#endif // OSCCONTROLLER_H +#endif // OSCMODELENGINEINTERFACE_H -- cgit v1.2.1