summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Network/HTTPConnectProxiedConnection.h')
-rw-r--r--Swiften/Network/HTTPConnectProxiedConnection.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/Swiften/Network/HTTPConnectProxiedConnection.h b/Swiften/Network/HTTPConnectProxiedConnection.h
index 5b28242..7d83863 100644
--- a/Swiften/Network/HTTPConnectProxiedConnection.h
+++ b/Swiften/Network/HTTPConnectProxiedConnection.h
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2011-2012 Isode Limited.
+ * Copyright (c) 2011-2015 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -13,6 +13,8 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include <Swiften/Base/API.h>
#include <Swiften/Network/ProxiedConnection.h>
@@ -21,6 +23,7 @@ namespace Swift {
class ConnectionFactory;
class EventLoop;
class TimerFactory;
+ class HTTPTrafficFilter;
class SWIFTEN_API HTTPConnectProxiedConnection : public ProxiedConnection {
public:
@@ -30,14 +33,20 @@ namespace Swift {
return ref(new HTTPConnectProxiedConnection(resolver, connectionFactory, timerFactory, proxyHost, proxyPort, authID, authPassword));
}
+ void setHTTPTrafficFilter(boost::shared_ptr<HTTPTrafficFilter> trafficFilter);
+
private:
HTTPConnectProxiedConnection(DomainNameResolver* resolver, ConnectionFactory* connectionFactory, TimerFactory* timerFactory, const std::string& proxyHost, int proxyPort, const SafeString& authID, const SafeString& authPassword);
virtual void initializeProxy();
virtual void handleProxyInitializeData(boost::shared_ptr<SafeByteArray> data);
+ void sendHTTPRequest(const std::string& statusLine, std::vector<std::pair<std::string, std::string> >& headerFields);
+ void parseHTTPHeader(const std::string& data, std::string& statusLine, std::vector<std::pair<std::string, std::string> >& headerFields);
+
private:
SafeByteArray authID_;
SafeByteArray authPassword_;
+ boost::shared_ptr<HTTPTrafficFilter> trafficFilter_;
};
}