summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2011-11-12 16:56:21 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-12-13 08:17:58 (GMT)
commit81c09a0f6a3e87b078340d7f35d0dea4c03f3a6d (patch)
tree4371c5808ee26b2b5ed79ace9ccb439ff2988945 /Swiften/Network/HTTPConnectProxiedConnection.h
parentfd17fe0d239f97cedebe4ceffa234155bd299b68 (diff)
downloadswift-81c09a0f6a3e87b078340d7f35d0dea4c03f3a6d.zip
swift-81c09a0f6a3e87b078340d7f35d0dea4c03f3a6d.tar.bz2
BOSH Support for Swiften
This adds support for BOSH to Swiften. It does not expose it to Swift. Release-Notes: Swiften now allows connects over BOSH, if used appropriately.
Diffstat (limited to 'Swiften/Network/HTTPConnectProxiedConnection.h')
-rw-r--r--Swiften/Network/HTTPConnectProxiedConnection.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/Swiften/Network/HTTPConnectProxiedConnection.h b/Swiften/Network/HTTPConnectProxiedConnection.h
index d3f5b7a..02d3edd 100644
--- a/Swiften/Network/HTTPConnectProxiedConnection.h
+++ b/Swiften/Network/HTTPConnectProxiedConnection.h
@@ -4,12 +4,20 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2011 Kevin Smith
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+
#pragma once
#include <boost/enable_shared_from_this.hpp>
#include <Swiften/Network/Connection.h>
#include <Swiften/Network/HostAddressPort.h>
+#include <Swiften/Base/SafeString.h>
namespace boost {
class thread;
@@ -27,8 +35,8 @@ namespace Swift {
~HTTPConnectProxiedConnection();
- static ref create(ConnectionFactory* connectionFactory, HostAddressPort proxy) {
- return ref(new HTTPConnectProxiedConnection(connectionFactory, proxy));
+ static ref create(ConnectionFactory* connectionFactory, HostAddressPort proxy, const SafeString& authID, const SafeString& authPassword) {
+ return ref(new HTTPConnectProxiedConnection(connectionFactory, proxy, authID, authPassword));
}
virtual void listen();
@@ -38,7 +46,7 @@ namespace Swift {
virtual HostAddressPort getLocalAddress() const;
private:
- HTTPConnectProxiedConnection(ConnectionFactory* connectionFactory, HostAddressPort proxy);
+ HTTPConnectProxiedConnection(ConnectionFactory* connectionFactory, HostAddressPort proxy, const SafeString& authID, const SafeString& authPassword);
void handleConnectionConnectFinished(bool error);
void handleDataRead(boost::shared_ptr<SafeByteArray> data);
@@ -49,6 +57,8 @@ namespace Swift {
ConnectionFactory* connectionFactory_;
HostAddressPort proxy_;
HostAddressPort server_;
+ SafeByteArray authID_;
+ SafeByteArray authPassword_;
boost::shared_ptr<Connection> connection_;
};
}