SchedulingSupport.php 2.0 KB

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