summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/Builder.cpp2
-rw-r--r--src/shared/ClashAvoider.cpp3
-rw-r--r--src/shared/LV2Atom.cpp5
-rw-r--r--src/shared/LV2Features.cpp4
-rw-r--r--src/shared/LV2Features.hpp77
-rw-r--r--src/shared/LV2URIMap.cpp6
-rw-r--r--src/shared/LV2URIMap.hpp71
-rw-r--r--src/shared/ResourceImpl.cpp4
-rw-r--r--src/shared/ResourceImpl.hpp87
-rw-r--r--src/shared/Store.cpp2
-rw-r--r--src/shared/Store.hpp59
-rw-r--r--src/shared/World.cpp4
12 files changed, 13 insertions, 311 deletions
diff --git a/src/shared/Builder.cpp b/src/shared/Builder.cpp
index 83c2eafc..fff40f3f 100644
--- a/src/shared/Builder.cpp
+++ b/src/shared/Builder.cpp
@@ -25,7 +25,7 @@
#include "ingen/Plugin.hpp"
#include "ingen/Port.hpp"
#include "ingen/shared/Builder.hpp"
-#include "shared/LV2URIMap.hpp"
+#include "ingen/shared/LV2URIMap.hpp"
using namespace std;
using namespace Raul;
diff --git a/src/shared/ClashAvoider.cpp b/src/shared/ClashAvoider.cpp
index b9135951..9e8ea973 100644
--- a/src/shared/ClashAvoider.cpp
+++ b/src/shared/ClashAvoider.cpp
@@ -21,8 +21,7 @@
#include "raul/log.hpp"
#include "ingen/shared/ClashAvoider.hpp"
-
-#include "Store.hpp"
+#include "ingen/shared/Store.hpp"
using namespace std;
using namespace Raul;
diff --git a/src/shared/LV2Atom.cpp b/src/shared/LV2Atom.cpp
index 3381b90b..25e169e0 100644
--- a/src/shared/LV2Atom.cpp
+++ b/src/shared/LV2Atom.cpp
@@ -16,14 +16,13 @@
*/
#include "ingen/shared/LV2Atom.hpp"
+#include "ingen/shared/LV2Features.hpp"
+#include "ingen/shared/LV2URIMap.hpp"
#include "lv2/lv2plug.in/ns/ext/atom/atom.h"
#include "lv2/lv2plug.in/ns/ext/uri-map/uri-map.h"
#include "raul/Atom.hpp"
#include "raul/log.hpp"
-#include "LV2Features.hpp"
-#include "LV2URIMap.hpp"
-
using namespace std;
using namespace Raul;
diff --git a/src/shared/LV2Features.cpp b/src/shared/LV2Features.cpp
index ea5cdd8a..753c0969 100644
--- a/src/shared/LV2Features.cpp
+++ b/src/shared/LV2Features.cpp
@@ -17,8 +17,8 @@
#include <cstdlib>
-#include "LV2Features.hpp"
-#include "LV2URIMap.hpp"
+#include "ingen/shared/LV2Features.hpp"
+#include "ingen/shared/LV2URIMap.hpp"
using namespace std;
diff --git a/src/shared/LV2Features.hpp b/src/shared/LV2Features.hpp
deleted file mode 100644
index f33cc605..00000000
--- a/src/shared/LV2Features.hpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/* This file is part of Ingen.
- * Copyright 2008-2011 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_SHARED_LV2FEATURES_HPP
-#define INGEN_SHARED_LV2FEATURES_HPP
-
-#include <vector>
-
-#include "lv2/lv2plug.in/ns/lv2core/lv2.h"
-
-#include "raul/SharedPtr.hpp"
-
-namespace Ingen {
-
-class Node;
-
-namespace Shared {
-
-class World;
-
-/** Stuff that may need to be passed to an LV2 plugin (i.e. LV2 features).
- */
-class LV2Features {
-public:
- LV2Features();
-
- class Feature {
- public:
- virtual ~Feature() {}
-
- virtual SharedPtr<LV2_Feature> feature(Shared::World* world,
- Node* node) = 0;
- };
-
- class FeatureArray {
- public:
- typedef std::vector< SharedPtr<LV2_Feature> > FeatureVector;
-
- explicit FeatureArray(FeatureVector& features);
-
- ~FeatureArray();
-
- LV2_Feature** array() { return _array; }
-
- private:
- FeatureVector _features;
- LV2_Feature** _array;
- };
-
- void add_feature(SharedPtr<Feature> feature);
-
- SharedPtr<FeatureArray> lv2_features(Shared::World* world,
- Node* node) const;
-
-private:
- typedef std::vector< SharedPtr<Feature> > Features;
- Features _features;
-};
-
-} // namespace Shared
-} // namespace Ingen
-
-#endif // INGEN_SHARED_LV2FEATURES_HPP
diff --git a/src/shared/LV2URIMap.cpp b/src/shared/LV2URIMap.cpp
index 78d22b70..f87fdfce 100644
--- a/src/shared/LV2URIMap.cpp
+++ b/src/shared/LV2URIMap.cpp
@@ -24,12 +24,10 @@
#include <boost/shared_ptr.hpp>
-#include "raul/log.hpp"
-
+#include "ingen/shared/LV2URIMap.hpp"
#include "lv2/lv2plug.in/ns/ext/atom/atom.h"
#include "lv2/lv2plug.in/ns/ext/event/event.h"
-
-#include "LV2URIMap.hpp"
+#include "raul/log.hpp"
using namespace std;
using namespace Raul;
diff --git a/src/shared/LV2URIMap.hpp b/src/shared/LV2URIMap.hpp
deleted file mode 100644
index 4fd50e92..00000000
--- a/src/shared/LV2URIMap.hpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/* This file is part of Ingen.
- * Copyright 2008-2011 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_SHARED_LV2URIMAP_HPP
-#define INGEN_SHARED_LV2URIMAP_HPP
-
-#include <map>
-#include <utility>
-
-#include <boost/utility.hpp>
-
-#include "ingen/shared/URIs.hpp"
-#include "lv2/lv2plug.in/ns/ext/uri-map/uri-map.h"
-#include "raul/URI.hpp"
-
-#include "LV2Features.hpp"
-
-namespace Ingen {
-namespace Shared {
-
-/** Implementation of the LV2 URI Map extension
- */
-class LV2URIMap : public boost::noncopyable, public LV2Features::Feature {
-public:
- LV2URIMap(URIs& uris);
-
- SharedPtr<LV2_Feature> feature(Shared::World*, Node*) {
- return SharedPtr<LV2_Feature>(&uri_map_feature, NullDeleter<LV2_Feature>);
- }
-
- virtual uint32_t uri_to_id(const char* map, const char* uri);
- virtual const char* id_to_uri(const char* map, uint32_t id);
-
- std::pair<bool, uint32_t> event_to_global(uint16_t event_id) const;
- std::pair<bool, uint16_t> global_to_event(uint32_t global_id) const;
-
-private:
- static uint32_t uri_map_uri_to_id(LV2_URI_Map_Callback_Data callback_data,
- const char* map,
- const char* uri);
-
- LV2_Feature uri_map_feature;
- LV2_URI_Map_Feature uri_map_feature_data;
-
- typedef std::map<uint16_t, uint32_t> EventToGlobal;
- typedef std::map<uint32_t, uint16_t> GlobalToEvent;
-
- EventToGlobal _event_to_global;
- GlobalToEvent _global_to_event;
-
- URIs& _uris;
-};
-
-} // namespace Shared
-} // namespace Ingen
-
-#endif // INGEN_SHARED_LV2URIMAP_HPP
diff --git a/src/shared/ResourceImpl.cpp b/src/shared/ResourceImpl.cpp
index 1f9662f3..6f4b713b 100644
--- a/src/shared/ResourceImpl.cpp
+++ b/src/shared/ResourceImpl.cpp
@@ -17,8 +17,8 @@
#include "raul/log.hpp"
#include "raul/Atom.hpp"
-#include "shared/LV2URIMap.hpp"
-#include "ResourceImpl.hpp"
+#include "ingen/shared/LV2URIMap.hpp"
+#include "ingen/shared/ResourceImpl.hpp"
using namespace std;
using namespace Raul;
diff --git a/src/shared/ResourceImpl.hpp b/src/shared/ResourceImpl.hpp
deleted file mode 100644
index 13f1bd8f..00000000
--- a/src/shared/ResourceImpl.hpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/* This file is part of Ingen.
- * Copyright 2008-2011 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_SHARED_RESOURCEIMPL_HPP
-#define INGEN_SHARED_RESOURCEIMPL_HPP
-
-#include "raul/URI.hpp"
-#include "raul/SharedPtr.hpp"
-
-#include "ingen/Resource.hpp"
-
-namespace Ingen {
-namespace Shared {
-
-class URIs;
-
-class ResourceImpl : virtual public Resource
-{
-public:
- ResourceImpl(URIs& uris, const Raul::URI& uri)
- : _uris(uris)
- , _uri(uri)
- {}
-
- URIs& uris() const { return _uris; }
-
- virtual void set_uri(const Raul::URI& uri) { _uri = uri; }
- virtual const Raul::URI& uri() const { return _uri; }
-
- const Properties& properties() const { return _properties; }
- Properties& properties() { return _properties; }
-
- Properties properties(Resource::Graph ctx) const;
-
- const Raul::Atom& get_property(const Raul::URI& uri) const;
- const Raul::Atom& set_property(const Raul::URI& uri, const Raul::Atom& value,
- Resource::Graph ctx=Resource::DEFAULT);
- void remove_property(const Raul::URI& uri, const Raul::Atom& value);
- bool has_property(const Raul::URI& uri, const Raul::Atom& value) const;
- void add_property(const Raul::URI& uri, const Raul::Atom& value,
- Graph ctx=DEFAULT);
- void set_properties(const Properties& p);
- void add_properties(const Properties& p);
- void remove_properties(const Properties& p);
-
- void dump(std::ostream& os) const;
-
- /** Get the ingen type from a set of Properties.
- * If some coherent ingen type is found, true is returned and the appropriate
- * output parameter set to true. Otherwise false is returned.
- */
- static bool type(const URIs& uris,
- const Properties& properties,
- bool& patch,
- bool& node,
- bool& port,
- bool& is_output);
-
-protected:
- const Raul::Atom& set_property(const Raul::URI& uri, const Raul::Atom& value) const;
-
- URIs& _uris;
-
-private:
- Raul::URI _uri;
- mutable Properties _properties;
-};
-
-} // namespace Shared
-} // namespace Ingen
-
-#endif // INGEN_SHARED_RESOURCEIMPL_HPP
-
diff --git a/src/shared/Store.cpp b/src/shared/Store.cpp
index 62c7f824..dd685c96 100644
--- a/src/shared/Store.cpp
+++ b/src/shared/Store.cpp
@@ -21,7 +21,7 @@
#include "raul/TableImpl.hpp"
#include "ingen/Node.hpp"
#include "ingen/Port.hpp"
-#include "Store.hpp"
+#include "ingen/shared/Store.hpp"
using namespace std;
using namespace Raul;
diff --git a/src/shared/Store.hpp b/src/shared/Store.hpp
deleted file mode 100644
index cc78e946..00000000
--- a/src/shared/Store.hpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/* This file is part of Ingen.
- * Copyright 2008-2011 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_SHARED_STORE_HPP
-#define INGEN_SHARED_STORE_HPP
-
-#include <string>
-
-#include <glibmm/thread.h>
-
-#include "raul/PathTable.hpp"
-
-#include "ingen/GraphObject.hpp"
-
-namespace Ingen {
-namespace Shared {
-
-class Store : public Raul::PathTable< SharedPtr<GraphObject> > {
-public:
- virtual ~Store() {}
-
- virtual void add(GraphObject* o);
-
- typedef Raul::Table< Raul::Path, SharedPtr<GraphObject> > Objects;
-
- const_iterator children_begin(SharedPtr<const GraphObject> o) const;
- const_iterator children_end(SharedPtr<const GraphObject> o) const;
-
- SharedPtr<GraphObject> find_child(SharedPtr<const GraphObject> parent,
- const std::string& child_name) const;
-
- unsigned child_name_offset(const Raul::Path& parent,
- const Raul::Symbol& symbol,
- bool allow_zero=true);
-
- Glib::RWLock& lock() { return _lock; }
-
-private:
- Glib::RWLock _lock;
-};
-
-} // namespace Shared
-} // namespace Ingen
-
-#endif // INGEN_SHARED_STORE_HPP
diff --git a/src/shared/World.cpp b/src/shared/World.cpp
index 4f6b279b..9aa17d4f 100644
--- a/src/shared/World.cpp
+++ b/src/shared/World.cpp
@@ -29,8 +29,8 @@
#include "ingen/shared/Module.hpp"
#include "ingen/shared/World.hpp"
#include "ingen/shared/runtime_paths.hpp"
-#include "shared/LV2Features.hpp"
-#include "shared/LV2URIMap.hpp"
+#include "ingen/shared/LV2Features.hpp"
+#include "ingen/shared/LV2URIMap.hpp"
#define LOG(s) s << "[Module] "