summaryrefslogtreecommitdiffstats
path: root/src/bindings
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-02-24 20:07:29 +0000
committerDavid Robillard <d@drobilla.net>2015-02-24 20:07:29 +0000
commitf69c75e637cc3c789a675d1811a2f632732bafc0 (patch)
treeb82b69f45d6c92ae3c7000cc465ee18bfa0bbb15 /src/bindings
parent9d7c1e971d51561c4bb28fa1064503e5f266908f (diff)
downloadingen-f69c75e637cc3c789a675d1811a2f632732bafc0.tar.gz
ingen-f69c75e637cc3c789a675d1811a2f632732bafc0.tar.bz2
ingen-f69c75e637cc3c789a675d1811a2f632732bafc0.zip
Remove crusty old internal bindings.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5608 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/Client.hpp42
-rwxr-xr-xsrc/bindings/build.sh4
-rw-r--r--src/bindings/ingen.i47
-rw-r--r--src/bindings/ingen_bindings.cpp61
-rw-r--r--src/bindings/ingen_bindings.hpp32
-rwxr-xr-xsrc/bindings/test_ingen.py34
6 files changed, 0 insertions, 220 deletions
diff --git a/src/bindings/Client.hpp b/src/bindings/Client.hpp
deleted file mode 100644
index f277e7f9..00000000
--- a/src/bindings/Client.hpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- This file is part of Ingen.
- Copyright 2007-2012 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/>.
-*/
-
-#include <string>
-
-#include "ingen/Resource.hpp"
-
-/** Need a stub ClientInterface without pure virtual methods
- * to allow inheritance in the script
- */
-class Client : public Ingen::ClientInterface
-{
-public:
- /** Wrapper for engine->register_client to appease SWIG */
- virtual void subscribe(Ingen::ServerInterface* engine) {
- engine->register_client(this);
- }
-
- void bundle_begin() {}
- void bundle_end() {}
- void response(int32_t id, Status status, const std::string& subject) {}
- void error(const std::string& msg) {}
- void put(const Raul::URI& path, const Ingen::Resource::Properties& properties) {}
- void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path) {}
- void del(const Raul::URI& uri) {}
- 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 Atom& value) {}
-};
diff --git a/src/bindings/build.sh b/src/bindings/build.sh
deleted file mode 100755
index a1f17e8a..00000000
--- a/src/bindings/build.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-swig -c++ -python ./ingen.i
-
-gcc -shared -o _ingen.so ./ingen_wrap.cxx ./ingen_bindings.cpp -I.. -I../.. `pkg-config --cflags --libs glibmm-2.4` `python-config --cflags --ldflags` -fPIC
diff --git a/src/bindings/ingen.i b/src/bindings/ingen.i
deleted file mode 100644
index b29a61ce..00000000
--- a/src/bindings/ingen.i
+++ /dev/null
@@ -1,47 +0,0 @@
-%include "stl.i"
-%module(directors="1") ingen
-%{
-#include "ingen/CommonInterface.hpp"
-#include "ingen/ClientInterface.hpp"
-#include "ingen/EngineInterface.hpp"
-#include "module/World.hpp"
-#include "ingen_bindings.hpp"
-#include "Client.hpp"
-%}
-
-%include "../../ingen/CommonInterface.hpp"
-%include "../../ingen/ClientInterface.hpp"
-%include "../../ingen/EngineInterface.hpp"
-%include "../../includemodule/World.hpp"
-//%include "../module/module.h"
-%include "ingen_bindings.hpp"
-
-// generate directors for all classes that have virtual methods
-%feature("director");
-%feature("director") Ingen::ClientInterface;
-
-typedef Ingen::World World;
-namespace Ingen {
-%extend World {
- World() {
- if (!Ingen::ingen_world) {
- fprintf(stderr, "ERROR: World uninitialized (running within Ingen?)\n");
- abort();
- } else {
- return Ingen::ingen_world;
- }
- }
-
- void iteration() {
- Ingen::script_iteration($self);
- }
-
- /*LILVWorld lilv() { return $self->me->lilv_world; }*/
-};
-
-}
-
-
-%include "Client.hpp"
-
-%feature("director") Client;
diff --git a/src/bindings/ingen_bindings.cpp b/src/bindings/ingen_bindings.cpp
deleted file mode 100644
index b289e685..00000000
--- a/src/bindings/ingen_bindings.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- This file is part of Ingen.
- Copyright 2007-2012 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/>.
-*/
-
-#include "python2.4/Python.h"
-#include "ingen_bindings.hpp"
-#include "server/Engine.hpp"
-#include "ingen/World.hpp"
-
-bool
-run(Ingen::World* world, const char* filename)
-{
- ingen_world = world;
-
- FILE* fd = fopen(filename, "r");
- if (fd) {
- info << "Executing script " << filename << endl;
- Py_Initialize();
- PyRun_SimpleFile(fd, filename);
- Py_Finalize();
- return true;
- } else {
- error << "Unable to open script " << filename << endl;
- return false;
- }
-}
-
-struct IngenBindingsModule : public Ingen::Module {
- void load(Ingen::World* world) {
- world->script_runners.insert(make_pair("application/x-python", &run));
- }
-};
-
-extern "C" {
-
-Ingen::Module*
-ingen_module_load()
-{
- return new IngenBindingsModule();
-}
-
-void
-script_iteration(Ingen::World* world)
-{
- if (world->engine())
- world->engine()->main_iteration();
-}
-
-} // extern "C"
diff --git a/src/bindings/ingen_bindings.hpp b/src/bindings/ingen_bindings.hpp
deleted file mode 100644
index b07baae8..00000000
--- a/src/bindings/ingen_bindings.hpp
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- This file is part of Ingen.
- Copyright 2007-2012 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_BINDINGS_HPP
-#define INGEN_BINDINGS_HPP
-
-namespace Ingen {
-
-class World;
-extern World* ingen_world;
-
-extern "C" {
-bool run(World* world, const char* filename);
-void script_iteration(World* world);
-}
-
-} // namespace Ingen
-
-#endif // INGEN_BINDINGS_HPP
diff --git a/src/bindings/test_ingen.py b/src/bindings/test_ingen.py
deleted file mode 100755
index da90b988..00000000
--- a/src/bindings/test_ingen.py
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env python
-
-import ingen
-import time
-
-world = ingen.World()
-
-class PythonClient(ingen.Client):
- def error(self, msg):
- print "*** Received error:", msg
-
- def bundle_begin(self):
- print "*** Receiving Bundle {"
-
- def bundle_end(self):
- print "*** }"
-
- def put(self, path, properties):
- print "*** Received Object:", path
-
-c = PythonClient()
-c.enable()
-
-e = world.engine
-e.activate()
-
-c.subscribe(e)
-
-e.create_port("/dynamic_port", "http://lv2plug.in/ns/lv2core#AudioPort", False)
-
-while True:
- world.iteration()
- time.sleep(0.1)
-