summaryrefslogtreecommitdiff
path: root/rotord/rotord.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/rotord.cpp')
-rwxr-xr-xrotord/rotord.cpp28
1 files changed, 5 insertions, 23 deletions
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 << "<html><head><title>RotorServer powered by "
- "POCO C++ Libraries</title>";
- ostr << "</head>";
- ostr << "<body><p style=\"text-align: center; "
- "font-size: 48px;\">";
- vampHost::runPlugin("",settings.soname,settings.filtername, "",0, settings.inputFile, ostr,true);
- ostr << "</p></body></html>";
-}
-
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 <std::string> 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>"+sID+"</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<std::string>& args){
if (!_helpRequested) {
+
+
unsigned short port;
xmlIO xml;