2013-10-21 22:46:31 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Sabre\CalDAV\Backend;
|
|
|
|
|
2016-05-11 00:26:44 +00:00
|
|
|
use Sabre\CalDAV\Xml\Notification\NotificationInterface;
|
|
|
|
|
2013-10-21 22:46:31 +00:00
|
|
|
/**
|
|
|
|
* Adds caldav notification support to a backend.
|
|
|
|
*
|
|
|
|
* Note: This feature is experimental, and may change in between different
|
|
|
|
* SabreDAV versions.
|
|
|
|
*
|
|
|
|
* Notifications are defined at:
|
|
|
|
* http://svn.calendarserver.org/repository/calendarserver/CalendarServer/trunk/doc/Extensions/caldav-notifications.txt
|
|
|
|
*
|
|
|
|
* These notifications are basically a list of server-generated notifications
|
|
|
|
* displayed to the user. Users can dismiss notifications by deleting them.
|
|
|
|
*
|
|
|
|
* The primary usecase is to allow for calendar-sharing.
|
|
|
|
*
|
2016-05-11 00:26:44 +00:00
|
|
|
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
|
2013-10-21 22:46:31 +00:00
|
|
|
* @author Evert Pot (http://evertpot.com/)
|
2014-06-28 20:28:08 +00:00
|
|
|
* @license http://sabre.io/license/ Modified BSD License
|
2013-10-21 22:46:31 +00:00
|
|
|
*/
|
|
|
|
interface NotificationSupport extends BackendInterface {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns a list of notifications for a given principal url.
|
|
|
|
*
|
|
|
|
* @param string $principalUri
|
2016-05-11 00:26:44 +00:00
|
|
|
* @return NotificationInterface[]
|
2013-10-21 22:46:31 +00:00
|
|
|
*/
|
2016-05-11 00:26:44 +00:00
|
|
|
function getNotificationsForPrincipal($principalUri);
|
2013-10-21 22:46:31 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This deletes a specific notifcation.
|
|
|
|
*
|
|
|
|
* This may be called by a client once it deems a notification handled.
|
|
|
|
*
|
|
|
|
* @param string $principalUri
|
2016-05-11 00:26:44 +00:00
|
|
|
* @param NotificationInterface $notification
|
2013-10-21 22:46:31 +00:00
|
|
|
* @return void
|
|
|
|
*/
|
2016-05-11 00:26:44 +00:00
|
|
|
function deleteNotification($principalUri, NotificationInterface $notification);
|
2013-10-21 22:46:31 +00:00
|
|
|
|
|
|
|
}
|