summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-05-04 03:59:38 +0000
committerDavid Robillard <d@drobilla.net>2007-05-04 03:59:38 +0000
commita96166710faf2447ed10194d1829db5564b0dff9 (patch)
tree4eb792fcceee17f188566fc6e6bee11e5a8c4336 /src/libs/client
parentcf14d321e8f084f742b03e09c086d5ef30297492 (diff)
downloadingen-a96166710faf2447ed10194d1829db5564b0dff9.tar.gz
ingen-a96166710faf2447ed10194d1829db5564b0dff9.tar.bz2
ingen-a96166710faf2447ed10194d1829db5564b0dff9.zip
Made engine, serialisation, client library, and GUI all dynamically loaded modules.
Combined all executables into a single "ingen" program which can do everything. git-svn-id: http://svn.drobilla.net/lad/ingen@493 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client')
-rw-r--r--src/libs/client/Makefile.am19
-rw-r--r--src/libs/client/OSCEngineSender.h5
-rw-r--r--src/libs/client/client.cpp36
-rw-r--r--src/libs/client/client.h40
4 files changed, 96 insertions, 4 deletions
diff --git a/src/libs/client/Makefile.am b/src/libs/client/Makefile.am
index 1a0aa61d..20822e8a 100644
--- a/src/libs/client/Makefile.am
+++ b/src/libs/client/Makefile.am
@@ -1,12 +1,25 @@
if BUILD_CLIENT_LIB
-noinst_LTLIBRARIES = libingen_client.la
-libingen_client_la_CXXFLAGS = @RAUL_CFLAGS@ @SLV2_CFLAGS@ @LXML2_CFLAGS@ @RASQAL_CFLAGS@ @RAPTOR_CFLAGS@ @LSIGCPP_CFLAGS@ @GLIBMM_CFLAGS@ -I$(top_srcdir)/src/common -DPKGDATADIR=\"$(pkgdatadir)\"
+moduledir = $(libdir)/ingen
-libingen_client_la_LIBADD = @RAUL_LIBS@ @SLV2_LIBS@ @LXML2_LIBS@ @LOSC_LIBS@ @RASQAL_LIBS@ @RAPTOR_LIBS@ @LSIGCPP_LIBS@ @GLIBMM_LIBS@
+module_LTLIBRARIES = libingen_client.la
+
+libingen_client_la_CXXFLAGS = \
+ @RAUL_CFLAGS@ @SLV2_CFLAGS@ @LOSC_CFLAGS@ \
+ @LXML2_CFLAGS@ @RASQAL_CFLAGS@ @RAPTOR_CFLAGS@ \
+ @LSIGCPP_CFLAGS@ @GLIBMM_CFLAGS@ \
+ -I$(top_srcdir)/src/common \
+ -DPKGDATADIR=\"$(pkgdatadir)\"
+
+libingen_client_la_LIBADD = \
+ @RAUL_LIBS@ @SLV2_LIBS@ @LOSC_LIBS@ \
+ @LXML2_LIBS@ @RASQAL_LIBS@ @RAPTOR_LIBS@ \
+ @LSIGCPP_LIBS@ @GLIBMM_LIBS@
libingen_client_la_SOURCES = \
+ client.h \
+ client.cpp \
OSCEngineSender.h \
OSCEngineSender.cpp \
OSCClientReceiver.h \
diff --git a/src/libs/client/OSCEngineSender.h b/src/libs/client/OSCEngineSender.h
index 30df18fa..68163ec6 100644
--- a/src/libs/client/OSCEngineSender.h
+++ b/src/libs/client/OSCEngineSender.h
@@ -22,10 +22,12 @@
#include <string>
#include <lo/lo.h>
#include "interface/EngineInterface.h"
+#include "interface/Responder.h"
using std::string;
using Ingen::Shared::EngineInterface;
using Ingen::Shared::ClientInterface;
using Ingen::Shared::ClientKey;
+using Ingen::Shared::Responder;
namespace Ingen {
namespace Client {
@@ -38,7 +40,7 @@ namespace Client {
*
* \ingroup IngenClient
*/
-class OSCEngineSender : virtual public EngineInterface
+class OSCEngineSender : public EngineInterface
{
public:
OSCEngineSender(const string& engine_url);
@@ -50,6 +52,7 @@ public:
inline size_t next_id()
{ int32_t ret = (_id == -1) ? -1 : _id++; return ret; }
+ void set_responder(SharedPtr<Responder> responder) { throw; }
void set_next_response_id(int32_t id) { _id = id; }
void disable_responses() { _id = -1; }
diff --git a/src/libs/client/client.cpp b/src/libs/client/client.cpp
new file mode 100644
index 00000000..99fa116c
--- /dev/null
+++ b/src/libs/client/client.cpp
@@ -0,0 +1,36 @@
+/* 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
+ */
+
+#include "client.h"
+#include "OSCEngineSender.h"
+
+namespace Ingen {
+namespace Client {
+
+
+SharedPtr<Ingen::Shared::EngineInterface>
+new_osc_interface(const std::string& url)
+{
+ OSCEngineSender* oes = new OSCEngineSender(url);
+ oes->attach(rand(), true);
+ return SharedPtr<Shared::EngineInterface>(oes);
+}
+
+
+} // namespace Client
+} // namespace Ingen
+
diff --git a/src/libs/client/client.h b/src/libs/client/client.h
new file mode 100644
index 00000000..c2b19d12
--- /dev/null
+++ b/src/libs/client/client.h
@@ -0,0 +1,40 @@
+/* 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 INGEN_CLIENT_H
+#define INGEN_CLIENT_H
+
+#include <raul/SharedPtr.h>
+
+namespace Ingen {
+
+namespace Shared { class EngineInterface; }
+
+namespace Client {
+
+extern "C" {
+
+ SharedPtr<Shared::EngineInterface> new_osc_interface(const std::string& url);
+
+}
+
+
+} // namespace Client
+} // namespace Ingen
+
+#endif // INGEN_CLIENT_H
+