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