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/Server | |
parent | cad974b45c0fb9355e68d9728e42c9ae3dbcebc7 (diff) | |
download | swift-cb05f5a908e20006c954ce38755c2e422ecc2388.zip swift-cb05f5a908e20006c954ce38755c2e422ecc2388.tar.bz2 |
Removed Swift::String.
Diffstat (limited to 'Swiften/Server')
-rw-r--r-- | Swiften/Server/ServerFromClientSession.cpp | 2 | ||||
-rw-r--r-- | Swiften/Server/ServerFromClientSession.h | 8 | ||||
-rw-r--r-- | Swiften/Server/SimpleUserRegistry.cpp | 6 | ||||
-rw-r--r-- | Swiften/Server/SimpleUserRegistry.h | 10 | ||||
-rw-r--r-- | Swiften/Server/UnitTest/ServerStanzaRouterTest.cpp | 2 | ||||
-rw-r--r-- | Swiften/Server/UserRegistry.h | 6 |
6 files changed, 18 insertions, 16 deletions
diff --git a/Swiften/Server/ServerFromClientSession.cpp b/Swiften/Server/ServerFromClientSession.cpp index 1c47cef..18da7e8 100644 --- a/Swiften/Server/ServerFromClientSession.cpp +++ b/Swiften/Server/ServerFromClientSession.cpp @@ -24,7 +24,7 @@ namespace Swift { ServerFromClientSession::ServerFromClientSession( - const String& id, + const std::string& id, boost::shared_ptr<Connection> connection, PayloadParserFactoryCollection* payloadParserFactories, PayloadSerializerCollection* payloadSerializers, diff --git a/Swiften/Server/ServerFromClientSession.h b/Swiften/Server/ServerFromClientSession.h index 2ac4296..80ef063 100644 --- a/Swiften/Server/ServerFromClientSession.h +++ b/Swiften/Server/ServerFromClientSession.h @@ -10,7 +10,7 @@ #include "Swiften/Base/boost_bsignals.h" #include <boost/enable_shared_from_this.hpp> -#include "Swiften/Base/String.h" +#include <string> #include "Swiften/Session/Session.h" #include "Swiften/JID/JID.h" #include "Swiften/Network/Connection.h" @@ -31,7 +31,7 @@ namespace Swift { class ServerFromClientSession : public Session { public: ServerFromClientSession( - const String& id, + const std::string& id, boost::shared_ptr<Connection> connection, PayloadParserFactoryCollection* payloadParserFactories, PayloadSerializerCollection* payloadSerializers, @@ -50,11 +50,11 @@ namespace Swift { } private: - String id_; + std::string id_; UserRegistry* userRegistry_; bool authenticated_; bool initialized; bool allowSASLEXTERNAL; - String user_; + std::string user_; }; } diff --git a/Swiften/Server/SimpleUserRegistry.cpp b/Swiften/Server/SimpleUserRegistry.cpp index 51278d4..2de28fe 100644 --- a/Swiften/Server/SimpleUserRegistry.cpp +++ b/Swiften/Server/SimpleUserRegistry.cpp @@ -11,12 +11,12 @@ namespace Swift { SimpleUserRegistry::SimpleUserRegistry() { } -bool SimpleUserRegistry::isValidUserPassword(const JID& user, const String& password) const { - std::map<JID,String>::const_iterator i = users.find(user); +bool SimpleUserRegistry::isValidUserPassword(const JID& user, const std::string& password) const { + std::map<JID,std::string>::const_iterator i = users.find(user); return i != users.end() ? i->second == password : false; } -void SimpleUserRegistry::addUser(const JID& user, const String& password) { +void SimpleUserRegistry::addUser(const JID& user, const std::string& password) { users.insert(std::make_pair(user, password)); } diff --git a/Swiften/Server/SimpleUserRegistry.h b/Swiften/Server/SimpleUserRegistry.h index 022e017..5de9f64 100644 --- a/Swiften/Server/SimpleUserRegistry.h +++ b/Swiften/Server/SimpleUserRegistry.h @@ -9,20 +9,20 @@ #include <map> #include "Swiften/JID/JID.h" -#include "Swiften/Base/String.h" +#include <string> #include "Swiften/Server/UserRegistry.h" namespace Swift { - class String; + class SimpleUserRegistry : public UserRegistry { public: SimpleUserRegistry(); - virtual bool isValidUserPassword(const JID& user, const String& password) const; - void addUser(const JID& user, const String& password); + virtual bool isValidUserPassword(const JID& user, const std::string& password) const; + void addUser(const JID& user, const std::string& password); private: - std::map<JID, String> users; + std::map<JID, std::string> users; }; } diff --git a/Swiften/Server/UnitTest/ServerStanzaRouterTest.cpp b/Swiften/Server/UnitTest/ServerStanzaRouterTest.cpp index d24d1f8..0a5c7c1 100644 --- a/Swiften/Server/UnitTest/ServerStanzaRouterTest.cpp +++ b/Swiften/Server/UnitTest/ServerStanzaRouterTest.cpp @@ -124,7 +124,7 @@ class ServerStanzaRouterTest : public CppUnit::TestFixture { } private: - boost::shared_ptr<Message> createMessageTo(const String& recipient) { + boost::shared_ptr<Message> createMessageTo(const std::string& recipient) { boost::shared_ptr<Message> message(new Message()); message->setTo(JID(recipient)); return message; diff --git a/Swiften/Server/UserRegistry.h b/Swiften/Server/UserRegistry.h index ced2022..c021fc4 100644 --- a/Swiften/Server/UserRegistry.h +++ b/Swiften/Server/UserRegistry.h @@ -6,14 +6,16 @@ #pragma once +#include <string> + namespace Swift { - class String; + class JID; class UserRegistry { public: virtual ~UserRegistry(); - virtual bool isValidUserPassword(const JID& user, const String& password) const = 0; + virtual bool isValidUserPassword(const JID& user, const std::string& password) const = 0; }; } |