1<?php
2
3namespace Sabre\CalDAV;
4
5/**
6 * This interface represents a Calendar that can be shared with other users.
7 *
8 * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
9 * @author Evert Pot (http://evertpot.com/)
10 * @license http://sabre.io/license/ Modified BSD License
11 */
12interface IShareableCalendar extends ICalendar {
13
14    /**
15     * Updates the list of shares.
16     *
17     * The first array is a list of people that are to be added to the
18     * calendar.
19     *
20     * Every element in the add array has the following properties:
21     *   * href - A url. Usually a mailto: address
22     *   * commonName - Usually a first and last name, or false
23     *   * summary - A description of the share, can also be false
24     *   * readOnly - A boolean value
25     *
26     * Every element in the remove array is just the address string.
27     *
28     * @param array $add
29     * @param array $remove
30     * @return void
31     */
32    function updateShares(array $add, array $remove);
33
34    /**
35     * Returns the list of people whom this calendar is shared with.
36     *
37     * Every element in this array should have the following properties:
38     *   * href - Often a mailto: address
39     *   * commonName - Optional, for example a first + last name
40     *   * status - See the Sabre\CalDAV\SharingPlugin::STATUS_ constants.
41     *   * readOnly - boolean
42     *   * summary - Optional, a description for the share
43     *
44     * @return array
45     */
46    function getShares();
47
48}
49