1<?php
2
3namespace Sabre\DAV\Sharing;
4
5use Sabre\DAV\INode;
6
7/**
8 * This interface represents a resource that has sharing capabilities, either
9 * because it's possible for an owner to share the resource, or because this is
10 * an instance of a shared resource.
11 *
12 * @copyright Copyright (C) fruux GmbH. (https://fruux.com/)
13 * @author Evert Pot (http://evertpot.com/)
14 * @license http://sabre.io/license/ Modified BSD License
15 */
16interface ISharedNode extends INode {
17
18    /**
19     * Returns the 'access level' for the instance of this shared resource.
20     *
21     * The value should be one of the Sabre\DAV\Sharing\Plugin::ACCESS_
22     * constants.
23     *
24     * @return int
25     */
26    function getShareAccess();
27
28    /**
29     * This function must return a URI that uniquely identifies the shared
30     * resource. This URI should be identical across instances, and is
31     * also used in several other XML bodies to connect invites to
32     * resources.
33     *
34     * This may simply be a relative reference to the original shared instance,
35     * but it could also be a urn. As long as it's a valid URI and unique.
36     *
37     * @return string
38     */
39    function getShareResourceUri();
40
41    /**
42     * Updates the list of sharees.
43     *
44     * Every item must be a Sharee object.
45     *
46     * @param \Sabre\DAV\Xml\Element\Sharee[] $sharees
47     * @return void
48     */
49    function updateInvites(array $sharees);
50
51    /**
52     * Returns the list of people whom this resource is shared with.
53     *
54     * Every item in the returned array must be a Sharee object with
55     * at least the following properties set:
56     *
57     * * $href
58     * * $shareAccess
59     * * $inviteStatus
60     *
61     * and optionally:
62     *
63     * * $properties
64     *
65     * @return \Sabre\DAV\Xml\Element\Sharee[]
66     */
67    function getInvites();
68
69}
70