summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/backend/leapbackend.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/backend/leapbackend.py')
-rw-r--r--src/leap/bitmask/backend/leapbackend.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/leap/bitmask/backend/leapbackend.py b/src/leap/bitmask/backend/leapbackend.py
index 3bc7a513..d3c4fcda 100644
--- a/src/leap/bitmask/backend/leapbackend.py
+++ b/src/leap/bitmask/backend/leapbackend.py
@@ -24,6 +24,7 @@ import zope.proxy
from leap.bitmask.backend import components
from leap.bitmask.backend.backend import Backend
+from leap.bitmask.backend.settings import Settings
logger = logging.getLogger(__name__)
@@ -41,6 +42,8 @@ class LeapBackend(Backend):
"""
Backend.__init__(self)
+ self._settings = Settings()
+
# Objects needed by several components, so we make a proxy and pass
# them around
self._soledad_proxy = zope.proxy.ProxyBase(None)
@@ -515,3 +518,14 @@ class LeapBackend(Backend):
imap_stopped
"""
self._mail.stop_imap_service()
+
+ def settings_set_selected_gateway(self, provider, gateway):
+ """
+ Set the selected gateway for a given provider.
+
+ :param provider: provider domain
+ :type provider: str
+ :param gateway: gateway to use as default
+ :type gateway: str
+ """
+ self._settings.set_selected_gateway(provider, gateway)