summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/OSCEngineReceiver.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-09-30 16:50:21 +0000
committerDavid Robillard <d@drobilla.net>2008-09-30 16:50:21 +0000
commit93850c202de8b073a1ce1dd8bd246d407bce4e2f (patch)
tree6910b135bf4eff12de1af116cef73f6e9c107cd0 /src/libs/engine/OSCEngineReceiver.hpp
parenta8bf5272d096de73507d2eab47f282c345f4ca8a (diff)
downloadingen-93850c202de8b073a1ce1dd8bd246d407bce4e2f.tar.gz
ingen-93850c202de8b073a1ce1dd8bd246d407bce4e2f.tar.bz2
ingen-93850c202de8b073a1ce1dd8bd246d407bce4e2f.zip
Flatten ingen source directory heirarchy a bit.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1551 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/OSCEngineReceiver.hpp')
-rw-r--r--src/libs/engine/OSCEngineReceiver.hpp129
1 files changed, 0 insertions, 129 deletions
diff --git a/src/libs/engine/OSCEngineReceiver.hpp b/src/libs/engine/OSCEngineReceiver.hpp
deleted file mode 100644
index c6e0bf59..00000000
--- a/src/libs/engine/OSCEngineReceiver.hpp
+++ /dev/null
@@ -1,129 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
- * Ingen is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef OSCENGINERECEIVER_H
-#define OSCENGINERECEIVER_H
-
-#include CONFIG_H_PATH
-#include <string>
-#include <stdint.h>
-#include <lo/lo.h>
-#include <raul/SharedPtr.hpp>
-#include "QueuedEngineInterface.hpp"
-#include "Responder.hpp"
-using std::string;
-
-namespace Ingen {
-
-class JackDriver;
-class NodeFactory;
-class PatchImpl;
-
-
-/* Some boilerplate killing macros... */
-#define LO_HANDLER_ARGS const char* path, const char* types, lo_arg** argv, int argc, lo_message msg
-
-/* Defines a static handler to be passed to lo_add_method, which is a trivial
- * wrapper around a non-static method that does the real work. Makes a whoole
- * lot of ugly boiler plate go away */
-#define LO_HANDLER(name) \
-int _##name##_cb (LO_HANDLER_ARGS);\
-inline static int name##_cb(LO_HANDLER_ARGS, void* myself)\
-{ return ((OSCEngineReceiver*)myself)->_##name##_cb(path, types, argv, argc, msg); }
-
-
-/* FIXME: Make this receive and preprocess in the same thread? */
-
-
-/** Receives OSC messages from liblo.
- *
- * This inherits from QueuedEngineInterface and calls it's own functions
- * via OSC. It's not actually a directly callable EngineInterface (it's
- * callable via OSC...) so it should be implemented-as-a (privately inherit)
- * QueuedEngineInterface, but it needs to be public so it's an EventSource
- * the Driver can use. This probably should be fixed somehow..
- *
- * \ingroup engine
- */
-class OSCEngineReceiver : public QueuedEngineInterface
-{
-public:
- OSCEngineReceiver(Engine& engine, size_t queue_size, uint16_t port);
- ~OSCEngineReceiver();
-
- void activate();
- void deactivate();
-
-private:
- struct ReceiveThread : public Raul::Thread {
- ReceiveThread(OSCEngineReceiver& receiver) : _receiver(receiver) {}
- virtual void _run();
- private:
- OSCEngineReceiver& _receiver;
- };
-
- friend class ReceiveThread;
-
- ReceiveThread* _receive_thread;
-
- static void error_cb(int num, const char* msg, const char* path);
- static int set_response_address_cb(LO_HANDLER_ARGS, void* myself);
- static int generic_cb(LO_HANDLER_ARGS, void* myself);
- static int unknown_cb(LO_HANDLER_ARGS, void* myself);
-
- LO_HANDLER(quit);
- LO_HANDLER(ping);
- LO_HANDLER(ping_slow);
- LO_HANDLER(register_client);
- LO_HANDLER(unregister_client);
- LO_HANDLER(load_plugins);
- LO_HANDLER(engine_activate);
- LO_HANDLER(engine_deactivate);
- LO_HANDLER(new_patch);
- LO_HANDLER(rename);
- LO_HANDLER(new_port);
- LO_HANDLER(new_node);
- LO_HANDLER(new_node_by_uri);
- LO_HANDLER(clear_patch);
- LO_HANDLER(set_polyphony);
- LO_HANDLER(set_polyphonic);
- LO_HANDLER(destroy);
- LO_HANDLER(connect);
- LO_HANDLER(disconnect);
- LO_HANDLER(disconnect_all);
- LO_HANDLER(set_port_value);
- LO_HANDLER(note_on);
- LO_HANDLER(note_off);
- LO_HANDLER(all_notes_off);
- LO_HANDLER(midi_learn);
- LO_HANDLER(variable_get);
- LO_HANDLER(variable_set);
- LO_HANDLER(property_set);
- LO_HANDLER(request_plugin);
- LO_HANDLER(request_object);
- LO_HANDLER(request_port_value);
- LO_HANDLER(request_variable);
- LO_HANDLER(request_plugins);
- LO_HANDLER(request_all_objects);
-
- lo_server _server;
-};
-
-
-} // namespace Ingen
-
-#endif // OSCENGINERECEIVER_H