summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-12 00:09:28 +0000
committerDavid Robillard <d@drobilla.net>2012-05-12 00:09:28 +0000
commit90e7284b2f3c9e491497030f4443130c1b6f98bf (patch)
tree5bfb92f278c71c0631b5a8fefdde90ad14402076 /src/server
parenteaf3abc571e5c1a60cf6d65d55b3cc496d5e62dd (diff)
downloadingen-90e7284b2f3c9e491497030f4443130c1b6f98bf.tar.gz
ingen-90e7284b2f3c9e491497030f4443130c1b6f98bf.tar.bz2
ingen-90e7284b2f3c9e491497030f4443130c1b6f98bf.zip
Remove Ping event and associated cruft.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4365 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server')
-rw-r--r--src/server/EventWriter.cpp37
-rw-r--r--src/server/events.hpp1
-rw-r--r--src/server/events/Ping.hpp52
3 files changed, 9 insertions, 81 deletions
diff --git a/src/server/EventWriter.cpp b/src/server/EventWriter.cpp
index 8dbd4425..c839d65e 100644
--- a/src/server/EventWriter.cpp
+++ b/src/server/EventWriter.cpp
@@ -92,15 +92,8 @@ EventWriter::move(const Raul::Path& old_path,
void
EventWriter::del(const Raul::URI& uri)
{
- if (uri == "ingen:engine") {
- if (_respondee) {
- _respondee->response(_request_id, SUCCESS);
- }
- _engine.quit();
- } else {
- _engine.enqueue_event(
- new Events::Delete(_engine, _respondee.get(), _request_id, now(), uri));
- }
+ _engine.enqueue_event(
+ new Events::Delete(_engine, _respondee.get(), _request_id, now(), uri));
}
void
@@ -136,25 +129,13 @@ EventWriter::set_property(const Raul::URI& uri,
const Raul::URI& predicate,
const Raul::Atom& value)
{
- if (uri == "ingen:engine" && predicate == "ingen:enabled"
- && value.type() == _engine.world()->forge().Bool) {
- if (value.get_bool()) {
- _engine.activate();
- _engine.enqueue_event(
- new Events::Ping(_engine, _respondee.get(), _request_id, now()));
- } else {
- _engine.enqueue_event(
- new Events::Deactivate(_engine, _respondee.get(), _request_id, now()));
- }
- } else {
- Resource::Properties remove;
- remove.insert(make_pair(predicate, _engine.world()->uris().wildcard));
- Resource::Properties add;
- add.insert(make_pair(predicate, value));
- _engine.enqueue_event(
- new Events::SetMetadata(_engine, _respondee.get(), _request_id, now(),
- false, Resource::DEFAULT, uri, add, remove));
- }
+ Resource::Properties remove;
+ remove.insert(make_pair(predicate, _engine.world()->uris().wildcard));
+ Resource::Properties add;
+ add.insert(make_pair(predicate, value));
+ _engine.enqueue_event(
+ new Events::SetMetadata(_engine, _respondee.get(), _request_id, now(),
+ false, Resource::DEFAULT, uri, add, remove));
}
void
diff --git a/src/server/events.hpp b/src/server/events.hpp
index c6f8766b..ba126296 100644
--- a/src/server/events.hpp
+++ b/src/server/events.hpp
@@ -27,7 +27,6 @@
#include "events/DisconnectAll.hpp"
#include "events/Get.hpp"
#include "events/Move.hpp"
-#include "events/Ping.hpp"
#include "events/SetMetadata.hpp"
#include "events/SetPortValue.hpp"
diff --git a/src/server/events/Ping.hpp b/src/server/events/Ping.hpp
deleted file mode 100644
index 879b8d8a..00000000
--- a/src/server/events/Ping.hpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- This file is part of Ingen.
- Copyright 2007-2012 David Robillard <http://drobilla.net/>
-
- Ingen is free software: you can redistribute it and/or modify it under the
- terms of the GNU Affero General Public License as published by the Free
- Software Foundation, either version 3 of the License, or any later version.
-
- Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- A PARTICULAR PURPOSE. See the GNU Affero General Public License for details.
-
- You should have received a copy of the GNU Affero General Public License
- along with Ingen. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef INGEN_EVENTS_PING_HPP
-#define INGEN_EVENTS_PING_HPP
-
-#include "Event.hpp"
-#include "types.hpp"
-
-namespace Ingen {
-namespace Server {
-
-class PortImpl;
-
-namespace Events {
-
-/** A ping that travels through the pre-processed event queue before responding
- * (useful for the order guarantee).
- *
- * \ingroup engine
- */
-class Ping : public Event
-{
-public:
- Ping(Engine& engine,
- Interface* client,
- int32_t id,
- SampleCount timestamp)
- : Event(engine, client, id, timestamp)
- {}
-
- void post_process() { respond(SUCCESS); }
-};
-
-} // namespace Events
-} // namespace Server
-} // namespace Ingen
-
-#endif // INGEN_EVENTS_PING_HPP