From 78eb4c35ae7ee52615c62abb3683595fe6384206 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Wed, 12 Jun 2013 17:03:42 +0100 Subject: file clean --- rotord/rotord.cpp | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) (limited to 'rotord/rotord.cpp') diff --git a/rotord/rotord.cpp b/rotord/rotord.cpp index 27a09d7..7b7285b 100755 --- a/rotord/rotord.cpp +++ b/rotord/rotord.cpp @@ -67,26 +67,6 @@ void RotorRequestHandler::handleRequest(HTTPServerRequest& request,HTTPServerRes } -AudioAnalyserHandler::AudioAnalyserHandler(const vampHost::Settings& _settings): settings(_settings){ -} - -void AudioAnalyserHandler::handleRequest(HTTPServerRequest& request,HTTPServerResponse& response) { - - response.setChunkedTransferEncoding(true); - response.setContentType("text/html"); - - //string audioData=vampHost::runPlugin(); - - std::ostream& ostr = response.send(); - ostr << "RotorServer powered by " - "POCO C++ Libraries"; - ostr << ""; - ostr << "

"; - vampHost::runPlugin("",settings.soname,settings.filtername, "",0, settings.inputFile, ostr,true); - ostr << "

"; -} - RenderContextHandler::RenderContextHandler(const std::string _content,const HTTPServerResponse::HTTPStatus _status){ content=_content; status=_status; @@ -108,13 +88,13 @@ void RenderContextHandler::handleRequest(HTTPServerRequest& request,HTTPServerRe HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPServerRequest& request){ - Application& app = Application::instance(); + Logger& logger = Logger::get("Rotor"); Poco::URI theuri=Poco::URI(request.getURI()); std::vector command; theuri.getPathSegments(command); - app.logger().information(request.clientAddress().toString()+" "+request.getMethod()); + logger.information(request.clientAddress().toString()+" "+request.getMethod()); string content=""; HTTPResponse::HTTPStatus status=HTTPResponse::HTTP_BAD_REQUEST; //by default @@ -132,7 +112,7 @@ HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPS //Throws a SystemException if no MAC address can be obtained. // //seems to hang, to me - cerr << "Rotor: starting thread "<< sID << endl; + logger.information("Rotor: starting thread "+sID); manager.start(new Rotor::Render_context(sID)); content=""+sID+"\n"; status=HTTPResponse::HTTP_OK; @@ -284,6 +264,8 @@ void RotorServer::handleHelp(const std::string& name, const std::string& value){ int RotorServer::main(const std::vector& args){ if (!_helpRequested) { + + unsigned short port; xmlIO xml; -- cgit v1.2.3