diff options
-rw-r--r-- | src/bindings/Client.hpp | 74 | ||||
-rwxr-xr-x | src/bindings/build.sh | 4 | ||||
-rw-r--r-- | src/bindings/ingen.i | 15 | ||||
-rw-r--r-- | src/bindings/ingen_bindings.hpp | 1 | ||||
-rw-r--r-- | src/client/PluginUI.cpp | 1 | ||||
-rw-r--r-- | src/common/interface/CommonInterface.hpp | 4 | ||||
-rw-r--r-- | src/engine/JackMidiDriver.cpp | 1 | ||||
-rw-r--r-- | src/engine/LV2Info.hpp | 1 | ||||
-rw-r--r-- | src/engine/NodeFactory.hpp | 1 | ||||
-rw-r--r-- | src/module/World.hpp | 33 | ||||
-rw-r--r-- | src/module/global.cpp | 1 | ||||
-rw-r--r-- | src/serialisation/serialisation.hpp | 6 |
12 files changed, 51 insertions, 91 deletions
diff --git a/src/bindings/Client.hpp b/src/bindings/Client.hpp index 0f293c36..cdb6b352 100644 --- a/src/bindings/Client.hpp +++ b/src/bindings/Client.hpp @@ -1,3 +1,4 @@ +#include "interface/Resource.hpp" /** Need a stub ClientInterface without pure virtual methods * to allow inheritance in the script @@ -10,60 +11,21 @@ public: engine->register_client(this); } - virtual void response_ok(int32_t id) {} - - virtual void response_error(int32_t id, const std::string& msg) {} - - virtual void enable() {} - - /** Signifies the client does not wish to receive any messages until - * enable is called. Useful for performance and avoiding feedback. - */ - virtual void disable() {} - - /** Bundles are a group of messages that are guaranteed to be in an - * atomic unit with guaranteed order (eg a packet). For datagram - * protocols (like UDP) there is likely an upper limit on bundle size. - */ - virtual void bundle_begin() {} - virtual void bundle_end() {} - - /** Transfers are 'weak' bundles. These are used to break a large group - * of similar/related messages into larger chunks (solely for communication - * efficiency). A bunch of messages in a transfer will arrive as 1 or more - * bundles (so a transfer can exceed the maximum bundle (packet) size). - */ - virtual void transfer_begin() {} - virtual void transfer_end() {} - - virtual void error(const std::string& msg) {} - - void put(const URI& path, - const Resource::Properties& properties) {} - - virtual void clear_patch(const std::string& path) {} - - virtual void move(const std::string& old_path, - const std::string& new_path) {} - - virtual void connect(const std::string& src_port_path, - const std::string& dst_port_path) {} - - virtual void disconnect(const std::string& src_port_path, - const std::string& dst_port_path) {} - - virtual void set_property(const std::string& subject_path, - const std::string& predicate, - const Raul::Atom& value) {} - - virtual void set_port_value(const std::string& port_path, - const std::string& type_uri, - uint32_t data_size, - const void* data) {} - - virtual void set_voice_value(const std::string& port_path, - const std::string& type_uri, - uint32_t voice, - uint32_t data_size, - const void* data) {} + void bundle_begin() {} + void bundle_end() {} + void transfer_begin() {} + void transfer_end() {} + void response_ok(int32_t id) {} + void response_error(int32_t id, const std::string& msg) {} + void error(const std::string& msg) {} + void put(const Raul::URI& path, const Ingen::Shared::Resource::Properties& properties) {} + void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path) {} + void del(const Raul::Path& path) {} + void clear_patch(const Raul::Path& path) {} + void move(const Raul::Path& old_path, const Raul::Path& new_path) {} + void disconnect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path) {} + void set_property(const Raul::URI& subject, const Raul::URI& key, const Raul::Atom& value) {} + void set_port_value(const Raul::Path& port_path, const Raul::Atom& value) {} + void set_voice_value(const Raul::Path& port_path, uint32_t voice, const Raul::Atom& value) {} + void activity(const Raul::Path& port_path) {} }; diff --git a/src/bindings/build.sh b/src/bindings/build.sh new file mode 100755 index 00000000..d279433a --- /dev/null +++ b/src/bindings/build.sh @@ -0,0 +1,4 @@ +#!/bin/sh +swig -c++ -python ./ingen.i + +gcc -shared -o _ingen.so ./ingen_wrap.cxx ./ingen_bindings.cpp -I.. -I../common `pkg-config --cflags --libs glibmm-2.4` `python-config --cflags --ldflags` -fPIC diff --git a/src/bindings/ingen.i b/src/bindings/ingen.i index 5a303701..19c4b1f1 100644 --- a/src/bindings/ingen.i +++ b/src/bindings/ingen.i @@ -1,16 +1,12 @@ %include "stl.i" %module(directors="1") ingen %{ -#include "../common/interface/CommonInterface.hpp" -#include "../common/interface/ClientInterface.hpp" -#include "../common/interface/EngineInterface.hpp" -#include "../module/World.hpp" +#include "common/interface/CommonInterface.hpp" +#include "common/interface/ClientInterface.hpp" +#include "common/interface/EngineInterface.hpp" +#include "module/World.hpp" #include "ingen_bindings.hpp" #include "Client.hpp" - -namespace Ingen { namespace Shared { - class World; -} } %} /*%ignore Ingen::Shared::EngineInterface;*/ @@ -27,9 +23,6 @@ namespace Ingen { namespace Shared { %feature("director") Ingen::Shared::ClientInterface; //%feature("director") Ingen::Shared::EngineInterface; -namespace Ingen { namespace Shared { - class World; -} } typedef Ingen::Shared::World World; namespace Ingen { namespace Shared { %extend World { diff --git a/src/bindings/ingen_bindings.hpp b/src/bindings/ingen_bindings.hpp index 0d501de9..f76a4ea7 100644 --- a/src/bindings/ingen_bindings.hpp +++ b/src/bindings/ingen_bindings.hpp @@ -4,7 +4,6 @@ namespace Ingen { namespace Shared { - class World; extern World* ingen_world; diff --git a/src/client/PluginUI.cpp b/src/client/PluginUI.cpp index 9c711ee3..4ea5a9e2 100644 --- a/src/client/PluginUI.cpp +++ b/src/client/PluginUI.cpp @@ -17,6 +17,7 @@ #include <iostream> #include "lv2ext/lv2_event_helpers.h" +#include "shared/LV2Features.hpp" #include "shared/LV2URIMap.hpp" #include "PluginUI.hpp" #include "NodeModel.hpp" diff --git a/src/common/interface/CommonInterface.hpp b/src/common/interface/CommonInterface.hpp index e3c5998d..5855bfaa 100644 --- a/src/common/interface/CommonInterface.hpp +++ b/src/common/interface/CommonInterface.hpp @@ -45,8 +45,8 @@ public: /** End (and send) an atomic bundle */ virtual void bundle_end() = 0; - virtual void put(const Raul::URI& uri, - const Resource::Properties& properties) = 0; + virtual void put(const Raul::URI& uri, + const Ingen::Shared::Resource::Properties& properties) = 0; virtual void move(const Raul::Path& old_path, const Raul::Path& new_path) = 0; diff --git a/src/engine/JackMidiDriver.cpp b/src/engine/JackMidiDriver.cpp index 039bf7b0..8c6a7020 100644 --- a/src/engine/JackMidiDriver.cpp +++ b/src/engine/JackMidiDriver.cpp @@ -21,6 +21,7 @@ #include "raul/Maid.hpp" #include "raul/midi_events.h" #include "module/World.hpp" +#include "shared/LV2Features.hpp" #include "lv2ext/lv2_event_helpers.h" #include "shared/LV2URIMap.hpp" #include "JackMidiDriver.hpp" diff --git a/src/engine/LV2Info.hpp b/src/engine/LV2Info.hpp index b5833df8..63b1b9c2 100644 --- a/src/engine/LV2Info.hpp +++ b/src/engine/LV2Info.hpp @@ -29,6 +29,7 @@ #include "module/global.hpp" #include "module/World.hpp" #include "shared/LV2URIMap.hpp" +#include "shared/LV2Features.hpp" #include "lv2ext/lv2_uri_map.h" #include "lv2ext/lv2_event.h" diff --git a/src/engine/NodeFactory.hpp b/src/engine/NodeFactory.hpp index fdd8a9c5..fe443424 100644 --- a/src/engine/NodeFactory.hpp +++ b/src/engine/NodeFactory.hpp @@ -23,6 +23,7 @@ #include <string> #include <pthread.h> #include <glibmm/module.h> +#include "raul/SharedPtr.hpp" #include "ingen-config.h" #include "module/global.hpp" #include "raul/URI.hpp" diff --git a/src/module/World.hpp b/src/module/World.hpp index 013d615a..27c9c764 100644 --- a/src/module/World.hpp +++ b/src/module/World.hpp @@ -18,27 +18,24 @@ #ifndef INGEN_WORLD_HPP #define INGEN_WORLD_HPP -#include "ingen-config.h" - -#include <string> +#include <boost/shared_ptr.hpp> #include <glibmm/module.h> -#include "raul/SharedPtr.hpp" -#include "shared/LV2Features.hpp" -#ifdef HAVE_SLV2 -#include "slv2/slv2.h" -#endif +typedef struct _SLV2World* SLV2World; namespace Redland { class World; } namespace Ingen { + class Engine; namespace Serialisation { class Serialiser; class Parser; } namespace Shared { + class EngineInterface; class Store; +class LV2Features; /** The "world" all Ingen modules may share. @@ -52,20 +49,18 @@ class Store; * The Ingen System(TM) and whatnot. */ struct World { -#ifdef HAVE_SLV2 - SLV2World slv2_world; - LV2Features* lv2_features; -#endif - Redland::World* rdf_world; - SharedPtr<EngineInterface> engine; - SharedPtr<Engine> local_engine; - SharedPtr<Serialisation::Serialiser> serialiser; - SharedPtr<Serialisation::Parser> parser; - SharedPtr<Store> store; + SLV2World slv2_world; + LV2Features* lv2_features; + + boost::shared_ptr<EngineInterface> engine; + boost::shared_ptr<Engine> local_engine; + boost::shared_ptr<Serialisation::Serialiser> serialiser; + boost::shared_ptr<Serialisation::Parser> parser; + boost::shared_ptr<Store> store; - SharedPtr<Glib::Module> serialisation_module; + boost::shared_ptr<Glib::Module> serialisation_module; }; diff --git a/src/module/global.cpp b/src/module/global.cpp index 1c592682..2415f6ef 100644 --- a/src/module/global.cpp +++ b/src/module/global.cpp @@ -17,6 +17,7 @@ #include <iostream> #include "redlandmm/World.hpp" +#include "shared/LV2Features.hpp" #include "global.hpp" #include "World.hpp" diff --git a/src/serialisation/serialisation.hpp b/src/serialisation/serialisation.hpp index b984102d..d04639a5 100644 --- a/src/serialisation/serialisation.hpp +++ b/src/serialisation/serialisation.hpp @@ -18,6 +18,8 @@ #ifndef INGEN_SERIALISATION_H #define INGEN_SERIALISATION_H +#include <boost/shared_ptr.hpp> + namespace Ingen { namespace Shared { class World; class Store; } @@ -31,8 +33,8 @@ class Serialiser; extern "C" { extern Parser* new_parser(); - extern Serialiser* new_serialiser(Ingen::Shared::World* world, - SharedPtr<Shared::Store> store); + extern Serialiser* new_serialiser(Ingen::Shared::World* world, + boost::shared_ptr<Shared::Store> store); } |