summaryrefslogtreecommitdiffstats
path: root/lib/public/Collaboration/Resources/IProvider.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-10-17 20:03:44 +0200
committerJulius Härtl <jus@bitgrid.net>2019-03-01 20:56:15 +0100
commit136d2c39ac72f837a3ea9a3f698be963fefb69a3 (patch)
tree5b6f44f7a8e49a23533060fd50c0bbeccd292ba2 /lib/public/Collaboration/Resources/IProvider.php
parent65a9ab47ea233701b559d08d89e36649a3d5a30b (diff)
downloadnextcloud-server-136d2c39ac72f837a3ea9a3f698be963fefb69a3.tar.gz
nextcloud-server-136d2c39ac72f837a3ea9a3f698be963fefb69a3.zip
Provider functionality
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/public/Collaboration/Resources/IProvider.php')
-rw-r--r--lib/public/Collaboration/Resources/IProvider.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/public/Collaboration/Resources/IProvider.php b/lib/public/Collaboration/Resources/IProvider.php
index eac92733dea..bf338113005 100644
--- a/lib/public/Collaboration/Resources/IProvider.php
+++ b/lib/public/Collaboration/Resources/IProvider.php
@@ -22,7 +22,27 @@ declare(strict_types=1);
namespace OCP\Collaboration\Resources;
+use OCP\IUser;
interface IProvider {
+ /**
+ * Get the display name of a resource
+ *
+ * @param IResource $resource
+ * @return string
+ * @since 15.0.0
+ */
+ public function getName(IResource $resource): string;
+
+ /**
+ * Can a user/guest access the collection
+ *
+ * @param IResource $resource
+ * @param IUser $user
+ * @return bool
+ * @since 15.0.0
+ */
+ public function canAccess(IResource $resource, IUser $user = null): bool;
+
}