summaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2018-05-09 17:06:35 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2018-07-02 11:29:27 +0200
commitdb428ea5471a5be5517911b3bf2f3a6d3f86e297 (patch)
tree3921525a302150e75d968a47dff14be79f9ffa3b /apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
parenta3948e8a126d6f84629841c8886fe0819ab04ad5 (diff)
downloadnextcloud-server-db428ea5471a5be5517911b3bf2f3a6d3f86e297.tar.gz
nextcloud-server-db428ea5471a5be5517911b3bf2f3a6d3f86e297.zip
send accept share notification (WIP)
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php')
-rw-r--r--apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php20
1 files changed, 15 insertions, 5 deletions
diff --git a/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php b/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
index dea4c3f5fc1..6c5b63b1cd2 100644
--- a/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
+++ b/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
@@ -27,7 +27,9 @@ use OCA\FederatedFileSharing\AddressHandler;
use OCA\FederatedFileSharing\FederatedShareProvider;
use OCP\Activity\IManager as IActivityManager;
use OCP\App\IAppManager;
+use OCP\Federation\Exceptions\ActionNotSupportedException;
use OCP\Federation\Exceptions\ProviderCouldNotAddShareException;
+use OCP\Federation\Exceptions\ShareNotFoundException;
use OCP\Federation\ICloudFederationProvider;
use OCP\Federation\ICloudFederationShare;
use OCP\Federation\ICloudIdManager;
@@ -178,6 +180,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
\OC::$server->getNotificationManager(),
\OC::$server->query(\OCP\OCS\IDiscoveryService::class),
\OC::$server->getCloudFederationProviderManager(),
+ \OC::$server->getCloudFederationFactory(),
$shareWith
);
@@ -230,15 +233,22 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
/**
* notification received from another server
*
- * @param string $id unique ID of a already existing share
- * @param array $notification provider specific notification
+ * @param string $notificationType (e.g. SHARE_ACCEPTED)
+ * @param array $message
*
- * @throws \OCP\Federation\Exceptions\ShareNotFoundException
+ * @throws ShareNotFoundException
+ * @throws ActionNotSupportedException
*
* @since 14.0.0
*/
- public function notificationReceived($id, $notification) {
- // TODO: Implement notificationReceived() method.
+ public function notificationReceived($notificationType, array $message) {
+ switch ($notificationType) {
+ case 'SHARE_ACCEPTED' :
+ return;
+ }
+
+
+ throw new ActionNotSupportedException($notificationType);
}
/**