summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Presence')
-rw-r--r--Swiften/Presence/PresenceOracle.h2
-rw-r--r--Swiften/Presence/SubscriptionManager.h6
-rw-r--r--Swiften/Presence/UnitTest/PayloadAddingPresenceSenderTest.cpp14
-rw-r--r--Swiften/Presence/UnitTest/PresenceOracleTest.cpp10
4 files changed, 16 insertions, 16 deletions
diff --git a/Swiften/Presence/PresenceOracle.h b/Swiften/Presence/PresenceOracle.h
index 4e16e41..f98e1cd 100644
--- a/Swiften/Presence/PresenceOracle.h
+++ b/Swiften/Presence/PresenceOracle.h
@@ -8,7 +8,7 @@
#include <map>
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Elements/Presence.h"
#include "Swiften/Base/boost_bsignals.h"
diff --git a/Swiften/Presence/SubscriptionManager.h b/Swiften/Presence/SubscriptionManager.h
index fdf3c04..ad55f9d 100644
--- a/Swiften/Presence/SubscriptionManager.h
+++ b/Swiften/Presence/SubscriptionManager.h
@@ -8,7 +8,7 @@
#include <map>
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/JID/JID.h"
#include "Swiften/Base/boost_bsignals.h"
#include "Swiften/Elements/Presence.h"
@@ -33,9 +33,9 @@ namespace Swift {
* received. This is useful when the subscriber adds extensions to
* the request.
*/
- boost::signal<void (const JID&, const String&, Presence::ref)> onPresenceSubscriptionRequest;
+ boost::signal<void (const JID&, const std::string&, Presence::ref)> onPresenceSubscriptionRequest;
- boost::signal<void (const JID&, const String&)> onPresenceSubscriptionRevoked;
+ boost::signal<void (const JID&, const std::string&)> onPresenceSubscriptionRevoked;
private:
void handleIncomingPresence(Presence::ref presence);
diff --git a/Swiften/Presence/UnitTest/PayloadAddingPresenceSenderTest.cpp b/Swiften/Presence/UnitTest/PayloadAddingPresenceSenderTest.cpp
index 3a6487a..132c865 100644
--- a/Swiften/Presence/UnitTest/PayloadAddingPresenceSenderTest.cpp
+++ b/Swiften/Presence/UnitTest/PayloadAddingPresenceSenderTest.cpp
@@ -44,7 +44,7 @@ class PayloadAddingPresenceSenderTest : public CppUnit::TestFixture {
testling->sendPresence(Presence::create("bar"));
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(stanzaChannel->sentStanzas.size()));
- CPPUNIT_ASSERT_EQUAL(String("bar"), stanzaChannel->getStanzaAtIndex<Presence>(0)->getStatus());
+ CPPUNIT_ASSERT_EQUAL(std::string("bar"), stanzaChannel->getStanzaAtIndex<Presence>(0)->getStatus());
CPPUNIT_ASSERT(stanzaChannel->getStanzaAtIndex<Presence>(0)->getPayload<MyPayload>());
}
@@ -55,7 +55,7 @@ class PayloadAddingPresenceSenderTest : public CppUnit::TestFixture {
testling->sendPresence(Presence::create("bar"));
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(stanzaChannel->sentStanzas.size()));
- CPPUNIT_ASSERT_EQUAL(String("bar"), stanzaChannel->getStanzaAtIndex<Presence>(0)->getStatus());
+ CPPUNIT_ASSERT_EQUAL(std::string("bar"), stanzaChannel->getStanzaAtIndex<Presence>(0)->getStatus());
CPPUNIT_ASSERT(!stanzaChannel->getStanzaAtIndex<Presence>(0)->getPayload<MyPayload>());
}
@@ -76,7 +76,7 @@ class PayloadAddingPresenceSenderTest : public CppUnit::TestFixture {
testling->setPayload(MyPayload::create("foo"));
CPPUNIT_ASSERT_EQUAL(2, static_cast<int>(stanzaChannel->sentStanzas.size()));
- CPPUNIT_ASSERT_EQUAL(String("bar"), stanzaChannel->getStanzaAtIndex<Presence>(1)->getStatus());
+ CPPUNIT_ASSERT_EQUAL(std::string("bar"), stanzaChannel->getStanzaAtIndex<Presence>(1)->getStatus());
CPPUNIT_ASSERT(stanzaChannel->getStanzaAtIndex<Presence>(1)->getPayload<MyPayload>());
}
@@ -102,7 +102,7 @@ class PayloadAddingPresenceSenderTest : public CppUnit::TestFixture {
testling->setPayload(MyPayload::create("foo"));
CPPUNIT_ASSERT_EQUAL(3, static_cast<int>(stanzaChannel->sentStanzas.size()));
- CPPUNIT_ASSERT_EQUAL(String("bar"), stanzaChannel->getStanzaAtIndex<Presence>(2)->getStatus());
+ CPPUNIT_ASSERT_EQUAL(std::string("bar"), stanzaChannel->getStanzaAtIndex<Presence>(2)->getStatus());
}
private:
@@ -114,13 +114,13 @@ class PayloadAddingPresenceSenderTest : public CppUnit::TestFixture {
struct MyPayload : public Payload {
typedef boost::shared_ptr<MyPayload> ref;
- MyPayload(const String& body) : body(body) {}
+ MyPayload(const std::string& body) : body(body) {}
- static ref create(const String& body) {
+ static ref create(const std::string& body) {
return ref(new MyPayload(body));
}
- String body;
+ std::string body;
};
private:
diff --git a/Swiften/Presence/UnitTest/PresenceOracleTest.cpp b/Swiften/Presence/UnitTest/PresenceOracleTest.cpp
index aa450a2..24cc62c 100644
--- a/Swiften/Presence/UnitTest/PresenceOracleTest.cpp
+++ b/Swiften/Presence/UnitTest/PresenceOracleTest.cpp
@@ -122,7 +122,7 @@ class PresenceOracleTest : public CppUnit::TestFixture {
}
void testSubscriptionRequest() {
- String reasonText = "Because I want to";
+ std::string reasonText = "Because I want to";
JID sentJID = JID("me@example.com");
boost::shared_ptr<Presence> sentPresence(new Presence());
@@ -147,14 +147,14 @@ class PresenceOracleTest : public CppUnit::TestFixture {
}
private:
- Presence::ref makeOnline(const String& resource, int priority) {
+ Presence::ref makeOnline(const std::string& resource, int priority) {
Presence::ref presence(new Presence());
presence->setPriority(priority);
presence->setFrom(JID("alice@wonderland.lit/" + resource));
return presence;
}
- Presence::ref makeOffline(const String& resource) {
+ Presence::ref makeOffline(const std::string& resource) {
Presence::ref presence(new Presence());
presence->setFrom(JID("alice@wonderland.lit" + resource));
presence->setType(Presence::Unavailable);
@@ -165,7 +165,7 @@ class PresenceOracleTest : public CppUnit::TestFixture {
changes.push_back(newPresence);
}
- void handlePresenceSubscriptionRequest(const JID& jid, const String& reason) {
+ void handlePresenceSubscriptionRequest(const JID& jid, const std::string& reason) {
SubscriptionRequestInfo subscriptionRequest;
subscriptionRequest.jid = jid;
subscriptionRequest.reason = reason;
@@ -181,7 +181,7 @@ class PresenceOracleTest : public CppUnit::TestFixture {
private:
struct SubscriptionRequestInfo {
JID jid;
- String reason;
+ std::string reason;
};
PresenceOracle* oracle_;
SubscriptionManager* subscriptionManager_;