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