summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-14 18:57:18 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-14 21:36:32 (GMT)
commitcb05f5a908e20006c954ce38755c2e422ecc2388 (patch)
treea793551a5fe279a57d4330119560e8542f745484 /Swiften/StreamStack
parentcad974b45c0fb9355e68d9728e42c9ae3dbcebc7 (diff)
downloadswift-contrib-cb05f5a908e20006c954ce38755c2e422ecc2388.zip
swift-contrib-cb05f5a908e20006c954ce38755c2e422ecc2388.tar.bz2
Removed Swift::String.
Diffstat (limited to 'Swiften/StreamStack')
-rw-r--r--Swiften/StreamStack/HighLayer.cpp2
-rw-r--r--Swiften/StreamStack/LowLayer.cpp2
-rw-r--r--Swiften/StreamStack/UnitTest/StreamStackTest.cpp4
-rw-r--r--Swiften/StreamStack/UnitTest/XMPPLayerTest.cpp8
-rw-r--r--Swiften/StreamStack/XMPPLayer.cpp4
-rw-r--r--Swiften/StreamStack/XMPPLayer.h2
6 files changed, 13 insertions, 9 deletions
diff --git a/Swiften/StreamStack/HighLayer.cpp b/Swiften/StreamStack/HighLayer.cpp
index da1eec9..7203b7f 100644
--- a/Swiften/StreamStack/HighLayer.cpp
+++ b/Swiften/StreamStack/HighLayer.cpp
@@ -6,6 +6,8 @@
#include <Swiften/StreamStack/HighLayer.h>
+#include <cassert>
+
#include <Swiften/StreamStack/LowLayer.h>
namespace Swift {
diff --git a/Swiften/StreamStack/LowLayer.cpp b/Swiften/StreamStack/LowLayer.cpp
index ca7b72b..ed93cd2 100644
--- a/Swiften/StreamStack/LowLayer.cpp
+++ b/Swiften/StreamStack/LowLayer.cpp
@@ -6,6 +6,8 @@
#include <Swiften/StreamStack/LowLayer.h>
+#include <cassert>
+
#include <Swiften/StreamStack/HighLayer.h>
namespace Swift {
diff --git a/Swiften/StreamStack/UnitTest/StreamStackTest.cpp b/Swiften/StreamStack/UnitTest/StreamStackTest.cpp
index 20b976d..be16baa 100644
--- a/Swiften/StreamStack/UnitTest/StreamStackTest.cpp
+++ b/Swiften/StreamStack/UnitTest/StreamStackTest.cpp
@@ -134,7 +134,7 @@ class StreamStackTest : public CppUnit::TestFixture {
private:
class MyStreamLayer : public StreamLayer {
public:
- MyStreamLayer(const String& prepend) : prepend_(prepend) {
+ MyStreamLayer(const std::string& prepend) : prepend_(prepend) {
}
virtual void writeData(const ByteArray& data) {
@@ -146,7 +146,7 @@ class StreamStackTest : public CppUnit::TestFixture {
}
private:
- String prepend_;
+ std::string prepend_;
};
class TestLowLayer : public LowLayer {
diff --git a/Swiften/StreamStack/UnitTest/XMPPLayerTest.cpp b/Swiften/StreamStack/UnitTest/XMPPLayerTest.cpp
index 77e6f7e..6c69a5f 100644
--- a/Swiften/StreamStack/UnitTest/XMPPLayerTest.cpp
+++ b/Swiften/StreamStack/UnitTest/XMPPLayerTest.cpp
@@ -78,19 +78,19 @@ class XMPPLayerTest : public CppUnit::TestFixture {
header.setTo("example.com");
testling_->writeHeader(header);
- CPPUNIT_ASSERT_EQUAL(String("<?xml version=\"1.0\"?><stream:stream xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" to=\"example.com\" version=\"1.0\">"), lowLayer_->writtenData);
+ CPPUNIT_ASSERT_EQUAL(std::string("<?xml version=\"1.0\"?><stream:stream xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" to=\"example.com\" version=\"1.0\">"), lowLayer_->writtenData);
}
void testWriteElement() {
testling_->writeElement(boost::shared_ptr<Presence>(new Presence()));
- CPPUNIT_ASSERT_EQUAL(String("<presence/>"), lowLayer_->writtenData);
+ CPPUNIT_ASSERT_EQUAL(std::string("<presence/>"), lowLayer_->writtenData);
}
void testWriteFooter() {
testling_->writeFooter();
- CPPUNIT_ASSERT_EQUAL(String("</stream:stream>"), lowLayer_->writtenData);
+ CPPUNIT_ASSERT_EQUAL(std::string("</stream:stream>"), lowLayer_->writtenData);
}
void handleElement(boost::shared_ptr<Element>) {
@@ -124,7 +124,7 @@ class XMPPLayerTest : public CppUnit::TestFixture {
writtenData += std::string(data.getData(), data.getSize());
}
- String writtenData;
+ std::string writtenData;
};
FullPayloadParserFactoryCollection parserFactories_;
diff --git a/Swiften/StreamStack/XMPPLayer.cpp b/Swiften/StreamStack/XMPPLayer.cpp
index 3ecda95..a1e7ba3 100644
--- a/Swiften/StreamStack/XMPPLayer.cpp
+++ b/Swiften/StreamStack/XMPPLayer.cpp
@@ -40,7 +40,7 @@ void XMPPLayer::writeElement(boost::shared_ptr<Element> element) {
writeDataInternal(ByteArray(xmppSerializer_->serializeElement(element)));
}
-void XMPPLayer::writeData(const String& data) {
+void XMPPLayer::writeData(const std::string& data) {
writeDataInternal(ByteArray(data));
}
@@ -52,7 +52,7 @@ void XMPPLayer::writeDataInternal(const ByteArray& data) {
void XMPPLayer::handleDataRead(const ByteArray& data) {
onDataRead(data);
inParser_ = true;
- if (!xmppParser_->parse(String(data.getData(), data.getSize()))) {
+ if (!xmppParser_->parse(std::string(data.getData(), data.getSize()))) {
inParser_ = false;
onError();
return;
diff --git a/Swiften/StreamStack/XMPPLayer.h b/Swiften/StreamStack/XMPPLayer.h
index f08bde1..6669cda 100644
--- a/Swiften/StreamStack/XMPPLayer.h
+++ b/Swiften/StreamStack/XMPPLayer.h
@@ -34,7 +34,7 @@ namespace Swift {
void writeHeader(const ProtocolHeader& header);
void writeFooter();
void writeElement(boost::shared_ptr<Element>);
- void writeData(const String& data);
+ void writeData(const std::string& data);
void resetParser();