SchedulingSupport.php 2.1 KB

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