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