diff options
Diffstat (limited to 'rotord/src/rendercontext.cpp')
| -rw-r--r-- | rotord/src/rendercontext.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/rotord/src/rendercontext.cpp b/rotord/src/rendercontext.cpp index 7d85cce..3f20923 100644 --- a/rotord/src/rendercontext.cpp +++ b/rotord/src/rendercontext.cpp @@ -342,6 +342,31 @@ void Render_context::session_command(const Session_command& command,xmlIO& XML,H XML.addValue("error","Bad request"); } } + if (command.commands[1]=="features") { + if (command.method=="GET") { + if(state==IDLE){ + //parse json to get preview spec, return XML? this is a mess + string features_node=command.commands[2]; + if (graph.print_features(XML,features_node)) { + status=HTTPResponse::HTTP_OK; + } + else { + status=HTTPResponse::HTTP_BAD_REQUEST; + logger.error("ERROR: Could not print features for node "+features_node); + } + } + else { + status=HTTPResponse::HTTP_BAD_REQUEST; + logger.error("ERROR: Session busy"); + XML.addValue("error","Session busy"); + } + } + else { + status=HTTPResponse::HTTP_BAD_REQUEST; + logger.error("ERROR: Bad request"); + XML.addValue("error","Bad request"); + } + } if (command.commands[1]=="render") { if (command.method=="GET") { if(state==RENDERING){ |
