summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/services/mail
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/services/mail')
-rw-r--r--src/leap/bitmask/services/mail/conductor.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/leap/bitmask/services/mail/conductor.py b/src/leap/bitmask/services/mail/conductor.py
index 67bc007e..87c4621e 100644
--- a/src/leap/bitmask/services/mail/conductor.py
+++ b/src/leap/bitmask/services/mail/conductor.py
@@ -66,18 +66,14 @@ class IMAPControl(object):
"""
self._backend.start_imap_service(self.userid, flags.OFFLINE)
- def stop_imap_service(self, cv):
+ def stop_imap_service(self):
"""
Stop imap service.
-
- :param cv: A condition variable to which we can signal when imap
- indeed stops.
- :type cv: threading.Condition
"""
self.imap_connection.qtsigs.disconnecting_signal.emit()
logger.debug('Stopping imap service.')
- self._backend.stop_imap_service(cv)
+ self._backend.stop_imap_service()
def _handle_imap_events(self, req):
"""
@@ -249,6 +245,13 @@ class MailConductor(IMAPControl, SMTPControl):
self._smtp_machine = smtp
self._smtp_machine.start()
+ def stop_mail_services(self):
+ """
+ Stop the IMAP and SMTP services.
+ """
+ self.stop_imap_service()
+ self.stop_smtp_service()
+
def connect_mail_signals(self, widget):
"""
Connects the mail signals to the mail_status widget slots.