diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-09-27 19:58:24 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-09-27 19:58:24 +0200 |
commit | b40ba0cf91603b695f1f2380cbd39966a458f22f (patch) | |
tree | 1fec48ddc59eb1392fac38495b230e4b2cbf7528 /src/Common/Requests | |
parent | e1d8490f0654a3da0b900407d80d91d8d0da68c8 (diff) | |
download | mad-b40ba0cf91603b695f1f2380cbd39966a458f22f.tar mad-b40ba0cf91603b695f1f2380cbd39966a458f22f.zip |
Use Unicode-aware String class instead of std::string
Diffstat (limited to 'src/Common/Requests')
-rw-r--r-- | src/Common/Requests/DisconnectRequest.cpp | 2 | ||||
-rw-r--r-- | src/Common/Requests/IdentifyRequest.cpp | 3 | ||||
-rw-r--r-- | src/Common/Requests/IdentifyRequest.h | 4 | ||||
-rw-r--r-- | src/Common/Requests/SimpleRequest.h | 6 |
4 files changed, 7 insertions, 8 deletions
diff --git a/src/Common/Requests/DisconnectRequest.cpp b/src/Common/Requests/DisconnectRequest.cpp index c2b7b71..676c9e1 100644 --- a/src/Common/Requests/DisconnectRequest.cpp +++ b/src/Common/Requests/DisconnectRequest.cpp @@ -32,7 +32,7 @@ void DisconnectRequest::sendRequest() { void DisconnectRequest::handlePacket(boost::shared_ptr<const XmlData> packet) { if(packet->getType() == "Error") { - signalFinished(Core::Exception(packet->get<const std::string&>("Where"), static_cast<Core::Exception::ErrorCode>(packet->get<long>("ErrorCode")), + signalFinished(Core::Exception(packet->get<const Core::String&>("Where").extract(), static_cast<Core::Exception::ErrorCode>(packet->get<long>("ErrorCode")), packet->get<long>("SubCode"), packet->get<long>("SubSubCode"))); return; } diff --git a/src/Common/Requests/IdentifyRequest.cpp b/src/Common/Requests/IdentifyRequest.cpp index 98868ef..a9e566a 100644 --- a/src/Common/Requests/IdentifyRequest.cpp +++ b/src/Common/Requests/IdentifyRequest.cpp @@ -27,8 +27,7 @@ void IdentifyRequest::sendRequest() { Common::XmlData packet; packet.setType("Identify"); - if(!hostname.empty()) - packet.set("hostname", hostname); + packet.set("hostname", hostname); sendPacket(packet); } diff --git a/src/Common/Requests/IdentifyRequest.h b/src/Common/Requests/IdentifyRequest.h index 51b24dd..b0e9669 100644 --- a/src/Common/Requests/IdentifyRequest.h +++ b/src/Common/Requests/IdentifyRequest.h @@ -32,13 +32,13 @@ namespace Requests { class MAD_COMMON_EXPORT IdentifyRequest : public Common::Request { private: - std::string hostname; + Core::String hostname; protected: virtual void sendRequest(); public: - IdentifyRequest(Application *application, const std::string &hostname0) : Request(application), hostname(hostname0) {} + IdentifyRequest(Application *application, const Core::String &hostname0) : Request(application), hostname(hostname0) {} }; } diff --git a/src/Common/Requests/SimpleRequest.h b/src/Common/Requests/SimpleRequest.h index 4bff997..ff0c3c1 100644 --- a/src/Common/Requests/SimpleRequest.h +++ b/src/Common/Requests/SimpleRequest.h @@ -24,7 +24,7 @@ #include "../Request.h" -#include <string> +#include <Core/String.h> namespace Mad { namespace Common { @@ -32,11 +32,11 @@ namespace Requests { class MAD_COMMON_EXPORT SimpleRequest : public Request { protected: - const std::string type; + const Core::String type; virtual void sendRequest(); - SimpleRequest(Application *application, const std::string &type0) : Request(application), type(type0) {} + SimpleRequest(Application *application, const Core::String &type0) : Request(application), type(type0) {} }; } |