summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Swiften/FileTransfer/DefaultFileTransferTransporter.cpp2
-rw-r--r--Swiften/Network/BOSHConnection.cpp13
-rw-r--r--Swiften/Parser/MessageParser.cpp8
-rw-r--r--Swiften/Session/BOSHSessionStream.cpp2
-rw-r--r--Swiften/Session/BOSHSessionStream.h2
5 files changed, 14 insertions, 13 deletions
diff --git a/Swiften/FileTransfer/DefaultFileTransferTransporter.cpp b/Swiften/FileTransfer/DefaultFileTransferTransporter.cpp
index 20635f9..1e68bc6 100644
--- a/Swiften/FileTransfer/DefaultFileTransferTransporter.cpp
+++ b/Swiften/FileTransfer/DefaultFileTransferTransporter.cpp
@@ -66,19 +66,19 @@ DefaultFileTransferTransporter::DefaultFileTransferTransporter(
remoteCandidateSelector = new RemoteJingleTransportCandidateSelector(
connectionFactory,
timerFactory,
options);
remoteCandidateSelector->onCandidateSelectFinished.connect(
boost::bind(&DefaultFileTransferTransporter::handleRemoteCandidateSelectFinished, this, _1, _2));
}
DefaultFileTransferTransporter::~DefaultFileTransferTransporter() {
- stopGeneratingLocalCandidates();
+ DefaultFileTransferTransporter::stopGeneratingLocalCandidates();
remoteCandidateSelector->onCandidateSelectFinished.disconnect(
boost::bind(&DefaultFileTransferTransporter::handleRemoteCandidateSelectFinished, this, _1, _2));
delete remoteCandidateSelector;
localCandidateGenerator->onLocalTransportCandidatesGenerated.disconnect(
boost::bind(&DefaultFileTransferTransporter::handleLocalCandidatesGenerated, this, _1));
delete localCandidateGenerator;
}
diff --git a/Swiften/Network/BOSHConnection.cpp b/Swiften/Network/BOSHConnection.cpp
index a9565c9..298b015 100644
--- a/Swiften/Network/BOSHConnection.cpp
+++ b/Swiften/Network/BOSHConnection.cpp
@@ -1,32 +1,33 @@
/*
* Copyright (c) 2011 Thilo Cestonaro
* Licensed under the simplified BSD license.
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
/*
- * Copyright (c) 2011-2014 Isode Limited.
+ * Copyright (c) 2011-2015 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Network/BOSHConnection.h>
+#include <string>
+
#include <boost/bind.hpp>
-#include <boost/thread.hpp>
#include <boost/lexical_cast.hpp>
-#include <string>
+#include <boost/thread.hpp>
+#include <Swiften/Base/ByteArray.h>
+#include <Swiften/Base/Concat.h>
#include <Swiften/Base/Log.h>
#include <Swiften/Base/String.h>
-#include <Swiften/Base/Concat.h>
-#include <Swiften/Base/ByteArray.h>
#include <Swiften/Network/HostAddressPort.h>
#include <Swiften/Parser/BOSHBodyExtractor.h>
namespace Swift {
BOSHConnection::BOSHConnection(const URL& boshURL, Connector::ref connector, XMLParserFactory* parserFactory)
: boshURL_(boshURL),
connector_(connector),
parserFactory_(parserFactory),
@@ -38,19 +39,19 @@ BOSHConnection::BOSHConnection(const URL& boshURL, Connector::ref connector, XML
{
}
BOSHConnection::~BOSHConnection() {
cancelConnector();
if (connection_) {
connection_->onDataRead.disconnect(boost::bind(&BOSHConnection::handleDataRead, shared_from_this(), _1));
connection_->onDisconnected.disconnect(boost::bind(&BOSHConnection::handleDisconnected, shared_from_this(), _1));
}
- disconnect();
+ BOSHConnection::disconnect();
}
void BOSHConnection::connect() {
connector_->onConnectFinished.connect(boost::bind(&BOSHConnection::handleConnectFinished, shared_from_this(), _1));
connector_->start();
}
void BOSHConnection::cancelConnector() {
if (connector_) {
diff --git a/Swiften/Parser/MessageParser.cpp b/Swiften/Parser/MessageParser.cpp
index fd9d57c..5de0038 100644
--- a/Swiften/Parser/MessageParser.cpp
+++ b/Swiften/Parser/MessageParser.cpp
@@ -1,24 +1,24 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2015 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
-#include <boost/optional.hpp>
-
#include <Swiften/Parser/MessageParser.h>
+#include <boost/optional.hpp>
+
namespace Swift {
MessageParser::MessageParser(PayloadParserFactoryCollection* factories) :
GenericStanzaParser<Message>(factories) {
- getStanzaGeneric()->setType(Message::Normal);
+ GenericStanzaParser<Message>::getStanzaGeneric()->setType(Message::Normal);
}
void MessageParser::handleStanzaAttributes(const AttributeMap& attributes) {
boost::optional<std::string> type = attributes.getAttributeValue("type");
if (type) {
if (*type == "chat") {
getStanzaGeneric()->setType(Message::Chat);
}
else if (*type == "error") {
diff --git a/Swiften/Session/BOSHSessionStream.cpp b/Swiften/Session/BOSHSessionStream.cpp
index c5d0dd5..99af71d 100644
--- a/Swiften/Session/BOSHSessionStream.cpp
+++ b/Swiften/Session/BOSHSessionStream.cpp
@@ -61,19 +61,19 @@ BOSHSessionStream::BOSHSessionStream(const URL& boshURL,
xmppLayer->onStreamStart.connect(boost::bind(&BOSHSessionStream::handleStreamStartReceived, this, _1));
xmppLayer->onElement.connect(boost::bind(&BOSHSessionStream::handleElementReceived, this, _1));
xmppLayer->onError.connect(boost::bind(&BOSHSessionStream::handleXMPPError, this));
xmppLayer->onWriteData.connect(boost::bind(&BOSHSessionStream::handleXMPPLayerDataWritten, this, _1));
available = true;
}
BOSHSessionStream::~BOSHSessionStream() {
- close();
+ BOSHSessionStream::close();
connectionPool->onSessionTerminated.disconnect(boost::bind(&BOSHSessionStream::handlePoolSessionTerminated, this, _1));
connectionPool->onSessionStarted.disconnect(boost::bind(&BOSHSessionStream::handlePoolSessionStarted, this));
connectionPool->onXMPPDataRead.disconnect(boost::bind(&BOSHSessionStream::handlePoolXMPPDataRead, this, _1));
connectionPool->onBOSHDataRead.disconnect(boost::bind(&BOSHSessionStream::handlePoolBOSHDataRead, this, _1));
connectionPool->onBOSHDataWritten.disconnect(boost::bind(&BOSHSessionStream::handlePoolBOSHDataWritten, this, _1));
delete connectionPool;
connectionPool = NULL;
xmppLayer->onStreamStart.disconnect(boost::bind(&BOSHSessionStream::handleStreamStartReceived, this, _1));
xmppLayer->onElement.disconnect(boost::bind(&BOSHSessionStream::handleElementReceived, this, _1));
diff --git a/Swiften/Session/BOSHSessionStream.h b/Swiften/Session/BOSHSessionStream.h
index 817f5e9..191a6f4 100644
--- a/Swiften/Session/BOSHSessionStream.h
+++ b/Swiften/Session/BOSHSessionStream.h
@@ -43,19 +43,19 @@ namespace Swift {
EventLoop* eventLoop,
DomainNameResolver* resolver,
const std::string& to,
const URL& boshHTTPConnectProxyURL,
const SafeString& boshHTTPConnectProxyAuthID,
const SafeString& boshHTTPConnectProxyAuthPassword,
const TLSOptions& tlsOptions,
boost::shared_ptr<HTTPTrafficFilter> trafficFilter
);
- ~BOSHSessionStream();
+ virtual ~BOSHSessionStream();
virtual void close();
virtual bool isOpen();
virtual void writeHeader(const ProtocolHeader& header);
virtual void writeElement(boost::shared_ptr<ToplevelElement>);
virtual void writeFooter();
virtual void writeData(const std::string& data);