diff options
Diffstat (limited to 'apps/dav/lib/Events')
22 files changed, 2060 insertions, 0 deletions
diff --git a/apps/dav/lib/Events/AddressBookCreatedEvent.php b/apps/dav/lib/Events/AddressBookCreatedEvent.php new file mode 100644 index 00000000000..c0e9b2370f2 --- /dev/null +++ b/apps/dav/lib/Events/AddressBookCreatedEvent.php @@ -0,0 +1,72 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class AddressBookCreatedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class AddressBookCreatedEvent extends Event { + + /** @var int */ + private $addressBookId; + + /** @var array */ + private $addressBookData; + + /** + * AddressBookCreatedEvent constructor. + * + * @param int $addressBookId + * @param array $addressBookData + * @since 20.0.0 + */ + public function __construct(int $addressBookId, + array $addressBookData) { + parent::__construct(); + $this->addressBookId = $addressBookId; + $this->addressBookData = $addressBookData; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getAddressBookId(): int { + return $this->addressBookId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getAddressBookData(): array { + return $this->addressBookData; + } +} diff --git a/apps/dav/lib/Events/AddressBookDeletedEvent.php b/apps/dav/lib/Events/AddressBookDeletedEvent.php new file mode 100644 index 00000000000..39ae3bd2799 --- /dev/null +++ b/apps/dav/lib/Events/AddressBookDeletedEvent.php @@ -0,0 +1,86 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class AddressBookDeletedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class AddressBookDeletedEvent extends Event { + + /** @var int */ + private $addressBookId; + + /** @var array */ + private $addressBookData; + + /** @var array */ + private $shares; + + /** + * AddressBookDeletedEvent constructor. + * + * @param int $addressBookId + * @param array $addressBookData + * @param array $shares + * @since 20.0.0 + */ + public function __construct(int $addressBookId, + array $addressBookData, + array $shares) { + parent::__construct(); + $this->addressBookId = $addressBookId; + $this->addressBookData = $addressBookData; + $this->shares = $shares; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getAddressBookId():int { + return $this->addressBookId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getAddressBookData(): array { + return $this->addressBookData; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getShares(): array { + return $this->shares; + } +} diff --git a/apps/dav/lib/Events/AddressBookShareUpdatedEvent.php b/apps/dav/lib/Events/AddressBookShareUpdatedEvent.php new file mode 100644 index 00000000000..343fb2c6b6b --- /dev/null +++ b/apps/dav/lib/Events/AddressBookShareUpdatedEvent.php @@ -0,0 +1,114 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class AddressBookShareUpdatedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class AddressBookShareUpdatedEvent extends Event { + + /** @var int */ + private $addressBookId; + + /** @var array */ + private $addressBookData; + + /** @var array */ + private $oldShares; + + /** @var array */ + private $added; + + /** @var array */ + private $removed; + + /** + * AddressBookShareUpdatedEvent constructor. + * + * @param int $addressBookId + * @param array $addressBookData + * @param array $oldShares + * @param array $added + * @param array $removed + * @since 20.0.0 + */ + public function __construct(int $addressBookId, + array $addressBookData, + array $oldShares, + array $added, + array $removed) { + parent::__construct(); + $this->addressBookId = $addressBookId; + $this->addressBookData = $addressBookData; + $this->oldShares = $oldShares; + $this->added = $added; + $this->removed = $removed; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getAddressBookId(): int { + return $this->addressBookId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getAddressBookData(): array { + return $this->addressBookData; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getOldShares(): array { + return $this->oldShares; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getAdded(): array { + return $this->added; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getRemoved(): array { + return $this->removed; + } +} diff --git a/apps/dav/lib/Events/AddressBookUpdatedEvent.php b/apps/dav/lib/Events/AddressBookUpdatedEvent.php new file mode 100644 index 00000000000..59fe0b7b28a --- /dev/null +++ b/apps/dav/lib/Events/AddressBookUpdatedEvent.php @@ -0,0 +1,100 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class AddressBookUpdatedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class AddressBookUpdatedEvent extends Event { + + /** @var int */ + private $addressBookId; + + /** @var array */ + private $addressBookData; + + /** @var array */ + private $shares; + + /** @var array */ + private $mutations; + + /** + * AddressBookUpdatedEvent constructor. + * + * @param int $addressBookId + * @param array $addressBookData + * @param array $shares + * @param array $mutations + * @since 20.0.0 + */ + public function __construct(int $addressBookId, + array $addressBookData, + array $shares, + array $mutations) { + parent::__construct(); + $this->addressBookId = $addressBookId; + $this->addressBookData = $addressBookData; + $this->shares = $shares; + $this->mutations = $mutations; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getAddressBookId(): int { + return $this->addressBookId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getAddressBookData(): array { + return $this->addressBookData; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getShares(): array { + return $this->shares; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getMutations(): array { + return $this->mutations; + } +} diff --git a/apps/dav/lib/Events/CachedCalendarObjectCreatedEvent.php b/apps/dav/lib/Events/CachedCalendarObjectCreatedEvent.php new file mode 100644 index 00000000000..466009ea368 --- /dev/null +++ b/apps/dav/lib/Events/CachedCalendarObjectCreatedEvent.php @@ -0,0 +1,100 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class CachedCalendarObjectCreatedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class CachedCalendarObjectCreatedEvent extends Event { + + /** @var int */ + private $subscriptionId; + + /** @var array */ + private $subscriptionData; + + /** @var array */ + private $shares; + + /** @var array */ + private $objectData; + + /** + * CachedCalendarObjectCreatedEvent constructor. + * + * @param int $subscriptionId + * @param array $subscriptionData + * @param array $shares + * @param array $objectData + * @since 20.0.0 + */ + public function __construct(int $subscriptionId, + array $subscriptionData, + array $shares, + array $objectData) { + parent::__construct(); + $this->subscriptionId = $subscriptionId; + $this->subscriptionData = $subscriptionData; + $this->shares = $shares; + $this->objectData = $objectData; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getSubscriptionId(): int { + return $this->subscriptionId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getSubscriptionData(): array { + return $this->subscriptionData; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getShares(): array { + return $this->shares; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getObjectData(): array { + return $this->objectData; + } +} diff --git a/apps/dav/lib/Events/CachedCalendarObjectDeletedEvent.php b/apps/dav/lib/Events/CachedCalendarObjectDeletedEvent.php new file mode 100644 index 00000000000..fbb2a9cab0b --- /dev/null +++ b/apps/dav/lib/Events/CachedCalendarObjectDeletedEvent.php @@ -0,0 +1,100 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class CachedCalendarObjectDeletedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class CachedCalendarObjectDeletedEvent extends Event { + + /** @var int */ + private $subscriptionId; + + /** @var array */ + private $subscriptionData; + + /** @var array */ + private $shares; + + /** @var array */ + private $objectData; + + /** + * CachedCalendarObjectDeletedEvent constructor. + * + * @param int $subscriptionId + * @param array $subscriptionData + * @param array $shares + * @param array $objectData + * @since 20.0.0 + */ + public function __construct(int $subscriptionId, + array $subscriptionData, + array $shares, + array $objectData) { + parent::__construct(); + $this->subscriptionId = $subscriptionId; + $this->subscriptionData = $subscriptionData; + $this->shares = $shares; + $this->objectData = $objectData; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getSubscriptionId(): int { + return $this->subscriptionId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getSubscriptionData(): array { + return $this->subscriptionData; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getShares(): array { + return $this->shares; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getObjectData(): array { + return $this->objectData; + } +} diff --git a/apps/dav/lib/Events/CachedCalendarObjectUpdatedEvent.php b/apps/dav/lib/Events/CachedCalendarObjectUpdatedEvent.php new file mode 100644 index 00000000000..c2a50c42efe --- /dev/null +++ b/apps/dav/lib/Events/CachedCalendarObjectUpdatedEvent.php @@ -0,0 +1,100 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class CachedCalendarObjectUpdatedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class CachedCalendarObjectUpdatedEvent extends Event { + + /** @var int */ + private $subscriptionId; + + /** @var array */ + private $subscriptionData; + + /** @var array */ + private $shares; + + /** @var array */ + private $objectData; + + /** + * CachedCalendarObjectUpdatedEvent constructor. + * + * @param int $subscriptionId + * @param array $subscriptionData + * @param array $shares + * @param array $objectData + * @since 20.0.0 + */ + public function __construct(int $subscriptionId, + array $subscriptionData, + array $shares, + array $objectData) { + parent::__construct(); + $this->subscriptionId = $subscriptionId; + $this->subscriptionData = $subscriptionData; + $this->shares = $shares; + $this->objectData = $objectData; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getSubscriptionId(): int { + return $this->subscriptionId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getSubscriptionData(): array { + return $this->subscriptionData; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getShares(): array { + return $this->shares; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getObjectData(): array { + return $this->objectData; + } +} diff --git a/apps/dav/lib/Events/CalendarCreatedEvent.php b/apps/dav/lib/Events/CalendarCreatedEvent.php new file mode 100644 index 00000000000..7f4aa4ac03e --- /dev/null +++ b/apps/dav/lib/Events/CalendarCreatedEvent.php @@ -0,0 +1,72 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class CalendarCreatedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class CalendarCreatedEvent extends Event { + + /** @var int */ + private $calendarId; + + /** @var array */ + private $calendarData; + + /** + * CalendarCreatedEvent constructor. + * + * @param int $calendarId + * @param array $calendarData + * @since 20.0.0 + */ + public function __construct(int $calendarId, + array $calendarData) { + parent::__construct(); + $this->calendarId = $calendarId; + $this->calendarData = $calendarData; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getCalendarId(): int { + return $this->calendarId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getCalendarData(): array { + return $this->calendarData; + } +} diff --git a/apps/dav/lib/Events/CalendarDeletedEvent.php b/apps/dav/lib/Events/CalendarDeletedEvent.php new file mode 100644 index 00000000000..f26e1a7fb6a --- /dev/null +++ b/apps/dav/lib/Events/CalendarDeletedEvent.php @@ -0,0 +1,86 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class CalendarDeletedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class CalendarDeletedEvent extends Event { + + /** @var int */ + private $calendarId; + + /** @var array */ + private $calendarData; + + /** @var array */ + private $shares; + + /** + * CalendarDeletedEvent constructor. + * + * @param int $calendarId + * @param array $calendarData + * @param array $shares + * @since 20.0.0 + */ + public function __construct(int $calendarId, + array $calendarData, + array $shares) { + parent::__construct(); + $this->calendarId = $calendarId; + $this->calendarData = $calendarData; + $this->shares = $shares; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getCalendarId(): int { + return $this->calendarId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getCalendarData(): array { + return $this->calendarData; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getShares(): array { + return $this->shares; + } +} diff --git a/apps/dav/lib/Events/CalendarObjectCreatedEvent.php b/apps/dav/lib/Events/CalendarObjectCreatedEvent.php new file mode 100644 index 00000000000..dcd68e4cd0a --- /dev/null +++ b/apps/dav/lib/Events/CalendarObjectCreatedEvent.php @@ -0,0 +1,100 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class CalendarObjectCreatedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class CalendarObjectCreatedEvent extends Event { + + /** @var int */ + private $calendarId; + + /** @var array */ + private $calendarData; + + /** @var array */ + private $shares; + + /** @var array */ + private $objectData; + + /** + * CalendarObjectCreatedEvent constructor. + * + * @param int $calendarId + * @param array $calendarData + * @param array $shares + * @param array $objectData + * @since 20.0.0 + */ + public function __construct(int $calendarId, + array $calendarData, + array $shares, + array $objectData) { + parent::__construct(); + $this->calendarId = $calendarId; + $this->calendarData = $calendarData; + $this->shares = $shares; + $this->objectData = $objectData; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getCalendarId(): int { + return $this->calendarId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getCalendarData(): array { + return $this->calendarData; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getShares(): array { + return $this->shares; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getObjectData(): array { + return $this->objectData; + } +} diff --git a/apps/dav/lib/Events/CalendarObjectDeletedEvent.php b/apps/dav/lib/Events/CalendarObjectDeletedEvent.php new file mode 100644 index 00000000000..357e9ede11f --- /dev/null +++ b/apps/dav/lib/Events/CalendarObjectDeletedEvent.php @@ -0,0 +1,100 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class CalendarObjectDeletedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class CalendarObjectDeletedEvent extends Event { + + /** @var int */ + private $calendarId; + + /** @var array */ + private $calendarData; + + /** @var array */ + private $shares; + + /** @var array */ + private $objectData; + + /** + * CalendarObjectDeletedEvent constructor. + * + * @param int $calendarId + * @param array $calendarData + * @param array $shares + * @param array $objectData + * @since 20.0.0 + */ + public function __construct(int $calendarId, + array $calendarData, + array $shares, + array $objectData) { + parent::__construct(); + $this->calendarId = $calendarId; + $this->calendarData = $calendarData; + $this->shares = $shares; + $this->objectData = $objectData; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getCalendarId(): int { + return $this->calendarId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getCalendarData(): array { + return $this->calendarData; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getShares(): array { + return $this->shares; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getObjectData(): array { + return $this->objectData; + } +} diff --git a/apps/dav/lib/Events/CalendarObjectUpdatedEvent.php b/apps/dav/lib/Events/CalendarObjectUpdatedEvent.php new file mode 100644 index 00000000000..28378005042 --- /dev/null +++ b/apps/dav/lib/Events/CalendarObjectUpdatedEvent.php @@ -0,0 +1,100 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class CalendarObjectUpdatedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class CalendarObjectUpdatedEvent extends Event { + + /** @var int */ + private $calendarId; + + /** @var array */ + private $calendarData; + + /** @var array */ + private $shares; + + /** @var array */ + private $objectData; + + /** + * CalendarObjectUpdatedEvent constructor. + * + * @param int $calendarId + * @param array $calendarData + * @param array $shares + * @param array $objectData + * @since 20.0.0 + */ + public function __construct(int $calendarId, + array $calendarData, + array $shares, + array $objectData) { + parent::__construct(); + $this->calendarId = $calendarId; + $this->calendarData = $calendarData; + $this->shares = $shares; + $this->objectData = $objectData; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getCalendarId(): int { + return $this->calendarId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getCalendarData(): array { + return $this->calendarData; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getShares(): array { + return $this->shares; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getObjectData(): array { + return $this->objectData; + } +} diff --git a/apps/dav/lib/Events/CalendarPublishedEvent.php b/apps/dav/lib/Events/CalendarPublishedEvent.php new file mode 100644 index 00000000000..63a2937d0cf --- /dev/null +++ b/apps/dav/lib/Events/CalendarPublishedEvent.php @@ -0,0 +1,86 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class CalendarPublishedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class CalendarPublishedEvent extends Event { + + /** @var int */ + private $calendarId; + + /** @var array */ + private $calendarData; + + /** @var string */ + private $publicUri; + + /** + * CalendarPublishedEvent constructor. + * + * @param int $calendarId + * @param array $calendarData + * @param string $publicUri + * @since 20.0.0 + */ + public function __construct(int $calendarId, + array $calendarData, + string $publicUri) { + parent::__construct(); + $this->calendarId = $calendarId; + $this->calendarData = $calendarData; + $this->publicUri = $publicUri; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getCalendarId(): int { + return $this->calendarId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getCalendarData(): array { + return $this->calendarData; + } + + /** + * @return string + * @since 20.0.0 + */ + public function getPublicUri(): string { + return $this->publicUri; + } +} diff --git a/apps/dav/lib/Events/CalendarShareUpdatedEvent.php b/apps/dav/lib/Events/CalendarShareUpdatedEvent.php new file mode 100644 index 00000000000..18b579540f1 --- /dev/null +++ b/apps/dav/lib/Events/CalendarShareUpdatedEvent.php @@ -0,0 +1,114 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class CalendarShareUpdatedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class CalendarShareUpdatedEvent extends Event { + + /** @var int */ + private $calendarId; + + /** @var array */ + private $calendarData; + + /** @var array */ + private $oldShares; + + /** @var array */ + private $added; + + /** @var array */ + private $removed; + + /** + * CalendarShareUpdatedEvent constructor. + * + * @param int $calendarId + * @param array $calendarData + * @param array $oldShares + * @param array $added + * @param array $removed + * @since 20.0.0 + */ + public function __construct(int $calendarId, + array $calendarData, + array $oldShares, + array $added, + array $removed) { + parent::__construct(); + $this->calendarId = $calendarId; + $this->calendarData = $calendarData; + $this->oldShares = $oldShares; + $this->added = $added; + $this->removed = $removed; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getCalendarId(): int { + return $this->calendarId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getCalendarData(): array { + return $this->calendarData; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getOldShares(): array { + return $this->oldShares; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getAdded(): array { + return $this->added; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getRemoved(): array { + return $this->removed; + } +} diff --git a/apps/dav/lib/Events/CalendarUnpublishedEvent.php b/apps/dav/lib/Events/CalendarUnpublishedEvent.php new file mode 100644 index 00000000000..dd927d808ac --- /dev/null +++ b/apps/dav/lib/Events/CalendarUnpublishedEvent.php @@ -0,0 +1,72 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class CalendarPublishedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class CalendarUnpublishedEvent extends Event { + + /** @var int */ + private $calendarId; + + /** @var array */ + private $calendarData; + + /** + * CalendarUnpublishedEvent constructor. + * + * @param int $calendarId + * @param array $calendarData + * @since 20.0.0 + */ + public function __construct(int $calendarId, + array $calendarData) { + parent::__construct(); + $this->calendarId = $calendarId; + $this->calendarData = $calendarData; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getCalendarId(): int { + return $this->calendarId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getCalendarData(): array { + return $this->calendarData; + } +} diff --git a/apps/dav/lib/Events/CalendarUpdatedEvent.php b/apps/dav/lib/Events/CalendarUpdatedEvent.php new file mode 100644 index 00000000000..644a29d97fa --- /dev/null +++ b/apps/dav/lib/Events/CalendarUpdatedEvent.php @@ -0,0 +1,100 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class CalendarUpdatedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class CalendarUpdatedEvent extends Event { + + /** @var int */ + private $calendarId; + + /** @var array */ + private $calendarData; + + /** @var array */ + private $shares; + + /** @var array */ + private $mutations; + + /** + * CalendarUpdatedEvent constructor. + * + * @param int $calendarId + * @param array $calendarData + * @param array $shares + * @param array $mutations + * @since 20.0.0 + */ + public function __construct(int $calendarId, + array $calendarData, + array $shares, + array $mutations) { + parent::__construct(); + $this->calendarId = $calendarId; + $this->calendarData = $calendarData; + $this->shares = $shares; + $this->mutations = $mutations; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getCalendarId(): int { + return $this->calendarId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getCalendarData(): array { + return $this->calendarData; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getShares(): array { + return $this->shares; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getMutations(): array { + return $this->mutations; + } +} diff --git a/apps/dav/lib/Events/CardCreatedEvent.php b/apps/dav/lib/Events/CardCreatedEvent.php new file mode 100644 index 00000000000..e885a05f91e --- /dev/null +++ b/apps/dav/lib/Events/CardCreatedEvent.php @@ -0,0 +1,100 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class CardCreatedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class CardCreatedEvent extends Event { + + /** @var int */ + private $addressBookId; + + /** @var array */ + private $addressBookData; + + /** @var array */ + private $shares; + + /** @var array */ + private $cardData; + + /** + * CardCreatedEvent constructor. + * + * @param int $addressBookId + * @param array $addressBookData + * @param array $shares + * @param array $cardData + * @since 20.0.0 + */ + public function __construct(int $addressBookId, + array $addressBookData, + array $shares, + array $cardData) { + parent::__construct(); + $this->addressBookId = $addressBookId; + $this->addressBookData = $addressBookData; + $this->shares = $shares; + $this->cardData = $cardData; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getAddressBookId(): int { + return $this->addressBookId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getAddressBookData(): array { + return $this->addressBookData; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getShares(): array { + return $this->shares; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getCardData(): array { + return $this->cardData; + } +} diff --git a/apps/dav/lib/Events/CardDeletedEvent.php b/apps/dav/lib/Events/CardDeletedEvent.php new file mode 100644 index 00000000000..27e8ccf48e6 --- /dev/null +++ b/apps/dav/lib/Events/CardDeletedEvent.php @@ -0,0 +1,100 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class CardDeletedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class CardDeletedEvent extends Event { + + /** @var int */ + private $addressBookId; + + /** @var array */ + private $addressBookData; + + /** @var array */ + private $shares; + + /** @var array */ + private $cardData; + + /** + * CardDeletedEvent constructor. + * + * @param int $addressBookId + * @param array $addressBookData + * @param array $shares + * @param array $cardData + * @since 20.0.0 + */ + public function __construct(int $addressBookId, + array $addressBookData, + array $shares, + array $cardData) { + parent::__construct(); + $this->addressBookId = $addressBookId; + $this->addressBookData = $addressBookData; + $this->shares = $shares; + $this->cardData = $cardData; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getAddressBookId(): int { + return $this->addressBookId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getAddressBookData(): array { + return $this->addressBookData; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getShares(): array { + return $this->shares; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getCardData(): array { + return $this->cardData; + } +} diff --git a/apps/dav/lib/Events/CardUpdatedEvent.php b/apps/dav/lib/Events/CardUpdatedEvent.php new file mode 100644 index 00000000000..ff8b66d4c9f --- /dev/null +++ b/apps/dav/lib/Events/CardUpdatedEvent.php @@ -0,0 +1,100 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class CardUpdatedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class CardUpdatedEvent extends Event { + + /** @var int */ + private $addressBookId; + + /** @var array */ + private $addressBookData; + + /** @var array */ + private $shares; + + /** @var array */ + private $cardData; + + /** + * CardUpdatedEvent constructor. + * + * @param int $addressBookId + * @param array $addressBookData + * @param array $shares + * @param array $cardData + * @since 20.0.0 + */ + public function __construct(int $addressBookId, + array $addressBookData, + array $shares, + array $cardData) { + parent::__construct(); + $this->addressBookId = $addressBookId; + $this->addressBookData = $addressBookData; + $this->shares = $shares; + $this->cardData = $cardData; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getAddressBookId(): int { + return $this->addressBookId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getAddressBookData(): array { + return $this->addressBookData; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getShares(): array { + return $this->shares; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getCardData(): array { + return $this->cardData; + } +} diff --git a/apps/dav/lib/Events/SubscriptionCreatedEvent.php b/apps/dav/lib/Events/SubscriptionCreatedEvent.php new file mode 100644 index 00000000000..36cff537a6f --- /dev/null +++ b/apps/dav/lib/Events/SubscriptionCreatedEvent.php @@ -0,0 +1,72 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class SubscriptionCreatedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class SubscriptionCreatedEvent extends Event { + + /** @var int */ + private $subscriptionId; + + /** @var array */ + private $subscriptionData; + + /** + * SubscriptionCreatedEvent constructor. + * + * @param int $subscriptionId + * @param array $subscriptionData + * @since 20.0.0 + */ + public function __construct(int $subscriptionId, + array $subscriptionData) { + parent::__construct(); + $this->subscriptionId = $subscriptionId; + $this->subscriptionData = $subscriptionData; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getSubscriptionId(): int { + return $this->subscriptionId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getSubscriptionData(): array { + return $this->subscriptionData; + } +} diff --git a/apps/dav/lib/Events/SubscriptionDeletedEvent.php b/apps/dav/lib/Events/SubscriptionDeletedEvent.php new file mode 100644 index 00000000000..d21102bf1ac --- /dev/null +++ b/apps/dav/lib/Events/SubscriptionDeletedEvent.php @@ -0,0 +1,86 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class SubscriptionDeletedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class SubscriptionDeletedEvent extends Event { + + /** @var int */ + private $subscriptionId; + + /** @var array */ + private $subscriptionData; + + /** @var array */ + private $shares; + + /** + * SubscriptionDeletedEvent constructor. + * + * @param int $subscriptionId + * @param array $subscriptionData + * @param array $shares + * @since 20.0.0 + */ + public function __construct(int $subscriptionId, + array $subscriptionData, + array $shares) { + parent::__construct(); + $this->subscriptionId = $subscriptionId; + $this->subscriptionData = $subscriptionData; + $this->shares = $shares; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getSubscriptionId(): int { + return $this->subscriptionId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getSubscriptionData(): array { + return $this->subscriptionData; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getShares(): array { + return $this->shares; + } +} diff --git a/apps/dav/lib/Events/SubscriptionUpdatedEvent.php b/apps/dav/lib/Events/SubscriptionUpdatedEvent.php new file mode 100644 index 00000000000..ec74ce863a3 --- /dev/null +++ b/apps/dav/lib/Events/SubscriptionUpdatedEvent.php @@ -0,0 +1,100 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2020, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; + +/** + * Class SubscriptionUpdatedEvent + * + * @package OCA\DAV\Events + * @since 20.0.0 + */ +class SubscriptionUpdatedEvent extends Event { + + /** @var int */ + private $subscriptionId; + + /** @var array */ + private $subscriptionData; + + /** @var array */ + private $shares; + + /** @var array */ + private $mutations; + + /** + * SubscriptionUpdatedEvent constructor. + * + * @param int $subscriptionId + * @param array $subscriptionData + * @param array $shares + * @param array $mutations + * @since 20.0.0 + */ + public function __construct(int $subscriptionId, + array $subscriptionData, + array $shares, + array $mutations) { + parent::__construct(); + $this->subscriptionId = $subscriptionId; + $this->subscriptionData = $subscriptionData; + $this->shares = $shares; + $this->mutations = $mutations; + } + + /** + * @return int + * @since 20.0.0 + */ + public function getSubscriptionId(): int { + return $this->subscriptionId; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getSubscriptionData(): array { + return $this->subscriptionData; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getShares(): array { + return $this->shares; + } + + /** + * @return array + * @since 20.0.0 + */ + public function getMutations(): array { + return $this->mutations; + } +} |