summaryrefslogtreecommitdiff
path: root/rotord/src/rotord.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@herge.(none)>2013-08-08 14:45:47 +0100
committerTim Redfern <tim@herge.(none)>2013-08-08 14:45:47 +0100
commitebc9d15f13cbf96d1ec093405657fe201b830ce4 (patch)
treed757a17625994924ed243afa73de1542cd4caf3d /rotord/src/rotord.cpp
parenta2254447b138af7fc0719e5a107816487255736b (diff)
basic list_nodes
Diffstat (limited to 'rotord/src/rotord.cpp')
-rwxr-xr-xrotord/src/rotord.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/rotord/src/rotord.cpp b/rotord/src/rotord.cpp
index 6f2d765..fefca8e 100755
--- a/rotord/src/rotord.cpp
+++ b/rotord/src/rotord.cpp
@@ -1,5 +1,7 @@
#include "rotord.h"
+using namespace Rotor;
+
RenderContextHandler::RenderContextHandler(const std::string _content,const HTTPServerResponse::HTTPStatus _status){
content=_content;
status=_status;
@@ -98,6 +100,14 @@ HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPS
status=HTTPResponse::HTTP_OK;
}
}
+ else if (command[0]=="listnodes") {
+ XML.pushTag("rotor");
+ if (request.getMethod()=="GET") {
+ Node_factory factory;
+ factory.list_nodes(XML);
+ status=HTTPResponse::HTTP_OK;
+ }
+ }
else if (command[0]=="exit") {
logger.information("exiting");
exit(0);