NotificationSupport.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace Sabre\CalDAV\Backend;
  3. use Sabre\CalDAV\Xml\Notification\NotificationInterface;
  4. /**
  5. * Adds caldav notification support to a backend.
  6. *
  7. * Note: This feature is experimental, and may change in between different
  8. * SabreDAV versions.
  9. *
  10. * Notifications are defined at:
  11. * http://svn.calendarserver.org/repository/calendarserver/CalendarServer/trunk/doc/Extensions/caldav-notifications.txt
  12. *
  13. * These notifications are basically a list of server-generated notifications
  14. * displayed to the user. Users can dismiss notifications by deleting them.
  15. *
  16. * The primary usecase is to allow for calendar-sharing.
  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 NotificationSupport extends BackendInterface {
  23. /**
  24. * Returns a list of notifications for a given principal url.
  25. *
  26. * @param string $principalUri
  27. * @return NotificationInterface[]
  28. */
  29. function getNotificationsForPrincipal($principalUri);
  30. /**
  31. * This deletes a specific notifcation.
  32. *
  33. * This may be called by a client once it deems a notification handled.
  34. *
  35. * @param string $principalUri
  36. * @param NotificationInterface $notification
  37. * @return void
  38. */
  39. function deleteNotification($principalUri, NotificationInterface $notification);
  40. }