diff options
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/client/DirectSigClientInterface.hpp | 118 | ||||
-rw-r--r-- | src/libs/client/Makefile.am | 1 | ||||
-rw-r--r-- | src/libs/client/SigClientInterface.hpp | 7 | ||||
-rw-r--r-- | src/libs/client/ThreadedSigClientInterface.hpp | 11 | ||||
-rw-r--r-- | src/libs/engine/PatchPlugin.hpp | 19 | ||||
-rw-r--r-- | src/libs/engine/events/RequestPluginEvent.hpp | 2 |
6 files changed, 15 insertions, 143 deletions
diff --git a/src/libs/client/DirectSigClientInterface.hpp b/src/libs/client/DirectSigClientInterface.hpp deleted file mode 100644 index 721a7f74..00000000 --- a/src/libs/client/DirectSigClientInterface.hpp +++ /dev/null @@ -1,118 +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 DIRECTSIGCLIENTINTERFACE_H -#define DIRECTSIGCLIENTINTERFACE_H - -#include <inttypes.h> -#include <string> -#include <sigc++/sigc++.h> -#include "SigClientInterface.hpp" -using std::string; - -namespace Ingen { -namespace Client { - - -/** A direct (nonthreaded) LibSigC++ signal emitting interface for clients to use. - * - * The signals from SigClientInterface will be emitted in the same thread as the - * ClientInterface functions are called. <b>You can not set this directly as an - * in-engine client interface and connect the signals to GTK</b>. - * - * For maximum performance of a monolithic single-client GUI app, it would be - * nice if the post processing thread in the engine could actually be the GTK - * thread, then you could use this directly and minimize queueing of events and - * thread/scheduling overhead. - * - * sed would have the copyright to this code if it was a legal person. - */ -class DirectSigClientInterface : virtual public SigClientInterface -{ -public: - DirectSigClientInterface(); - -private: - - // ClientInterface function implementations to drive SigClientInterface signals - - virtual void bundle_begin() - { bundle_begin_sig.emit(); } - - virtual void bundle_end() - { bundle_end_sig.emit(); } - - virtual void error(const string& msg) - { error_sig.emit(msg); } - - virtual void num_plugins(uint32_t num) - { num_plugins_sig.emit(num); } - - virtual void new_plugin(const string& type, const string& uri, const string& name) - { new_plugin_sig.emit(type, uri, name); } - - virtual void new_patch(const string& path, uint32_t poly) - { new_patch_sig.emit(path, poly); } - - virtual void new_node(const string& plugin_type, const string& plugin_uri, const string& node_path, bool is_polyphonic, uint32_t num_ports) - { new_node_sig.emit(plugin_type, plugin_uri, node_path, is_polyphonic, num_ports); } - - virtual void new_port(const string& path, const string& data_type, bool is_output) - { new_port_sig.emit(path, data_type, is_output); } - - virtual void polyphonic(const string& path, bool polyphonic) - { polyphonic_sig.emit(path, polyphonic); } - - virtual void patch_enabled(const string& path) - { patch_enabled_sig.emit(path); } - - virtual void patch_disabled(const string& path) - { patch_disabled_sig.emit(path); } - - virtual void patch_cleared(const string& path) - { patch_cleared_sig.emit(path); } - - virtual void object_renamed(const string& old_path, const string& new_path) - { object_renamed_sig.emit(old_path, new_path); } - - virtual void object_destroyed(const string& path) - { object_destroyed_sig.emit(path); } - - virtual void connection(const string& src_port_path, const string& dst_port_path) - { connection_sig.emit(src_port_path, dst_port_path); } - - virtual void disconnection(const string& src_port_path, const string& dst_port_path) - { disconnection_sig.emit(src_port_path, dst_port_path); } - - virtual void variable_change(const string& subject_path, const string& predicate, const string& value) - { variable_change_sig.emit(subject_path, predicate, value); } - - virtual void control_change(const string& port_path, float value) - { control_change_sig.emit(port_path, value); } - - virtual void program_add(const string& node_path, uint32_t bank, uint32_t program, const string& program_name) - { program_add_sig.emit(node_path, bank, program, program_name); } - - virtual void program_remove(const string& node_path, uint32_t bank, uint32_t program) - { program_remove_sig.emit(node_path, bank, program); } -}; - - -} // namespace Client -} // namespace Ingen - -#endif diff --git a/src/libs/client/Makefile.am b/src/libs/client/Makefile.am index 0f475ed0..6c55ab57 100644 --- a/src/libs/client/Makefile.am +++ b/src/libs/client/Makefile.am @@ -33,7 +33,6 @@ libingen_client_la_SOURCES = \ ControlModel.hpp \ DeprecatedLoader.cpp \ DeprecatedLoader.hpp \ - DirectSigClientInterface.hpp \ NodeModel.cpp \ NodeModel.hpp \ OSCClientReceiver.cpp \ diff --git a/src/libs/client/SigClientInterface.hpp b/src/libs/client/SigClientInterface.hpp index 14d96b21..858ea3e6 100644 --- a/src/libs/client/SigClientInterface.hpp +++ b/src/libs/client/SigClientInterface.hpp @@ -81,9 +81,12 @@ protected: void enable() { _enabled = true; } void disable() { _enabled = false ; } - void bundle_begin() {} - void bundle_end() {} + void bundle_begin() + { if (_enabled) signal_bundle_begin.emit(); } + void bundle_end() + { if (_enabled) signal_bundle_end.emit(); } + void transfer_begin() {} void transfer_end() {} diff --git a/src/libs/client/ThreadedSigClientInterface.hpp b/src/libs/client/ThreadedSigClientInterface.hpp index 7cac212f..2dab8897 100644 --- a/src/libs/client/ThreadedSigClientInterface.hpp +++ b/src/libs/client/ThreadedSigClientInterface.hpp @@ -69,12 +69,13 @@ public: , program_remove_slot(signal_program_remove.make_slot()) {} - virtual void subscribe(Shared::EngineInterface* engine) { throw; } // FIXME + virtual void subscribe(Shared::EngineInterface* engine) { throw; } - // TODO: make this insert bundle-boundary-events, where the GTK thread - // process all events between start and finish in one (GTK) "cycle", guaranteed - void bundle_begin() {} - void bundle_end() {} + void bundle_begin() + { push_sig(bundle_begin_slot); } + + void bundle_end() + { push_sig(bundle_end_slot); } void transfer_begin() {} void transfer_end() {} diff --git a/src/libs/engine/PatchPlugin.hpp b/src/libs/engine/PatchPlugin.hpp index 3c2272eb..24a2679a 100644 --- a/src/libs/engine/PatchPlugin.hpp +++ b/src/libs/engine/PatchPlugin.hpp @@ -15,23 +15,12 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef INTERNALPLUGIN_H -#define INTERNALPLUGIN_H +#ifndef PATCHPLUGIN_H +#define PATCHPLUGIN_H #include CONFIG_H_PATH -#ifndef HAVE_SLV2 -#error "This file requires SLV2, but HAVE_SLV2 is not defined. Please report." -#endif - -#include <cstdlib> -#include <glibmm/module.h> -#include <boost/utility.hpp> -#include <dlfcn.h> #include <string> -#include <iostream> -#include <slv2/slv2.h> -#include "types.hpp" #include "PluginImpl.hpp" namespace Ingen { @@ -52,8 +41,6 @@ public: : PluginImpl(Plugin::Patch, uri) {} - //PatchPlugin(const PatchPlugin* const copy); - NodeImpl* instantiate(const std::string& name, bool polyphonic, Ingen::PatchImpl* parent, @@ -74,5 +61,5 @@ private: } // namespace Ingen -#endif // INTERNALPLUGIN_H +#endif // PATCHPLUGIN_H diff --git a/src/libs/engine/events/RequestPluginEvent.hpp b/src/libs/engine/events/RequestPluginEvent.hpp index cca43627..8f936098 100644 --- a/src/libs/engine/events/RequestPluginEvent.hpp +++ b/src/libs/engine/events/RequestPluginEvent.hpp @@ -29,7 +29,7 @@ namespace Ingen { class PluginImpl; -/** A request from a client to send the value of a port. +/** A request from a client to send information about a plugin. * * \ingroup engine */ |