summaryrefslogtreecommitdiffstats
path: root/src/server/events/Get.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-01-11 04:47:21 +0000
committerDavid Robillard <d@drobilla.net>2013-01-11 04:47:21 +0000
commit10e9a3a800a35916872abf9e354be4c554338e4e (patch)
treed6be3ce7993f5d8efd525629fd321b32a6341633 /src/server/events/Get.cpp
parent684eaf6b58e41f6758b160b882a6313faf0cff18 (diff)
downloadingen-10e9a3a800a35916872abf9e354be4c554338e4e.tar.gz
ingen-10e9a3a800a35916872abf9e354be4c554338e4e.tar.bz2
ingen-10e9a3a800a35916872abf9e354be4c554338e4e.zip
Use type safe enumerations.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4918 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/events/Get.cpp')
-rw-r--r--src/server/events/Get.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/server/events/Get.cpp b/src/server/events/Get.cpp
index 93af8bf2..67b68de9 100644
--- a/src/server/events/Get.cpp
+++ b/src/server/events/Get.cpp
@@ -57,15 +57,17 @@ Get::pre_process()
if (_uri == "ingen:/plugins") {
_plugins = _engine.block_factory()->plugins();
- return Event::pre_process_done(SUCCESS);
+ return Event::pre_process_done(Status::SUCCESS);
} else if (_uri == "ingen:/engine") {
- return Event::pre_process_done(SUCCESS);
+ return Event::pre_process_done(Status::SUCCESS);
} else if (Node::uri_is_path(_uri)) {
_object = _engine.store()->get(Node::uri_to_path(_uri));
- return Event::pre_process_done(_object ? SUCCESS : NOT_FOUND, _uri);
+ return Event::pre_process_done(
+ _object ? Status::SUCCESS : Status::NOT_FOUND, _uri);
} else {
_plugin = _engine.block_factory()->plugin(_uri);
- return Event::pre_process_done(_plugin ? SUCCESS : NOT_FOUND, _uri);
+ return Event::pre_process_done(
+ _plugin ? Status::SUCCESS : Status::NOT_FOUND, _uri);
}
}
@@ -101,12 +103,12 @@ static void
send_graph(Interface* client, const GraphImpl* graph)
{
client->put(graph->uri(),
- graph->properties(Resource::INTERNAL),
- Resource::INTERNAL);
+ graph->properties(Resource::Graph::INTERNAL),
+ Resource::Graph::INTERNAL);
client->put(graph->uri(),
- graph->properties(Resource::EXTERNAL),
- Resource::EXTERNAL);
+ graph->properties(Resource::Graph::EXTERNAL),
+ Resource::Graph::EXTERNAL);
// Send blocks
for (GraphImpl::Blocks::const_iterator j = graph->blocks().begin();
@@ -130,7 +132,7 @@ void
Get::post_process()
{
Broadcaster::Transfer t(*_engine.broadcaster());
- if (!respond() && _request_client) {
+ if (respond() == Status::SUCCESS && _request_client) {
if (_uri == "ingen:/plugins") {
_engine.broadcaster()->send_plugins_to(_request_client.get(), _plugins);
} else if (_uri == "ingen:/engine") {