diff options
author | Alex Clayton <alex.clayton@isode.com> | 2016-03-14 16:56:32 (GMT) |
---|---|---|
committer | Alex Clayton <alex.clayton@isode.com> | 2016-03-15 14:13:57 (GMT) |
commit | 826bc53ab9839d4f6dff28cdb4d5dc1b317016de (patch) | |
tree | 87dcc73c152f550d618c64ef89198e279ec8bacc /src/com/isode/stroke/filetransfer/FileTransferOptions.java | |
parent | 3dcfa7102ac07188ac0c1c8b252d45735abd31ea (diff) | |
download | stroke-826bc53ab9839d4f6dff28cdb4d5dc1b317016de.zip stroke-826bc53ab9839d4f6dff28cdb4d5dc1b317016de.tar.bz2 |
Only calculate S5B candidates if supported by recipient
As per swiften patch of the same name
(e9ed818dac91e280eb8da86dc8494710f1da0624), some changes to
FileTransferMangerImpl on how it creates an Outgoing File Transfer.
Also added a copy constructor to FileTransferOption that had been in
swiften but was not yet implemented in stroke.
Change-Id: I314ac5ef7f8e082c7121ad89c012b84569f98d6c
Test-information: Unit tests still pass.
Diffstat (limited to 'src/com/isode/stroke/filetransfer/FileTransferOptions.java')
-rw-r--r-- | src/com/isode/stroke/filetransfer/FileTransferOptions.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/com/isode/stroke/filetransfer/FileTransferOptions.java b/src/com/isode/stroke/filetransfer/FileTransferOptions.java index fd529e9..73fe1a1 100644 --- a/src/com/isode/stroke/filetransfer/FileTransferOptions.java +++ b/src/com/isode/stroke/filetransfer/FileTransferOptions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Isode Limited. + * Copyright (c) 2013-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -12,7 +12,7 @@ package com.isode.stroke.filetransfer; public class FileTransferOptions { - + private boolean allowInBand_; private boolean allowAssisted_; private boolean allowProxied_; @@ -25,6 +25,17 @@ public class FileTransferOptions { allowDirect_ = true; } + /** + * Copy constructor + * @param other {@link FileTransferOptions} to copy + */ + public FileTransferOptions(FileTransferOptions other) { + this.allowInBand_ = other.allowInBand_; + this.allowAssisted_ = other.allowAssisted_; + this.allowProxied_ = other.allowProxied_; + this.allowDirect_ = other.allowDirect_; + } + public FileTransferOptions withInBandAllowed(boolean b) { allowInBand_ = b; return this; |