summaryrefslogtreecommitdiffstats
path: root/ingen/client/SigClientInterface.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'ingen/client/SigClientInterface.hpp')
-rw-r--r--ingen/client/SigClientInterface.hpp64
1 files changed, 64 insertions, 0 deletions
diff --git a/ingen/client/SigClientInterface.hpp b/ingen/client/SigClientInterface.hpp
new file mode 100644
index 00000000..461a7470
--- /dev/null
+++ b/ingen/client/SigClientInterface.hpp
@@ -0,0 +1,64 @@
+/*
+ This file is part of Ingen.
+ Copyright 2007-2016 David Robillard <http://drobilla.net/>
+
+ Ingen is free software: you can redistribute it and/or modify it under the
+ terms of the GNU Affero General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or 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 Affero General Public License for details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with Ingen. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef INGEN_CLIENT_SIGCLIENTINTERFACE_HPP
+#define INGEN_CLIENT_SIGCLIENTINTERFACE_HPP
+
+#include <cstdint>
+#include <string>
+
+#include "raul/Path.hpp"
+
+#include "ingen/Interface.hpp"
+#include "ingen/client/signal.hpp"
+#include "ingen/ingen.h"
+
+namespace ingen {
+namespace client {
+
+/** A LibSigC++ signal emitting interface for clients to use.
+ *
+ * This simply emits a signal for every event that comes from the engine.
+ * For a higher level model based view of the engine, use ClientStore.
+ *
+ * The signals here match the calls to ClientInterface exactly. See the
+ * documentation for ClientInterface for meanings of signal parameters.
+ *
+ * @ingroup IngenClient
+ */
+class INGEN_API SigClientInterface : public ingen::Interface,
+ public INGEN_TRACKABLE
+{
+public:
+ SigClientInterface() {}
+
+ URI uri() const override { return URI("ingen:/clients/sig"); }
+
+ INGEN_SIGNAL(message, void, Message)
+
+ /** Fire pending signals. Only does anything on derived classes (that may queue) */
+ virtual bool emit_signals() { return false; }
+
+protected:
+ void message(const Message& msg) override {
+ _signal_message(msg);
+ }
+};
+
+} // namespace client
+} // namespace ingen
+
+#endif