diff options
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/Broadcaster.hpp | 2 | ||||
-rw-r--r-- | src/server/Context.cpp | 2 | ||||
-rw-r--r-- | src/server/Engine.cpp | 10 | ||||
-rw-r--r-- | src/server/Event.hpp | 2 | ||||
-rw-r--r-- | src/server/EventWriter.hpp | 2 | ||||
-rw-r--r-- | src/server/GraphObjectImpl.cpp | 11 | ||||
-rw-r--r-- | src/server/GraphObjectImpl.hpp | 2 | ||||
-rw-r--r-- | src/server/InternalPlugin.cpp | 16 | ||||
-rw-r--r-- | src/server/InternalPlugin.hpp | 6 | ||||
-rw-r--r-- | src/server/LV2Node.cpp | 2 | ||||
-rw-r--r-- | src/server/LV2Plugin.cpp | 4 | ||||
-rw-r--r-- | src/server/LV2Plugin.hpp | 6 | ||||
-rw-r--r-- | src/server/NodeFactory.cpp | 6 | ||||
-rw-r--r-- | src/server/PatchImpl.cpp | 5 | ||||
-rw-r--r-- | src/server/PatchPlugin.hpp | 8 | ||||
-rw-r--r-- | src/server/PluginImpl.hpp | 7 | ||||
-rw-r--r-- | src/server/PortImpl.cpp | 4 | ||||
-rw-r--r-- | src/server/PortType.hpp | 10 | ||||
-rw-r--r-- | src/server/events/CreateNode.cpp | 5 | ||||
-rw-r--r-- | src/server/events/Move.cpp | 9 | ||||
-rw-r--r-- | src/server/ingen_lv2.cpp | 4 | ||||
-rw-r--r-- | src/server/internals/Controller.cpp | 3 | ||||
-rw-r--r-- | src/server/internals/Delay.cpp | 3 | ||||
-rw-r--r-- | src/server/internals/Note.cpp | 3 | ||||
-rw-r--r-- | src/server/internals/Trigger.cpp | 3 |
25 files changed, 66 insertions, 69 deletions
diff --git a/src/server/Broadcaster.hpp b/src/server/Broadcaster.hpp index 85b133b3..507e8eec 100644 --- a/src/server/Broadcaster.hpp +++ b/src/server/Broadcaster.hpp @@ -100,7 +100,7 @@ public: BROADCAST(set_property, subject, predicate, value); } - Raul::URI uri() const { return "http://drobilla.net/ns/ingen#broadcaster"; } ///< N/A + Raul::URI uri() const { return Raul::URI("ingen:broadcaster"); } void set_response_id(int32_t id) {} ///< N/A void get(const Raul::URI& uri) {} ///< N/A diff --git a/src/server/Context.cpp b/src/server/Context.cpp index 846368d2..a7a78b43 100644 --- a/src/server/Context.cpp +++ b/src/server/Context.cpp @@ -91,7 +91,7 @@ Context::emit_notifications(FrameTime end) const char* key = _engine.world()->uri_map().unmap_uri(note.key); if (key) { _engine.broadcaster()->set_property( - note.port->uri(), key, value); + note.port->uri(), Raul::URI(key), value); } else { Raul::error("Error unmapping notification key URI\n"); } diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp index 504c78bc..372090ef 100644 --- a/src/server/Engine.cpp +++ b/src/server/Engine.cpp @@ -225,8 +225,9 @@ Engine::activate() SharedPtr<Interface> respondee; execute_and_delete_event( - context, new Events::CreatePort(*this, respondee, -1, 0, - "/control_in", false, in_properties)); + context, new Events::CreatePort( + *this, respondee, -1, 0, Raul::Path("/control_in"), + false, in_properties)); // Add control out Resource::Properties out_properties(control_properties); @@ -242,8 +243,9 @@ Engine::activate() Resource::Property(forge.make(32.0f), Resource::EXTERNAL))); execute_and_delete_event( - context, new Events::CreatePort(*this, respondee, -1, 0, - "/control_out", true, out_properties)); + context, new Events::CreatePort( + *this, respondee, -1, 0, Raul::Path("/control_out"), + true, out_properties)); } _driver->activate(); diff --git a/src/server/Event.hpp b/src/server/Event.hpp index e35e1895..d627b5dc 100644 --- a/src/server/Event.hpp +++ b/src/server/Event.hpp @@ -103,7 +103,7 @@ protected: inline bool pre_process_done(Status st, const Raul::URI& subject) { _status = st; - _err_subject = subject.str(); + _err_subject = subject; return !st; } diff --git a/src/server/EventWriter.hpp b/src/server/EventWriter.hpp index d25dc113..67b3b83b 100644 --- a/src/server/EventWriter.hpp +++ b/src/server/EventWriter.hpp @@ -40,7 +40,7 @@ public: explicit EventWriter(Engine& engine); virtual ~EventWriter(); - Raul::URI uri() const { return "http://drobilla.net/ns/ingen#internal"; } + Raul::URI uri() const { return Raul::URI("ingen:eventWriter"); } virtual SharedPtr<Interface> respondee() const { return _respondee; diff --git a/src/server/GraphObjectImpl.cpp b/src/server/GraphObjectImpl.cpp index 0b66d05e..cdb299ee 100644 --- a/src/server/GraphObjectImpl.cpp +++ b/src/server/GraphObjectImpl.cpp @@ -30,9 +30,9 @@ namespace Server { GraphObjectImpl::GraphObjectImpl(Ingen::URIs& uris, GraphObjectImpl* parent, const Raul::Symbol& symbol) - : GraphObject(uris, parent ? parent->path().child(symbol) : "/") + : GraphObject(uris, parent ? parent->path().child(symbol) : Raul::Path("/")) , _parent(parent) - , _path(parent ? parent->path().child(symbol) : "/") + , _path(parent ? parent->path().child(symbol) : Raul::Path("/")) , _symbol(symbol) { } @@ -52,12 +52,5 @@ GraphObjectImpl::parent_patch() const return dynamic_cast<PatchImpl*>((NodeImpl*)_parent); } -SharedPtr<GraphObject> -GraphObjectImpl::find_child(const std::string& name) const -{ - Raul::error("GraphObjectImpl::find_child called\n"); - return SharedPtr<GraphObject>(); -} - } // namespace Server } // namespace Ingen diff --git a/src/server/GraphObjectImpl.hpp b/src/server/GraphObjectImpl.hpp index 4e626692..4f2dcbc2 100644 --- a/src/server/GraphObjectImpl.hpp +++ b/src/server/GraphObjectImpl.hpp @@ -76,8 +76,6 @@ public: const Raul::Path& path() const { return _path; } - SharedPtr<GraphObject> find_child(const std::string& name) const; - /** Prepare for a new (external) polyphony value. * * Preprocessor thread, poly is actually applied by apply_poly. diff --git a/src/server/InternalPlugin.cpp b/src/server/InternalPlugin.cpp index 0f1d380b..db43558c 100644 --- a/src/server/InternalPlugin.cpp +++ b/src/server/InternalPlugin.cpp @@ -32,9 +32,9 @@ namespace Server { using namespace Internals; -InternalPlugin::InternalPlugin(URIs& uris, - const std::string& uri, - const std::string& symbol) +InternalPlugin::InternalPlugin(URIs& uris, + const Raul::URI& uri, + const Raul::Symbol& symbol) : PluginImpl(uris, Plugin::Internal, uri) , _symbol(symbol) { @@ -52,15 +52,13 @@ InternalPlugin::instantiate(BufferFactory& bufs, const SampleCount srate = engine.driver()->sample_rate(); - const string uri_str = uri().str(); - - if (uri_str == NS_INTERNALS "Controller") { + if (uri() == NS_INTERNALS "Controller") { return new ControllerNode(this, bufs, symbol, polyphonic, parent, srate); - } else if (uri_str == NS_INTERNALS "Delay") { + } else if (uri() == NS_INTERNALS "Delay") { return new DelayNode(this, bufs, symbol, polyphonic, parent, srate); - } else if (uri_str == NS_INTERNALS "Note") { + } else if (uri() == NS_INTERNALS "Note") { return new NoteNode(this, bufs, symbol, polyphonic, parent, srate); - } else if (uri_str == NS_INTERNALS "Trigger") { + } else if (uri() == NS_INTERNALS "Trigger") { return new TriggerNode(this, bufs, symbol, polyphonic, parent, srate); } else { return NULL; diff --git a/src/server/InternalPlugin.hpp b/src/server/InternalPlugin.hpp index 043b56cb..59ba6d5a 100644 --- a/src/server/InternalPlugin.hpp +++ b/src/server/InternalPlugin.hpp @@ -38,9 +38,9 @@ class BufferFactory; class InternalPlugin : public PluginImpl { public: - InternalPlugin(URIs& uris, - const std::string& uri, - const std::string& symbol); + InternalPlugin(URIs& uris, + const Raul::URI& uri, + const Raul::Symbol& symbol); NodeImpl* instantiate(BufferFactory& bufs, const Raul::Symbol& symbol, diff --git a/src/server/LV2Node.cpp b/src/server/LV2Node.cpp index 21fd3c34..7b3a2ca5 100644 --- a/src/server/LV2Node.cpp +++ b/src/server/LV2Node.cpp @@ -344,7 +344,7 @@ LV2Node::instantiate(BufferFactory& bufs) LILV_FOREACH(nodes, v, values) { const LilvNode* val = lilv_nodes_get(values, v); if (lilv_node_is_uri(val)) { - port->add_property(lilv_node_as_uri(preds[p]), + port->add_property(Raul::URI(lilv_node_as_uri(preds[p])), forge.alloc_uri(lilv_node_as_uri(val))); } } diff --git a/src/server/LV2Plugin.cpp b/src/server/LV2Plugin.cpp index ddd58aca..0e2a16b2 100644 --- a/src/server/LV2Plugin.cpp +++ b/src/server/LV2Plugin.cpp @@ -28,7 +28,7 @@ using namespace std; namespace Ingen { namespace Server { -LV2Plugin::LV2Plugin(SharedPtr<LV2Info> lv2_info, const std::string& uri) +LV2Plugin::LV2Plugin(SharedPtr<LV2Info> lv2_info, const Raul::URI& uri) : PluginImpl(lv2_info->world().uris(), Plugin::LV2, uri) , _lilv_plugin(NULL) , _lv2_info(lv2_info) @@ -39,7 +39,7 @@ LV2Plugin::LV2Plugin(SharedPtr<LV2Info> lv2_info, const std::string& uri) const Raul::Symbol LV2Plugin::symbol() const { - string working = uri().str(); + string working = uri(); if (working[working.length() - 1] == '/') working = working.substr(0, working.length() - 1); diff --git a/src/server/LV2Plugin.hpp b/src/server/LV2Plugin.hpp index 9cf69daa..8e8effab 100644 --- a/src/server/LV2Plugin.hpp +++ b/src/server/LV2Plugin.hpp @@ -20,11 +20,9 @@ #include <cstdlib> #include <string> -#include <glibmm/module.h> -#include <boost/utility.hpp> - #include "lilv/lilv.h" #include "raul/SharedPtr.hpp" +#include "raul/URI.hpp" #include "PluginImpl.hpp" #include "LV2Info.hpp" @@ -40,7 +38,7 @@ class NodeImpl; class LV2Plugin : public PluginImpl { public: - LV2Plugin(SharedPtr<LV2Info> lv2_info, const std::string& uri); + LV2Plugin(SharedPtr<LV2Info> lv2_info, const Raul::URI& uri); NodeImpl* instantiate(BufferFactory& bufs, const Raul::Symbol& symbol, diff --git a/src/server/NodeFactory.cpp b/src/server/NodeFactory.cpp index 502e5370..17c0bb79 100644 --- a/src/server/NodeFactory.cpp +++ b/src/server/NodeFactory.cpp @@ -103,7 +103,7 @@ NodeFactory::load_plugin(const Raul::URI& uri) const LilvPlugins* plugs = lilv_world_get_all_plugins(_world->lilv_world()); const LilvPlugin* plug = lilv_plugins_get_by_uri(plugs, node); if (plug) { - LV2Plugin* const ingen_plugin = new LV2Plugin(_lv2_info, uri.str()); + LV2Plugin* const ingen_plugin = new LV2Plugin(_lv2_info, uri); ingen_plugin->lilv_plugin(plug); _plugins.insert(make_pair(uri, ingen_plugin)); } @@ -119,10 +119,10 @@ NodeFactory::load_lv2_plugins() LILV_FOREACH(plugins, i, plugins) { const LilvPlugin* lv2_plug = lilv_plugins_get(plugins, i); - const string uri(lilv_node_as_uri(lilv_plugin_get_uri(lv2_plug))); + const Raul::URI uri(lilv_node_as_uri(lilv_plugin_get_uri(lv2_plug))); if (_plugins.find(uri) != _plugins.end()) { - Raul::warn(Raul::fmt("Already discovered <%s>\n") % uri.c_str()); + Raul::warn(Raul::fmt("Already discovered <%s>\n") % uri); continue; } diff --git a/src/server/PatchImpl.cpp b/src/server/PatchImpl.cpp index 9b1e1a1f..acf0c46d 100644 --- a/src/server/PatchImpl.cpp +++ b/src/server/PatchImpl.cpp @@ -43,8 +43,9 @@ PatchImpl::PatchImpl(Engine& engine, SampleRate srate, uint32_t internal_poly) : NodeImpl(new PatchPlugin(engine.world()->uris(), - engine.world()->uris().ingen_Patch.c_str(), - "patch", "Ingen Patch"), + engine.world()->uris().ingen_Patch, + Raul::Symbol("patch"), + "Ingen Patch"), symbol, poly, parent, srate) , _engine(engine) , _poly_pre(internal_poly) diff --git a/src/server/PatchPlugin.hpp b/src/server/PatchPlugin.hpp index fc5d808f..ba1cfa40 100644 --- a/src/server/PatchPlugin.hpp +++ b/src/server/PatchPlugin.hpp @@ -32,10 +32,10 @@ class NodeImpl; class PatchPlugin : public PluginImpl { public: - PatchPlugin(URIs& uris, - const std::string& uri, - const std::string& symbol, - const std::string& name) + PatchPlugin(URIs& uris, + const Raul::URI& uri, + const Raul::Symbol& symbol, + const std::string& name) : PluginImpl(uris, Plugin::Patch, uri) {} diff --git a/src/server/PluginImpl.hpp b/src/server/PluginImpl.hpp index 8ef569ab..8aa741e0 100644 --- a/src/server/PluginImpl.hpp +++ b/src/server/PluginImpl.hpp @@ -25,6 +25,7 @@ #include "ingen/Plugin.hpp" #include "ingen/Resource.hpp" #include "raul/Symbol.hpp" +#include "raul/URI.hpp" namespace Ingen { @@ -45,9 +46,9 @@ class PluginImpl : public Plugin , public boost::noncopyable { public: - PluginImpl(Ingen::URIs& uris, - Type type, - const std::string& uri) + PluginImpl(Ingen::URIs& uris, + Type type, + const Raul::URI& uri) : Plugin(uris, uri) , _type(type) {} diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp index b7eaa5d4..9a12028a 100644 --- a/src/server/PortImpl.cpp +++ b/src/server/PortImpl.cpp @@ -72,7 +72,7 @@ PortImpl::PortImpl(BufferFactory& bufs, set_type(type, buffer_type); add_property(uris.atom_bufferType, bufs.forge().make_urid(buffer_type)); - add_property(uris.rdf_type, bufs.forge().alloc_uri(type.uri().str())); + add_property(uris.rdf_type, bufs.forge().alloc_uri(type.uri())); set_property(uris.lv2_index, bufs.forge().make((int32_t)index)); } @@ -107,7 +107,7 @@ bool PortImpl::supports(const Raul::URI& value_type) const { return has_property(_bufs.uris().atom_supports, - _bufs.forge().alloc_uri(value_type.str())); + _bufs.forge().alloc_uri(value_type)); } Raul::Array<BufferRef>* diff --git a/src/server/PortType.hpp b/src/server/PortType.hpp index c84cefb4..883b352f 100644 --- a/src/server/PortType.hpp +++ b/src/server/PortType.hpp @@ -78,11 +78,11 @@ private: static inline const Raul::URI& type_uri(unsigned symbol_num) { assert(symbol_num <= ATOM); static const Raul::URI uris[] = { - "http://drobilla.net/ns/ingen#nil", - LV2_CORE__AudioPort, - LV2_CORE__ControlPort, - LV2_CORE__CVPort, - LV2_ATOM__AtomPort + Raul::URI("http://drobilla.net/ns/ingen#nil"), + Raul::URI(LV2_CORE__AudioPort), + Raul::URI(LV2_CORE__ControlPort), + Raul::URI(LV2_CORE__CVPort), + Raul::URI(LV2_ATOM__AtomPort) }; return uris[symbol_num]; } diff --git a/src/server/events/CreateNode.cpp b/src/server/events/CreateNode.cpp index 0c3e34bf..acdc9091 100644 --- a/src/server/events/CreateNode.cpp +++ b/src/server/events/CreateNode.cpp @@ -57,10 +57,10 @@ CreateNode::pre_process() return Event::pre_process_done(BAD_URI, _path); } - std::string plugin_uri; + std::string plugin_uri_str; const iterator t = _properties.find(uris.ingen_prototype); if (t != _properties.end() && t->second.type() == uris.forge.URI) { - plugin_uri = t->second.get_uri(); + plugin_uri_str = t->second.get_uri(); } else { return Event::pre_process_done(BAD_REQUEST); } @@ -73,6 +73,7 @@ CreateNode::pre_process() return Event::pre_process_done(PARENT_NOT_FOUND, _path.parent()); } + const Raul::URI plugin_uri(plugin_uri_str); PluginImpl* plugin = _engine.node_factory()->plugin(plugin_uri); if (!plugin) { return Event::pre_process_done(PLUGIN_NOT_FOUND, Raul::URI(plugin_uri)); diff --git a/src/server/events/Move.cpp b/src/server/events/Move.cpp index 5c16ca8b..17ad1a70 100644 --- a/src/server/events/Move.cpp +++ b/src/server/events/Move.cpp @@ -77,11 +77,12 @@ Move::pre_process() assert(Raul::Path::descendant_comparator(_old_path, child_old_path)); Raul::Path child_new_path; - if (child_old_path == _old_path) + if (child_old_path == _old_path) { child_new_path = _new_path; - else - child_new_path = Raul::Path(_new_path).base() - + child_old_path.substr(_old_path.length() + 1); + } else { + child_new_path = Raul::Path( + _new_path.base() + child_old_path.substr(_old_path.length() + 1)); + } PtrCast<GraphObjectImpl>(i->second)->set_path(child_new_path); i->first = child_new_path; diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp index bb566113..4c9c7d85 100644 --- a/src/server/ingen_lv2.cpp +++ b/src/server/ingen_lv2.cpp @@ -566,7 +566,7 @@ ingen_instantiate(const LV2_Descriptor* descriptor, Since we are not yet rolling, it won't be drained, causing a deadlock. */ SharedPtr<Interface> client(&driver->writer(), NullDeleter<Interface>); interface->set_respondee(client); - engine->register_client("http://drobilla.net/ns/ingen#internal", client); + engine->register_client(Raul::URI("ingen:lv2"), client); return (LV2_Handle)plugin; } @@ -666,7 +666,7 @@ ingen_save(LV2_Handle instance, char* real_path = make_path->path(make_path->handle, "patch.ttl"); char* state_path = map_path->abstract_path(map_path->handle, real_path); - Ingen::Store::iterator root = plugin->world->store()->find("/"); + Ingen::Store::iterator root = plugin->world->store()->find(Raul::Path("/")); plugin->world->serialiser()->to_file(root->second, real_path); store(handle, diff --git a/src/server/internals/Controller.cpp b/src/server/internals/Controller.cpp index 09eafa87..62fe0520 100644 --- a/src/server/internals/Controller.cpp +++ b/src/server/internals/Controller.cpp @@ -39,7 +39,8 @@ namespace Server { namespace Internals { InternalPlugin* ControllerNode::internal_plugin(URIs& uris) { - return new InternalPlugin(uris, NS_INTERNALS "Controller", "controller"); + return new InternalPlugin( + uris, Raul::URI(NS_INTERNALS "Controller"), Raul::Symbol("controller")); } ControllerNode::ControllerNode(InternalPlugin* plugin, diff --git a/src/server/internals/Delay.cpp b/src/server/internals/Delay.cpp index f687a04e..b6d05f68 100644 --- a/src/server/internals/Delay.cpp +++ b/src/server/internals/Delay.cpp @@ -50,7 +50,8 @@ namespace Internals { static const float MAX_DELAY_SECONDS = 8.0f; InternalPlugin* DelayNode::internal_plugin(URIs& uris) { - return new InternalPlugin(uris, NS_INTERNALS "Delay", "delay"); + return new InternalPlugin( + uris, Raul::URI(NS_INTERNALS "Delay"), Raul::Symbol("delay")); } DelayNode::DelayNode(InternalPlugin* plugin, diff --git a/src/server/internals/Note.cpp b/src/server/internals/Note.cpp index d8993659..899e01df 100644 --- a/src/server/internals/Note.cpp +++ b/src/server/internals/Note.cpp @@ -46,7 +46,8 @@ namespace Server { namespace Internals { InternalPlugin* NoteNode::internal_plugin(URIs& uris) { - return new InternalPlugin(uris, NS_INTERNALS "Note", "note"); + return new InternalPlugin( + uris, Raul::URI(NS_INTERNALS "Note"), Raul::Symbol("note")); } NoteNode::NoteNode(InternalPlugin* plugin, diff --git a/src/server/internals/Trigger.cpp b/src/server/internals/Trigger.cpp index ca37bd59..4745ffbb 100644 --- a/src/server/internals/Trigger.cpp +++ b/src/server/internals/Trigger.cpp @@ -41,7 +41,8 @@ namespace Server { namespace Internals { InternalPlugin* TriggerNode::internal_plugin(URIs& uris) { - return new InternalPlugin(uris, NS_INTERNALS "Trigger", "trigger"); + return new InternalPlugin( + uris, Raul::URI(NS_INTERNALS "Trigger"), Raul::Symbol("trigger")); } TriggerNode::TriggerNode(InternalPlugin* plugin, |