-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Add
acceptShare
as an interface
It was commented out because at that time no other share provider supported the `acceptShare` method. Today it is the same no other provider supports it, but we should make it discoverable by adding it to the public API as an additional interface. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
- Loading branch information
Showing
4 changed files
with
31 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
namespace OCP\Share; | ||
|
||
/** | ||
* Interface IShareProviderSupportsAccept | ||
* | ||
* This interface allows to define IShareProvider that can handle the `acceptShare` method, | ||
* which is available since Nextcloud 17. | ||
* | ||
* @since 30.0.0 | ||
*/ | ||
interface IShareProviderSupportsAccept { | ||
/** | ||
* Accept a share. | ||
* | ||
* @param IShare $share | ||
* @param string $recipient | ||
* @return IShare The share object | ||
* @since 17.0.0 | ||
*/ | ||
public function acceptShare(IShare $share, string $recipient): IShare; | ||
} |