diff options
author | David Robillard <d@drobilla.net> | 2012-03-15 23:52:45 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-03-15 23:52:45 +0000 |
commit | b617f75ff95d48ab3089976eb767e4f09abaa110 (patch) | |
tree | 971640580f926580dad54bb0a20e7838e135f5c6 /include/ingen/shared | |
parent | 89e263ff78b51352f226c8b02ee65ecd8cbfefb8 (diff) | |
download | ingen-b617f75ff95d48ab3089976eb767e4f09abaa110.tar.gz ingen-b617f75ff95d48ab3089976eb767e4f09abaa110.tar.bz2 ingen-b617f75ff95d48ab3089976eb767e4f09abaa110.zip |
Remove weird "include" directory and use standard style ("ingen" directory in top level).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4063 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'include/ingen/shared')
-rw-r--r-- | include/ingen/shared/Builder.hpp | 57 | ||||
-rw-r--r-- | include/ingen/shared/ClashAvoider.hpp | 100 | ||||
-rw-r--r-- | include/ingen/shared/Configuration.hpp | 35 | ||||
-rw-r--r-- | include/ingen/shared/LV2Atom.hpp | 45 | ||||
-rw-r--r-- | include/ingen/shared/LV2Features.hpp | 77 | ||||
-rw-r--r-- | include/ingen/shared/LV2URIMap.hpp | 115 | ||||
-rw-r--r-- | include/ingen/shared/Module.hpp | 46 | ||||
-rw-r--r-- | include/ingen/shared/ResourceImpl.hpp | 97 | ||||
-rw-r--r-- | include/ingen/shared/Store.hpp | 60 | ||||
-rw-r--r-- | include/ingen/shared/URIs.hpp | 110 | ||||
-rw-r--r-- | include/ingen/shared/World.hpp | 130 | ||||
-rw-r--r-- | include/ingen/shared/runtime_paths.hpp | 36 |
12 files changed, 0 insertions, 908 deletions
diff --git a/include/ingen/shared/Builder.hpp b/include/ingen/shared/Builder.hpp deleted file mode 100644 index 245b3013..00000000 --- a/include/ingen/shared/Builder.hpp +++ /dev/null @@ -1,57 +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_BUILDER_HPP -#define INGEN_SHARED_BUILDER_HPP - -#include "raul/SharedPtr.hpp" - -namespace Ingen { - -class CommonInterface; -class GraphObject; - -namespace Shared { - -class URIs; - -/** Wrapper for CommonInterface to create existing objects/models. - * - * \ingroup interface - */ -class Builder -{ -public: - Builder(SharedPtr<Shared::URIs> uris, CommonInterface& interface); - virtual ~Builder() {} - - void build(SharedPtr<const GraphObject> object); - void connect(SharedPtr<const GraphObject> object); - -private: - void build_object(SharedPtr<const GraphObject> object); - - SharedPtr<Shared::URIs> _uris; - CommonInterface& _interface; -}; - -} // namespace Shared -} // namespace Ingen - -#endif // INGEN_SHARED_BUILDER_HPP - - diff --git a/include/ingen/shared/ClashAvoider.hpp b/include/ingen/shared/ClashAvoider.hpp deleted file mode 100644 index 4f5d8ec1..00000000 --- a/include/ingen/shared/ClashAvoider.hpp +++ /dev/null @@ -1,100 +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_CLASHAVOIDER_HPP -#define INGEN_SHARED_CLASHAVOIDER_HPP - -#include <inttypes.h> - -#include <map> - -#include "ingen/CommonInterface.hpp" - -namespace Raul { class Atom; class Path; } - -namespace Ingen { -namespace Shared { - -class Store; - -/** A wrapper for a CommonInterface that creates objects but possibly maps - * symbol names to avoid clashes with the existing objects in a store. - */ -class ClashAvoider : public CommonInterface -{ -public: - ClashAvoider(Store& store, CommonInterface& target, Store* also_avoid=NULL) - : _store(store), _target(target), _also_avoid(also_avoid) {} - - Raul::URI uri() const { return "ingen:ClientStore"; } - - void set_target(CommonInterface& target) { _target = target; } - - // Bundles - void bundle_begin() { _target.bundle_begin(); } - void bundle_end() { _target.bundle_end(); } - - // Object commands - - virtual void put(const Raul::URI& path, - const Resource::Properties& properties, - Resource::Graph ctx=Resource::DEFAULT); - - virtual void delta(const Raul::URI& path, - const Resource::Properties& remove, - const Resource::Properties& add); - - virtual void move(const Raul::Path& old_path, - const Raul::Path& new_path); - - virtual void connect(const Raul::Path& src_port_path, - const Raul::Path& dst_port_path); - - virtual void disconnect(const Raul::URI& src, - const Raul::URI& dst); - - virtual void disconnect_all(const Raul::Path& parent_patch_path, - const Raul::Path& path); - - virtual void set_property(const Raul::URI& subject_path, - const Raul::URI& predicate, - const Raul::Atom& value); - - virtual void del(const Raul::URI& uri); - -private: - const Raul::URI map_uri(const Raul::URI& in); - const Raul::Path map_path(const Raul::Path& in); - - Store& _store; - CommonInterface& _target; - - Store* _also_avoid; - bool exists(const Raul::Path& path) const; - - typedef std::map<Raul::Path, unsigned> Offsets; - Offsets _offsets; - - typedef std::map<Raul::Path, Raul::Path> SymbolMap; - SymbolMap _symbol_map; -}; - -} // namespace Shared -} // namespace Ingen - -#endif // INGEN_SHARED_CLASHAVOIDER_HPP - diff --git a/include/ingen/shared/Configuration.hpp b/include/ingen/shared/Configuration.hpp deleted file mode 100644 index 21bc5737..00000000 --- a/include/ingen/shared/Configuration.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/* This file is part of Ingen. - * Copyright 2010-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_CONFIGURATION_HPP -#define INGEN_SHARED_CONFIGURATION_HPP - -#include "raul/Configuration.hpp" - -namespace Ingen { -namespace Shared { - -class Configuration : public Raul::Configuration { -public: - Configuration(Raul::Forge* forge); -}; - -} // namespace Shared -} // namespace Ingen - -#endif // INGEN_SHARED_CONFIGURATION_HPP - diff --git a/include/ingen/shared/LV2Atom.hpp b/include/ingen/shared/LV2Atom.hpp deleted file mode 100644 index 0aa35889..00000000 --- a/include/ingen/shared/LV2Atom.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/* This file is part of Ingen. - * Copyright 2009-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_LV2ATOM_HPP -#define INGEN_SHARED_LV2ATOM_HPP - -#include "lv2/lv2plug.in/ns/ext/atom/atom.h" - -namespace Raul { class Atom; } - -namespace Ingen { -namespace Shared { - -class URIs; - -namespace LV2Atom { - -bool to_atom(const URIs& uris, - const LV2_Atom* object, - Raul::Atom& atom); - -bool from_atom(const URIs& uris, - const Raul::Atom& atom, - LV2_Atom* object); - -} // namespace LV2Atom - -} // namespace Shared -} // namespace Ingen - -#endif // INGEN_SHARED_LV2ATOM_HPP diff --git a/include/ingen/shared/LV2Features.hpp b/include/ingen/shared/LV2Features.hpp deleted file mode 100644 index f33cc605..00000000 --- a/include/ingen/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/include/ingen/shared/LV2URIMap.hpp b/include/ingen/shared/LV2URIMap.hpp deleted file mode 100644 index 70c47a12..00000000 --- a/include/ingen/shared/LV2URIMap.hpp +++ /dev/null @@ -1,115 +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/LV2Features.hpp" -#include "lv2/lv2plug.in/ns/ext/uri-map/uri-map.h" -#include "lv2/lv2plug.in/ns/ext/urid/urid.h" -#include "raul/URI.hpp" - -namespace Ingen { -namespace Shared { - -/** URI to Integer Map */ -class LV2URIMap : public boost::noncopyable { -public: - LV2URIMap(LV2_URID_Map* map, LV2_URID_Unmap* unmap); - virtual ~LV2URIMap() {} - - uint32_t map_uri(const char* uri); - const char* unmap_uri(uint32_t urid); - - class Feature : public LV2Features::Feature { - public: - Feature(const char* URI, void* data) { - _feature.URI = URI; - _feature.data = data; - } - - SharedPtr<LV2_Feature> feature(Shared::World*, Node*) { - return SharedPtr<LV2_Feature>(&_feature, NullDeleter<LV2_Feature>); - } - - private: - LV2_Feature _feature; - }; - - class URIMapFeature : public Feature { - public: - URIMapFeature(LV2URIMap* map); - - private: - LV2_URI_Map_Feature _feature_data; - }; - - class URIDMapFeature : public Feature { - public: - URIDMapFeature(LV2URIMap* map, LV2_URID_Map* urid_map); - LV2_URID map(const char* uri); - private: - static LV2_URID default_map(LV2_URID_Map_Handle h, const char* uri); - LV2_URID_Map _feature_data; - }; - - class URIDUnmapFeature : public Feature { - public: - URIDUnmapFeature(LV2URIMap* map, LV2_URID_Unmap* urid_unmap); - const char* unmap(const LV2_URID urid); - private: - static const char* default_unmap(LV2_URID_Map_Handle h, LV2_URID uri); - LV2_URID_Unmap _feature_data; - }; - - SharedPtr<URIMapFeature> uri_map_feature() { return _uri_map_feature; } - SharedPtr<URIDMapFeature> urid_map_feature() { return _urid_map_feature; } - SharedPtr<URIDUnmapFeature> urid_unmap_feature() { return _urid_unmap_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); - - static LV2_URID urid_map(LV2_URID_Map_Handle handle, const char* uri); - static const char* urid_unmap(LV2_URID_Unmap_Handle handle, LV2_URID urid); - - typedef std::map<uint16_t, uint32_t> EventToGlobal; - typedef std::map<uint32_t, uint16_t> GlobalToEvent; - - SharedPtr<URIMapFeature> _uri_map_feature; - SharedPtr<URIDMapFeature> _urid_map_feature; - SharedPtr<URIDUnmapFeature> _urid_unmap_feature; - EventToGlobal _event_to_global; - GlobalToEvent _global_to_event; -}; - -} // namespace Shared -} // namespace Ingen - -#endif // INGEN_SHARED_LV2URIMAP_HPP diff --git a/include/ingen/shared/Module.hpp b/include/ingen/shared/Module.hpp deleted file mode 100644 index f972a999..00000000 --- a/include/ingen/shared/Module.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/* This file is part of Ingen. - * Copyright 2007-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_MODULE_HPP -#define INGEN_SHARED_MODULE_HPP - -#include <glibmm/module.h> - -#include "raul/SharedPtr.hpp" - -namespace Ingen { -namespace Shared { - -class World; - -/** A dynamically loaded Ingen module. - * - * All components of Ingen reside in one of these. - */ -struct Module { - virtual ~Module(); - - virtual void load(Ingen::Shared::World* world) = 0; - virtual void run(Ingen::Shared::World* world) {} - - SharedPtr<Glib::Module> library; -}; - -} // namespace Shared -} // namespace Ingen - -#endif // INGEN_SHARED_MODULE_HPP diff --git a/include/ingen/shared/ResourceImpl.hpp b/include/ingen/shared/ResourceImpl.hpp deleted file mode 100644 index 8069c480..00000000 --- a/include/ingen/shared/ResourceImpl.hpp +++ /dev/null @@ -1,97 +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 "ingen/Resource.hpp" -#include "ingen/shared/URIs.hpp" -#include "raul/SharedPtr.hpp" -#include "raul/URI.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); - - /** Hook called whenever a property is added. - * This can be used by derived classes to implement special behaviour for - * particular properties (e.g. ingen:value for ports). - */ - virtual void on_property(const Raul::URI& uri, const Raul::Atom& value) {} - - 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/include/ingen/shared/Store.hpp b/include/ingen/shared/Store.hpp deleted file mode 100644 index 3347cdde..00000000 --- a/include/ingen/shared/Store.hpp +++ /dev/null @@ -1,60 +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> - -#undef nil -#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/include/ingen/shared/URIs.hpp b/include/ingen/shared/URIs.hpp deleted file mode 100644 index b3d8d301..00000000 --- a/include/ingen/shared/URIs.hpp +++ /dev/null @@ -1,110 +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_URIS_HPP -#define INGEN_SHARED_URIS_HPP - -#include <boost/utility.hpp> - -#include "ingen/shared/LV2URIMap.hpp" -#include "raul/URI.hpp" - -namespace Raul { - class Forge; -} - -namespace Ingen { -namespace Shared { - -class URIs : public boost::noncopyable { -public: - URIs(Raul::Forge& forge, LV2URIMap* map); - - struct Quark : public Raul::URI { - Quark(LV2URIMap* map, const char* str); - uint32_t id; - }; - - Raul::Forge& forge; - - const Quark atom_Bool; - const Quark atom_Float; - const Quark atom_Int32; - const Quark atom_MessagePort; - const Quark atom_String; - const Quark atom_ValuePort; - const Quark atom_Vector; - const Quark atom_eventTransfer; - const Quark atom_supports; - const Quark ctx_audioContext; - const Quark ctx_context; - const Quark ctx_messageContext; - const Quark cv_CVPort; - const Quark doap_name; - const Quark ev_EventPort; - const Quark ingen_Internal; - const Quark ingen_Node; - const Quark ingen_Patch; - const Quark ingen_Port; - const Quark ingen_broadcast; - const Quark ingen_controlBinding; - const Quark ingen_document; - const Quark ingen_enabled; - const Quark ingen_engine; - const Quark ingen_nil; - const Quark ingen_node; - const Quark ingen_polyphonic; - const Quark ingen_polyphony; - const Quark ingen_sampleRate; - const Quark ingen_selected; - const Quark ingen_value; - const Quark ingen_canvasX; - const Quark ingen_canvasY; - const Quark lv2_AudioPort; - const Quark lv2_ControlPort; - const Quark lv2_InputPort; - const Quark lv2_OutputPort; - const Quark lv2_Plugin; - const Quark lv2_connectionOptional; - const Quark lv2_default; - const Quark lv2_index; - const Quark lv2_integer; - const Quark lv2_maximum; - const Quark lv2_minimum; - const Quark lv2_name; - const Quark lv2_portProperty; - const Quark lv2_sampleRate; - const Quark lv2_symbol; - const Quark lv2_toggled; - const Quark midi_Bender; - const Quark midi_ChannelPressure; - const Quark midi_Controller; - const Quark midi_MidiEvent; - const Quark midi_NoteOn; - const Quark midi_controllerNumber; - const Quark midi_noteNumber; - const Quark rdf_instanceOf; - const Quark rdf_type; - const Quark rdfs_seeAlso; - const Quark ui_Events; - const Quark wildcard; -}; - -} // namespace Shared -} // namespace Ingen - -#endif // INGEN_SHARED_LV2URIMAP_HPP diff --git a/include/ingen/shared/World.hpp b/include/ingen/shared/World.hpp deleted file mode 100644 index e062dea6..00000000 --- a/include/ingen/shared/World.hpp +++ /dev/null @@ -1,130 +0,0 @@ -/* This file is part of Ingen. - * Copyright 2007-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_MODULE_WORLD_HPP -#define INGEN_MODULE_WORLD_HPP - -#include <string> - -#include <boost/shared_ptr.hpp> -#include <boost/utility.hpp> - -#include "lv2/lv2plug.in/ns/ext/urid/urid.h" - -#include "raul/Configuration.hpp" -#include "raul/SharedPtr.hpp" - -typedef struct LilvWorldImpl LilvWorld; - -namespace Sord { class World; } - -namespace Ingen { - -class EngineBase; -class ClientInterface; -class ServerInterface; - -namespace Serialisation { class Serialiser; class Parser; } - -namespace Shared { - -class LV2Features; -class URIs; -class LV2URIMap; -class Store; - -/** The "world" all Ingen modules may share. - * - * All loaded components of Ingen, as well as things requiring shared access - * and/or locking (e.g. Sord, Lilv). - * - * Ingen modules are shared libraries which modify the World when loaded - * using World::load, e.g. loading the "ingen_serialisation" module will - * set World::serialiser and World::parser to valid objects. - */ -class World : public boost::noncopyable { -public: - World(Raul::Configuration* conf, - int& argc, - char**& argv, - LV2_URID_Map* map, - LV2_URID_Unmap* unmap); - - virtual ~World(); - - virtual bool load_module(const char* name); - virtual bool run_module(const char* name); - - virtual void unload_modules(); - - typedef SharedPtr<ServerInterface> (*InterfaceFactory)( - World* world, - const std::string& engine_url, - SharedPtr<ClientInterface> respond_to); - - virtual void add_interface_factory(const std::string& scheme, - InterfaceFactory factory); - - virtual SharedPtr<ServerInterface> interface( - const std::string& engine_url, - SharedPtr<ClientInterface> respond_to); - - virtual bool run(const std::string& mime_type, - const std::string& filename); - - virtual void set_local_engine(SharedPtr<EngineBase> e); - virtual void set_engine(SharedPtr<ServerInterface> e); - virtual void set_serialiser(SharedPtr<Serialisation::Serialiser> s); - virtual void set_parser(SharedPtr<Serialisation::Parser> p); - virtual void set_store(SharedPtr<Store> s); - - virtual SharedPtr<EngineBase> local_engine(); - virtual SharedPtr<ServerInterface> engine(); - virtual SharedPtr<Serialisation::Serialiser> serialiser(); - virtual SharedPtr<Serialisation::Parser> parser(); - virtual SharedPtr<Store> store(); - - virtual Sord::World* rdf_world(); - - virtual SharedPtr<URIs> uris(); - virtual SharedPtr<LV2URIMap> lv2_uri_map(); - - virtual int& argc(); - virtual char**& argv(); - - virtual Raul::Configuration* conf(); - virtual void set_conf(Raul::Configuration* c); - - virtual Raul::Forge& forge(); - - virtual LV2Features* lv2_features(); - - virtual LilvWorld* lilv_world(); - - virtual void set_jack_uuid(const std::string& uuid); - virtual std::string jack_uuid(); - -private: - class Pimpl; - - Pimpl* _impl; -}; - -} // namespace Shared -} // namespace Ingen - -#endif // INGEN_MODULE_WORLD_HPP diff --git a/include/ingen/shared/runtime_paths.hpp b/include/ingen/shared/runtime_paths.hpp deleted file mode 100644 index 3ed48f00..00000000 --- a/include/ingen/shared/runtime_paths.hpp +++ /dev/null @@ -1,36 +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_RUNTIME_PATHS_HPP -#define INGEN_SHARED_RUNTIME_PATHS_HPP - -#include <string> - -namespace Ingen { -namespace Shared { - -void set_bundle_path(const char* path); -void set_bundle_path_from_code(void* function); - -std::string bundle_file_path(const std::string& name); -std::string data_file_path(const std::string& name); -std::string module_path(const std::string& name, std::string dir=""); - -} // namespace Ingen -} // namespace Shared - -#endif // INGEN_SHARED_RUNTIME_PATHS_HPP |