2017-10-15 15:58:40 -04:00
|
|
|
<?php
|
2021-09-27 08:58:16 -04:00
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2017-10-15 15:58:40 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2017-10-15 15:58:40 -04:00
|
|
|
*/
|
|
|
|
|
namespace OCP\Calendar;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Interface ICalendar
|
|
|
|
|
*
|
|
|
|
|
* @since 13.0.0
|
|
|
|
|
*/
|
|
|
|
|
interface ICalendar {
|
|
|
|
|
/**
|
|
|
|
|
* @return string defining the technical unique key
|
|
|
|
|
* @since 13.0.0
|
|
|
|
|
*/
|
2022-10-02 06:14:36 -04:00
|
|
|
public function getKey(): string;
|
2017-10-15 15:58:40 -04:00
|
|
|
|
2022-02-08 01:54:07 -05:00
|
|
|
/**
|
2022-11-08 19:34:20 -05:00
|
|
|
* In comparison to getKey() this function returns a unique uri within the scope of the principal
|
2022-02-08 01:54:07 -05:00
|
|
|
* @since 24.0.0
|
|
|
|
|
*/
|
2022-03-01 20:56:18 -05:00
|
|
|
public function getUri(): string;
|
2022-02-08 01:54:07 -05:00
|
|
|
|
2017-10-15 15:58:40 -04:00
|
|
|
/**
|
|
|
|
|
* In comparison to getKey() this function returns a human readable (maybe translated) name
|
|
|
|
|
* @return null|string
|
|
|
|
|
* @since 13.0.0
|
|
|
|
|
*/
|
2022-10-02 06:14:36 -04:00
|
|
|
public function getDisplayName(): ?string;
|
2017-10-15 15:58:40 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Calendar color
|
|
|
|
|
* @return null|string
|
|
|
|
|
* @since 13.0.0
|
|
|
|
|
*/
|
2022-10-02 06:14:36 -04:00
|
|
|
public function getDisplayColor(): ?string;
|
2017-10-15 15:58:40 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param string $pattern which should match within the $searchProperties
|
|
|
|
|
* @param array $searchProperties defines the properties within the query pattern should match
|
|
|
|
|
* @param array $options - optional parameters:
|
|
|
|
|
* ['timerange' => ['start' => new DateTime(...), 'end' => new DateTime(...)]]
|
2022-10-02 06:14:36 -04:00
|
|
|
* @param int|null $limit - limit number of search results
|
|
|
|
|
* @param int|null $offset - offset for paging of search results
|
2024-05-15 06:55:40 -04:00
|
|
|
* @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)
|
2017-10-15 15:58:40 -04:00
|
|
|
* @since 13.0.0
|
|
|
|
|
*/
|
2022-10-02 06:14:36 -04:00
|
|
|
public function search(string $pattern, array $searchProperties = [], array $options = [], ?int $limit = null, ?int $offset = null): array;
|
2017-10-15 15:58:40 -04:00
|
|
|
|
|
|
|
|
/**
|
2022-10-02 06:14:36 -04:00
|
|
|
* @return int build up using \OCP\Constants
|
2017-10-15 15:58:40 -04:00
|
|
|
* @since 13.0.0
|
|
|
|
|
*/
|
2022-10-02 06:14:36 -04:00
|
|
|
public function getPermissions(): int;
|
2022-10-02 06:39:30 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Whether the calendar is deleted
|
|
|
|
|
* @since 26.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function isDeleted(): bool;
|
2017-10-15 15:58:40 -04:00
|
|
|
}
|