blob: 06c6b6abe05237904645df95fe5ae84685b80f91 (
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
|
package de.thedevstack.conversationsplus.utils;
import eu.siacs.conversations.entities.Account;
/**
* Utility class to work with accounts.
*/
public final class AccountUtil {
public static boolean isHttpUploadAvailable(Account account, long filesize) {
return null != account
&& null != account.getXmppConnection()
&& null != account.getXmppConnection().getFeatures()
&& account.getXmppConnection().getFeatures().httpUpload(filesize);
}
public static boolean isHttpUploadAvailable(Account account) {
return null != account
&& null != account.getXmppConnection()
&& null != account.getXmppConnection().getFeatures()
&& account.getXmppConnection().getFeatures().httpUpload(0);
}
public static boolean isFileTransferHttpAvailable(Account account) {
return null != account
&& null != account.getXmppConnection()
&& null != account.getXmppConnection().getFeatures()
&& account.getXmppConnection().getFeatures().hasFeatureFileTransferHttp(0);
}
private AccountUtil() {
// avoid instantiation of utility class
}
}
|