aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/services
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-10-14 12:02:48 +0200
committeriNPUTmice <daniel@gultsch.de>2014-10-14 12:02:48 +0200
commit4fdc6b2eac103183f452269ec028bc44b3dce6f6 (patch)
treea0cac5d4e2adc4f753b27b434192596124e3b25d /src/eu/siacs/conversations/services
parentbbb0693f4a9a62a872b61b12a5118b01c7ca9450 (diff)
renaming
Diffstat (limited to 'src/eu/siacs/conversations/services')
-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;
+ }
+ }
+}