aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-02-06 17:09:09 +0100
committerJoas Schilling <coding@schilljs.com>2020-02-17 09:04:19 +0100
commit841f2f3b0491dfec43491911f20cce7a78408a1b (patch)
tree15e9f59d31aa60b5f6e63af928af5b8e8f16e094 /lib/public
parent6895a235174d02fe095cb51321e60e8ffaa3cfcf (diff)
downloadnextcloud-server-841f2f3b0491dfec43491911f20cce7a78408a1b.tar.gz
nextcloud-server-841f2f3b0491dfec43491911f20cce7a78408a1b.zip
Allow to overwrite share target mountpoints
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Share/Events/VerifyMountPointEvent.php83
1 files changed, 83 insertions, 0 deletions
diff --git a/lib/public/Share/Events/VerifyMountPointEvent.php b/lib/public/Share/Events/VerifyMountPointEvent.php
new file mode 100644
index 00000000000..75914f9416b
--- /dev/null
+++ b/lib/public/Share/Events/VerifyMountPointEvent.php
@@ -0,0 +1,83 @@
+<?php
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2020, Joas Schilling <coding@schilljs.com>
+ *
+ * @author Joas Schilling <coding@schilljs.com>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCP\Share\Events;
+
+use OC\Files\View;
+use OCP\EventDispatcher\Event;
+use OCP\Share\IShare;
+
+/**
+ * @since 19.0.0
+ */
+class VerifyMountPointEvent extends Event {
+
+ /** @var IShare */
+ private $share;
+ /** @var View */
+ private $view;
+ /** @var string */
+ private $parent;
+
+ /**
+ * @since 19.0.0
+ */
+ public function __construct(IShare $share,
+ View $view,
+ string $parent) {
+ parent::__construct();
+
+ $this->share = $share;
+ $this->view = $view;
+ $this->parent = $parent;
+ }
+
+ /**
+ * @since 19.0.0
+ */
+ public function getShare(): IShare {
+ return $this->share;
+ }
+
+ /**
+ * @since 19.0.0
+ */
+ public function getView(): View {
+ return $this->view;
+ }
+
+ /**
+ * @since 19.0.0
+ */
+ public function getParent(): string {
+ return $this->parent;
+ }
+
+ /**
+ * @since 19.0.0
+ */
+ public function setParent(string $parent): void {
+ $this->parent = $parent;
+ }
+}