diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 18:21:54 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 18:41:14 +0300 |
commit | 38ad0d54866c81b391906da32a7f2fb8bfda1b48 (patch) | |
tree | 0f2de58f800b152b2f6c0d84dd53f0b54b76cb66 /lib/Events | |
parent | f36b56e9d195af4203304ed712b263d01f1e67eb (diff) |
Update the message cache when a message is flagged
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Events')
-rw-r--r-- | lib/Events/MessageFlaggedEvent.php | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/lib/Events/MessageFlaggedEvent.php b/lib/Events/MessageFlaggedEvent.php new file mode 100644 index 000000000..976648fc0 --- /dev/null +++ b/lib/Events/MessageFlaggedEvent.php @@ -0,0 +1,82 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright 2020 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @author 2020 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace OCA\Mail\Events; + +use OCA\Mail\Account; +use OCA\Mail\Db\Mailbox; +use OCP\EventDispatcher\Event; + +class MessageFlaggedEvent extends Event { + + /** @var Account */ + private $account; + + /** @var Mailbox */ + private $mailbox; + + /** @var int */ + private $uid; + + /** @var string */ + private $flag; + + /** @var bool */ + private $set; + + public function __construct(Account $account, + Mailbox $mailbox, + int $uid, + string $flag, + bool $set) { + parent::__construct(); + $this->account = $account; + $this->mailbox = $mailbox; + $this->uid = $uid; + $this->flag = $flag; + $this->set = $set; + } + + public function getAccount(): Account { + return $this->account; + } + + public function getMailbox(): Mailbox { + return $this->mailbox; + } + + public function getUid(): int { + return $this->uid; + } + + public function getFlag(): string { + return $this->flag; + } + + public function isSet(): bool { + return $this->set; + } + +} |