diff options
author | Anna Larch <anna@nextcloud.com> | 2021-03-04 19:31:21 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-03-22 20:06:02 +0300 |
commit | 83a58623b116cd3f8c79f751a3df5963b3392692 (patch) | |
tree | 8f9660e75ea8748057e752c4f1573e3c618b5b85 /lib/Contracts | |
parent | f27fb61c0fe15ef6a278a40d7774cde4b7c748b8 (diff) |
Add tagging to messages
Signed-off-by: Anna Larch <anna@nextcloud.com>
Diffstat (limited to 'lib/Contracts')
-rw-r--r-- | lib/Contracts/IMailManager.php | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/lib/Contracts/IMailManager.php b/lib/Contracts/IMailManager.php index 9b3f48e41..33fe6d970 100644 --- a/lib/Contracts/IMailManager.php +++ b/lib/Contracts/IMailManager.php @@ -23,15 +23,16 @@ declare(strict_types=1); namespace OCA\Mail\Contracts; +use OCA\Mail\Db\Tag; +use OCA\Mail\Folder; use OCA\Mail\Account; use OCA\Mail\Db\Mailbox; use OCA\Mail\Db\Message; -use OCA\Mail\Exception\ClientException; -use OCA\Mail\Exception\ServiceException; -use OCA\Mail\Folder; +use OCA\Mail\Service\Quota; use OCA\Mail\IMAP\FolderStats; use OCA\Mail\Model\IMAPMessage; -use OCA\Mail\Service\Quota; +use OCA\Mail\Exception\ClientException; +use OCA\Mail\Exception\ServiceException; use OCP\AppFramework\Db\DoesNotExistException; interface IMailManager { @@ -172,6 +173,18 @@ interface IMailManager { /** * @param Account $account + * @param string $mailbox + * @param int $uid + * @param Tag $tag + * @param bool $value + * + * @throws ClientException + * @throws ServiceException + */ + public function tagMessage(Account $account, string $mailbox, Message $message, Tag $tag, bool $value): void; + + /** + * @param Account $account * * @return Quota|null */ @@ -229,4 +242,12 @@ interface IMailManager { * @return array */ public function getMailAttachments(Account $account, Mailbox $mailbox, Message $message) : array; + + /** + * @param string $imapLabel + * @param string $userId + * @return Tag + * @throws DoesNotExistException + */ + public function getTagByImapLabel(string $imapLabel, string $userId): Tag; } |