diff options
Diffstat (limited to 'lib/public/Notification/INotification.php')
-rw-r--r-- | lib/public/Notification/INotification.php | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/lib/public/Notification/INotification.php b/lib/public/Notification/INotification.php index b7517326581..a740678376f 100644 --- a/lib/public/Notification/INotification.php +++ b/lib/public/Notification/INotification.php @@ -1,35 +1,16 @@ <?php declare(strict_types=1); - /** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Joas Schilling <coding@schilljs.com> - * @author Roeland Jago Douma <roeland@famdouma.nl> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * 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, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * + * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-FileCopyrightText: 2016 ownCloud, Inc. + * SPDX-License-Identifier: AGPL-3.0-only */ namespace OCP\Notification; -/** - * Interface INotification - * - * @since 9.0.0 - */ +use OCP\AppFramework\Attribute\Consumable; + +#[Consumable(since: '9.0.0')] interface INotification { /** * @param string $app @@ -154,7 +135,7 @@ interface INotification { * See https://github.com/nextcloud/server/issues/1706 for more information. * * @param string $subject - * @param array $parameters + * @param array<string, array<string, string>> $parameters * @return $this * @throws InvalidValueException if the subject or parameters are invalid * @since 11.0.0 @@ -230,7 +211,7 @@ interface INotification { * See https://github.com/nextcloud/server/issues/1706 for more information. * * @param string $message - * @param array $parameters + * @param array<string, array<string, string>> $parameters * @return $this * @throws InvalidValueException if the message or parameters are invalid * @since 11.0.0 @@ -266,6 +247,10 @@ interface INotification { public function getLink(): string; /** + * Set the absolute url for the icon (should be colored black or not have a color) + * + * It's automatically color inverted by clients when needed + * * @param string $icon * @return $this * @throws InvalidValueException if the icon is invalid @@ -275,12 +260,28 @@ interface INotification { public function setIcon(string $icon): INotification; /** + * Get the absolute url for the icon (should be colored black or not have a color) + * + * It's automatically color inverted by clients when needed + * * @return string * @since 11.0.0 */ public function getIcon(): string; /** + * @return $this + * @throws InvalidValueException if the app is not allowed to send priority notifications + * @since 31.0.0 + */ + public function setPriorityNotification(bool $priorityNotification): INotification; + + /** + * @since 31.0.0 + */ + public function isPriorityNotification(): bool; + + /** * @return IAction * @since 9.0.0 */ |