From bb78c80b079e940faff1e938ef54d1d25e184edd Mon Sep 17 00:00:00 2001 From: Jonathan Treffler Date: Fri, 3 May 2024 18:08:19 +0200 Subject: [PATCH] ensured license headers exist and match reality --- lib/Dav/ServiceDetectionPlugin.php | 3 +- lib/Event/RegisterTransportsEvent.php | 28 -------------- lib/Events/RegisterTransportsEvent.php | 50 +++++++++++++++++++++++++ lib/Listener/SabrePluginAddListener.php | 22 +++++++++++ lib/PushTransports/WebPushTransport.php | 22 +++++++++++ lib/Transport/Transport.php | 22 +++++++++++ lib/Transport/TransportManager.php | 24 +++++++++++- 7 files changed, 141 insertions(+), 30 deletions(-) delete mode 100644 lib/Event/RegisterTransportsEvent.php create mode 100644 lib/Events/RegisterTransportsEvent.php diff --git a/lib/Dav/ServiceDetectionPlugin.php b/lib/Dav/ServiceDetectionPlugin.php index ef4001e..2b323b5 100644 --- a/lib/Dav/ServiceDetectionPlugin.php +++ b/lib/Dav/ServiceDetectionPlugin.php @@ -3,8 +3,9 @@ declare(strict_types=1); /** - * @copyright 2024 Christopher Ng + * @copyright 2024 Jonathan Treffler * + * @author Jonathan Treffler * @author Christopher Ng * * @license GNU AGPL version 3 or any later version diff --git a/lib/Event/RegisterTransportsEvent.php b/lib/Event/RegisterTransportsEvent.php deleted file mode 100644 index 34a3db9..0000000 --- a/lib/Event/RegisterTransportsEvent.php +++ /dev/null @@ -1,28 +0,0 @@ -transportManager = $transportManager; - } - - public function getTransportManager(): TransportManager { - return $this->transportManager; - } -} \ No newline at end of file diff --git a/lib/Events/RegisterTransportsEvent.php b/lib/Events/RegisterTransportsEvent.php new file mode 100644 index 0000000..bc20e2f --- /dev/null +++ b/lib/Events/RegisterTransportsEvent.php @@ -0,0 +1,50 @@ + + * + * @author Jonathan Treffler + * + * @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 . + * + */ + +namespace OCA\DavPush\Events; + +use OCP\EventDispatcher\Event; + +use OCA\DavPush\Transport\TransportManager; + +/** + * This event is triggered during the initialization of DAV Push. + * Use it to register external push transports. + */ +class RegisterTransportsEvent extends Event { + + /** @var TransportManager */ + private $transportManager; + + public function __construct(TransportManager $transportManager) { + parent::__construct(); + $this->transportManager = $transportManager; + } + + public function getTransportManager(): TransportManager { + return $this->transportManager; + } +} \ No newline at end of file diff --git a/lib/Listener/SabrePluginAddListener.php b/lib/Listener/SabrePluginAddListener.php index ad774d2..4c74c87 100644 --- a/lib/Listener/SabrePluginAddListener.php +++ b/lib/Listener/SabrePluginAddListener.php @@ -2,6 +2,28 @@ declare(strict_types=1); +/** + * @copyright 2024 Jonathan Treffler + * + * @author Jonathan Treffler + * + * @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 . + * + */ + namespace OCA\DavPush\Listener; use OCA\DAV\Events\SabrePluginAddEvent; diff --git a/lib/PushTransports/WebPushTransport.php b/lib/PushTransports/WebPushTransport.php index 2acc2db..39c9ebd 100644 --- a/lib/PushTransports/WebPushTransport.php +++ b/lib/PushTransports/WebPushTransport.php @@ -2,6 +2,28 @@ declare(strict_types=1); +/** + * @copyright 2024 Jonathan Treffler + * + * @author Jonathan Treffler + * + * @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 . + * + */ + namespace OCA\DavPush\PushTransports; use OCA\DavPush\Transport\Transport; diff --git a/lib/Transport/Transport.php b/lib/Transport/Transport.php index 2a6b693..2483f43 100644 --- a/lib/Transport/Transport.php +++ b/lib/Transport/Transport.php @@ -2,6 +2,28 @@ declare(strict_types=1); +/** + * @copyright 2024 Jonathan Treffler + * + * @author Jonathan Treffler + * + * @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 . + * + */ + namespace OCA\DavPush\Transport; abstract class Transport { diff --git a/lib/Transport/TransportManager.php b/lib/Transport/TransportManager.php index 3c12a68..27a6cc2 100644 --- a/lib/Transport/TransportManager.php +++ b/lib/Transport/TransportManager.php @@ -2,11 +2,33 @@ declare(strict_types=1); +/** + * @copyright 2024 Jonathan Treffler + * + * @author Jonathan Treffler + * + * @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 . + * + */ + namespace OCA\DavPush\Transport; use OCP\EventDispatcher\IEventDispatcher; -use OCA\DavPush\Event\RegisterTransportsEvent; +use OCA\DavPush\Events\RegisterTransportsEvent; use OCA\DavPush\PushTransports\WebPushTransport; class TransportManager {