aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Server.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r--lib/private/Server.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 3c15873206d..170bc6b2584 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -68,6 +68,8 @@ use OC\Contacts\ContactsMenu\ActionFactory;
use OC\Contacts\ContactsMenu\ContactsStore;
use OC\Diagnostics\EventLogger;
use OC\Diagnostics\QueryLogger;
+use OC\Federation\CloudFederationFactory;
+use OC\Federation\CloudFederationProviderManager;
use OC\Federation\CloudIdManager;
use OC\Files\Config\UserMountCache;
use OC\Files\Config\UserMountCacheListener;
@@ -124,9 +126,12 @@ use OCP\Collaboration\AutoComplete\IManager;
use OCP\Contacts\ContactsMenu\IContactsStore;
use OCP\Defaults;
use OCA\Theming\Util;
+use OCP\Federation\ICloudFederationFactory;
+use OCP\Federation\ICloudFederationProviderManager;
use OCP\Federation\ICloudIdManager;
use OCP\Authentication\LoginCredentials\IStore;
use OCP\Files\NotFoundException;
+use OCP\GlobalScale\IConfig;
use OCP\ICacheFactory;
use OCP\IDBConnection;
use OCP\IL10N;
@@ -1107,6 +1112,18 @@ class Server extends ServerContainer implements IServerContainer {
return new CloudIdManager();
});
+ $this->registerService(IConfig::class, function (Server $c) {
+ return new GlobalScale\Config($c->getConfig());
+ });
+
+ $this->registerService(ICloudFederationProviderManager::class, function (Server $c) {
+ return new CloudFederationProviderManager();
+ });
+
+ $this->registerService(ICloudFederationFactory::class, function (Server $c) {
+ return new CloudFederationFactory();
+ });
+
$this->registerAlias(\OCP\AppFramework\Utility\IControllerMethodReflector::class, \OC\AppFramework\Utility\ControllerMethodReflector::class);
$this->registerAlias('ControllerMethodReflector', \OCP\AppFramework\Utility\IControllerMethodReflector::class);
@@ -1974,6 +1991,20 @@ class Server extends ServerContainer implements IServerContainer {
}
/**
+ * @return \OCP\GlobalScale\IConfig
+ */
+ public function getGlobalScaleConfig() {
+ return $this->query(IConfig::class);
+ }
+
+ /**
+ * @return \OCP\Federation\ICloudFederationProviderManager
+ */
+ public function getCloudFederationProviderManager() {
+ return $this->query(ICloudFederationProviderManager::class);
+ }
+
+ /**
* @return \OCP\Remote\Api\IApiFactory
*/
public function getRemoteApiFactory() {
@@ -1981,6 +2012,13 @@ class Server extends ServerContainer implements IServerContainer {
}
/**
+ * @return \OCP\Federation\ICloudFederationFactory
+ */
+ public function getCloudFederationFactory() {
+ return $this->query(ICloudFederationFactory::class);
+ }
+
+ /**
* @return \OCP\Remote\IInstanceFactory
*/
public function getRemoteInstanceFactory() {