summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-02-22 13:31:39 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-02-22 14:16:18 (GMT)
commitfa705718be1f98185557a09cf155ed66cbc740e2 (patch)
treeb73c65981c6e879df40c40c4b5436a4d4386e5a4 /Swiften/Session/SessionStream.h
parent110eb87e848b85dd74a6f19413c775520a75ea35 (diff)
downloadswift-contrib-fa705718be1f98185557a09cf155ed66cbc740e2.zip
swift-contrib-fa705718be1f98185557a09cf155ed66cbc740e2.tar.bz2
Fix up for previous CAPI patch
Now connects successfully with or without TLS(with cert)
Diffstat (limited to 'Swiften/Session/SessionStream.h')
-rw-r--r--Swiften/Session/SessionStream.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/Swiften/Session/SessionStream.h b/Swiften/Session/SessionStream.h
index 58015b3..2ff2a56 100644
--- a/Swiften/Session/SessionStream.h
+++ b/Swiften/Session/SessionStream.h
@@ -1,11 +1,11 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2012 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
#pragma once
#include <Swiften/Base/boost_bsignals.h>
#include <boost/shared_ptr.hpp>
#include <boost/optional.hpp>
@@ -30,19 +30,19 @@ namespace Swift {
ConnectionReadError,
ConnectionWriteError
};
Error(Type type) : type(type) {}
Type type;
};
- SessionStream(): certificate(0) {}
+ SessionStream(): certificate() {}
virtual ~SessionStream();
virtual void close() = 0;
virtual bool isOpen() = 0;
virtual void writeHeader(const ProtocolHeader& header) = 0;
virtual void writeFooter() = 0;
virtual void writeElement(boost::shared_ptr<Element>) = 0;
@@ -52,19 +52,19 @@ namespace Swift {
virtual void addZLibCompression() = 0;
virtual bool supportsTLSEncryption() = 0;
virtual void addTLSEncryption() = 0;
virtual bool isTLSEncrypted() = 0;
virtual void setWhitespacePingEnabled(bool enabled) = 0;
virtual void resetXMPPParser() = 0;
- void setTLSCertificate(CertificateWithKey* cert) {
+ void setTLSCertificate(CertificateWithKey::ref cert) {
certificate = cert;
}
virtual bool hasTLSCertificate() {
return certificate && !certificate->isNull();
}
virtual Certificate::ref getPeerCertificate() const = 0;
virtual boost::shared_ptr<CertificateVerificationError> getPeerCertificateVerificationError() const = 0;
@@ -73,17 +73,17 @@ namespace Swift {
boost::signal<void (const ProtocolHeader&)> onStreamStartReceived;
boost::signal<void (boost::shared_ptr<Element>)> onElementReceived;
boost::signal<void (boost::shared_ptr<Error>)> onClosed;
boost::signal<void ()> onTLSEncrypted;
boost::signal<void (const SafeByteArray&)> onDataRead;
boost::signal<void (const SafeByteArray&)> onDataWritten;
protected:
- CertificateWithKey * getTLSCertificate() const {
+ CertificateWithKey::ref getTLSCertificate() const {
return certificate;
}
private:
- CertificateWithKey * certificate;
+ CertificateWithKey::ref certificate;
};
}