2018-05-28 08:37:29 -04:00
|
|
|
<?php
|
2025-06-30 09:04:05 -04:00
|
|
|
|
2018-05-28 08:37:29 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2018-05-28 08:37:29 -04:00
|
|
|
*/
|
|
|
|
|
namespace OCP\Calendar\Resource;
|
2020-04-09 05:48:10 -04:00
|
|
|
|
2018-06-18 12:15:50 -04:00
|
|
|
use OCP\Calendar\BackendTemporarilyUnavailableException;
|
2018-05-28 08:37:29 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Interface IBackend
|
|
|
|
|
*
|
|
|
|
|
* @since 14.0.0
|
|
|
|
|
*/
|
|
|
|
|
interface IBackend {
|
|
|
|
|
/**
|
|
|
|
|
* get a list of all resources in this backend
|
|
|
|
|
*
|
2018-06-18 12:15:50 -04:00
|
|
|
* @throws BackendTemporarilyUnavailableException
|
2018-05-28 08:37:29 -04:00
|
|
|
* @return IResource[]
|
2018-06-19 06:22:30 -04:00
|
|
|
* @since 14.0.0
|
2018-05-28 08:37:29 -04:00
|
|
|
*/
|
2018-06-18 08:26:32 -04:00
|
|
|
public function getAllResources():array;
|
2018-05-28 08:37:29 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* get a list of all resource identifiers in this backend
|
|
|
|
|
*
|
2018-06-18 12:15:50 -04:00
|
|
|
* @throws BackendTemporarilyUnavailableException
|
2018-05-28 08:37:29 -04:00
|
|
|
* @return string[]
|
2018-06-19 06:22:30 -04:00
|
|
|
* @since 14.0.0
|
2018-05-28 08:37:29 -04:00
|
|
|
*/
|
2018-06-18 08:26:32 -04:00
|
|
|
public function listAllResources():array;
|
2018-05-28 08:37:29 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* get a resource by it's id
|
|
|
|
|
*
|
|
|
|
|
* @param string $id
|
2018-06-18 12:15:50 -04:00
|
|
|
* @throws BackendTemporarilyUnavailableException
|
2018-05-28 08:37:29 -04:00
|
|
|
* @return IResource|null
|
2018-06-19 06:22:30 -04:00
|
|
|
* @since 14.0.0
|
2018-05-28 08:37:29 -04:00
|
|
|
*/
|
|
|
|
|
public function getResource($id);
|
2018-06-18 08:26:32 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get unique identifier of the backend
|
|
|
|
|
*
|
|
|
|
|
* @return string
|
|
|
|
|
* @since 14.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function getBackendIdentifier():string;
|
2018-05-28 08:37:29 -04:00
|
|
|
}
|