diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-02-14 18:57:18 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-02-14 21:36:32 (GMT) |
commit | cb05f5a908e20006c954ce38755c2e422ecc2388 (patch) | |
tree | a793551a5fe279a57d4330119560e8542f745484 /Swiften/Parser/PayloadParsers/MUCUserPayloadParser.cpp | |
parent | cad974b45c0fb9355e68d9728e42c9ae3dbcebc7 (diff) | |
download | swift-contrib-cb05f5a908e20006c954ce38755c2e422ecc2388.zip swift-contrib-cb05f5a908e20006c954ce38755c2e422ecc2388.tar.bz2 |
Removed Swift::String.
Diffstat (limited to 'Swiften/Parser/PayloadParsers/MUCUserPayloadParser.cpp')
-rw-r--r-- | Swiften/Parser/PayloadParsers/MUCUserPayloadParser.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Swiften/Parser/PayloadParsers/MUCUserPayloadParser.cpp b/Swiften/Parser/PayloadParsers/MUCUserPayloadParser.cpp index 65417a7..ec9e200 100644 --- a/Swiften/Parser/PayloadParsers/MUCUserPayloadParser.cpp +++ b/Swiften/Parser/PayloadParsers/MUCUserPayloadParser.cpp @@ -18,27 +18,27 @@ namespace Swift { MUCUserPayloadParser::MUCUserPayloadParser() : level(TopLevel) { } -void MUCUserPayloadParser::handleStartElement(const String& element, const String&, const AttributeMap& attributes) { +void MUCUserPayloadParser::handleStartElement(const std::string& element, const std::string&, const AttributeMap& attributes) { if (level == ItemLevel) { if (element == "item") { MUCUserPayload::Item item; - String affiliation = attributes.getAttribute("affiliation"); - String role = attributes.getAttribute("role"); - String nick = attributes.getAttribute("nick"); - String jid = attributes.getAttribute("jid"); + std::string affiliation = attributes.getAttribute("affiliation"); + std::string role = attributes.getAttribute("role"); + std::string nick = attributes.getAttribute("nick"); + std::string jid = attributes.getAttribute("jid"); item.affiliation = parseAffiliation(affiliation); item.role = parseRole(role); - if (!jid.isEmpty()) { + if (!jid.empty()) { item.realJID = JID(jid); } - if (!nick.isEmpty()) { + if (!nick.empty()) { item.nick = nick; } getPayloadInternal()->addItem(item); } else if (element == "status") { MUCUserPayload::StatusCode status; try { - status.code = boost::lexical_cast<int>(attributes.getAttribute("code").getUTF8Data()); + status.code = boost::lexical_cast<int>(attributes.getAttribute("code").c_str()); getPayloadInternal()->addStatusCode(status); } catch (boost::bad_lexical_cast&) { } @@ -47,7 +47,7 @@ void MUCUserPayloadParser::handleStartElement(const String& element, const Strin ++level; } -MUCOccupant::Role MUCUserPayloadParser::parseRole(const String& roleString) const { +MUCOccupant::Role MUCUserPayloadParser::parseRole(const std::string& roleString) const { if (roleString == "moderator") { return MUCOccupant::Moderator; } @@ -63,7 +63,7 @@ MUCOccupant::Role MUCUserPayloadParser::parseRole(const String& roleString) cons return MUCOccupant::NoRole; } -MUCOccupant::Affiliation MUCUserPayloadParser::parseAffiliation(const String& affiliationString) const { +MUCOccupant::Affiliation MUCUserPayloadParser::parseAffiliation(const std::string& affiliationString) const { if (affiliationString == "owner") { return MUCOccupant::Owner; } @@ -83,11 +83,11 @@ MUCOccupant::Affiliation MUCUserPayloadParser::parseAffiliation(const String& af } -void MUCUserPayloadParser::handleEndElement(const String& /*element*/, const String&) { +void MUCUserPayloadParser::handleEndElement(const std::string& /*element*/, const std::string&) { --level; } -void MUCUserPayloadParser::handleCharacterData(const String& /*data*/) { +void MUCUserPayloadParser::handleCharacterData(const std::string& /*data*/) { } |