aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Repair/Events
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Repair/Events')
-rw-r--r--lib/private/Repair/Events/RepairAdvanceEvent.php32
-rw-r--r--lib/private/Repair/Events/RepairErrorEvent.php25
-rw-r--r--lib/private/Repair/Events/RepairFinishEvent.php14
-rw-r--r--lib/private/Repair/Events/RepairInfoEvent.php25
-rw-r--r--lib/private/Repair/Events/RepairStartEvent.php32
-rw-r--r--lib/private/Repair/Events/RepairStepEvent.php25
-rw-r--r--lib/private/Repair/Events/RepairWarningEvent.php25
7 files changed, 178 insertions, 0 deletions
diff --git a/lib/private/Repair/Events/RepairAdvanceEvent.php b/lib/private/Repair/Events/RepairAdvanceEvent.php
new file mode 100644
index 00000000000..476db9e4702
--- /dev/null
+++ b/lib/private/Repair/Events/RepairAdvanceEvent.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OC\Repair\Events;
+
+use OCP\EventDispatcher\Event;
+
+class RepairAdvanceEvent extends Event {
+ private int $increment;
+ private string $description;
+
+ public function __construct(
+ int $increment,
+ string $description,
+ ) {
+ $this->increment = $increment;
+ $this->description = $description;
+ }
+
+ public function getIncrement(): int {
+ return $this->increment;
+ }
+
+ public function getDescription(): string {
+ return $this->description;
+ }
+}
diff --git a/lib/private/Repair/Events/RepairErrorEvent.php b/lib/private/Repair/Events/RepairErrorEvent.php
new file mode 100644
index 00000000000..e5be8a5a031
--- /dev/null
+++ b/lib/private/Repair/Events/RepairErrorEvent.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OC\Repair\Events;
+
+use OCP\EventDispatcher\Event;
+
+class RepairErrorEvent extends Event {
+ private string $message;
+
+ public function __construct(
+ string $message,
+ ) {
+ $this->message = $message;
+ }
+
+ public function getMessage(): string {
+ return $this->message;
+ }
+}
diff --git a/lib/private/Repair/Events/RepairFinishEvent.php b/lib/private/Repair/Events/RepairFinishEvent.php
new file mode 100644
index 00000000000..767a7506e6f
--- /dev/null
+++ b/lib/private/Repair/Events/RepairFinishEvent.php
@@ -0,0 +1,14 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OC\Repair\Events;
+
+use OCP\EventDispatcher\Event;
+
+class RepairFinishEvent extends Event {
+}
diff --git a/lib/private/Repair/Events/RepairInfoEvent.php b/lib/private/Repair/Events/RepairInfoEvent.php
new file mode 100644
index 00000000000..ce8eb2f99e6
--- /dev/null
+++ b/lib/private/Repair/Events/RepairInfoEvent.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OC\Repair\Events;
+
+use OCP\EventDispatcher\Event;
+
+class RepairInfoEvent extends Event {
+ private string $message;
+
+ public function __construct(
+ string $message,
+ ) {
+ $this->message = $message;
+ }
+
+ public function getMessage(): string {
+ return $this->message;
+ }
+}
diff --git a/lib/private/Repair/Events/RepairStartEvent.php b/lib/private/Repair/Events/RepairStartEvent.php
new file mode 100644
index 00000000000..47e713d57d9
--- /dev/null
+++ b/lib/private/Repair/Events/RepairStartEvent.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OC\Repair\Events;
+
+use OCP\EventDispatcher\Event;
+
+class RepairStartEvent extends Event {
+ private int $max;
+ private string $current;
+
+ public function __construct(
+ int $max,
+ string $current,
+ ) {
+ $this->max = $max;
+ $this->current = $current;
+ }
+
+ public function getMaxStep(): int {
+ return $this->max;
+ }
+
+ public function getCurrentStepName(): string {
+ return $this->current;
+ }
+}
diff --git a/lib/private/Repair/Events/RepairStepEvent.php b/lib/private/Repair/Events/RepairStepEvent.php
new file mode 100644
index 00000000000..27e1efbdb08
--- /dev/null
+++ b/lib/private/Repair/Events/RepairStepEvent.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OC\Repair\Events;
+
+use OCP\EventDispatcher\Event;
+
+class RepairStepEvent extends Event {
+ private string $stepName;
+
+ public function __construct(
+ string $stepName,
+ ) {
+ $this->stepName = $stepName;
+ }
+
+ public function getStepName(): string {
+ return $this->stepName;
+ }
+}
diff --git a/lib/private/Repair/Events/RepairWarningEvent.php b/lib/private/Repair/Events/RepairWarningEvent.php
new file mode 100644
index 00000000000..6893a7212ec
--- /dev/null
+++ b/lib/private/Repair/Events/RepairWarningEvent.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OC\Repair\Events;
+
+use OCP\EventDispatcher\Event;
+
+class RepairWarningEvent extends Event {
+ private string $message;
+
+ public function __construct(
+ string $message,
+ ) {
+ $this->message = $message;
+ }
+
+ public function getMessage(): string {
+ return $this->message;
+ }
+}