2015-08-31 06:24:37 -04:00
|
|
|
<?php
|
2019-12-03 13:57:53 -05:00
|
|
|
|
2019-04-10 08:12:10 -04:00
|
|
|
declare(strict_types=1);
|
2015-08-31 06:24:37 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
2015-08-31 06:24:37 -04:00
|
|
|
*/
|
2016-01-14 08:35:24 -05:00
|
|
|
namespace OCP\Notification;
|
2015-08-31 06:24:37 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Interface IApp
|
|
|
|
|
*
|
2016-01-22 04:51:36 -05:00
|
|
|
* @since 9.0.0
|
2015-08-31 06:24:37 -04:00
|
|
|
*/
|
|
|
|
|
interface IApp {
|
|
|
|
|
/**
|
|
|
|
|
* @param INotification $notification
|
2024-04-10 10:07:16 -04:00
|
|
|
* @throws IncompleteNotificationException When the notification does not have all required fields set
|
2016-01-22 04:51:36 -05:00
|
|
|
* @since 9.0.0
|
2024-04-10 10:07:16 -04:00
|
|
|
* @since 30.0.0 throws {@see IncompleteNotificationException} instead of \InvalidArgumentException
|
2015-08-31 06:24:37 -04:00
|
|
|
*/
|
2019-04-10 08:12:10 -04:00
|
|
|
public function notify(INotification $notification): void;
|
2015-08-31 06:24:37 -04:00
|
|
|
|
|
|
|
|
/**
|
2015-09-01 04:46:32 -04:00
|
|
|
* @param INotification $notification
|
2016-01-22 04:51:36 -05:00
|
|
|
* @since 9.0.0
|
2015-08-31 06:24:37 -04:00
|
|
|
*/
|
2019-04-10 08:12:10 -04:00
|
|
|
public function markProcessed(INotification $notification): void;
|
2015-08-31 06:24:37 -04:00
|
|
|
|
|
|
|
|
/**
|
2015-09-01 04:46:32 -04:00
|
|
|
* @param INotification $notification
|
2015-08-31 06:24:37 -04:00
|
|
|
* @return int
|
2016-01-22 04:51:36 -05:00
|
|
|
* @since 9.0.0
|
2015-08-31 06:24:37 -04:00
|
|
|
*/
|
2019-04-10 08:12:10 -04:00
|
|
|
public function getCount(INotification $notification): int;
|
2015-08-31 06:24:37 -04:00
|
|
|
}
|