summaryrefslogtreecommitdiffstats
path: root/src/common/interface
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/interface')
-rw-r--r--src/common/interface/ClientInterface.hpp63
-rw-r--r--src/common/interface/CommonInterface.hpp77
-rw-r--r--src/common/interface/Connection.hpp43
-rw-r--r--src/common/interface/EngineInterface.hpp76
-rw-r--r--src/common/interface/EventType.hpp80
-rw-r--r--src/common/interface/GraphObject.hpp53
-rw-r--r--src/common/interface/Node.hpp52
-rw-r--r--src/common/interface/Patch.hpp52
-rw-r--r--src/common/interface/Plugin.hpp65
-rw-r--r--src/common/interface/Port.hpp58
-rw-r--r--src/common/interface/PortType.hpp100
-rw-r--r--src/common/interface/README11
-rw-r--r--src/common/interface/Resource.hpp100
13 files changed, 0 insertions, 830 deletions
diff --git a/src/common/interface/ClientInterface.hpp b/src/common/interface/ClientInterface.hpp
deleted file mode 100644
index 39a121b1..00000000
--- a/src/common/interface/ClientInterface.hpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2007-2009 David 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_INTERFACE_CLIENTINTERFACE_HPP
-#define INGEN_INTERFACE_CLIENTINTERFACE_HPP
-
-#include <stdio.h>
-#include <string>
-#include <inttypes.h>
-#include "interface/CommonInterface.hpp"
-
-namespace Raul { class Path; class URI; }
-
-namespace Ingen {
-namespace Shared {
-
-/** The (only) interface the engine uses to communicate with clients.
- * Purely virtual (except for the destructor).
- *
- * \ingroup interface
- */
-class ClientInterface : public CommonInterface
-{
-public:
- virtual ~ClientInterface() {}
-
- virtual Raul::URI uri() const = 0;
-
- virtual void response_ok(int32_t id) = 0;
- virtual void response_error(int32_t id, const std::string& msg) = 0;
-
- /** 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() = 0;
- virtual void transfer_end() = 0;
-
- virtual void error(const std::string& msg) = 0;
-
- virtual void activity(const Raul::Path& path) = 0;
-};
-
-
-} // namespace Shared
-} // namespace Ingen
-
-#endif
diff --git a/src/common/interface/CommonInterface.hpp b/src/common/interface/CommonInterface.hpp
deleted file mode 100644
index cbf3573c..00000000
--- a/src/common/interface/CommonInterface.hpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2008-2009 David 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_INTERFACE_COMMONINTERFACE_HPP
-#define INGEN_INTERFACE_COMMONINTERFACE_HPP
-
-#include <inttypes.h>
-#include <string>
-#include "interface/CommonInterface.hpp"
-#include "interface/GraphObject.hpp"
-
-namespace Raul { class Atom; class Path; class URI; }
-
-namespace Ingen {
-namespace Shared {
-
-
-/** Abstract interface common to both engine and clients.
- * Purely virtual (except for the destructor).
- *
- * \ingroup interface
- */
-class CommonInterface
-{
-public:
- virtual ~CommonInterface() {}
-
- /** Begin an atomic bundle */
- virtual void bundle_begin() = 0;
-
- /** End (and send) an atomic bundle */
- virtual void bundle_end() = 0;
-
- virtual void put(const Raul::URI& uri,
- const Resource::Properties& properties,
- Resource::Graph ctx=Resource::DEFAULT) = 0;
-
- virtual void delta(const Raul::URI& uri,
- const Resource::Properties& remove,
- const Resource::Properties& add) = 0;
-
- virtual void move(const Raul::Path& old_path,
- const Raul::Path& new_path) = 0;
-
- virtual void del(const Raul::Path& path) = 0;
-
- virtual void connect(const Raul::Path& src_port_path,
- const Raul::Path& dst_port_path) = 0;
-
- virtual void disconnect(const Raul::Path& src_port_path,
- const Raul::Path& dst_port_path) = 0;
-
- virtual void set_property(const Raul::URI& subject,
- const Raul::URI& predicate,
- const Raul::Atom& value) = 0;
-};
-
-
-} // namespace Shared
-} // namespace Ingen
-
-#endif // INGEN_INTERFACE_COMMONINTERFACE_HPP
-
diff --git a/src/common/interface/Connection.hpp b/src/common/interface/Connection.hpp
deleted file mode 100644
index 8e429631..00000000
--- a/src/common/interface/Connection.hpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2007-2009 David 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_INTERFACE_CONNECTION_HPP
-#define INGEN_INTERFACE_CONNECTION_HPP
-
-#include "raul/Path.hpp"
-
-namespace Ingen {
-namespace Shared {
-
-
-/** A connection between two ports.
- *
- * \ingroup interface
- */
-class Connection
-{
-public:
- virtual ~Connection() {}
- virtual const Raul::Path src_port_path() const = 0;
- virtual const Raul::Path dst_port_path() const = 0;
-};
-
-
-} // namespace Shared
-} // namespace Ingen
-
-#endif // INGEN_INTERFACE_CONNECTION_HPP
diff --git a/src/common/interface/EngineInterface.hpp b/src/common/interface/EngineInterface.hpp
deleted file mode 100644
index 384c500d..00000000
--- a/src/common/interface/EngineInterface.hpp
+++ /dev/null
@@ -1,76 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2007-2009 David Robillard <http://drobilla.net>
- *
- * Ingen is free software = 0; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation = 0; 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 = 0; 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 = 0; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef INGEN_INTERFACE_ENGINEINTERFACE_HPP
-#define INGEN_INTERFACE_ENGINEINTERFACE_HPP
-
-#include <inttypes.h>
-#include "interface/CommonInterface.hpp"
-
-namespace Ingen {
-namespace Shared {
-
-class ClientInterface;
-
-
-/** The (only) interface clients use to communicate with the engine.
- * Purely virtual (except for the destructor).
- *
- * \ingroup interface
- */
-class EngineInterface : public CommonInterface
-{
-public:
- virtual ~EngineInterface() {}
-
- virtual Raul::URI uri() const = 0;
-
- // Responses
- virtual void set_next_response_id(int32_t id) = 0;
- virtual void disable_responses() = 0;
-
- // Client registration
- virtual void register_client(ClientInterface* client) = 0;
- virtual void unregister_client(const Raul::URI& uri) = 0;
-
- // Engine commands
- virtual void load_plugins() = 0;
- virtual void activate() = 0;
- virtual void deactivate() = 0;
- virtual void quit() = 0;
-
- // Object commands
-
- virtual void disconnect_all(const Raul::Path& parent_patch_path,
- const Raul::Path& path) = 0;
-
- // Requests
-
- virtual void ping() = 0;
-
- virtual void get(const Raul::URI& uri) = 0;
-
- virtual void request_property(const Raul::URI& uri,
- const Raul::URI& key) = 0;
-};
-
-
-} // namespace Shared
-} // namespace Ingen
-
-#endif // INGEN_INTERFACE_ENGINEINTERFACE_HPP
-
diff --git a/src/common/interface/EventType.hpp b/src/common/interface/EventType.hpp
deleted file mode 100644
index 8a19ba42..00000000
--- a/src/common/interface/EventType.hpp
+++ /dev/null
@@ -1,80 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2008-2009 David 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_INTERFACE_EVENTTYPE_HPP
-#define INGEN_INTERFACE_EVENTTYPE_HPP
-
-#include "raul/URI.hpp"
-
-namespace Ingen {
-namespace Shared {
-
-
-/** A type of event (that can live in an EventBuffer).
- */
-class EventType {
-public:
-
- enum Symbol {
- UNKNOWN = 0,
- MIDI = 1,
- OSC = 2
- };
-
- EventType(const Raul::URI& uri)
- : _symbol(UNKNOWN)
- {
- if (uri == type_uri(MIDI)) {
- _symbol = MIDI;
- } else if (uri == type_uri(OSC)) {
- _symbol = OSC;
- }
- }
-
- EventType(Symbol symbol)
- : _symbol(symbol)
- {}
-
- inline const Raul::URI& uri() const { return type_uri(_symbol); }
-
- inline bool operator==(const Symbol& symbol) const { return (_symbol == symbol); }
- inline bool operator!=(const Symbol& symbol) const { return (_symbol != symbol); }
- inline bool operator==(const EventType& type) const { return (_symbol == type._symbol); }
- inline bool operator!=(const EventType& type) const { return (_symbol != type._symbol); }
-
- inline bool is_midi() { return _symbol == MIDI; }
- inline bool is_osc() { return _symbol == OSC; }
-
-private:
- static inline const Raul::URI& type_uri(unsigned symbol_num) {
- assert(symbol_num <= OSC);
- static const Raul::URI uris[] = {
- "http://drobilla.net/ns/ingen#nil",
- "http://drobilla.net/ns/ingen#MidiEvent",
- "http://drobilla.net/ns/ingen#OSCEvent"
- };
- return uris[symbol_num];
- }
-
- Symbol _symbol;
-};
-
-
-} // namespace Shared
-} // namespace Ingen
-
-#endif // INGEN_INTERFACE_EVENTTYPE_HPP
diff --git a/src/common/interface/GraphObject.hpp b/src/common/interface/GraphObject.hpp
deleted file mode 100644
index ed592971..00000000
--- a/src/common/interface/GraphObject.hpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2007-2009 David 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_INTERFACE_GRAPHOBJECT_HPP
-#define INGEN_INTERFACE_GRAPHOBJECT_HPP
-
-#include "raul/Deletable.hpp"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
-#include "interface/Resource.hpp"
-
-namespace Raul { class Atom; }
-
-namespace Ingen {
-namespace Shared {
-
-
-/** An object on the audio graph - Patch, Node, Port, etc.
- *
- * Purely virtual (except for the destructor).
- *
- * \ingroup interface
- */
-class GraphObject : public Raul::Deletable
- , public virtual Resource
-{
-public:
- virtual void set_path(const Raul::Path& path) = 0;
-
- virtual const Raul::Path& path() const = 0;
- virtual const Raul::Symbol& symbol() const = 0;
- virtual GraphObject* graph_parent() const = 0;
-};
-
-
-} // namespace Shared
-} // namespace Ingen
-
-#endif // INGEN_INTERFACE_GRAPHOBJECT_HPP
diff --git a/src/common/interface/Node.hpp b/src/common/interface/Node.hpp
deleted file mode 100644
index e7669761..00000000
--- a/src/common/interface/Node.hpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2007-2009 David 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_INTERFACE_NODE_HPP
-#define INGEN_INTERFACE_NODE_HPP
-
-#include <stdint.h>
-#include "GraphObject.hpp"
-
-namespace Ingen {
-namespace Shared {
-
-class Port;
-class Plugin;
-
-
-/** A Node (or "module") in a Patch (which is also a Node).
- *
- * A Node is a unit with input/output ports, a process() method, and some other
- * things.
- *
- * Purely virtual (except for the destructor).
- *
- * \ingroup interface
- */
-class Node : public virtual GraphObject
-{
-public:
- virtual uint32_t num_ports() const = 0;
- virtual Port* port(uint32_t index) const = 0;
- virtual const Plugin* plugin() const = 0;
-};
-
-
-} // namespace Shared
-} // namespace Ingen
-
-#endif // INGEN_INTERFACE_NODE_HPP
diff --git a/src/common/interface/Patch.hpp b/src/common/interface/Patch.hpp
deleted file mode 100644
index 87f12bca..00000000
--- a/src/common/interface/Patch.hpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2007-2009 David 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_INTERFACE_PATCH_HPP
-#define INGEN_INTERFACE_PATCH_HPP
-
-#include <map>
-#include "raul/SharedPtr.hpp"
-#include "raul/List.hpp"
-#include "interface/Node.hpp"
-
-namespace Ingen {
-namespace Shared {
-
-class Connection;
-
-
-/** A Path (graph of Nodes/Connections)
- *
- * \ingroup interface
- */
-class Patch : virtual public Node
-{
-public:
- typedef std::pair<const Port*, const Port*> ConnectionsKey;
- typedef std::map< ConnectionsKey, SharedPtr<Connection> > Connections;
-
- virtual const Connections& connections() const = 0;
-
- virtual bool enabled() const = 0;
- virtual uint32_t internal_poly() const = 0;
-};
-
-
-} // namespace Shared
-} // namespace Ingen
-
-#endif // INGEN_INTERFACE_PATCH_HPP
diff --git a/src/common/interface/Plugin.hpp b/src/common/interface/Plugin.hpp
deleted file mode 100644
index 0dfd85d3..00000000
--- a/src/common/interface/Plugin.hpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2007-2009 David 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_INTERFACE_PLUGIN_HPP
-#define INGEN_INTERFACE_PLUGIN_HPP
-
-#include <string>
-#include "raul/URI.hpp"
-#include "interface/Resource.hpp"
-
-namespace Ingen {
-namespace Shared {
-
-
-class Plugin : virtual public Resource
-{
-public:
- enum Type { NIL, LV2, Internal, Patch };
-
- virtual Type type() const = 0;
-
- static inline const Raul::URI& type_uri(Type type) {
- static const Raul::URI uris[] = {
- "http://drobilla.net/ns/ingen#nil",
- "http://lv2plug.in/ns/lv2core#Plugin",
- "http://drobilla.net/ns/ingen#Internal",
- "http://drobilla.net/ns/ingen#Patch"
- };
-
- return uris[type];
- }
-
- inline const Raul::URI& type_uri() const { return type_uri(type()); }
-
- static inline Type type_from_uri(const Raul::URI& uri) {
- if (uri == type_uri(LV2))
- return LV2;
- else if (uri == type_uri(Internal))
- return Internal;
- else if (uri == type_uri(Patch))
- return Patch;
- else
- return NIL;
- }
-};
-
-
-} // namespace Shared
-} // namespace Ingen
-
-#endif // INGEN_INTERFACE_PLUGIN_HPP
diff --git a/src/common/interface/Port.hpp b/src/common/interface/Port.hpp
deleted file mode 100644
index 1ddcc0a9..00000000
--- a/src/common/interface/Port.hpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2007-2009 David 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_INTERFACE_PORT_HPP
-#define INGEN_INTERFACE_PORT_HPP
-
-#include <set>
-#include <stdint.h>
-#include "GraphObject.hpp"
-#include "PortType.hpp"
-
-namespace Raul { class Atom; }
-
-namespace Ingen {
-namespace Shared {
-
-
-/** A Port on a Node.
- *
- * Purely virtual (except for the destructor).
- *
- * \ingroup interface
- */
-class Port : public virtual GraphObject
-{
-public:
- typedef std::set<Shared::PortType> PortTypes;
-
- virtual const PortTypes& types() const = 0;
-
- inline bool is_a(PortType type) const { return types().find(type) != types().end(); }
-
- virtual bool supports(const Raul::URI& value_type) const = 0;
-
- virtual uint32_t index() const = 0;
- virtual bool is_input() const = 0;
- virtual const Raul::Atom& value() const = 0;
-};
-
-
-} // namespace Shared
-} // namespace Ingen
-
-#endif // INGEN_INTERFACE_PORT_HPP
diff --git a/src/common/interface/PortType.hpp b/src/common/interface/PortType.hpp
deleted file mode 100644
index fa28bfa4..00000000
--- a/src/common/interface/PortType.hpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2007-2009 David 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_INTERFACE_PORTTYPE_HPP
-#define INGEN_INTERFACE_PORTTYPE_HPP
-
-#include <raul/URI.hpp>
-
-namespace Ingen {
-namespace Shared {
-
-
-/** The type of a port.
- *
- * This type refers to the type of the port itself (not necessarily the type
- * of its contents). Ports with different types can contain the same type of
- * data, but may e.g. have different access semantics.
- */
-class PortType {
-public:
- enum Symbol {
- UNKNOWN = 0,
- AUDIO = 1,
- CONTROL = 2,
- EVENTS = 3,
- VALUE = 4,
- MESSAGE = 5,
- };
-
- PortType(const Raul::URI& uri)
- : _symbol(UNKNOWN)
- {
- if (uri == type_uri(AUDIO)) {
- _symbol = AUDIO;
- } else if (uri == type_uri(CONTROL)) {
- _symbol = CONTROL;
- } else if (uri == type_uri(EVENTS)) {
- _symbol = EVENTS;
- } else if (uri == type_uri(VALUE)) {
- _symbol = VALUE;
- } else if (uri == type_uri(MESSAGE)) {
- _symbol = MESSAGE;
- }
- }
-
- PortType(Symbol symbol)
- : _symbol(symbol)
- {}
-
- inline const Raul::URI& uri() const { return type_uri(_symbol); }
- inline Symbol symbol() const { return _symbol; }
-
- inline bool operator==(const Symbol& symbol) const { return (_symbol == symbol); }
- inline bool operator!=(const Symbol& symbol) const { return (_symbol != symbol); }
- inline bool operator==(const PortType& type) const { return (_symbol == type._symbol); }
- inline bool operator!=(const PortType& type) const { return (_symbol != type._symbol); }
- inline bool operator<(const PortType& type) const { return (_symbol < type._symbol); }
-
- inline bool is_audio() { return _symbol == AUDIO; }
- inline bool is_control() { return _symbol == CONTROL; }
- inline bool is_events() { return _symbol == EVENTS; }
- inline bool is_value() { return _symbol == VALUE; }
- inline bool is_message() { return _symbol == MESSAGE; }
-
-private:
- static inline const Raul::URI& type_uri(unsigned symbol_num) {
- assert(symbol_num <= MESSAGE);
- static const Raul::URI uris[] = {
- "http://drobilla.net/ns/ingen#nil",
- "http://lv2plug.in/ns/lv2core#AudioPort",
- "http://lv2plug.in/ns/lv2core#ControlPort",
- "http://lv2plug.in/ns/ext/event#EventPort",
- "http://lv2plug.in/ns/ext/atom#ValuePort",
- "http://lv2plug.in/ns/ext/atom#MessagePort"
- };
- return uris[symbol_num];
- }
-
- Symbol _symbol;
-};
-
-
-} // namespace Shared
-} // namespace Ingen
-
-#endif // INGEN_INTERFACE_PORTTYPE_HPP
diff --git a/src/common/interface/README b/src/common/interface/README
deleted file mode 100644
index f79bdc2a..00000000
--- a/src/common/interface/README
+++ /dev/null
@@ -1,11 +0,0 @@
-This directory contains the core engine/client interfaces, code used on
-both the engine side and client side.
-
-It's very, very important that nothing here gets messed up that violates
-client/engine separation. All interfaces use simple messages composed of
-serializable types.
-
-The interface here maps directly on to the OSC interface - except it can
-happen in the same process as well, with only (virtual) function call
-overhead.
-
diff --git a/src/common/interface/Resource.hpp b/src/common/interface/Resource.hpp
deleted file mode 100644
index 3b2f9aa6..00000000
--- a/src/common/interface/Resource.hpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2008-2009 David 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_INTERFACE_RESOURCE_HPP
-#define INGEN_INTERFACE_RESOURCE_HPP
-
-#include <string>
-#include <map>
-
-namespace Raul { class Atom; class URI; }
-
-namespace Ingen {
-namespace Shared {
-
-
-class Resource
-{
-public:
- enum Graph {
- DEFAULT,
- EXTERNAL,
- INTERNAL
- };
-
- class Property : public Raul::Atom {
- public:
- Property(const Raul::Atom& atom, Graph ctx=DEFAULT)
- : Raul::Atom(atom)
- , _ctx(ctx)
- {}
-
- Property() : Raul::Atom(), _ctx(DEFAULT) {}
- Property(int32_t val) : Raul::Atom(val), _ctx(DEFAULT) {}
- Property(float val) : Raul::Atom(val), _ctx(DEFAULT) {}
- Property(bool val) : Raul::Atom(val), _ctx(DEFAULT) {}
- Property(const char* val) : Raul::Atom(val), _ctx(DEFAULT) {}
- Property(const std::string& val) : Raul::Atom(val), _ctx(DEFAULT) {}
-
- Property(const Raul::Atom::DictValue& dict)
- : Raul::Atom(dict)
- , _ctx(DEFAULT)
- {}
-
- Property(Type t, const std::string& uri)
- : Raul::Atom(t, uri)
- , _ctx(DEFAULT)
- {}
-
- Graph context() const { return _ctx; }
- void set_context(Graph ctx) { _ctx = ctx; }
-
- private:
- Graph _ctx;
- };
-
- virtual ~Resource() {}
-
- virtual const Raul::URI& uri() const = 0;
-
- typedef std::multimap<Raul::URI, Property> Properties;
-
- static void set_context(Properties& props, Graph ctx) {
- for (Properties::iterator i = props.begin(); i != props.end(); ++i) {
- i->second.set_context(ctx);
- }
- }
-
- virtual Properties properties(Resource::Graph ctx) const = 0;
-
- virtual const Properties& properties() const = 0;
- virtual Properties& properties() = 0;
- virtual const Raul::Atom& get_property(const Raul::URI& uri) const = 0;
- virtual Raul::Atom& set_property(const Raul::URI& uri,
- const Raul::Atom& value) = 0;
- virtual void add_property(const Raul::URI& uri,
- const Raul::Atom& value) = 0;
- virtual bool has_property(const Raul::URI& uri,
- const Raul::Atom& value) const = 0;
-};
-
-
-} // namespace Shared
-} // namespace Ingen
-
-#endif // INGEN_INTERFACE_RESOURCE_HPP
-