1<?php 2 3namespace Sabre\CalDAV\Backend; 4 5use Sabre\CalDAV\Xml\Notification\NotificationInterface; 6 7/** 8 * Adds caldav notification support to a backend. 9 * 10 * Note: This feature is experimental, and may change in between different 11 * SabreDAV versions. 12 * 13 * Notifications are defined at: 14 * http://svn.calendarserver.org/repository/calendarserver/CalendarServer/trunk/doc/Extensions/caldav-notifications.txt 15 * 16 * These notifications are basically a list of server-generated notifications 17 * displayed to the user. Users can dismiss notifications by deleting them. 18 * 19 * The primary usecase is to allow for calendar-sharing. 20 * 21 * @copyright Copyright (C) fruux GmbH (https://fruux.com/) 22 * @author Evert Pot (http://evertpot.com/) 23 * @license http://sabre.io/license/ Modified BSD License 24 */ 25interface NotificationSupport extends BackendInterface { 26 27 /** 28 * Returns a list of notifications for a given principal url. 29 * 30 * @param string $principalUri 31 * @return NotificationInterface[] 32 */ 33 function getNotificationsForPrincipal($principalUri); 34 35 /** 36 * This deletes a specific notifcation. 37 * 38 * This may be called by a client once it deems a notification handled. 39 * 40 * @param string $principalUri 41 * @param NotificationInterface $notification 42 * @return void 43 */ 44 function deleteNotification($principalUri, NotificationInterface $notification); 45 46 /** 47 * This method is called when a user replied to a request to share. 48 * 49 * If the user chose to accept the share, this method should return the 50 * newly created calendar url. 51 * 52 * @param string $href The sharee who is replying (often a mailto: address) 53 * @param int $status One of the SharingPlugin::STATUS_* constants 54 * @param string $calendarUri The url to the calendar thats being shared 55 * @param string $inReplyTo The unique id this message is a response to 56 * @param string $summary A description of the reply 57 * @return null|string 58 */ 59 function shareReply($href, $status, $calendarUri, $inReplyTo, $summary = null); 60 61} 62