1
0

ICalendar.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @copyright 2017, Georg Ehrke <oc.list@georgehrke.com>
  5. *
  6. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  7. * @author Georg Ehrke <oc.list@georgehrke.com>
  8. *
  9. * @license GNU AGPL version 3 or any later version
  10. *
  11. * This program is free software: you can redistribute it and/or modify
  12. * it under the terms of the GNU Affero General Public License as
  13. * published by the Free Software Foundation, either version 3 of the
  14. * License, or (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU Affero General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU Affero General Public License
  22. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  23. *
  24. */
  25. namespace OCP\Calendar;
  26. /**
  27. * Interface ICalendar
  28. *
  29. * @since 13.0.0
  30. */
  31. interface ICalendar {
  32. /**
  33. * @return string defining the technical unique key
  34. * @since 13.0.0
  35. */
  36. public function getKey(): string;
  37. /**
  38. * In comparison to getKey() this function returns a unique uri within the scope of the principal
  39. * @since 24.0.0
  40. */
  41. public function getUri(): string;
  42. /**
  43. * In comparison to getKey() this function returns a human readable (maybe translated) name
  44. * @return null|string
  45. * @since 13.0.0
  46. */
  47. public function getDisplayName(): ?string;
  48. /**
  49. * Calendar color
  50. * @return null|string
  51. * @since 13.0.0
  52. */
  53. public function getDisplayColor(): ?string;
  54. /**
  55. * @param string $pattern which should match within the $searchProperties
  56. * @param array $searchProperties defines the properties within the query pattern should match
  57. * @param array $options - optional parameters:
  58. * ['timerange' => ['start' => new DateTime(...), 'end' => new DateTime(...)]]
  59. * @param int|null $limit - limit number of search results
  60. * @param int|null $offset - offset for paging of search results
  61. * @return array an array of events/journals/todos which are arrays of key-value-pairs. the events are sorted by start date (closest first, furthest last)
  62. * @since 13.0.0
  63. */
  64. public function search(string $pattern, array $searchProperties = [], array $options = [], ?int $limit = null, ?int $offset = null): array;
  65. /**
  66. * @return int build up using \OCP\Constants
  67. * @since 13.0.0
  68. */
  69. public function getPermissions(): int;
  70. /**
  71. * Whether the calendar is deleted
  72. * @since 26.0.0
  73. */
  74. public function isDeleted(): bool;
  75. }