Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2018-04-30 12:49:24 +0300
committerBjoern Schiessle <bjoern@schiessle.org>2018-07-02 12:29:27 +0300
commit21e64ec7f41dcf5424c3357f7ce07b22a817a16e (patch)
tree70216c0c182d43a329bfb52ed1f39652bbc930c2 /lib/public/Federation
parent5cfe20675dfa1f895af47b4a8c93cf479d53b200 (diff)
implement receiving of federated shares
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'lib/public/Federation')
-rw-r--r--lib/public/Federation/Exceptions/ProviderCouldNotAddShareException.php6
-rw-r--r--lib/public/Federation/ICloudFederationProvider.php12
2 files changed, 11 insertions, 7 deletions
diff --git a/lib/public/Federation/Exceptions/ProviderCouldNotAddShareException.php b/lib/public/Federation/Exceptions/ProviderCouldNotAddShareException.php
index b608437aa3c..205206d5af8 100644
--- a/lib/public/Federation/Exceptions/ProviderCouldNotAddShareException.php
+++ b/lib/public/Federation/Exceptions/ProviderCouldNotAddShareException.php
@@ -22,7 +22,13 @@
namespace OCP\Federation\Exceptions;
use OC\HintException;
+use OCP\AppFramework\Http;
class ProviderCouldNotAddShareException extends HintException {
+ public function __construct($message, $hint = '', $code = Http::STATUS_BAD_REQUEST, \Exception $previous = null) {
+ parent::__construct($message, $hint, $code, $previous);
+ }
+
+
}
diff --git a/lib/public/Federation/ICloudFederationProvider.php b/lib/public/Federation/ICloudFederationProvider.php
index 4c11fc20397..535f61aae89 100644
--- a/lib/public/Federation/ICloudFederationProvider.php
+++ b/lib/public/Federation/ICloudFederationProvider.php
@@ -21,6 +21,7 @@
namespace OCP\Federation;
+use OCP\Federation\Exceptions\ProviderCouldNotAddShareException;
use OCP\Federation\Exceptions\ShareNotFoundException;
/**
@@ -36,16 +37,11 @@ use OCP\Federation\Exceptions\ShareNotFoundException;
interface ICloudFederationProvider {
/**
- * ICloudFederationProvider constructor.
- *
- * @param $shareType define the share type, handled by this provider
- */
- public function __construct($shareType);
-
- /**
* get the name of the share type, handled by this provider
*
* @return string
+ *
+ * @since 14.0.0
*/
public function getShareType();
@@ -62,6 +58,8 @@ interface ICloudFederationProvider {
* @param ICloudFederationShare $share
* @return string provider specific unique ID of the share
*
+ * @throws ProviderCouldNotAddShareException
+ *
* @since 14.0.0
*/
public function shareReceived(ICloudFederationShare $share);