summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-05-24 22:21:20 +0000
committerDavid Robillard <d@drobilla.net>2011-05-24 22:21:20 +0000
commit881eac58c2f9bf1fcb18ef7dcda7ab025e327871 (patch)
treeef6e61d1547afab07dfb67bd0a7d32b33a4a4e89 /src
parentc85f3ab4c7d4c1e793519a400f10fc8499459d80 (diff)
downloadingen-881eac58c2f9bf1fcb18ef7dcda7ab025e327871.tar.gz
ingen-881eac58c2f9bf1fcb18ef7dcda7ab025e327871.tar.bz2
ingen-881eac58c2f9bf1fcb18ef7dcda7ab025e327871.zip
Tidy up headers.
Remove dependency on OSCEngineSender and HTTPEngineSender from GUI code. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3317 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/client/ClientStore.cpp1
-rw-r--r--src/client/ClientStore.hpp4
-rw-r--r--src/client/ConnectionModel.hpp19
-rw-r--r--src/client/OSCClientReceiver.hpp11
-rw-r--r--src/client/OSCEngineSender.hpp1
-rw-r--r--src/client/ObjectModel.hpp9
-rw-r--r--src/client/PatchModel.hpp7
-rw-r--r--src/client/SigClientInterface.hpp8
-rw-r--r--src/client/signal.hpp2
-rw-r--r--src/gui/ConnectWindow.cpp22
-rw-r--r--src/server/ConnectionImpl.hpp4
-rw-r--r--src/server/GraphObjectImpl.hpp1
-rw-r--r--src/shared/Builder.cpp10
-rw-r--r--src/shared/Builder.hpp3
-rw-r--r--src/shared/ClashAvoider.hpp4
-rw-r--r--src/shared/HTTPSender.hpp3
-rw-r--r--src/shared/LV2Atom.hpp19
-rw-r--r--src/shared/LV2Features.hpp2
-rw-r--r--src/shared/Module.hpp6
-rw-r--r--src/shared/OSCSender.hpp1
-rw-r--r--src/shared/Store.hpp3
-rw-r--r--src/shared/runtime_paths.hpp4
22 files changed, 61 insertions, 83 deletions
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp
index 492529a0..681893bb 100644
--- a/src/client/ClientStore.cpp
+++ b/src/client/ClientStore.cpp
@@ -21,6 +21,7 @@
#include "shared/LV2URIMap.hpp"
#include "ClientStore.hpp"
+#include "ConnectionModel.hpp"
#include "NodeModel.hpp"
#include "ObjectModel.hpp"
#include "PatchModel.hpp"
diff --git a/src/client/ClientStore.hpp b/src/client/ClientStore.hpp
index a01a9dc6..011bb38c 100644
--- a/src/client/ClientStore.hpp
+++ b/src/client/ClientStore.hpp
@@ -24,8 +24,6 @@
#include "raul/SharedPtr.hpp"
-#include <sigc++/sigc++.h>
-
#include "ingen/ServerInterface.hpp"
#include "raul/Path.hpp"
#include "raul/PathTable.hpp"
@@ -54,7 +52,7 @@ class SigClientInterface;
*/
class ClientStore : public Shared::Store
, public CommonInterface
- , public sigc::trackable {
+ , public INGEN_TRACKABLE {
public:
ClientStore(
SharedPtr<Shared::LV2URIMap> uris,
diff --git a/src/client/ConnectionModel.hpp b/src/client/ConnectionModel.hpp
index bc2f56e5..9a51d309 100644
--- a/src/client/ConnectionModel.hpp
+++ b/src/client/ConnectionModel.hpp
@@ -19,25 +19,20 @@
#define INGEN_CLIENT_CONNECTIONMODEL_HPP
#include <cassert>
-#include <string>
-#include <list>
+
#include "raul/Path.hpp"
#include "raul/SharedPtr.hpp"
+
#include "ingen/Connection.hpp"
-#include "PortModel.hpp"
+
+#include "client/PortModel.hpp"
namespace Ingen {
namespace Client {
class ClientStore;
-/** Class to represent a port->port connection in the engine.
- *
- * This can either have pointers to the connection ports' models, or just
- * paths as strings. The engine passes just strings (by necessity), but
- * clients can set the pointers then they don't have to worry about port
- * renaming, as the connections will always return the port's path, even
- * if it changes.
+/** Class to represent a port->port connections in the engine.
*
* \ingroup IngenClient
*/
@@ -47,8 +42,8 @@ public:
SharedPtr<PortModel> src_port() const { return _src_port; }
SharedPtr<PortModel> dst_port() const { return _dst_port; }
- const Raul::Path src_port_path() const { return _src_port->path(); }
- const Raul::Path dst_port_path() const { return _dst_port->path(); }
+ const Raul::Path& src_port_path() const { return _src_port->path(); }
+ const Raul::Path& dst_port_path() const { return _dst_port->path(); }
private:
friend class ClientStore;
diff --git a/src/client/OSCClientReceiver.hpp b/src/client/OSCClientReceiver.hpp
index e3fda0fa..c685f969 100644
--- a/src/client/OSCClientReceiver.hpp
+++ b/src/client/OSCClientReceiver.hpp
@@ -38,16 +38,7 @@ int _##name##_cb (LO_HANDLER_ARGS);\
inline static int name##_cb(LO_HANDLER_ARGS, void* osc_listener)\
{ return ((OSCClientReceiver*)osc_listener)->_##name##_cb(path, types, argv, argc, msg); }
-/** Callbacks for "notification band" OSC messages.
- *
- * Receives all notification of engine state, but not replies on the "control
- * band". See OSC namespace documentation for details.
- *
- * Right now this class and Comm share the same lo_server_thread and the barrier
- * between them is a bit odd, but eventually this class will be able to listen
- * on a completely different port (ie have it's own lo_server_thread) to allow
- * things like listening to the notification band over TCP while sending commands
- * on the control band over UDP.
+/** Client-side receiver for OSC messages from the engine.
*
* \ingroup IngenClient
*/
diff --git a/src/client/OSCEngineSender.hpp b/src/client/OSCEngineSender.hpp
index a29694fb..a50de0f3 100644
--- a/src/client/OSCEngineSender.hpp
+++ b/src/client/OSCEngineSender.hpp
@@ -18,7 +18,6 @@
#ifndef INGEN_CLIENT_OSCENGINESENDER_HPP
#define INGEN_CLIENT_OSCENGINESENDER_HPP
-#include <stdbool.h>
#include <stddef.h>
#include <string>
diff --git a/src/client/ObjectModel.hpp b/src/client/ObjectModel.hpp
index bcba2242..18f013fa 100644
--- a/src/client/ObjectModel.hpp
+++ b/src/client/ObjectModel.hpp
@@ -18,16 +18,17 @@
#ifndef INGEN_CLIENT_OBJECTMODEL_HPP
#define INGEN_CLIENT_OBJECTMODEL_HPP
-#include <cstdlib>
#include <algorithm>
#include <cassert>
-#include <boost/utility.hpp>
+#include <cstdlib>
+
#include "raul/Path.hpp"
-#include "raul/URI.hpp"
#include "raul/SharedPtr.hpp"
+#include "raul/URI.hpp"
+
+#include "client/signal.hpp"
#include "ingen/GraphObject.hpp"
#include "shared/ResourceImpl.hpp"
-#include "client/signal.hpp"
namespace Ingen {
diff --git a/src/client/PatchModel.hpp b/src/client/PatchModel.hpp
index dbd54c03..1b9e4a48 100644
--- a/src/client/PatchModel.hpp
+++ b/src/client/PatchModel.hpp
@@ -18,13 +18,11 @@
#ifndef INGEN_CLIENT_PATCHMODEL_HPP
#define INGEN_CLIENT_PATCHMODEL_HPP
-#include <cassert>
#include "raul/SharedPtr.hpp"
+
#include "ingen/Patch.hpp"
#include "NodeModel.hpp"
-#include "ConnectionModel.hpp"
-
namespace Ingen {
class Port;
@@ -32,6 +30,7 @@ class Port;
namespace Client {
class ClientStore;
+class ConnectionModel;
/** Client's model of a patch.
*
@@ -47,10 +46,8 @@ public:
SharedPtr<ConnectionModel> get_connection(const Ingen::Port* src_port,
const Ingen::Port* dst_port);
- //uint32_t poly() const { return _poly; }
bool enabled() const;
bool polyphonic() const;
-
uint32_t internal_poly() const;
/** "editable" = arranging,connecting,adding,deleting,etc
diff --git a/src/client/SigClientInterface.hpp b/src/client/SigClientInterface.hpp
index 7409688a..116ec0dc 100644
--- a/src/client/SigClientInterface.hpp
+++ b/src/client/SigClientInterface.hpp
@@ -18,10 +18,12 @@
#ifndef INGEN_CLIENT_SIGCLIENTINTERFACE_HPP
#define INGEN_CLIENT_SIGCLIENTINTERFACE_HPP
-#include <inttypes.h>
+#include <stdint.h>
+
#include "raul/Path.hpp"
-#include "ingen/ClientInterface.hpp"
+
#include "client/signal.hpp"
+#include "ingen/ClientInterface.hpp"
namespace Ingen {
namespace Client {
@@ -35,7 +37,7 @@ namespace Client {
* documentation for ClientInterface for meanings of signal parameters.
*/
class SigClientInterface : public Ingen::ClientInterface,
- public sigc::trackable
+ public INGEN_TRACKABLE
{
public:
SigClientInterface() {}
diff --git a/src/client/signal.hpp b/src/client/signal.hpp
index 46718163..f40c6a57 100644
--- a/src/client/signal.hpp
+++ b/src/client/signal.hpp
@@ -27,4 +27,6 @@ public: \
sigc::signal<__VA_ARGS__> signal_##name() const { return _signal_##name; } \
sigc::signal<__VA_ARGS__>& signal_##name() { return _signal_##name; }
+#define INGEN_TRACKABLE sigc::trackable
+
#endif // INGEN_CLIENT_SIGNAL_HPP
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp
index eb98bb6b..b266307a 100644
--- a/src/gui/ConnectWindow.cpp
+++ b/src/gui/ConnectWindow.cpp
@@ -31,11 +31,9 @@
#include "server/Engine.hpp"
#ifdef HAVE_SOUP
#include "client/HTTPClientReceiver.hpp"
-#include "client/HTTPEngineSender.hpp"
#endif
#ifdef HAVE_LIBLO
#include "client/OSCClientReceiver.hpp"
-#include "client/OSCEngineSender.hpp"
#endif
#include "client/ClientStore.hpp"
#include "client/PatchModel.hpp"
@@ -191,19 +189,7 @@ ConnectWindow::connect(bool existing)
#endif
if (!existing) {
-#ifdef HAVE_LIBLO
- if (scheme == "osc.udp" || scheme == "osc.tcp")
- world->set_engine(
- SharedPtr<ServerInterface>(
- new OSCEngineSender(
- uri,
- world->conf()->option("packet-size").get_int32())));
-#endif
-#ifdef HAVE_SOUP
- if (scheme == "http")
- world->set_engine(SharedPtr<ServerInterface>(
- new HTTPEngineSender(world, uri)));
-#endif
+ world->set_engine(world->interface(uri));
} else {
uri = world->engine()->uri().str();
scheme = uri.substr(0, uri.find(":"));
@@ -223,10 +209,8 @@ ConnectWindow::connect(bool existing)
const string cmd = string("ingen -e --engine-port=").append(port_str);
if (Raul::Process::launch(cmd)) {
- world->set_engine(SharedPtr<ServerInterface>(
- new OSCEngineSender(
- string("osc.udp://localhost:").append(port_str),
- world->conf()->option("packet-size").get_int32())));
+ const std::string engine_uri = string("osc.udp://localhost:").append(port_str);
+ world->set_engine(world->interface(engine_uri));
// FIXME: static args
SharedPtr<ThreadedSigClientInterface> tsci(new ThreadedSigClientInterface(1024));
diff --git a/src/server/ConnectionImpl.hpp b/src/server/ConnectionImpl.hpp
index 5a04d81b..9dd71233 100644
--- a/src/server/ConnectionImpl.hpp
+++ b/src/server/ConnectionImpl.hpp
@@ -57,8 +57,8 @@ public:
PortImpl* src_port() const { return _src_port; }
PortImpl* dst_port() const { return _dst_port; }
- const Raul::Path src_port_path() const { return _src_port->path(); }
- const Raul::Path dst_port_path() const { return _dst_port->path(); }
+ const Raul::Path& src_port_path() const { return _src_port->path(); }
+ const Raul::Path& dst_port_path() const { return _dst_port->path(); }
/** Used by some (recursive) events to prevent double disconnections */
bool pending_disconnection() { return _pending_disconnection; }
diff --git a/src/server/GraphObjectImpl.hpp b/src/server/GraphObjectImpl.hpp
index 4ef9ffa7..09988214 100644
--- a/src/server/GraphObjectImpl.hpp
+++ b/src/server/GraphObjectImpl.hpp
@@ -74,7 +74,6 @@ public:
/** The Patch this object is a child of. */
virtual PatchImpl* parent_patch() const;
- /** Raul::Path is dynamically generated from parent to ease renaming */
const Raul::Path& path() const { return _path; }
SharedPtr<GraphObject> find_child(const std::string& name) const;
diff --git a/src/shared/Builder.cpp b/src/shared/Builder.cpp
index 24459d55..cac4201d 100644
--- a/src/shared/Builder.cpp
+++ b/src/shared/Builder.cpp
@@ -16,14 +16,16 @@
*/
#include "raul/Atom.hpp"
+#include "raul/Path.hpp"
+
#include "ingen/CommonInterface.hpp"
-#include "ingen/Patch.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/Port.hpp"
#include "ingen/Connection.hpp"
+#include "ingen/Node.hpp"
+#include "ingen/Patch.hpp"
#include "ingen/Plugin.hpp"
+#include "ingen/Port.hpp"
+#include "shared/Builder.hpp"
#include "shared/LV2URIMap.hpp"
-#include "Builder.hpp"
using namespace std;
using namespace Raul;
diff --git a/src/shared/Builder.hpp b/src/shared/Builder.hpp
index 91957d0a..8a21dee0 100644
--- a/src/shared/Builder.hpp
+++ b/src/shared/Builder.hpp
@@ -20,8 +20,6 @@
#include "raul/SharedPtr.hpp"
-namespace Raul { class Path; }
-
namespace Ingen {
class CommonInterface;
@@ -56,3 +54,4 @@ private:
#endif // INGEN_SHARED_BUILDER_HPP
+
diff --git a/src/shared/ClashAvoider.hpp b/src/shared/ClashAvoider.hpp
index e6f2704a..87fd106a 100644
--- a/src/shared/ClashAvoider.hpp
+++ b/src/shared/ClashAvoider.hpp
@@ -19,8 +19,10 @@
#define INGEN_SHARED_CLASHAVOIDER_HPP
#include <inttypes.h>
-#include <string>
+
#include <map>
+#include <string>
+
#include "ingen/CommonInterface.hpp"
namespace Raul { class Atom; class Path; }
diff --git a/src/shared/HTTPSender.hpp b/src/shared/HTTPSender.hpp
index 5c26a386..a1a3ea2a 100644
--- a/src/shared/HTTPSender.hpp
+++ b/src/shared/HTTPSender.hpp
@@ -18,9 +18,10 @@
#ifndef INGEN_SHARED_HTTPSENDER_HPP
#define INGEN_SHARED_HTTPSENDER_HPP
-#include <stdint.h>
#include <string>
+
#include <glibmm/thread.h>
+
#include "raul/Thread.hpp"
namespace Ingen {
diff --git a/src/shared/LV2Atom.hpp b/src/shared/LV2Atom.hpp
index 458eb31e..ad0c8691 100644
--- a/src/shared/LV2Atom.hpp
+++ b/src/shared/LV2Atom.hpp
@@ -15,26 +15,31 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef INGEN_SHARED_LV2OBJECT_HPP
-#define INGEN_SHARED_LV2OBJECT_HPP
+#ifndef INGEN_SHARED_LV2ATOM_HPP
+#define INGEN_SHARED_LV2ATOM_HPP
-namespace Raul { class Atom; }
typedef struct _LV2_Atom LV2_Atom;
+namespace Raul { class Atom; }
+
namespace Ingen {
namespace Shared {
-class World;
class LV2URIMap;
namespace LV2Atom {
- bool to_atom(const Shared::LV2URIMap& uris, const LV2_Atom* object, Raul::Atom& atom);
- bool from_atom(const Shared::LV2URIMap& uris, const Raul::Atom& atom, LV2_Atom* object);
+bool to_atom(const LV2URIMap& uris,
+ const LV2_Atom* object,
+ Raul::Atom& atom);
+
+bool from_atom(const LV2URIMap& uris,
+ const Raul::Atom& atom,
+ LV2_Atom* object);
} // namespace LV2Atom
} // namespace Shared
} // namespace Ingen
-#endif // INGEN_SHARED_LV2OBJECT_HPP
+#endif // INGEN_SHARED_LV2ATOM_HPP
diff --git a/src/shared/LV2Features.hpp b/src/shared/LV2Features.hpp
index ffc48ab2..75bbcda3 100644
--- a/src/shared/LV2Features.hpp
+++ b/src/shared/LV2Features.hpp
@@ -21,7 +21,9 @@
#include <map>
#include <string>
#include <vector>
+
#include "lv2/lv2plug.in/ns/lv2core/lv2.h"
+
#include "raul/SharedPtr.hpp"
namespace Ingen {
diff --git a/src/shared/Module.hpp b/src/shared/Module.hpp
index 841e8890..60acf1ff 100644
--- a/src/shared/Module.hpp
+++ b/src/shared/Module.hpp
@@ -15,8 +15,8 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef INGEN_MODULE_MODULE_HPP
-#define INGEN_MODULE_MODULE_HPP
+#ifndef INGEN_SHARED_MODULE_HPP
+#define INGEN_SHARED_MODULE_HPP
#include <glibmm/module.h>
@@ -45,4 +45,4 @@ struct Module {
} // namespace Shared
} // namespace Ingen
-#endif // INGEN_MODULE_MODULE_HPP
+#endif // INGEN_SHARED_MODULE_HPP
diff --git a/src/shared/OSCSender.hpp b/src/shared/OSCSender.hpp
index 34c5565a..b2febb70 100644
--- a/src/shared/OSCSender.hpp
+++ b/src/shared/OSCSender.hpp
@@ -18,7 +18,6 @@
#ifndef INGEN_SHARED_OSCSENDER_HPP
#define INGEN_SHARED_OSCSENDER_HPP
-#include <stdbool.h>
#include <stddef.h>
#include <lo/lo.h>
diff --git a/src/shared/Store.hpp b/src/shared/Store.hpp
index 997305a1..cc78e946 100644
--- a/src/shared/Store.hpp
+++ b/src/shared/Store.hpp
@@ -19,8 +19,11 @@
#define INGEN_SHARED_STORE_HPP
#include <string>
+
#include <glibmm/thread.h>
+
#include "raul/PathTable.hpp"
+
#include "ingen/GraphObject.hpp"
namespace Ingen {
diff --git a/src/shared/runtime_paths.hpp b/src/shared/runtime_paths.hpp
index 4a2ff81a..3ed48f00 100644
--- a/src/shared/runtime_paths.hpp
+++ b/src/shared/runtime_paths.hpp
@@ -18,10 +18,6 @@
#ifndef INGEN_SHARED_RUNTIME_PATHS_HPP
#define INGEN_SHARED_RUNTIME_PATHS_HPP
-#ifndef _GNU_SOURCE
- #define _GNU_SOURCE
-#endif
-
#include <string>
namespace Ingen {