summaryrefslogtreecommitdiffstats
path: root/src/Common/RequestHandlers
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/RequestHandlers')
-rw-r--r--src/Common/RequestHandlers/FSInfoRequestHandler.cpp4
-rw-r--r--src/Common/RequestHandlers/SimpleRequestHandler.cpp2
-rw-r--r--src/Common/RequestHandlers/SimpleRequestHandler.h4
-rw-r--r--src/Common/RequestHandlers/SimpleRequestHandlerGroup.cpp6
-rw-r--r--src/Common/RequestHandlers/SimpleRequestHandlerGroup.h14
5 files changed, 15 insertions, 15 deletions
diff --git a/src/Common/RequestHandlers/FSInfoRequestHandler.cpp b/src/Common/RequestHandlers/FSInfoRequestHandler.cpp
index af4bf50..36ae515 100644
--- a/src/Common/RequestHandlers/FSInfoRequestHandler.cpp
+++ b/src/Common/RequestHandlers/FSInfoRequestHandler.cpp
@@ -37,8 +37,8 @@ void FSInfoRequestHandler::handleRequest(boost::shared_ptr<const Common::XmlData
for(std::vector<SystemManager::FSInfo>::const_iterator fs = fsInfo.begin(); fs != fsInfo.end(); ++fs) {
XmlData::List::iterator entry = list->addEntry();
- entry->set("name", fs->fsName);
- entry->set("mountedOn", fs->mountedOn);
+ entry->set("name", fs->fsName.c_str());
+ entry->set("mountedOn", fs->mountedOn.c_str());
entry->set("totalSize", fs->total);
entry->set("usedSize", fs->used);
entry->set("availableSize", fs->available);
diff --git a/src/Common/RequestHandlers/SimpleRequestHandler.cpp b/src/Common/RequestHandlers/SimpleRequestHandler.cpp
index 86edca6..71a8b3a 100644
--- a/src/Common/RequestHandlers/SimpleRequestHandler.cpp
+++ b/src/Common/RequestHandlers/SimpleRequestHandler.cpp
@@ -49,7 +49,7 @@ void SimpleRequestHandler::handlePacket(boost::shared_ptr<const XmlData> packet)
ret.set("ErrorCode", e.getErrorCode());
ret.set("SubCode", e.getSubCode());
ret.set("SubSubCode", e.getSubSubCode());
- ret.set("Where", e.getWhere());
+ ret.set("Where", e.getWhere().c_str());
}
sendPacket(ret);
diff --git a/src/Common/RequestHandlers/SimpleRequestHandler.h b/src/Common/RequestHandlers/SimpleRequestHandler.h
index 85cbd4c..5ccb1f4 100644
--- a/src/Common/RequestHandlers/SimpleRequestHandler.h
+++ b/src/Common/RequestHandlers/SimpleRequestHandler.h
@@ -30,13 +30,13 @@ namespace RequestHandlers {
class MAD_COMMON_EXPORT SimpleRequestHandler : public RequestHandler {
private:
- std::string type;
+ Core::String type;
boost::function2<void, boost::shared_ptr<const XmlData>, XmlData*> handler;
protected:
virtual void handlePacket(boost::shared_ptr<const XmlData> packet);
- SimpleRequestHandler(Application *application, const std::string &type0, const boost::function2<void, boost::shared_ptr<const XmlData>, XmlData*> &handler0)
+ SimpleRequestHandler(Application *application, const Core::String &type0, const boost::function2<void, boost::shared_ptr<const XmlData>, XmlData*> &handler0)
: RequestHandler(application), type(type0), handler(handler0) {}
};
diff --git a/src/Common/RequestHandlers/SimpleRequestHandlerGroup.cpp b/src/Common/RequestHandlers/SimpleRequestHandlerGroup.cpp
index a7debc3..a3ed286 100644
--- a/src/Common/RequestHandlers/SimpleRequestHandlerGroup.cpp
+++ b/src/Common/RequestHandlers/SimpleRequestHandlerGroup.cpp
@@ -50,15 +50,15 @@ void SimpleRequestHandlerGroup::GroupRequestHandler::handlePacket(boost::shared_
ret.set("ErrorCode", e.getErrorCode());
ret.set("SubCode", e.getSubCode());
ret.set("SubSubCode", e.getSubSubCode());
- ret.set("Where", e.getWhere());
+ ret.set("Where", e.getWhere().c_str());
}
sendPacket(ret);
signalFinished();
}
-boost::shared_ptr<RequestHandler> SimpleRequestHandlerGroup::createRequestHandler(Application *application, const std::string &type) {
- std::map<std::string, boost::function3<void, boost::shared_ptr<const XmlData>, XmlData*, Connection*> >::iterator handler = handlers.find(type);
+boost::shared_ptr<RequestHandler> SimpleRequestHandlerGroup::createRequestHandler(Application *application, const Core::String &type) {
+ std::map<Core::String, boost::function3<void, boost::shared_ptr<const XmlData>, XmlData*, Connection*> >::iterator handler = handlers.find(type);
if(handler == handlers.end())
return boost::shared_ptr<RequestHandler>();
diff --git a/src/Common/RequestHandlers/SimpleRequestHandlerGroup.h b/src/Common/RequestHandlers/SimpleRequestHandlerGroup.h
index 2022705..53f8516 100644
--- a/src/Common/RequestHandlers/SimpleRequestHandlerGroup.h
+++ b/src/Common/RequestHandlers/SimpleRequestHandlerGroup.h
@@ -32,22 +32,22 @@ class MAD_COMMON_EXPORT SimpleRequestHandlerGroup : public RequestHandlerGroup {
private:
class MAD_COMMON_EXPORT GroupRequestHandler : public RequestHandler {
private:
- std::string type;
+ Core::String type;
boost::function3<void, boost::shared_ptr<const XmlData>, XmlData*, Connection*> handler;
protected:
virtual void handlePacket(boost::shared_ptr<const XmlData> packet);
public:
- GroupRequestHandler(Application *application, const std::string &type0, const boost::function3<void, boost::shared_ptr<const XmlData>, XmlData*, Connection*> &handler0)
+ GroupRequestHandler(Application *application, const Core::String &type0, const boost::function3<void, boost::shared_ptr<const XmlData>, XmlData*, Connection*> &handler0)
: RequestHandler(application), type(type0), handler(handler0) {}
};
- std::set<std::string> types;
- std::map<std::string, boost::function3<void, boost::shared_ptr<const XmlData>, XmlData*, Connection*> > handlers;
+ std::set<Core::String> types;
+ std::map<Core::String, boost::function3<void, boost::shared_ptr<const XmlData>, XmlData*, Connection*> > handlers;
protected:
- void registerHandler(const std::string &type, const boost::function3<void, boost::shared_ptr<const XmlData>, XmlData*, Connection*> &handler) {
+ void registerHandler(const Core::String &type, const boost::function3<void, boost::shared_ptr<const XmlData>, XmlData*, Connection*> &handler) {
types.insert(type);
handlers.insert(std::make_pair(type, handler));
}
@@ -55,11 +55,11 @@ class MAD_COMMON_EXPORT SimpleRequestHandlerGroup : public RequestHandlerGroup {
SimpleRequestHandlerGroup() {}
public:
- virtual const std::set<std::string>& getPacketTypes() {
+ virtual const std::set<Core::String>& getPacketTypes() {
return types;
}
- virtual boost::shared_ptr<RequestHandler> createRequestHandler(Application *application, const std::string &type);
+ virtual boost::shared_ptr<RequestHandler> createRequestHandler(Application *application, const Core::String &type);
};
}