diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-07-28 15:50:38 +0200 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-08-11 17:00:29 +0200 |
commit | 9ba07cc943f1d85664b70546404ee26b1313dcee (patch) | |
tree | 36e82c087fb112f244559e0d1d136ab27eec378f /service/pixelated | |
parent | ff739a697af362647c17a4010984439a03b673df (diff) |
Added delete_mailbox to leap mail store.
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/adapter/mailstore/__init__.py | 3 | ||||
-rw-r--r-- | service/pixelated/adapter/mailstore/leap_mailstore.py | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/service/pixelated/adapter/mailstore/__init__.py b/service/pixelated/adapter/mailstore/__init__.py index 6983194d..ab7bfb94 100644 --- a/service/pixelated/adapter/mailstore/__init__.py +++ b/service/pixelated/adapter/mailstore/__init__.py @@ -40,6 +40,9 @@ class MailStore(object): def add_mailbox(self, mailbox_name): pass + def delete_mailbox(self, mailbox_name): + pass + def get_mailbox_mail_ids(self, mailbox_name): pass diff --git a/service/pixelated/adapter/mailstore/leap_mailstore.py b/service/pixelated/adapter/mailstore/leap_mailstore.py index ee40e03b..70c19bca 100644 --- a/service/pixelated/adapter/mailstore/leap_mailstore.py +++ b/service/pixelated/adapter/mailstore/leap_mailstore.py @@ -119,6 +119,11 @@ class LeapMailStore(MailStore): defer.returnValue(mail_ids) @defer.inlineCallbacks + def delete_mailbox(self, mailbox_name): + mbx_wrapper = yield self._get_or_create_mailbox(mailbox_name) + yield SoledadMailAdaptor().delete_mbox(self.soledad, mbx_wrapper) + + @defer.inlineCallbacks def _leap_message_to_leap_mail(self, mail_id, message, include_body): if include_body: body = (yield message._wrapper.get_body(self.soledad)).raw |