diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-02-24 12:50:43 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-04-11 15:03:59 +0200 |
commit | 45aee2e4795ac12d8f46c7659b2604b8cc891750 (patch) | |
tree | e1589362806eab43ef5cd7e7131bb8adf83aa8c5 /lib/private/Server.php | |
parent | afb5d45705f7d7743b9dfd2d79b618938cb05b77 (diff) | |
download | nextcloud-server-45aee2e4795ac12d8f46c7659b2604b8cc891750.tar.gz nextcloud-server-45aee2e4795ac12d8f46c7659b2604b8cc891750.zip |
provide public discovery service to discover OCS end-points on another server
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r-- | lib/private/Server.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php index 9b2380ac7ac..13387ebd3ed 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -77,6 +77,7 @@ use OC\Mail\Mailer; use OC\Memcache\ArrayCache; use OC\Memcache\Factory; use OC\Notification\Manager; +use OC\OCS\DiscoveryService; use OC\Repair\NC11\CleanPreviewsBackgroundJob; use OC\RichObjectStrings\Validator; use OC\Security\Bruteforce\Throttler; @@ -936,6 +937,10 @@ class Server extends ServerContainer implements IServerContainer { }); }); + $this->registerService('OCSDiscoveryService', function (Server $c) { + return new DiscoveryService($c->getMemCacheFactory(), $c->getHTTPClientService()); + }); + $this->registerService(ICloudIdManager::class, function (Server $c) { return new CloudIdManager(); }); @@ -997,6 +1002,14 @@ class Server extends ServerContainer implements IServerContainer { } /** + * @return \OC\OCS\DiscoveryService + */ + public function getOCSDiscoveryService() { + return $this->query('OCSDiscoveryService'); + } + + + /** * The current request object holding all information about the request * currently being processed is returned from this method. * In case the current execution was not initiated by a web request null is returned |