1<?php
2
3namespace Sabre\CalDAV\Backend;
4
5/**
6 * Implementing this interface adds CalDAV Scheduling support to your caldav
7 * server, as defined in rfc6638.
8 *
9 * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
10 * @author Evert Pot (http://evertpot.com/)
11 * @license http://sabre.io/license/ Modified BSD License
12 */
13interface SchedulingSupport extends BackendInterface {
14
15    /**
16     * Returns a single scheduling object for the inbox collection.
17     *
18     * The returned array should contain the following elements:
19     *   * uri - A unique basename for the object. This will be used to
20     *           construct a full uri.
21     *   * calendardata - The iCalendar object
22     *   * lastmodified - The last modification date. Can be an int for a unix
23     *                    timestamp, or a PHP DateTime object.
24     *   * etag - A unique token that must change if the object changed.
25     *   * size - The size of the object, in bytes.
26     *
27     * @param string $principalUri
28     * @param string $objectUri
29     * @return array
30     */
31    function getSchedulingObject($principalUri, $objectUri);
32
33    /**
34     * Returns all scheduling objects for the inbox collection.
35     *
36     * These objects should be returned as an array. Every item in the array
37     * should follow the same structure as returned from getSchedulingObject.
38     *
39     * The main difference is that 'calendardata' is optional.
40     *
41     * @param string $principalUri
42     * @return array
43     */
44    function getSchedulingObjects($principalUri);
45
46    /**
47     * Deletes a scheduling object from the inbox collection.
48     *
49     * @param string $principalUri
50     * @param string $objectUri
51     * @return void
52     */
53    function deleteSchedulingObject($principalUri, $objectUri);
54
55    /**
56     * Creates a new scheduling object. This should land in a users' inbox.
57     *
58     * @param string $principalUri
59     * @param string $objectUri
60     * @param string $objectData
61     * @return void
62     */
63    function createSchedulingObject($principalUri, $objectUri, $objectData);
64
65}
66