From dd79e76e41446833088482588456afed37231bff Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 12 Aug 2015 04:46:29 +0000 Subject: Server-side presets. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5703 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/BlockImpl.hpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/server/BlockImpl.hpp') diff --git a/src/server/BlockImpl.hpp b/src/server/BlockImpl.hpp index 44271cc3..2dcc4762 100644 --- a/src/server/BlockImpl.hpp +++ b/src/server/BlockImpl.hpp @@ -20,6 +20,7 @@ #include #include +#include #include "lilv/lilv.h" @@ -28,6 +29,7 @@ #include "BufferRef.hpp" #include "Context.hpp" #include "NodeImpl.hpp" +#include "PluginImpl.hpp" #include "PortType.hpp" #include "types.hpp" @@ -36,9 +38,6 @@ class Maid; } namespace Ingen { - -class Plugin; - namespace Server { class Buffer; @@ -106,6 +105,11 @@ public: /** Restore `state`. */ virtual void apply_state(LilvState* state) {} + /** Save current state as preset. */ + virtual boost::optional + save_preset(const Raul::URI& bundle, + const Properties& props) { return boost::optional(); } + /** Learn the next incoming MIDI event (for internals) */ virtual void learn() {} @@ -152,14 +156,14 @@ public: ProcessContext& context, Raul::Maid& maid, uint32_t poly); /** Information about the Plugin this Block is an instance of. - * Not the best name - not all blocks come from plugins (e.g. Graph) + * Not the best name - not all blocks come from plugins (ie Graph) */ - virtual PluginImpl* plugin_impl() const { return _plugin; } + virtual const Resource* plugin() const; /** Information about the Plugin this Block is an instance of. * Not the best name - not all blocks come from plugins (ie Graph) */ - virtual const Plugin* plugin() const; + virtual const PluginImpl* plugin_impl() const; virtual void plugin(PluginImpl* pi) { _plugin = pi; } -- cgit v1.2.1