summaryrefslogtreecommitdiffstats
path: root/src/server/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-02-15 23:18:59 +0100
committerDavid Robillard <d@drobilla.net>2017-02-15 23:26:03 +0100
commitfa6bb9afe8fcf2b0b8348495b9c4e1d6425136f0 (patch)
treee69cd957486b3fe8a82c0b56f26aec0a23b8235c /src/server/events
parent2ba09e4b41b01cbd8f8756eb0e3b7e33136e06b3 (diff)
downloadingen-fa6bb9afe8fcf2b0b8348495b9c4e1d6425136f0.tar.gz
ingen-fa6bb9afe8fcf2b0b8348495b9c4e1d6425136f0.tar.bz2
ingen-fa6bb9afe8fcf2b0b8348495b9c4e1d6425136f0.zip
Move Properties out of Resource
Diffstat (limited to 'src/server/events')
-rw-r--r--src/server/events/Connect.hpp8
-rw-r--r--src/server/events/CreateBlock.cpp16
-rw-r--r--src/server/events/CreateBlock.hpp24
-rw-r--r--src/server/events/CreateGraph.cpp24
-rw-r--r--src/server/events/CreateGraph.hpp26
-rw-r--r--src/server/events/CreatePort.cpp18
-rw-r--r--src/server/events/CreatePort.hpp32
-rw-r--r--src/server/events/Delta.cpp8
-rw-r--r--src/server/events/Delta.hpp26
9 files changed, 90 insertions, 92 deletions
diff --git a/src/server/events/Connect.hpp b/src/server/events/Connect.hpp
index 8e7a5030..78c0befa 100644
--- a/src/server/events/Connect.hpp
+++ b/src/server/events/Connect.hpp
@@ -64,10 +64,10 @@ private:
MPtr<CompiledGraph> _compiled_graph;
SPtr<ArcImpl> _arc;
MPtr<PortImpl::Voices> _voices;
- Resource::Properties _tail_remove;
- Resource::Properties _tail_add;
- Resource::Properties _head_remove;
- Resource::Properties _head_add;
+ Properties _tail_remove;
+ Properties _tail_add;
+ Properties _head_remove;
+ Properties _head_add;
};
} // namespace Events
diff --git a/src/server/events/CreateBlock.cpp b/src/server/events/CreateBlock.cpp
index db561e1c..0b4cbae3 100644
--- a/src/server/events/CreateBlock.cpp
+++ b/src/server/events/CreateBlock.cpp
@@ -35,12 +35,12 @@ namespace Ingen {
namespace Server {
namespace Events {
-CreateBlock::CreateBlock(Engine& engine,
- SPtr<Interface> client,
- int32_t id,
- SampleCount timestamp,
- const Raul::Path& path,
- Resource::Properties& properties)
+CreateBlock::CreateBlock(Engine& engine,
+ SPtr<Interface> client,
+ int32_t id,
+ SampleCount timestamp,
+ const Raul::Path& path,
+ Properties& properties)
: Event(engine, client, id, timestamp)
, _path(path)
, _properties(properties)
@@ -55,7 +55,7 @@ CreateBlock::~CreateBlock()
bool
CreateBlock::pre_process(PreProcessContext& ctx)
{
- typedef Resource::Properties::const_iterator iterator;
+ typedef Properties::const_iterator iterator;
const Ingen::URIs& uris = _engine.world()->uris();
const SPtr<Store> store = _engine.store();
@@ -121,7 +121,7 @@ CreateBlock::pre_process(PreProcessContext& ctx)
// Load state from directory if given in properties
LilvState* state = NULL;
- Resource::Properties::iterator s = _properties.find(uris.state_state);
+ Properties::iterator s = _properties.find(uris.state_state);
if (s != _properties.end() && s->second.type() == uris.forge.Path) {
state = LV2Block::load_state(_engine.world(), s->second.ptr<char>());
}
diff --git a/src/server/events/CreateBlock.hpp b/src/server/events/CreateBlock.hpp
index 047c01f3..7ffd9931 100644
--- a/src/server/events/CreateBlock.hpp
+++ b/src/server/events/CreateBlock.hpp
@@ -38,12 +38,12 @@ namespace Events {
class CreateBlock : public Event
{
public:
- CreateBlock(Engine& engine,
- SPtr<Interface> client,
- int32_t id,
- SampleCount timestamp,
- const Raul::Path& block_path,
- Resource::Properties& properties);
+ CreateBlock(Engine& engine,
+ SPtr<Interface> client,
+ int32_t id,
+ SampleCount timestamp,
+ const Raul::Path& block_path,
+ Properties& properties);
~CreateBlock();
@@ -53,12 +53,12 @@ public:
void undo(Interface& target);
private:
- Raul::Path _path;
- Resource::Properties& _properties;
- ClientUpdate _update;
- GraphImpl* _graph;
- BlockImpl* _block;
- MPtr<CompiledGraph> _compiled_graph;
+ Raul::Path _path;
+ Properties& _properties;
+ ClientUpdate _update;
+ GraphImpl* _graph;
+ BlockImpl* _block;
+ MPtr<CompiledGraph> _compiled_graph;
};
} // namespace Events
diff --git a/src/server/events/CreateGraph.cpp b/src/server/events/CreateGraph.cpp
index 1fff9f95..891ca33c 100644
--- a/src/server/events/CreateGraph.cpp
+++ b/src/server/events/CreateGraph.cpp
@@ -31,12 +31,12 @@ namespace Ingen {
namespace Server {
namespace Events {
-CreateGraph::CreateGraph(Engine& engine,
- SPtr<Interface> client,
- int32_t id,
- SampleCount timestamp,
- const Raul::Path& path,
- const Resource::Properties& properties)
+CreateGraph::CreateGraph(Engine& engine,
+ SPtr<Interface> client,
+ int32_t id,
+ SampleCount timestamp,
+ const Raul::Path& path,
+ const Properties& properties)
: Event(engine, client, id, timestamp)
, _path(path)
, _properties(properties)
@@ -57,7 +57,7 @@ CreateGraph::build_child_events()
const Ingen::URIs& uris = _engine.world()->uris();
// Properties common to both ports
- Resource::Properties control_properties;
+ Properties control_properties;
control_properties.put(uris.atom_bufferType, uris.atom_Sequence);
control_properties.put(uris.atom_supports, uris.patch_Message);
control_properties.put(uris.lv2_designation, uris.lv2_control);
@@ -66,7 +66,7 @@ CreateGraph::build_child_events()
control_properties.put(uris.rsz_minimumSize, uris.forge.make(4096));
// Add control port (message receive)
- Resource::Properties in_properties(control_properties);
+ Properties in_properties(control_properties);
in_properties.put(uris.lv2_index, uris.forge.make(0));
in_properties.put(uris.lv2_name, uris.forge.alloc("Control"));
in_properties.put(uris.rdf_type, uris.lv2_InputPort);
@@ -82,7 +82,7 @@ CreateGraph::build_child_events()
in_properties));
// Add notify port (message respond)
- Resource::Properties out_properties(control_properties);
+ Properties out_properties(control_properties);
out_properties.put(uris.lv2_index, uris.forge.make(1));
out_properties.put(uris.lv2_name, uris.forge.alloc("Notify"));
out_properties.put(uris.rdf_type, uris.lv2_OutputPort);
@@ -113,7 +113,7 @@ CreateGraph::pre_process(PreProcessContext& ctx)
const Ingen::URIs& uris = _engine.world()->uris();
- typedef Resource::Properties::const_iterator iterator;
+ typedef Properties::const_iterator iterator;
uint32_t ext_poly = 1;
uint32_t int_poly = 1;
@@ -158,8 +158,8 @@ CreateGraph::pre_process(PreProcessContext& ctx)
_engine.driver()->sample_rate(), int_poly);
_graph->add_property(uris.rdf_type, uris.ingen_Graph.urid);
_graph->add_property(uris.rdf_type,
- Resource::Property(uris.ingen_Block,
- Resource::Graph::EXTERNAL));
+ Property(uris.ingen_Block,
+ Resource::Graph::EXTERNAL));
}
_graph->set_properties(_properties);
diff --git a/src/server/events/CreateGraph.hpp b/src/server/events/CreateGraph.hpp
index 896a18f9..9b4124e4 100644
--- a/src/server/events/CreateGraph.hpp
+++ b/src/server/events/CreateGraph.hpp
@@ -37,12 +37,12 @@ namespace Events {
class CreateGraph : public Event
{
public:
- CreateGraph(Engine& engine,
- SPtr<Interface> client,
- int32_t id,
- SampleCount timestamp,
- const Raul::Path& path,
- const Resource::Properties& properties);
+ CreateGraph(Engine& engine,
+ SPtr<Interface> client,
+ int32_t id,
+ SampleCount timestamp,
+ const Raul::Path& path,
+ const Properties& properties);
~CreateGraph();
@@ -56,13 +56,13 @@ public:
private:
void build_child_events();
- const Raul::Path _path;
- Resource::Properties _properties;
- ClientUpdate _update;
- GraphImpl* _graph;
- GraphImpl* _parent;
- MPtr<CompiledGraph> _compiled_graph;
- std::list<Event*> _child_events;
+ const Raul::Path _path;
+ Properties _properties;
+ ClientUpdate _update;
+ GraphImpl* _graph;
+ GraphImpl* _parent;
+ MPtr<CompiledGraph> _compiled_graph;
+ std::list<Event*> _child_events;
};
} // namespace Events
diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp
index 63301efd..4e34762a 100644
--- a/src/server/events/CreatePort.cpp
+++ b/src/server/events/CreatePort.cpp
@@ -36,12 +36,12 @@ namespace Ingen {
namespace Server {
namespace Events {
-CreatePort::CreatePort(Engine& engine,
- SPtr<Interface> client,
- int32_t id,
- SampleCount timestamp,
- const Raul::Path& path,
- const Resource::Properties& properties)
+CreatePort::CreatePort(Engine& engine,
+ SPtr<Interface> client,
+ int32_t id,
+ SampleCount timestamp,
+ const Raul::Path& path,
+ const Properties& properties)
: Event(engine, client, id, timestamp)
, _path(path)
, _port_type(PortType::UNKNOWN)
@@ -53,8 +53,8 @@ CreatePort::CreatePort(Engine& engine,
{
const Ingen::URIs& uris = _engine.world()->uris();
- typedef Resource::Properties::const_iterator Iterator;
- typedef std::pair<Iterator, Iterator> Range;
+ typedef Properties::const_iterator Iterator;
+ typedef std::pair<Iterator, Iterator> Range;
const Range types = properties.equal_range(uris.rdf_type);
for (Iterator i = types.first; i != types.second; ++i) {
@@ -109,7 +109,7 @@ CreatePort::pre_process(PreProcessContext& ctx)
const uint32_t buf_size = bufs.default_size(_buf_type);
const int32_t old_n_ports = _graph->num_ports_non_rt();
- typedef Resource::Properties::const_iterator PropIter;
+ typedef Properties::const_iterator PropIter;
PropIter index_i = _properties.find(uris.lv2_index);
if (index_i == _properties.end()) {
diff --git a/src/server/events/CreatePort.hpp b/src/server/events/CreatePort.hpp
index 2d32f1dd..a2ea7682 100644
--- a/src/server/events/CreatePort.hpp
+++ b/src/server/events/CreatePort.hpp
@@ -45,12 +45,12 @@ namespace Events {
class CreatePort : public Event
{
public:
- CreatePort(Engine& engine,
- SPtr<Interface> client,
- int32_t id,
- SampleCount timestamp,
- const Raul::Path& path,
- const Resource::Properties& properties);
+ CreatePort(Engine& engine,
+ SPtr<Interface> client,
+ int32_t id,
+ SampleCount timestamp,
+ const Raul::Path& path,
+ const Properties& properties);
bool pre_process(PreProcessContext& ctx);
void execute(RunContext& context);
@@ -63,16 +63,16 @@ private:
OUTPUT
};
- Raul::Path _path;
- PortType _port_type;
- LV2_URID _buf_type;
- GraphImpl* _graph;
- DuplexPort* _graph_port;
- MPtr<BlockImpl::Ports> _ports_array; ///< New external port array for Graph
- EnginePort* _engine_port; ///< Driver port if on the root
- Resource::Properties _properties;
- Resource::Properties _update;
- boost::optional<Flow> _flow;
+ Raul::Path _path;
+ PortType _port_type;
+ LV2_URID _buf_type;
+ GraphImpl* _graph;
+ DuplexPort* _graph_port;
+ MPtr<BlockImpl::Ports> _ports_array; ///< New external port array for Graph
+ EnginePort* _engine_port; ///< Driver port if on the root
+ Properties _properties;
+ Properties _update;
+ boost::optional<Flow> _flow;
};
} // namespace Events
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp
index 0398face..9f4c1da2 100644
--- a/src/server/events/Delta.cpp
+++ b/src/server/events/Delta.cpp
@@ -42,8 +42,6 @@ namespace Ingen {
namespace Server {
namespace Events {
-typedef Resource::Properties Properties;
-
Delta::Delta(Engine& engine,
SPtr<Interface> client,
int32_t id,
@@ -276,9 +274,9 @@ Delta::pre_process(PreProcessContext& ctx)
}
for (const auto& p : _properties) {
- const Raul::URI& key = p.first;
- const Resource::Property& value = p.second;
- SpecialType op = SpecialType::NONE;
+ const Raul::URI& key = p.first;
+ const Property& value = p.second;
+ SpecialType op = SpecialType::NONE;
if (obj) {
Resource& resource = *obj;
if (value != uris.patch_wildcard) {
diff --git a/src/server/events/Delta.hpp b/src/server/events/Delta.hpp
index d751afc7..842986a9 100644
--- a/src/server/events/Delta.hpp
+++ b/src/server/events/Delta.hpp
@@ -56,15 +56,15 @@ public:
PATCH
};
- Delta(Engine& engine,
- SPtr<Interface> client,
- int32_t id,
- SampleCount timestamp,
- Type type,
- Resource::Graph context,
- const Raul::URI& subject,
- const Resource::Properties& properties,
- const Resource::Properties& remove = Resource::Properties());
+ Delta(Engine& engine,
+ SPtr<Interface> client,
+ int32_t id,
+ SampleCount timestamp,
+ Type type,
+ Resource::Graph context,
+ const Raul::URI& subject,
+ const Properties& properties,
+ const Properties& remove = Properties());
~Delta();
@@ -99,8 +99,8 @@ private:
std::vector<SpecialType> _types;
std::vector<SpecialType> _remove_types;
Raul::URI _subject;
- Resource::Properties _properties;
- Resource::Properties _remove;
+ Properties _properties;
+ Properties _remove;
ClientUpdate _update;
Ingen::Resource* _object;
GraphImpl* _graph;
@@ -110,8 +110,8 @@ private:
Resource::Graph _context;
Type _type;
- Resource::Properties _added;
- Resource::Properties _removed;
+ Properties _added;
+ Properties _removed;
std::vector<ControlBindings::Binding*> _removed_bindings;