SharingSupport.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. declare(strict_types=1);
  3. namespace Sabre\CalDAV\Backend;
  4. /**
  5. * Adds support for sharing features to a CalDAV server.
  6. *
  7. * CalDAV backends that implement this interface, must make the following
  8. * modifications to getCalendarsForUser:
  9. *
  10. * 1. Return shared calendars for users.
  11. * 2. For every calendar, return calendar-resource-uri. This strings is a URI or
  12. * relative URI reference that must be unique for every calendar, but
  13. * identical for every instance of the same shared calendar.
  14. * 3. For every calendar, you must return a share-access element. This element
  15. * should contain one of the Sabre\DAV\Sharing\Plugin:ACCESS_* constants and
  16. * indicates the access level the user has.
  17. *
  18. * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
  19. * @author Evert Pot (http://evertpot.com/)
  20. * @license http://sabre.io/license/ Modified BSD License
  21. */
  22. interface SharingSupport extends BackendInterface
  23. {
  24. /**
  25. * Updates the list of shares.
  26. *
  27. * @param mixed $calendarId
  28. * @param \Sabre\DAV\Xml\Element\Sharee[] $sharees
  29. */
  30. public function updateInvites($calendarId, array $sharees);
  31. /**
  32. * Returns the list of people whom this calendar is shared with.
  33. *
  34. * Every item in the returned list must be a Sharee object with at
  35. * least the following properties set:
  36. * $href
  37. * $shareAccess
  38. * $inviteStatus
  39. *
  40. * and optionally:
  41. * $properties
  42. *
  43. * @param mixed $calendarId
  44. *
  45. * @return \Sabre\DAV\Xml\Element\Sharee[]
  46. */
  47. public function getInvites($calendarId);
  48. /**
  49. * Publishes a calendar.
  50. *
  51. * @param mixed $calendarId
  52. * @param bool $value
  53. */
  54. public function setPublishStatus($calendarId, $value);
  55. }