summaryrefslogtreecommitdiffstats
path: root/src/engine/HTTPClientSender.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/HTTPClientSender.cpp')
-rw-r--r--src/engine/HTTPClientSender.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/engine/HTTPClientSender.cpp b/src/engine/HTTPClientSender.cpp
index ec60cb44..413dfe7f 100644
--- a/src/engine/HTTPClientSender.cpp
+++ b/src/engine/HTTPClientSender.cpp
@@ -17,7 +17,10 @@
#include <string>
#include "raul/Atom.hpp"
+#include "serialisation/Serialiser.hpp"
+#include "module/World.hpp"
#include "HTTPClientSender.hpp"
+#include "Engine.hpp"
using namespace std;
using namespace Raul;
@@ -74,6 +77,7 @@ HTTPClientSender::destroy(const std::string& path)
void
HTTPClientSender::patch_cleared(const std::string& patch_path)
{
+ send_chunk(string("<").append(patch_path).append("> ingen:empty true ."));
//send("/ingen/patch_cleared", "s", patch_path.c_str(), LO_ARGS_END);
}
@@ -140,6 +144,20 @@ HTTPClientSender::activity(const std::string& path)
//lo_send(_address, "/ingen/activity", "s", port_path.c_str(), LO_ARGS_END);
}
+static void null_deleter(const Shared::GraphObject*) {}
+
+void
+HTTPClientSender::new_object(const Shared::GraphObject* object)
+{
+ SharedPtr<Serialisation::Serialiser> serialiser = _engine.world()->serialiser;
+ serialiser->start_to_string("/", "");
+ // FIXME
+ boost::shared_ptr<Shared::GraphObject> obj((Shared::GraphObject*)object, null_deleter);
+ serialiser->serialise(obj);
+ string str = serialiser->finish();
+ send_chunk(str);
+}
+
void
HTTPClientSender::new_plugin(const std::string& uri,
@@ -159,7 +177,7 @@ HTTPClientSender::new_plugin(const std::string& uri,
void
HTTPClientSender::new_patch(const std::string& path, uint32_t poly)
{
- send_chunk(string("<").append(path).append("> a ingen:Patch"));
+ //send_chunk(string("<").append(path).append("> a ingen:Patch"));
}