summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-06-08 19:10:13 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-06-08 19:10:13 (GMT)
commit9c6f742cbb729ecd4f78c33f5b630f670f976715 (patch)
treeed43a275f9d1585579a14e3ccf883bbcfc3d2656 /Swiften/Client/ClientOptions.h
parentcdb0b448b9a64dc5144b1119236f63cadd99d79d (diff)
downloadswift-9c6f742cbb729ecd4f78c33f5b630f670f976715.zip
swift-9c6f742cbb729ecd4f78c33f5b630f670f976715.tar.bz2
Added AllowPlainOverNONTLS option to ClientOptions.
Diffstat (limited to 'Swiften/Client/ClientOptions.h')
-rw-r--r--Swiften/Client/ClientOptions.h89
1 files changed, 49 insertions, 40 deletions
diff --git a/Swiften/Client/ClientOptions.h b/Swiften/Client/ClientOptions.h
index cc80dc2..0766402 100644
--- a/Swiften/Client/ClientOptions.h
+++ b/Swiften/Client/ClientOptions.h
@@ -6,44 +6,53 @@
#pragma once
-struct ClientOptions {
- enum UseTLS {
- NeverUseTLS,
- UseTLSWhenAvailable
+namespace Swift {
+ struct ClientOptions {
+ enum UseTLS {
+ NeverUseTLS,
+ UseTLSWhenAvailable
+ };
+
+ ClientOptions() : useStreamCompression(true), useTLS(UseTLSWhenAvailable), allowPLAINWithoutTLS(false), useStreamResumption(false), forgetPassword(false) {
+ }
+
+ /**
+ * Whether ZLib stream compression should be used when available.
+ *
+ * Default: true
+ */
+ bool useStreamCompression;
+
+ /**
+ * Sets whether TLS encryption should be used.
+ *
+ * Default: UseTLSWhenAvailable
+ */
+ UseTLS useTLS;
+
+ /**
+ * Sets whether plaintext authentication is
+ * allowed over non-TLS-encrypted connections.
+ *
+ * Default: false
+ */
+ bool allowPLAINWithoutTLS;
+
+ /**
+ * Use XEP-196 stream resumption when available.
+ *
+ * Default: false
+ */
+ bool useStreamResumption;
+
+ /**
+ * Forget the password once it's used.
+ * This makes the Client useless after the first login attempt.
+ *
+ * FIXME: This is a temporary workaround.
+ *
+ * Default: false
+ */
+ bool forgetPassword;
};
-
- ClientOptions() : useStreamCompression(true), useTLS(UseTLSWhenAvailable), useStreamResumption(false), forgetPassword(false) {
- }
-
- /**
- * Whether ZLib stream compression should be used when available.
- *
- * Default: true
- */
- bool useStreamCompression;
-
- /**
- * Sets whether TLS encryption should be used.
- *
- * Default: UseTLSWhenAvailable
- */
- UseTLS useTLS;
-
- /**
- * Use XEP-196 stream resumption when available.
- *
- * Default: false
- */
- bool useStreamResumption;
-
- /**
- * Forget the password once it's used.
- * This makes the Client useless after the first login attempt.
- *
- * FIXME: This is a temporary workaround.
- *
- * Default: false
- */
- bool forgetPassword;
-};
-
+}