summaryrefslogtreecommitdiffstats
blob: 73fe1a10adfffd078feedef86b874b4cb6535354 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
 * Copyright (c) 2013-2016 Isode Limited.
 * All rights reserved.
 * See the COPYING file for more information.
 */
/*
 * Copyright (c) 2015 Tarun Gupta.
 * Licensed under the simplified BSD license.
 * See Documentation/Licenses/BSD-simplified.txt for more information.
 */

package com.isode.stroke.filetransfer;

public class FileTransferOptions {
    
	private boolean allowInBand_;
	private boolean allowAssisted_;
	private boolean allowProxied_;
	private boolean allowDirect_;

	public FileTransferOptions() {
		allowInBand_ = true;
		allowAssisted_ = true;
		allowProxied_ = true;
		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;
	}

	public boolean isInBandAllowed() {
		return allowInBand_;
	}

	public FileTransferOptions withAssistedAllowed(boolean b) {
		allowAssisted_ = b;
		return this;
	}

	public boolean isAssistedAllowed() {
		return allowAssisted_;
	}

	public FileTransferOptions withProxiedAllowed(boolean b) {
		allowProxied_ = b;
		return this;
	}

	public boolean isProxiedAllowed() {
		return allowProxied_;
	}

	public FileTransferOptions withDirectAllowed(boolean b) {
		allowDirect_ = b;
		return this;
	}

	public boolean isDirectAllowed() {
		return allowDirect_;
	}
}