1<?php 2 3declare(strict_types=1); 4 5namespace Sabre\CalDAV\Backend; 6 7/** 8 * Adds support for sharing features to a CalDAV server. 9 * 10 * CalDAV backends that implement this interface, must make the following 11 * modifications to getCalendarsForUser: 12 * 13 * 1. Return shared calendars for users. 14 * 2. For every calendar, return calendar-resource-uri. This strings is a URI or 15 * relative URI reference that must be unique for every calendar, but 16 * identical for every instance of the same shared calendar. 17 * 3. For every calendar, you must return a share-access element. This element 18 * should contain one of the Sabre\DAV\Sharing\Plugin:ACCESS_* constants and 19 * indicates the access level the user has. 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 SharingSupport extends BackendInterface 26{ 27 /** 28 * Updates the list of shares. 29 * 30 * @param mixed $calendarId 31 * @param \Sabre\DAV\Xml\Element\Sharee[] $sharees 32 */ 33 public function updateInvites($calendarId, array $sharees); 34 35 /** 36 * Returns the list of people whom this calendar is shared with. 37 * 38 * Every item in the returned list must be a Sharee object with at 39 * least the following properties set: 40 * $href 41 * $shareAccess 42 * $inviteStatus 43 * 44 * and optionally: 45 * $properties 46 * 47 * @param mixed $calendarId 48 * 49 * @return \Sabre\DAV\Xml\Element\Sharee[] 50 */ 51 public function getInvites($calendarId); 52 53 /** 54 * Publishes a calendar. 55 * 56 * @param mixed $calendarId 57 * @param bool $value 58 */ 59 public function setPublishStatus($calendarId, $value); 60} 61