ICalendar.php 2.4 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. * @since 24.0.0
  39. */
  40. public function getUri(): string;
  41. /**
  42. * In comparison to getKey() this function returns a human readable (maybe translated) name
  43. * @return null|string
  44. * @since 13.0.0
  45. */
  46. public function getDisplayName(): ?string;
  47. /**
  48. * Calendar color
  49. * @return null|string
  50. * @since 13.0.0
  51. */
  52. public function getDisplayColor(): ?string;
  53. /**
  54. * @param string $pattern which should match within the $searchProperties
  55. * @param array $searchProperties defines the properties within the query pattern should match
  56. * @param array $options - optional parameters:
  57. * ['timerange' => ['start' => new DateTime(...), 'end' => new DateTime(...)]]
  58. * @param int|null $limit - limit number of search results
  59. * @param int|null $offset - offset for paging of search results
  60. * @return array an array of events/journals/todos which are arrays of key-value-pairs
  61. * @since 13.0.0
  62. */
  63. public function search(string $pattern, array $searchProperties = [], array $options = [], ?int $limit = null, ?int $offset = null): array;
  64. /**
  65. * @return int build up using \OCP\Constants
  66. * @since 13.0.0
  67. */
  68. public function getPermissions(): int;
  69. /**
  70. * Whether the calendar is deleted
  71. * @since 26.0.0
  72. */
  73. public function isDeleted(): bool;
  74. }