2013-10-21 22:46:31 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Sabre\CalDAV\Backend;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Adds support for sharing features to a CalDAV server.
|
|
|
|
*
|
2016-05-28 15:46:24 +00:00
|
|
|
* CalDAV backends that implement this interface, must make the following
|
|
|
|
* modifications to getCalendarsForUser:
|
2013-10-21 22:46:31 +00:00
|
|
|
*
|
2016-05-28 15:46:24 +00:00
|
|
|
* 1. Return shared calendars for users.
|
|
|
|
* 2. For every calendar, return calendar-resource-uri. This strings is a URI or
|
|
|
|
* relative URI reference that must be unique for every calendar, but
|
|
|
|
* identical for every instance of the same shared calenar.
|
|
|
|
* 3. For every calenar, you must return a share-access element. This element
|
|
|
|
* should contain one of the Sabre\DAV\Sharing\Plugin:ACCESS_* contants and
|
|
|
|
* indicates the access level the user has.
|
2013-10-21 22:46:31 +00:00
|
|
|
*
|
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
|
|
|
*/
|
2016-05-28 15:46:24 +00:00
|
|
|
interface SharingSupport extends BackendInterface {
|
2013-10-21 22:46:31 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Updates the list of shares.
|
|
|
|
*
|
|
|
|
* @param mixed $calendarId
|
2016-05-28 15:46:24 +00:00
|
|
|
* @param \Sabre\DAV\Xml\Element\Sharee[] $sharees
|
2013-10-21 22:46:31 +00:00
|
|
|
* @return void
|
|
|
|
*/
|
2016-05-28 15:46:24 +00:00
|
|
|
function updateInvites($calendarId, array $sharees);
|
2013-10-21 22:46:31 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the list of people whom this calendar is shared with.
|
|
|
|
*
|
2016-05-28 15:46:24 +00:00
|
|
|
* Every item in the returned list must be a Sharee object with at
|
|
|
|
* least the following properties set:
|
|
|
|
* $href
|
|
|
|
* $shareAccess
|
|
|
|
* $inviteStatus
|
2013-10-21 22:46:31 +00:00
|
|
|
*
|
2016-05-28 15:46:24 +00:00
|
|
|
* and optionally:
|
|
|
|
* $properties
|
2013-10-21 22:46:31 +00:00
|
|
|
*
|
|
|
|
* @param mixed $calendarId
|
2016-05-28 15:46:24 +00:00
|
|
|
* @return \Sabre\DAV\Xml\Element\Sharee[]
|
2013-10-21 22:46:31 +00:00
|
|
|
*/
|
2016-05-28 15:46:24 +00:00
|
|
|
function getInvites($calendarId);
|
2013-10-21 22:46:31 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Publishes a calendar
|
|
|
|
*
|
|
|
|
* @param mixed $calendarId
|
|
|
|
* @param bool $value
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function setPublishStatus($calendarId, $value);
|
|
|
|
|
|
|
|
}
|