diff options
author | Kevin Smith <git@kismith.co.uk> | 2012-09-21 18:37:25 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-09-21 18:37:25 (GMT) |
commit | 816655ed98893382b82569ccbbebdb04c4af9127 (patch) | |
tree | 10274e693352516e36837b7bdbc88d979ee54f61 /src/com/isode/stroke/client/ClientOptions.java | |
parent | 88c4b4ac3e8609049d6ccd6de9f57d5eaef67558 (diff) | |
download | stroke-816655ed98893382b82569ccbbebdb04c4af9127.zip stroke-816655ed98893382b82569ccbbebdb04c4af9127.tar.bz2 |
Update some interfaces for consistency with Swiften.
Makes ClientOptions do more.
Diffstat (limited to 'src/com/isode/stroke/client/ClientOptions.java')
-rw-r--r-- | src/com/isode/stroke/client/ClientOptions.java | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/src/com/isode/stroke/client/ClientOptions.java b/src/com/isode/stroke/client/ClientOptions.java index 7a7e47e..4090d1f 100644 --- a/src/com/isode/stroke/client/ClientOptions.java +++ b/src/com/isode/stroke/client/ClientOptions.java @@ -16,13 +16,18 @@ public class ClientOptions { public enum UseTLS { NeverUseTLS, - UseTLSWhenAvailable + UseTLSWhenAvailable, + RequireTLS } public ClientOptions() { useStreamCompression = true; useTLS = UseTLS.UseTLSWhenAvailable; useStreamResumption = false; + allowPLAINWithoutTLS = false; + useAcks = true; + manualHostname = ""; + manualPort = -1; } @Override @@ -46,10 +51,37 @@ public class ClientOptions { */ public UseTLS useTLS; /** - * Use XEP-196 stream resumption when available. + * Sets whether plaintext authentication is + * allowed over non-TLS-encrypted connections. + * + * Default: false + */ + public boolean allowPLAINWithoutTLS; + /** + * Use XEP-198 stream resumption when available. * * Default: false */ public boolean useStreamResumption; + /** + * Use XEP-0198 acks in the stream when available. + * Default: true + */ + public boolean useAcks; + + /** + * The hostname to connect to. + * Leave this empty for standard XMPP connection, based on the JID domain. + */ + public String manualHostname; + + /** + * The port to connect to. + * Leave this to -1 to use the port discovered by SRV lookups, and 5222 as a + * fallback. + */ + public int manualPort; + + } |