diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-11-03 12:19:47 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-11-03 12:19:47 +0100 |
commit | 3ef6a099a3d3a3a9baaa48188d316c8295067974 (patch) | |
tree | 64b16a0babf4d958598c106dd3d84543de2a7a0b /lib/public/Calendar | |
parent | 5705af29a5a06c78d0b36dcee5047ba893e7e867 (diff) | |
download | nextcloud-server-3ef6a099a3d3a3a9baaa48188d316c8295067974.tar.gz nextcloud-server-3ef6a099a3d3a3a9baaa48188d316c8295067974.zip |
Add IManager::getCalendarsForPrincipal API
The Calendar app needs to access calendars of a given principal in the
back-end. The new calendar providers were not accessible for apps before
this patch. Now they can access the ICalendar objects on demand.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/public/Calendar')
-rw-r--r-- | lib/public/Calendar/ICalendarProvider.php | 4 | ||||
-rw-r--r-- | lib/public/Calendar/IManager.php | 11 |
2 files changed, 12 insertions, 3 deletions
diff --git a/lib/public/Calendar/ICalendarProvider.php b/lib/public/Calendar/ICalendarProvider.php index d135910b08c..14ef644e580 100644 --- a/lib/public/Calendar/ICalendarProvider.php +++ b/lib/public/Calendar/ICalendarProvider.php @@ -36,8 +36,8 @@ namespace OCP\Calendar; interface ICalendarProvider { /** - * @param string $principalUri - * @param string[] $calendarUris + * @param string $principalUri URI of the principal + * @param string[] $calendarUris optionally specify which calendars to load, or all if this array is empty * @return ICalendar[] * @since 23.0.0 */ diff --git a/lib/public/Calendar/IManager.php b/lib/public/Calendar/IManager.php index eb4113bba99..7f0eec80910 100644 --- a/lib/public/Calendar/IManager.php +++ b/lib/public/Calendar/IManager.php @@ -118,7 +118,7 @@ interface IManager { /** * @return ICalendar[] * @since 13.0.0 - * @deprecated 23.0.0 + * @deprecated 23.0.0 use \OCP\Calendar\IManager::getCalendarsForPrincipal */ public function getCalendars(); @@ -132,6 +132,15 @@ interface IManager { public function clear(); /** + * @param string $principalUri URI of the principal + * @param string[] $calendarUris optionally specify which calendars to load, or all if this array is empty + * + * @return ICalendar[] + * @since 23.0.0 + */ + public function getCalendarsForPrincipal(string $principalUri, array $calendarUris = []): array; + + /** * Query a principals calendar(s) * * @param ICalendarQuery $query |