From 139a03a9ca952758bb14c840467c8c45a9b34d64 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 15 Feb 2014 12:58:58 +0100 Subject: [PATCH] Moved "discovery" interfaces to sub folders, to allow generic interface 'Discoverable' being added. Signed-off-by: Roland Haeder --- .../discovery/class_Discoverable.php | 28 +++++++++++++++++++ .../hub/interfaces/discovery/dht/.htaccess | 1 + .../class_DiscoverableDhtRecipient.php | 2 +- .../hub/interfaces/discovery/node/.htaccess | 1 + .../class_DiscoverableNodeRecipient.php | 2 +- .../hub/interfaces/discovery/socket/.htaccess | 1 + .../{ => socket}/class_DiscoverableSocket.php | 2 +- .../main/discovery/class_BaseHubDiscovery.php | 2 +- .../package/class_NetworkPackageFactory.php | 2 +- 9 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 application/hub/interfaces/discovery/class_Discoverable.php create mode 100644 application/hub/interfaces/discovery/dht/.htaccess rename application/hub/interfaces/discovery/{ => dht}/class_DiscoverableDhtRecipient.php (95%) create mode 100644 application/hub/interfaces/discovery/node/.htaccess rename application/hub/interfaces/discovery/{ => node}/class_DiscoverableNodeRecipient.php (95%) create mode 100644 application/hub/interfaces/discovery/socket/.htaccess rename application/hub/interfaces/discovery/{ => socket}/class_DiscoverableSocket.php (96%) diff --git a/application/hub/interfaces/discovery/class_Discoverable.php b/application/hub/interfaces/discovery/class_Discoverable.php new file mode 100644 index 000000000..aa582a616 --- /dev/null +++ b/application/hub/interfaces/discovery/class_Discoverable.php @@ -0,0 +1,28 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.shipsimu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +interface Discoverable extends FrameworkInterface { +} + +// [EOF] +?> diff --git a/application/hub/interfaces/discovery/dht/.htaccess b/application/hub/interfaces/discovery/dht/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/interfaces/discovery/dht/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/interfaces/discovery/class_DiscoverableDhtRecipient.php b/application/hub/interfaces/discovery/dht/class_DiscoverableDhtRecipient.php similarity index 95% rename from application/hub/interfaces/discovery/class_DiscoverableDhtRecipient.php rename to application/hub/interfaces/discovery/dht/class_DiscoverableDhtRecipient.php index f1c686441..d0153361a 100644 --- a/application/hub/interfaces/discovery/class_DiscoverableDhtRecipient.php +++ b/application/hub/interfaces/discovery/dht/class_DiscoverableDhtRecipient.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -interface DiscoverableDhtRecipient extends FrameworkInterface { +interface DiscoverableDhtRecipient extends Discoverable { /** * Resolves one or more recipients for a DHT transfer by given package data. * diff --git a/application/hub/interfaces/discovery/node/.htaccess b/application/hub/interfaces/discovery/node/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/interfaces/discovery/node/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/interfaces/discovery/class_DiscoverableNodeRecipient.php b/application/hub/interfaces/discovery/node/class_DiscoverableNodeRecipient.php similarity index 95% rename from application/hub/interfaces/discovery/class_DiscoverableNodeRecipient.php rename to application/hub/interfaces/discovery/node/class_DiscoverableNodeRecipient.php index 9ec820615..2b1b7b443 100644 --- a/application/hub/interfaces/discovery/class_DiscoverableNodeRecipient.php +++ b/application/hub/interfaces/discovery/node/class_DiscoverableNodeRecipient.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -interface DiscoverableNodeRecipient extends FrameworkInterface, IteratorAggregate { +interface DiscoverableNodeRecipient extends Discoverable, IteratorAggregate { /** * Tries to discover all recipients for given package data * diff --git a/application/hub/interfaces/discovery/socket/.htaccess b/application/hub/interfaces/discovery/socket/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/interfaces/discovery/socket/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/interfaces/discovery/class_DiscoverableSocket.php b/application/hub/interfaces/discovery/socket/class_DiscoverableSocket.php similarity index 96% rename from application/hub/interfaces/discovery/class_DiscoverableSocket.php rename to application/hub/interfaces/discovery/socket/class_DiscoverableSocket.php index 8da19c551..332bf1ebb 100644 --- a/application/hub/interfaces/discovery/class_DiscoverableSocket.php +++ b/application/hub/interfaces/discovery/socket/class_DiscoverableSocket.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -interface DiscoverableSocket extends FrameworkInterface { +interface DiscoverableSocket extends Discoverable { /** * Tries to discover the right socket for given package data and returns a * matching socket resource. diff --git a/application/hub/main/discovery/class_BaseHubDiscovery.php b/application/hub/main/discovery/class_BaseHubDiscovery.php index e9efd0242..90b53869a 100644 --- a/application/hub/main/discovery/class_BaseHubDiscovery.php +++ b/application/hub/main/discovery/class_BaseHubDiscovery.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class BaseHubDiscovery extends BaseDiscovery { +class BaseHubDiscovery extends BaseDiscovery implements Discoverable { /** * Protected constructor * diff --git a/application/hub/main/factories/package/class_NetworkPackageFactory.php b/application/hub/main/factories/package/class_NetworkPackageFactory.php index 7c195d74f..8fbaa246b 100644 --- a/application/hub/main/factories/package/class_NetworkPackageFactory.php +++ b/application/hub/main/factories/package/class_NetworkPackageFactory.php @@ -48,7 +48,7 @@ class NetworkPackageFactory extends ObjectFactory { /* * Prepare the compressor for our package, ZLIB should be fine but we * keep it open here so you can experiment with the settings and don't - * need to touch any code. + * need to touch this code. */ $compressorInstance = self::createObjectByConfiguredName('raw_package_compressor_class'); -- 2.39.5