diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-06-09 19:01:02 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-06-09 19:01:02 +0200 |
commit | 766c56a693e8b1bd4293459bb256abdc0515a0b5 (patch) | |
tree | da8e51003cf801344e22b0b2b2e28a48d6a8b74c /src/Common/RequestHandlers | |
parent | 452320b5ec31447a526735016fa07589cb848032 (diff) | |
download | mad-766c56a693e8b1bd4293459bb256abdc0515a0b5.tar mad-766c56a693e8b1bd4293459bb256abdc0515a0b5.zip |
Teile der Namespaces Common und Net in den neuen Namespace Core verschoben
Diffstat (limited to 'src/Common/RequestHandlers')
-rw-r--r-- | src/Common/RequestHandlers/DisconnectRequestHandler.cpp | 8 | ||||
-rw-r--r-- | src/Common/RequestHandlers/SimpleRequestHandler.cpp | 10 | ||||
-rw-r--r-- | src/Common/RequestHandlers/StatusRequestHandler.cpp | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/Common/RequestHandlers/DisconnectRequestHandler.cpp b/src/Common/RequestHandlers/DisconnectRequestHandler.cpp index 942da0a..6c89ab2 100644 --- a/src/Common/RequestHandlers/DisconnectRequestHandler.cpp +++ b/src/Common/RequestHandlers/DisconnectRequestHandler.cpp @@ -18,8 +18,8 @@ */ #include "DisconnectRequestHandler.h" -#include <Net/Exception.h> -#include "../Logger.h" +#include <Core/Exception.h> +#include <Core/Logger.h> namespace Mad { namespace Common { @@ -27,11 +27,11 @@ namespace RequestHandlers { void DisconnectRequestHandler::handlePacket(boost::shared_ptr<const XmlPacket> packet) { if(packet->getType() != "Disconnect") { - Logger::log(Logger::ERROR, "Received an unexpected packet."); + Core::Logger::log(Core::Logger::ERROR, "Received an unexpected packet."); XmlPacket ret; ret.setType("Error"); - ret.add("ErrorCode", Net::Exception::UNEXPECTED_PACKET); + ret.add("ErrorCode", Core::Exception::UNEXPECTED_PACKET); sendPacket(ret); diff --git a/src/Common/RequestHandlers/SimpleRequestHandler.cpp b/src/Common/RequestHandlers/SimpleRequestHandler.cpp index 0abc484..b6de0f4 100644 --- a/src/Common/RequestHandlers/SimpleRequestHandler.cpp +++ b/src/Common/RequestHandlers/SimpleRequestHandler.cpp @@ -18,9 +18,9 @@ */ #include "SimpleRequestHandler.h" -#include "../Logger.h" -#include <Net/Exception.h> +#include <Core/Logger.h> +#include <Core/Exception.h> namespace Mad { namespace Common { @@ -28,11 +28,11 @@ namespace RequestHandlers { void SimpleRequestHandler::handlePacket(boost::shared_ptr<const XmlPacket> packet) { if(packet->getType() != type) { - Logger::log(Logger::ERROR, "Received an unexpected packet."); + Core::Logger::log(Core::Logger::ERROR, "Received an unexpected packet."); XmlPacket ret; ret.setType("Error"); - ret.add("ErrorCode", Net::Exception::UNEXPECTED_PACKET); + ret.add("ErrorCode", Core::Exception::UNEXPECTED_PACKET); sendPacket(ret); @@ -47,7 +47,7 @@ void SimpleRequestHandler::handlePacket(boost::shared_ptr<const XmlPacket> packe try { handler(packet, &ret); } - catch(Net::Exception e) { + catch(Core::Exception e) { ret.setType("Error"); ret.add("ErrorCode", e.getErrorCode()); ret.add("SubCode", e.getSubCode()); diff --git a/src/Common/RequestHandlers/StatusRequestHandler.cpp b/src/Common/RequestHandlers/StatusRequestHandler.cpp index 25d2f23..95bdd30 100644 --- a/src/Common/RequestHandlers/StatusRequestHandler.cpp +++ b/src/Common/RequestHandlers/StatusRequestHandler.cpp @@ -38,7 +38,7 @@ void StatusRequestHandler::handleRequest(boost::shared_ptr<const Common::XmlPack SystemManager::get()->getMemoryInfo(&totalMem, &freeMem, &totalSwap, &freeSwap); SystemManager::get()->getLoadInfo(¤tLoad, &nProcesses, &loadAvg1, &loadAvg5, &loadAvg15); } - catch(Net::Exception e) {} + catch(Core::Exception e) {} ret->setType("OK"); |