Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-08-19 13:01:13 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2016-08-28 22:26:33 +0300
commit28127553591205c3ecd37233509d6ce8bacaed0f (patch)
treecd0853c6fa38a19a541531092242acad3b151587 /apps/federatedfilesharing/lib/AppInfo
parent3647fbe7cd86e743b059889d69b03fcf8207780f (diff)
Move federated sharing routes to the federatedfilesharingapp
* Move routes to app * Move routes over to the AppFramework * Fix tests There is plenty of stuff to fix properly here. But out of scope for now.
Diffstat (limited to 'apps/federatedfilesharing/lib/AppInfo')
-rw-r--r--apps/federatedfilesharing/lib/AppInfo/Application.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/apps/federatedfilesharing/lib/AppInfo/Application.php b/apps/federatedfilesharing/lib/AppInfo/Application.php
index b767a322505..b470bb3e584 100644
--- a/apps/federatedfilesharing/lib/AppInfo/Application.php
+++ b/apps/federatedfilesharing/lib/AppInfo/Application.php
@@ -24,7 +24,12 @@
namespace OCA\FederatedFileSharing\AppInfo;
+use OC\AppFramework\Utility\SimpleContainer;
+use OCA\FederatedFileSharing\AddressHandler;
+use OCA\FederatedFileSharing\Controller\RequestHandlerController;
use OCA\FederatedFileSharing\FederatedShareProvider;
+use OCA\FederatedFileSharing\Notifications;
+use OCA\FederatedFileSharing\RequestHandler;
use OCP\AppFramework\App;
class Application extends App {
@@ -34,6 +39,35 @@ class Application extends App {
public function __construct() {
parent::__construct('federatedfilesharing');
+
+ $container = $this->getContainer();
+ $server = $container->getServer();
+
+ $container->registerService('RequestHandlerController', function(SimpleContainer $c) use ($server) {
+ $addressHandler = new AddressHandler(
+ $server->getURLGenerator(),
+ $server->getL10N('federatedfilesharing')
+ );
+ $notification = new Notifications(
+ $addressHandler,
+ $server->getHTTPClientService(),
+ new \OCA\FederatedFileSharing\DiscoveryManager(
+ $server->getMemCacheFactory(),
+ $server->getHTTPClientService()
+ ),
+ \OC::$server->getJobList()
+ );
+ return new RequestHandlerController(
+ $c->query('AppName'),
+ $server->getRequest(),
+ $this->getFederatedShareProvider(),
+ $server->getDatabaseConnection(),
+ $server->getShareManager(),
+ $notification,
+ $addressHandler,
+ $server->getUserManager()
+ );
+ });
}
/**