summaryrefslogtreecommitdiffstats
path: root/src/bindings
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-06-03 04:16:04 +0000
committerDavid Robillard <d@drobilla.net>2009-06-03 04:16:04 +0000
commit4baec44d69d855a28d234b375bdb902e89114356 (patch)
tree753b8a475248507cbf13812ae0770bb24f1122f5 /src/bindings
parentbb4f3f48003b20266862752e402ed492e28303bf (diff)
downloadingen-4baec44d69d855a28d234b375bdb902e89114356.tar.gz
ingen-4baec44d69d855a28d234b375bdb902e89114356.tar.bz2
ingen-4baec44d69d855a28d234b375bdb902e89114356.zip
Update bindings.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2079 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/Client.hpp74
-rwxr-xr-xsrc/bindings/build.sh4
-rw-r--r--src/bindings/ingen.i15
-rw-r--r--src/bindings/ingen_bindings.hpp1
4 files changed, 26 insertions, 68 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;