summaryrefslogtreecommitdiffstats
path: root/src/engine/events
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/events')
-rw-r--r--src/engine/events/DeleteEvent.cpp (renamed from src/engine/events/DestroyEvent.cpp)12
-rw-r--r--src/engine/events/DeleteEvent.hpp (renamed from src/engine/events/DestroyEvent.hpp)15
-rw-r--r--src/engine/events/MoveEvent.cpp (renamed from src/engine/events/RenameEvent.cpp)14
-rw-r--r--src/engine/events/MoveEvent.hpp (renamed from src/engine/events/RenameEvent.hpp)14
4 files changed, 34 insertions, 21 deletions
diff --git a/src/engine/events/DestroyEvent.cpp b/src/engine/events/DeleteEvent.cpp
index 2a2e4abd..21058546 100644
--- a/src/engine/events/DestroyEvent.cpp
+++ b/src/engine/events/DeleteEvent.cpp
@@ -17,7 +17,7 @@
#include "raul/Maid.hpp"
#include "raul/Path.hpp"
-#include "DestroyEvent.hpp"
+#include "DeleteEvent.hpp"
#include "Responder.hpp"
#include "Engine.hpp"
#include "PatchImpl.hpp"
@@ -38,7 +38,7 @@ namespace Ingen {
using namespace Shared;
-DestroyEvent::DestroyEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const Raul::Path& path)
+DeleteEvent::DeleteEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const Raul::Path& path)
: QueuedEvent(engine, responder, time, true, source)
, _path(path)
, _store_iterator(engine.engine_store()->end())
@@ -53,14 +53,14 @@ DestroyEvent::DestroyEvent(Engine& engine, SharedPtr<Responder> responder, Frame
}
-DestroyEvent::~DestroyEvent()
+DeleteEvent::~DeleteEvent()
{
delete _disconnect_event;
}
void
-DestroyEvent::pre_process()
+DeleteEvent::pre_process()
{
_store_iterator = _engine.engine_store()->find(_path);
@@ -120,7 +120,7 @@ DestroyEvent::pre_process()
void
-DestroyEvent::execute(ProcessContext& context)
+DeleteEvent::execute(ProcessContext& context)
{
QueuedEvent::execute(context);
@@ -169,7 +169,7 @@ DestroyEvent::execute(ProcessContext& context)
void
-DestroyEvent::post_process()
+DeleteEvent::post_process()
{
if (!_node && !_port) {
if (_path.is_root()) {
diff --git a/src/engine/events/DestroyEvent.hpp b/src/engine/events/DeleteEvent.hpp
index 25d0b65b..d0fa43f1 100644
--- a/src/engine/events/DestroyEvent.hpp
+++ b/src/engine/events/DeleteEvent.hpp
@@ -37,15 +37,22 @@ class DisconnectAllEvent;
class CompiledPatch;
-/** An event to remove and delete a Node.
+/** Delete a graph object.
+ * WebDAV method DELETE (RFC4918 S9.6).
*
* \ingroup engine
*/
-class DestroyEvent : public QueuedEvent
+class DeleteEvent : public QueuedEvent
{
public:
- DestroyEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime timestamp, QueuedEventSource* source, const Raul::Path& path);
- ~DestroyEvent();
+ DeleteEvent(
+ Engine& engine,
+ SharedPtr<Responder> responder,
+ FrameTime timestamp,
+ QueuedEventSource* source,
+ const Raul::Path& path);
+
+ ~DeleteEvent();
void pre_process();
void execute(ProcessContext& context);
diff --git a/src/engine/events/RenameEvent.cpp b/src/engine/events/MoveEvent.cpp
index 73379a0c..661bc4c1 100644
--- a/src/engine/events/RenameEvent.cpp
+++ b/src/engine/events/MoveEvent.cpp
@@ -21,7 +21,7 @@
#include "NodeImpl.hpp"
#include "EngineStore.hpp"
#include "PatchImpl.hpp"
-#include "RenameEvent.hpp"
+#include "MoveEvent.hpp"
#include "Responder.hpp"
#include "AudioDriver.hpp"
#include "MidiDriver.hpp"
@@ -34,7 +34,7 @@ namespace Ingen {
using namespace Shared;
-RenameEvent::RenameEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const Path& path, const Path& new_path)
+MoveEvent::MoveEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const Path& path, const Path& new_path)
: QueuedEvent(engine, responder, timestamp)
, _old_path(path)
, _new_path(new_path)
@@ -45,13 +45,13 @@ RenameEvent::RenameEvent(Engine& engine, SharedPtr<Responder> responder, SampleC
}
-RenameEvent::~RenameEvent()
+MoveEvent::~MoveEvent()
{
}
void
-RenameEvent::pre_process()
+MoveEvent::pre_process()
{
if (!_old_path.parent().is_parent_of(_new_path)) {
_error = PARENT_DIFFERS;
@@ -97,7 +97,7 @@ RenameEvent::pre_process()
void
-RenameEvent::execute(ProcessContext& context)
+MoveEvent::execute(ProcessContext& context)
{
QueuedEvent::execute(context);
@@ -117,13 +117,13 @@ RenameEvent::execute(ProcessContext& context)
void
-RenameEvent::post_process()
+MoveEvent::post_process()
{
string msg = "Unable to rename object - ";
if (_error == NO_ERROR) {
_responder->respond_ok();
- _engine.broadcaster()->send_rename(_old_path, _new_path);
+ _engine.broadcaster()->send_move(_old_path, _new_path);
} else {
if (_error == OBJECT_EXISTS)
msg.append("Object already exists at ").append(_new_path.str());
diff --git a/src/engine/events/RenameEvent.hpp b/src/engine/events/MoveEvent.hpp
index 2fa9d897..f55d70b1 100644
--- a/src/engine/events/RenameEvent.hpp
+++ b/src/engine/events/MoveEvent.hpp
@@ -27,15 +27,21 @@ namespace Ingen {
class PatchImpl;
-/** An event to change the name of an GraphObjectImpl.
+/** Move a graph object to a new path.
+ * WebDAV method MOVE (RFC4918 S9.9).
*
* \ingroup engine
*/
-class RenameEvent : public QueuedEvent
+class MoveEvent : public QueuedEvent
{
public:
- RenameEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const Raul::Path& old_path, const Raul::Path& new_path);
- ~RenameEvent();
+ MoveEvent(
+ Engine& engine,
+ SharedPtr<Responder> responder,
+ SampleCount timestamp,
+ const Raul::Path& old_path,
+ const Raul::Path& new_path);
+ ~MoveEvent();
void pre_process();
void execute(ProcessContext& context);