diff options
author | Robin Appelman <icewind@owncloud.com> | 2016-06-18 22:04:56 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-10-31 15:55:40 +0100 |
commit | 3692769b0a0713fa9e3976692736da76707986c5 (patch) | |
tree | 7749b3fcc18a8027301635519794a44b9bdc683e /lib/public | |
parent | 357a823457397d3e93ec8cd4dc01fb6859eb0049 (diff) | |
download | nextcloud-server-3692769b0a0713fa9e3976692736da76707986c5.tar.gz nextcloud-server-3692769b0a0713fa9e3976692736da76707986c5.zip |
Add getShareTypesInFolder to optimize folder listening
Signed-off-by: Robin Appelman <icewind@owncloud.com>
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/Share/IManager.php | 11 | ||||
-rw-r--r-- | lib/public/Share/IProviderFactory.php | 6 | ||||
-rw-r--r-- | lib/public/Share/IShareProvider.php | 11 |
3 files changed, 28 insertions, 0 deletions
diff --git a/lib/public/Share/IManager.php b/lib/public/Share/IManager.php index 37751911883..e8c69e06f9f 100644 --- a/lib/public/Share/IManager.php +++ b/lib/public/Share/IManager.php @@ -88,6 +88,17 @@ interface IManager { public function moveShare(IShare $share, $recipientId); /** + * Get all shares shared by (initiated) by the provided user in a folder. + * + * @param string $userId + * @param Node|null $node + * @param bool $reshares + * @return IShare[] + * @since 9.2.0 + */ + public function getSharesInFolder($userId, Node $node, $reshares = false); + + /** * Get shares shared by (initiated) by the provided user. * * @param string $userId diff --git a/lib/public/Share/IProviderFactory.php b/lib/public/Share/IProviderFactory.php index 8d9ea5bfdd0..928298a7860 100644 --- a/lib/public/Share/IProviderFactory.php +++ b/lib/public/Share/IProviderFactory.php @@ -55,4 +55,10 @@ interface IProviderFactory { * @since 9.0.0 */ public function getProviderForType($shareType); + + /** + * @return IShareProvider[] + * @since 9.2.0 + */ + public function getAllProviders(); } diff --git a/lib/public/Share/IShareProvider.php b/lib/public/Share/IShareProvider.php index c4e116ac7fd..db444d36935 100644 --- a/lib/public/Share/IShareProvider.php +++ b/lib/public/Share/IShareProvider.php @@ -92,6 +92,17 @@ interface IShareProvider { public function move(\OCP\Share\IShare $share, $recipient); /** + * Get all shares by the given user in a folder + * + * @param string $userId + * @param Node|null $node + * @param bool $reshares Also get the shares where $user is the owner instead of just the shares where $user is the initiator + * @return \OCP\Share\IShare[] + * @since 9.2.0 + */ + public function getSharesInFolder($userId, $node, $reshares); + + /** * Get all shares by the given user * * @param string $userId |