summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-04-20 18:18:52 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-04-20 18:18:52 (GMT)
commit0adf0ba15f8217ac760cfafa355f8d712b3c0b6d (patch)
tree491744e03d44efd13402175abdef23fb9ecd1724 /Swiften/Client/CoreClient.h
parent73aa15c624c1233ab6af9ca3618c95ee05b9cf04 (diff)
downloadswift-0adf0ba15f8217ac760cfafa355f8d712b3c0b6d.zip
swift-0adf0ba15f8217ac760cfafa355f8d712b3c0b6d.tar.bz2
Introduce ClientOptions struct.
Diffstat (limited to 'Swiften/Client/CoreClient.h')
-rw-r--r--Swiften/Client/CoreClient.h21
1 files changed, 3 insertions, 18 deletions
diff --git a/Swiften/Client/CoreClient.h b/Swiften/Client/CoreClient.h
index d7c165f..7c46fe7 100644
--- a/Swiften/Client/CoreClient.h
+++ b/Swiften/Client/CoreClient.h
@@ -13,6 +13,7 @@
#include <Swiften/Entity/Entity.h>
#include <Swiften/JID/JID.h>
#include <Swiften/Client/ClientError.h>
+#include <Swiften/Client/ClientOptions.h>
namespace Swift {
class ChainedConnector;
@@ -45,11 +46,6 @@ namespace Swift {
*/
class CoreClient : public Entity {
public:
- enum UseTLS {
- NeverUseTLS,
- UseTLSWhenAvailable
- };
-
/**
* Constructs a client for the given JID with the given password.
* The given eventLoop will be used to post events to.
@@ -65,7 +61,7 @@ namespace Swift {
* After the connection is established, the client will set
* initialize the stream and authenticate.
*/
- void connect();
+ void connect(const ClientOptions& = ClientOptions());
/**
* Disconnects the client from the server.
@@ -137,16 +133,6 @@ namespace Swift {
*/
void setCertificateTrustChecker(CertificateTrustChecker*);
- /**
- * Sets whether ZLib stream compression should be used when available.
- */
- void setUseStreamCompression(bool b);
-
- /**
- * Sets whether TLS encryption should be used.
- */
- void setUseTLS(UseTLS useTLS);
-
public:
/**
* Emitted when the client was disconnected from the network.
@@ -216,10 +202,9 @@ namespace Swift {
JID jid_;
std::string password_;
NetworkFactories* networkFactories;
- bool useStreamCompression;
- UseTLS useTLS;
ClientSessionStanzaChannel* stanzaChannel_;
IQRouter* iqRouter_;
+ ClientOptions options;
boost::shared_ptr<ChainedConnector> connector_;
std::vector<ConnectionFactory*> proxyConnectionFactories;
PlatformTLSFactories* tlsFactories;