summaryrefslogtreecommitdiffstats
path: root/ingen/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-01-21 00:41:34 +0100
committerDavid Robillard <d@drobilla.net>2018-01-21 00:56:50 +0100
commit44f7ad5222d824d81dc743045d5887418847e74e (patch)
tree1b41535ac00b8b225a25dba2873b064cb074bfa9 /ingen/client
parent90fca083052880479ad90d870e556f0648e32106 (diff)
downloadingen-44f7ad5222d824d81dc743045d5887418847e74e.tar.gz
ingen-44f7ad5222d824d81dc743045d5887418847e74e.tar.bz2
ingen-44f7ad5222d824d81dc743045d5887418847e74e.zip
Add URI class and remove use of Raul::URI
Diffstat (limited to 'ingen/client')
-rw-r--r--ingen/client/BlockModel.hpp6
-rw-r--r--ingen/client/ClientStore.hpp14
-rw-r--r--ingen/client/ObjectModel.hpp11
-rw-r--r--ingen/client/PluginModel.hpp23
-rw-r--r--ingen/client/PluginUI.hpp4
-rw-r--r--ingen/client/PortModel.hpp2
-rw-r--r--ingen/client/SigClientInterface.hpp2
-rw-r--r--ingen/client/SocketClient.hpp4
-rw-r--r--ingen/client/ThreadedSigClientInterface.hpp5
9 files changed, 34 insertions, 37 deletions
diff --git a/ingen/client/BlockModel.hpp b/ingen/client/BlockModel.hpp
index 22613eca..38e8987e 100644
--- a/ingen/client/BlockModel.hpp
+++ b/ingen/client/BlockModel.hpp
@@ -58,7 +58,7 @@ public:
Node* port(uint32_t index) const;
- const Raul::URI& plugin_uri() const { return _plugin_uri; }
+ const URI& plugin_uri() const { return _plugin_uri; }
const Resource* plugin() const { return _plugin.get(); }
Resource* plugin() { return _plugin.get(); }
SPtr<PluginModel> plugin_model() const { return _plugin; }
@@ -86,7 +86,7 @@ protected:
friend class ClientStore;
BlockModel(URIs& uris,
- const Raul::URI& plugin_uri,
+ const URI& plugin_uri,
const Raul::Path& path);
BlockModel(URIs& uris,
SPtr<PluginModel> plugin,
@@ -103,7 +103,7 @@ protected:
virtual void clear();
Ports _ports; ///< Vector of ports
- Raul::URI _plugin_uri; ///< Plugin URI (if PluginModel is unknown)
+ URI _plugin_uri; ///< Plugin URI (if PluginModel is unknown)
SPtr<PluginModel> _plugin; ///< The plugin this block is an instance of
private:
diff --git a/ingen/client/ClientStore.hpp b/ingen/client/ClientStore.hpp
index 8850f401..797052ef 100644
--- a/ingen/client/ClientStore.hpp
+++ b/ingen/client/ClientStore.hpp
@@ -58,15 +58,15 @@ public:
Log& log,
SPtr<SigClientInterface> emitter = SPtr<SigClientInterface>());
- Raul::URI uri() const override { return Raul::URI("ingen:/clients/store"); }
+ URI uri() const override { return URI("ingen:/clients/store"); }
SPtr<const ObjectModel> object(const Raul::Path& path) const;
- SPtr<const PluginModel> plugin(const Raul::URI& uri) const;
- SPtr<const Resource> resource(const Raul::URI& uri) const;
+ SPtr<const PluginModel> plugin(const URI& uri) const;
+ SPtr<const Resource> resource(const URI& uri) const;
void clear();
- typedef std::map< const Raul::URI, SPtr<PluginModel> > Plugins;
+ typedef std::map< const URI, SPtr<PluginModel> > Plugins;
SPtr<const Plugins> plugins() const { return _plugins; }
SPtr<Plugins> plugins() { return _plugins; }
void set_plugins(SPtr<Plugins> p) { _plugins = p; }
@@ -94,13 +94,13 @@ public:
INGEN_SIGNAL(new_object, void, SPtr<ObjectModel>);
INGEN_SIGNAL(new_plugin, void, SPtr<PluginModel>);
- INGEN_SIGNAL(plugin_deleted, void, Raul::URI);
+ INGEN_SIGNAL(plugin_deleted, void, URI);
private:
SPtr<ObjectModel> _object(const Raul::Path& path);
- SPtr<PluginModel> _plugin(const Raul::URI& uri);
+ SPtr<PluginModel> _plugin(const URI& uri);
SPtr<PluginModel> _plugin(const Atom& uri);
- SPtr<Resource> _resource(const Raul::URI& uri);
+ SPtr<Resource> _resource(const URI& uri);
void add_object(SPtr<ObjectModel> object);
SPtr<ObjectModel> remove_object(const Raul::Path& path);
diff --git a/ingen/client/ObjectModel.hpp b/ingen/client/ObjectModel.hpp
index 4250efc5..a5a68f1e 100644
--- a/ingen/client/ObjectModel.hpp
+++ b/ingen/client/ObjectModel.hpp
@@ -27,7 +27,6 @@
#include "ingen/types.hpp"
#include "raul/Path.hpp"
-#include "raul/URI.hpp"
#include "ingen/Node.hpp"
#include "ingen/Resource.hpp"
@@ -58,10 +57,10 @@ class INGEN_API ObjectModel : public Node
public:
bool is_a(const URIs::Quark& type) const;
- const Atom& get_property(const Raul::URI& key) const;
+ const Atom& get_property(const URI& key) const;
- void on_property(const Raul::URI& uri, const Atom& value);
- void on_property_removed(const Raul::URI& uri, const Atom& value);
+ void on_property(const URI& uri, const Atom& value);
+ void on_property_removed(const URI& uri, const Atom& value);
const Raul::Path& path() const { return _path; }
const Raul::Symbol& symbol() const { return _symbol; }
@@ -73,8 +72,8 @@ public:
// Signals
INGEN_SIGNAL(new_child, void, SPtr<ObjectModel>);
INGEN_SIGNAL(removed_child, void, SPtr<ObjectModel>);
- INGEN_SIGNAL(property, void, const Raul::URI&, const Atom&);
- INGEN_SIGNAL(property_removed, void, const Raul::URI&, const Atom&);
+ INGEN_SIGNAL(property, void, const URI&, const Atom&);
+ INGEN_SIGNAL(property_removed, void, const URI&, const Atom&);
INGEN_SIGNAL(destroyed, void);
INGEN_SIGNAL(moved, void);
diff --git a/ingen/client/PluginModel.hpp b/ingen/client/PluginModel.hpp
index 585ac7d7..61de0f1a 100644
--- a/ingen/client/PluginModel.hpp
+++ b/ingen/client/PluginModel.hpp
@@ -50,18 +50,19 @@ class INGEN_API PluginModel : public Ingen::Resource
{
public:
PluginModel(URIs& uris,
- const Raul::URI& uri,
+ const URI& uri,
const Atom& type,
const Ingen::Properties& properties);
- const Atom& type() const { return _type; }
- const Raul::URI type_uri() const {
- return Raul::URI(_type.is_valid()
- ? _uris.forge.str(_type, false)
- : "http://www.w3.org/2002/07/owl#Nothing");
+ const Atom& type() const { return _type; }
+
+ const URI type_uri() const
+ {
+ return URI(_type.is_valid() ? _uris.forge.str(_type, false)
+ : "http://www.w3.org/2002/07/owl#Nothing");
}
- virtual const Atom& get_property(const Raul::URI& key) const;
+ virtual const Atom& get_property(const URI& key) const;
Raul::Symbol default_block_symbol() const;
std::string human_name() const;
@@ -70,7 +71,7 @@ public:
typedef std::map<float, std::string> ScalePoints;
ScalePoints port_scale_points(uint32_t i) const;
- typedef std::map<Raul::URI, std::string> Presets;
+ typedef std::map<URI, std::string> Presets;
const Presets& presets() const { return _presets; }
static LilvWorld* lilv_world() { return _lilv_world; }
@@ -96,8 +97,8 @@ public:
// Signals
INGEN_SIGNAL(changed, void);
- INGEN_SIGNAL(property, void, const Raul::URI&, const Atom&);
- INGEN_SIGNAL(preset, void, const Raul::URI&, const std::string&);
+ INGEN_SIGNAL(property, void, const URI&, const Atom&);
+ INGEN_SIGNAL(preset, void, const URI&, const std::string&);
bool fetched() const { return _fetched; }
void set_fetched(bool f) { _fetched = f; }
@@ -106,7 +107,7 @@ protected:
friend class ClientStore;
void set(SPtr<PluginModel> p);
- void add_preset(const Raul::URI& uri, const std::string& label);
+ void add_preset(const URI& uri, const std::string& label);
private:
std::string get_documentation(const LilvNode* subject, bool html) const;
diff --git a/ingen/client/PluginUI.hpp b/ingen/client/PluginUI.hpp
index 45475cfe..a98df61d 100644
--- a/ingen/client/PluginUI.hpp
+++ b/ingen/client/PluginUI.hpp
@@ -76,8 +76,8 @@ public:
* engine and/or update itself as necessary.
*/
INGEN_SIGNAL(property_changed, void,
- const Raul::URI&, // Subject
- const Raul::URI&, // Predicate
+ const URI&, // Subject
+ const URI&, // Predicate
const Atom&, // Object
Resource::Graph); // Context
diff --git a/ingen/client/PortModel.hpp b/ingen/client/PortModel.hpp
index f03e5bc1..9ad37378 100644
--- a/ingen/client/PortModel.hpp
+++ b/ingen/client/PortModel.hpp
@@ -63,7 +63,7 @@ public:
inline bool operator==(const PortModel& pm) const { return (path() == pm.path()); }
- void on_property(const Raul::URI& uri, const Atom& value);
+ void on_property(const URI& uri, const Atom& value);
// Signals
INGEN_SIGNAL(value_changed, void, const Atom&);
diff --git a/ingen/client/SigClientInterface.hpp b/ingen/client/SigClientInterface.hpp
index 4acc903b..6e94b257 100644
--- a/ingen/client/SigClientInterface.hpp
+++ b/ingen/client/SigClientInterface.hpp
@@ -46,7 +46,7 @@ class INGEN_API SigClientInterface : public Ingen::Interface,
public:
SigClientInterface() {}
- Raul::URI uri() const override { return Raul::URI("ingen:/clients/sig"); }
+ URI uri() const override { return URI("ingen:/clients/sig"); }
INGEN_SIGNAL(message, void, Message)
diff --git a/ingen/client/SocketClient.hpp b/ingen/client/SocketClient.hpp
index cceba9a3..8236200b 100644
--- a/ingen/client/SocketClient.hpp
+++ b/ingen/client/SocketClient.hpp
@@ -30,7 +30,7 @@ class INGEN_API SocketClient : public SocketWriter
{
public:
SocketClient(World& world,
- const Raul::URI& uri,
+ const URI& uri,
SPtr<Raul::Socket> sock,
SPtr<Interface> respondee)
: SocketWriter(world.uri_map(), world.uris(), uri, sock)
@@ -48,7 +48,7 @@ public:
static SPtr<Ingen::Interface>
new_socket_interface(Ingen::World* world,
- const Raul::URI& uri,
+ const URI& uri,
SPtr<Ingen::Interface> respondee)
{
const Raul::Socket::Type type = (uri.scheme() == "unix"
diff --git a/ingen/client/ThreadedSigClientInterface.hpp b/ingen/client/ThreadedSigClientInterface.hpp
index 6457d559..751ea37b 100644
--- a/ingen/client/ThreadedSigClientInterface.hpp
+++ b/ingen/client/ThreadedSigClientInterface.hpp
@@ -55,9 +55,7 @@ public:
: message_slot(_signal_message.make_slot())
{}
- Raul::URI uri() const override {
- return Raul::URI("ingen:/clients/sig_queue");
- }
+ URI uri() const override { return URI("ingen:/clients/sig_queue"); }
void message(const Message& msg) override {
std::lock_guard<std::mutex> lock(_mutex);
@@ -87,7 +85,6 @@ private:
using Graph = Resource::Graph;
using Path = Raul::Path;
- using URI = Raul::URI;
sigc::slot<void, Message> message_slot;
};