blob: f0e54b1ef6fdfa2269357dcd2edd83ee895c394d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\Collaboration\Resources;
use OCP\IUser;
/**
* @since 16.0.0
*/
interface IProvider {
/**
* Get the resource type of the provider
*
* @return string
* @since 16.0.0
*/
public function getType(): string;
/**
* Get the rich object data of a resource
*
* @param IResource $resource
* @return array
* @since 16.0.0
*/
public function getResourceRichObject(IResource $resource): array;
/**
* Can a user/guest access the collection
*
* @param IResource $resource
* @param IUser|null $user
* @return bool
* @since 16.0.0
*/
public function canAccessResource(IResource $resource, ?IUser $user): bool;
}
|