aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Share
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/Share')
-rw-r--r--lib/public/Share/IShareProvider.php10
-rw-r--r--lib/public/Share/IShareProviderSupportsAccept.php27
-rw-r--r--lib/public/Share/IShareProviderWithNotification.php5
3 files changed, 29 insertions, 13 deletions
diff --git a/lib/public/Share/IShareProvider.php b/lib/public/Share/IShareProvider.php
index c51bad8f9ef..9d7c8013a36 100644
--- a/lib/public/Share/IShareProvider.php
+++ b/lib/public/Share/IShareProvider.php
@@ -45,16 +45,6 @@ interface IShareProvider {
public function update(\OCP\Share\IShare $share);
/**
- * 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;
-
- /**
* Delete a share
*
* @param \OCP\Share\IShare $share
diff --git a/lib/public/Share/IShareProviderSupportsAccept.php b/lib/public/Share/IShareProviderSupportsAccept.php
new file mode 100644
index 00000000000..c3a0c2d0218
--- /dev/null
+++ b/lib/public/Share/IShareProviderSupportsAccept.php
@@ -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 extends IShareProvider {
+ /**
+ * Accept a share.
+ *
+ * @param IShare $share
+ * @param string $recipient
+ * @return IShare The share object
+ * @since 30.0.0
+ */
+ public function acceptShare(IShare $share, string $recipient): IShare;
+}
diff --git a/lib/public/Share/IShareProviderWithNotification.php b/lib/public/Share/IShareProviderWithNotification.php
index afd1429c1f0..c2ba8118175 100644
--- a/lib/public/Share/IShareProviderWithNotification.php
+++ b/lib/public/Share/IShareProviderWithNotification.php
@@ -1,9 +1,8 @@
<?php
/**
- * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
- * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
- * SPDX-License-Identifier: AGPL-3.0-only
+ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\Share;