summaryrefslogtreecommitdiffstats
path: root/src/server/events/Delta.cpp
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 /src/server/events/Delta.cpp
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 'src/server/events/Delta.cpp')
-rw-r--r--src/server/events/Delta.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp
index b7cb9475..56cc22aa 100644
--- a/src/server/events/Delta.cpp
+++ b/src/server/events/Delta.cpp
@@ -178,7 +178,7 @@ Delta::pre_process(PreProcessContext& ctx)
const bool is_graph_object = uri_is_path(_subject);
const bool is_client = (_subject == "ingen:/clients/this");
const bool is_engine = (_subject == "ingen:/");
- const bool is_file = (_subject.substr(0, 5) == "file:");
+ const bool is_file = (_subject.scheme() == "file");
if (_type == Type::PUT && is_file) {
// Ensure type is Preset, the only supported file put
@@ -195,7 +195,7 @@ Delta::pre_process(PreProcessContext& ctx)
return Event::pre_process_done(Status::BAD_REQUEST, _subject);
}
- const Raul::URI prot(_engine.world()->forge().str(p->second, false));
+ const URI prot(_engine.world()->forge().str(p->second, false));
if (!uri_is_path(prot)) {
return Event::pre_process_done(Status::BAD_URI, _subject);
}
@@ -261,8 +261,8 @@ Delta::pre_process(PreProcessContext& ctx)
// Remove any properties removed in delta
for (const auto& r : _remove) {
- const Raul::URI& key = r.first;
- const Atom& value = r.second;
+ const URI& key = r.first;
+ const Atom& value = r.second;
if (key == uris.midi_binding && value == uris.patch_wildcard) {
PortImpl* port = dynamic_cast<PortImpl*>(_object);
if (port) {
@@ -314,9 +314,9 @@ Delta::pre_process(PreProcessContext& ctx)
}
for (const auto& p : _properties) {
- const Raul::URI& key = p.first;
- const Property& value = p.second;
- SpecialType op = SpecialType::NONE;
+ const URI& key = p.first;
+ const Property& value = p.second;
+ SpecialType op = SpecialType::NONE;
if (obj) {
Resource& resource = *obj;
if (value != uris.patch_wildcard) {
@@ -373,8 +373,8 @@ Delta::pre_process(PreProcessContext& ctx)
uri_str = Glib::filename_to_uri(value.ptr<char>());
}
- if (Raul::URI::is_valid(uri_str)) {
- const Raul::URI uri(uri_str);
+ if (URI::is_valid(uri_str)) {
+ const URI uri(uri_str);
op = SpecialType::PRESET;
if ((_state = block->load_preset(uri))) {
lilv_state_emit_port_values(
@@ -503,8 +503,8 @@ Delta::execute(RunContext& context)
std::vector<SpecialType>::const_iterator t = _types.begin();
for (const auto& p : _properties) {
- const Raul::URI& key = p.first;
- const Atom& value = p.second;
+ const URI& key = p.first;
+ const Atom& value = p.second;
switch (*t++) {
case SpecialType::ENABLE_BROADCAST:
if (port) {
@@ -621,7 +621,7 @@ Delta::post_process()
}
break;
case Type::PUT:
- if (_type == Type::PUT && _subject.substr(0, 5) == "file:") {
+ if (_type == Type::PUT && _subject.scheme() == "file") {
// Preset save
ClientUpdate response;
response.put(_preset->uri(), _preset->properties());