IBackend.php 1006 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCP\Calendar\Room;
  7. use OCP\Calendar\BackendTemporarilyUnavailableException;
  8. /**
  9. * Interface IBackend
  10. *
  11. * @since 14.0.0
  12. */
  13. interface IBackend {
  14. /**
  15. * get a list of all rooms in this backend
  16. *
  17. * @throws BackendTemporarilyUnavailableException
  18. * @return IRoom[]
  19. * @since 14.0.0
  20. */
  21. public function getAllRooms():array;
  22. /**
  23. * get a list of all room identifiers in this backend
  24. *
  25. * @throws BackendTemporarilyUnavailableException
  26. * @return string[]
  27. * @since 14.0.0
  28. */
  29. public function listAllRooms():array;
  30. /**
  31. * get a room by it's id
  32. *
  33. * @param string $id
  34. * @throws BackendTemporarilyUnavailableException
  35. * @return IRoom|null
  36. * @since 14.0.0
  37. */
  38. public function getRoom($id);
  39. /**
  40. * Get unique identifier of the backend
  41. *
  42. * @return string
  43. * @since 14.0.0
  44. */
  45. public function getBackendIdentifier():string;
  46. }