aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/services/AbstractConnectionManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/services/AbstractConnectionManager.java')
-rw-r--r--src/eu/siacs/conversations/services/AbstractConnectionManager.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/services/AbstractConnectionManager.java b/src/eu/siacs/conversations/services/AbstractConnectionManager.java
new file mode 100644
index 00000000..a06be826
--- /dev/null
+++ b/src/eu/siacs/conversations/services/AbstractConnectionManager.java
@@ -0,0 +1,24 @@
+package eu.siacs.conversations.services;
+
+
+public class AbstractConnectionManager {
+ protected XmppConnectionService mXmppConnectionService;
+
+ public AbstractConnectionManager(XmppConnectionService service) {
+ this.mXmppConnectionService = service;
+ }
+
+ public XmppConnectionService getXmppConnectionService() {
+ return this.mXmppConnectionService;
+ }
+
+ public long getAutoAcceptFileSize() {
+ String config = this.mXmppConnectionService.getPreferences().getString(
+ "auto_accept_file_size", "524288");
+ try {
+ return Long.parseLong(config);
+ } catch (NumberFormatException e) {
+ return 524288;
+ }
+ }
+}