You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

652 lines
19 KiB

3 years ago
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @copyright Copyright (c) 2016, ownCloud, Inc.
  5. *
  6. * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
  7. * @author Bart Visscher <bartv@thisnet.nl>
  8. * @author Bernhard Posselt <dev@bernhard-posselt.com>
  9. * @author Bjoern Schiessle <bjoern@schiessle.org>
  10. * @author Björn Schießle <bjoern@schiessle.org>
  11. * @author Christopher Schäpers <kondou@ts.unde.re>
  12. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  13. * @author Georg Ehrke <oc.list@georgehrke.com>
  14. * @author Joas Schilling <coding@schilljs.com>
  15. * @author Jörn Friedrich Dreyer <jfd@butonic.de>
  16. * @author Lukas Reschke <lukas@statuscode.ch>
  17. * @author Morris Jobke <hey@morrisjobke.de>
  18. * @author Robin Appelman <robin@icewind.nl>
  19. * @author Robin McCorkell <robin@mccorkell.me.uk>
  20. * @author Roeland Jago Douma <roeland@famdouma.nl>
  21. * @author Thomas Müller <thomas.mueller@tmit.eu>
  22. * @author Thomas Tanghus <thomas@tanghus.net>
  23. * @author Vincent Petry <pvince81@owncloud.com>
  24. *
  25. * @license AGPL-3.0
  26. *
  27. * This code is free software: you can redistribute it and/or modify
  28. * it under the terms of the GNU Affero General Public License, version 3,
  29. * as published by the Free Software Foundation.
  30. *
  31. * This program is distributed in the hope that it will be useful,
  32. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  33. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  34. * GNU Affero General Public License for more details.
  35. *
  36. * You should have received a copy of the GNU Affero General Public License, version 3,
  37. * along with this program. If not, see <http://www.gnu.org/licenses/>
  38. *
  39. */
  40. namespace OCP;
  41. use OCP\Federation\ICloudFederationFactory;
  42. use OCP\Federation\ICloudFederationProviderManager;
  43. use OCP\Log\ILogFactory;
  44. use OCP\Security\IContentSecurityPolicyManager;
  45. use Psr\Container\ContainerInterface;
  46. use Symfony\Component\EventDispatcher\EventDispatcherInterface;
  47. /**
  48. * This is a tagging interface for the server container
  49. *
  50. * The interface currently extends IContainer, but this interface is deprecated as of Nextcloud 20,
  51. * thus this interface won't extend it anymore once that was removed. So migrate to the ContainerInterface
  52. * only.
  53. *
  54. * @since 6.0.0
  55. */
  56. interface IServerContainer extends ContainerInterface, IContainer {
  57. /**
  58. * The calendar manager will act as a broker between consumers for calendar information and
  59. * providers which actual deliver the calendar information.
  60. *
  61. * @return \OCP\Calendar\IManager
  62. * @since 13.0.0
  63. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  64. */
  65. public function getCalendarManager();
  66. /**
  67. * The calendar resource backend manager will act as a broker between consumers
  68. * for calendar resource information an providers which actual deliver the room information.
  69. *
  70. * @return \OCP\Calendar\Resource\IBackend
  71. * @since 14.0.0
  72. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  73. */
  74. public function getCalendarResourceBackendManager();
  75. /**
  76. * The calendar room backend manager will act as a broker between consumers
  77. * for calendar room information an providers which actual deliver the room information.
  78. *
  79. * @return \OCP\Calendar\Room\IBackend
  80. * @since 14.0.0
  81. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  82. */
  83. public function getCalendarRoomBackendManager();
  84. /**
  85. * The contacts manager will act as a broker between consumers for contacts information and
  86. * providers which actual deliver the contact information.
  87. *
  88. * @return \OCP\Contacts\IManager
  89. * @since 6.0.0
  90. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  91. */
  92. public function getContactsManager();
  93. /**
  94. * The current request object holding all information about the request currently being processed
  95. * is returned from this method.
  96. * In case the current execution was not initiated by a web request null is returned
  97. *
  98. * @return \OCP\IRequest
  99. * @since 6.0.0
  100. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  101. */
  102. public function getRequest();
  103. /**
  104. * Returns the preview manager which can create preview images for a given file
  105. *
  106. * @return \OCP\IPreview
  107. * @since 6.0.0
  108. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  109. */
  110. public function getPreviewManager();
  111. /**
  112. * Returns the tag manager which can get and set tags for different object types
  113. *
  114. * @see \OCP\ITagManager::load()
  115. * @return \OCP\ITagManager
  116. * @since 6.0.0
  117. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  118. */
  119. public function getTagManager();
  120. /**
  121. * Returns the root folder of ownCloud's data directory
  122. *
  123. * @return \OCP\Files\IRootFolder
  124. * @since 6.0.0 - between 6.0.0 and 8.0.0 this returned \OCP\Files\Folder
  125. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  126. */
  127. public function getRootFolder();
  128. /**
  129. * Returns a view to ownCloud's files folder
  130. *
  131. * @param string $userId user ID
  132. * @return \OCP\Files\Folder
  133. * @since 6.0.0 - parameter $userId was added in 8.0.0
  134. * @see getUserFolder in \OCP\Files\IRootFolder
  135. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  136. */
  137. public function getUserFolder($userId = null);
  138. /**
  139. * Returns a user manager
  140. *
  141. * @return \OCP\IUserManager
  142. * @since 8.0.0
  143. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  144. */
  145. public function getUserManager();
  146. /**
  147. * Returns a group manager
  148. *
  149. * @return \OCP\IGroupManager
  150. * @since 8.0.0
  151. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  152. */
  153. public function getGroupManager();
  154. /**
  155. * Returns the user session
  156. *
  157. * @return \OCP\IUserSession
  158. * @since 6.0.0
  159. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  160. */
  161. public function getUserSession();
  162. /**
  163. * Returns the navigation manager
  164. *
  165. * @return \OCP\INavigationManager
  166. * @since 6.0.0
  167. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  168. */
  169. public function getNavigationManager();
  170. /**
  171. * Returns the config manager
  172. *
  173. * @return \OCP\IConfig
  174. * @since 6.0.0
  175. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  176. */
  177. public function getConfig();
  178. /**
  179. * Returns a Crypto instance
  180. *
  181. * @return \OCP\Security\ICrypto
  182. * @since 8.0.0
  183. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  184. */
  185. public function getCrypto();
  186. /**
  187. * Returns a Hasher instance
  188. *
  189. * @return \OCP\Security\IHasher
  190. * @since 8.0.0
  191. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  192. */
  193. public function getHasher();
  194. /**
  195. * Returns a SecureRandom instance
  196. *
  197. * @return \OCP\Security\ISecureRandom
  198. * @since 8.1.0
  199. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  200. */
  201. public function getSecureRandom();
  202. /**
  203. * Returns a CredentialsManager instance
  204. *
  205. * @return \OCP\Security\ICredentialsManager
  206. * @since 9.0.0
  207. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  208. */
  209. public function getCredentialsManager();
  210. /**
  211. * Returns the app config manager
  212. *
  213. * @return \OCP\IAppConfig
  214. * @since 7.0.0
  215. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  216. */
  217. public function getAppConfig();
  218. /**
  219. * @return \OCP\L10N\IFactory
  220. * @since 8.2.0
  221. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  222. */
  223. public function getL10NFactory();
  224. /**
  225. * get an L10N instance
  226. * @param string $app appid
  227. * @param string $lang
  228. * @return \OCP\IL10N
  229. * @since 6.0.0 - parameter $lang was added in 8.0.0
  230. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  231. */
  232. public function getL10N($app, $lang = null);
  233. /**
  234. * @return \OC\Encryption\Manager
  235. * @since 8.1.0
  236. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  237. */
  238. public function getEncryptionManager();
  239. /**
  240. * @return \OC\Encryption\File
  241. * @since 8.1.0
  242. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  243. */
  244. public function getEncryptionFilesHelper();
  245. /**
  246. * @return \OCP\Encryption\Keys\IStorage
  247. * @since 8.1.0
  248. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  249. */
  250. public function getEncryptionKeyStorage();
  251. /**
  252. * Returns the URL generator
  253. *
  254. * @return \OCP\IURLGenerator
  255. * @since 6.0.0
  256. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  257. */
  258. public function getURLGenerator();
  259. /**
  260. * Returns an ICache instance
  261. *
  262. * @return \OCP\ICache
  263. * @since 6.0.0
  264. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  265. */
  266. public function getCache();
  267. /**
  268. * Returns an \OCP\CacheFactory instance
  269. *
  270. * @return \OCP\ICacheFactory
  271. * @since 7.0.0
  272. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  273. */
  274. public function getMemCacheFactory();
  275. /**
  276. * Returns the current session
  277. *
  278. * @return \OCP\ISession
  279. * @since 6.0.0
  280. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  281. */
  282. public function getSession();
  283. /**
  284. * Returns the activity manager
  285. *
  286. * @return \OCP\Activity\IManager
  287. * @since 6.0.0
  288. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  289. */
  290. public function getActivityManager();
  291. /**
  292. * Returns the current session
  293. *
  294. * @return \OCP\IDBConnection
  295. * @since 6.0.0
  296. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  297. */
  298. public function getDatabaseConnection();
  299. /**
  300. * Returns an avatar manager, used for avatar functionality
  301. *
  302. * @return \OCP\IAvatarManager
  303. * @since 6.0.0
  304. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  305. */
  306. public function getAvatarManager();
  307. /**
  308. * Returns an job list for controlling background jobs
  309. *
  310. * @return \OCP\BackgroundJob\IJobList
  311. * @since 7.0.0
  312. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  313. */
  314. public function getJobList();
  315. /**
  316. * Returns a logger instance
  317. *
  318. * @return \OCP\ILogger
  319. * @since 8.0.0
  320. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  321. */
  322. public function getLogger();
  323. /**
  324. * returns a log factory instance
  325. *
  326. * @return ILogFactory
  327. * @since 14.0.0
  328. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  329. */
  330. public function getLogFactory();
  331. /**
  332. * Returns a router for generating and matching urls
  333. *
  334. * @return \OCP\Route\IRouter
  335. * @since 7.0.0
  336. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  337. */
  338. public function getRouter();
  339. /**
  340. * Returns a search instance
  341. *
  342. * @return \OCP\ISearch
  343. * @since 7.0.0
  344. * @deprecated 20.0.0
  345. */
  346. public function getSearch();
  347. /**
  348. * Get the certificate manager for the user
  349. *
  350. * @param string $userId (optional) if not specified the current loggedin user is used, use null to get the system certificate manager
  351. * @return \OCP\ICertificateManager | null if $userId is null and no user is logged in
  352. * @since 8.0.0
  353. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  354. */
  355. public function getCertificateManager($userId = null);
  356. /**
  357. * Create a new event source
  358. *
  359. * @return \OCP\IEventSource
  360. * @since 8.0.0
  361. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  362. */
  363. public function createEventSource();
  364. /**
  365. * Returns an instance of the HTTP client service
  366. *
  367. * @return \OCP\Http\Client\IClientService
  368. * @since 8.1.0
  369. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  370. */
  371. public function getHTTPClientService();
  372. /**
  373. * Get the active event logger
  374. *
  375. * @return \OCP\Diagnostics\IEventLogger
  376. * @since 8.0.0
  377. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  378. */
  379. public function getEventLogger();
  380. /**
  381. * Get the active query logger
  382. *
  383. * The returned logger only logs data when debug mode is enabled
  384. *
  385. * @return \OCP\Diagnostics\IQueryLogger
  386. * @since 8.0.0
  387. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  388. */
  389. public function getQueryLogger();
  390. /**
  391. * Get the manager for temporary files and folders
  392. *
  393. * @return \OCP\ITempManager
  394. * @since 8.0.0
  395. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  396. */
  397. public function getTempManager();
  398. /**
  399. * Get the app manager
  400. *
  401. * @return \OCP\App\IAppManager
  402. * @since 8.0.0
  403. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  404. */
  405. public function getAppManager();
  406. /**
  407. * Get the webroot
  408. *
  409. * @return string
  410. * @since 8.0.0
  411. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  412. */
  413. public function getWebRoot();
  414. /**
  415. * @return \OCP\Files\Config\IMountProviderCollection
  416. * @since 8.0.0
  417. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  418. */
  419. public function getMountProviderCollection();
  420. /**
  421. * Get the IniWrapper
  422. *
  423. * @return \bantu\IniGetWrapper\IniGetWrapper
  424. * @since 8.0.0
  425. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  426. */
  427. public function getIniWrapper();
  428. /**
  429. * @return \OCP\Command\IBus
  430. * @since 8.1.0
  431. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  432. */
  433. public function getCommandBus();
  434. /**
  435. * Creates a new mailer
  436. *
  437. * @return \OCP\Mail\IMailer
  438. * @since 8.1.0
  439. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  440. */
  441. public function getMailer();
  442. /**
  443. * Get the locking provider
  444. *
  445. * @return \OCP\Lock\ILockingProvider
  446. * @since 8.1.0
  447. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  448. */
  449. public function getLockingProvider();
  450. /**
  451. * @return \OCP\Files\Mount\IMountManager
  452. * @since 8.2.0
  453. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  454. */
  455. public function getMountManager();
  456. /**
  457. * Get the MimeTypeDetector
  458. *
  459. * @return \OCP\Files\IMimeTypeDetector
  460. * @since 8.2.0
  461. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  462. */
  463. public function getMimeTypeDetector();
  464. /**
  465. * Get the MimeTypeLoader
  466. *
  467. * @return \OCP\Files\IMimeTypeLoader
  468. * @since 8.2.0
  469. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  470. */
  471. public function getMimeTypeLoader();
  472. /**
  473. * Get the EventDispatcher
  474. *
  475. * @return EventDispatcherInterface
  476. * @deprecated 20.0.0 use \OCP\EventDispatcher\IEventDispatcher
  477. * @since 8.2.0
  478. */
  479. public function getEventDispatcher();
  480. /**
  481. * Get the Notification Manager
  482. *
  483. * @return \OCP\Notification\IManager
  484. * @since 9.0.0
  485. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  486. */
  487. public function getNotificationManager();
  488. /**
  489. * @return \OCP\Comments\ICommentsManager
  490. * @since 9.0.0
  491. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  492. */
  493. public function getCommentsManager();
  494. /**
  495. * Returns the system-tag manager
  496. *
  497. * @return \OCP\SystemTag\ISystemTagManager
  498. *
  499. * @since 9.0.0
  500. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  501. */
  502. public function getSystemTagManager();
  503. /**
  504. * Returns the system-tag object mapper
  505. *
  506. * @return \OCP\SystemTag\ISystemTagObjectMapper
  507. *
  508. * @since 9.0.0
  509. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  510. */
  511. public function getSystemTagObjectMapper();
  512. /**
  513. * Returns the share manager
  514. *
  515. * @return \OCP\Share\IManager
  516. * @since 9.0.0
  517. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  518. */
  519. public function getShareManager();
  520. /**
  521. * @return IContentSecurityPolicyManager
  522. * @since 9.0.0
  523. * @deprecated 17.0.0 Use the AddContentSecurityPolicyEvent
  524. */
  525. public function getContentSecurityPolicyManager();
  526. /**
  527. * @return \OCP\IDateTimeZone
  528. * @since 8.0.0
  529. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  530. */
  531. public function getDateTimeZone();
  532. /**
  533. * @return \OCP\IDateTimeFormatter
  534. * @since 8.0.0
  535. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  536. */
  537. public function getDateTimeFormatter();
  538. /**
  539. * @return \OCP\Federation\ICloudIdManager
  540. * @since 12.0.0
  541. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  542. */
  543. public function getCloudIdManager();
  544. /**
  545. * @return \OCP\GlobalScale\IConfig
  546. * @since 14.0.0
  547. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  548. */
  549. public function getGlobalScaleConfig();
  550. /**
  551. * @return ICloudFederationFactory
  552. * @since 14.0.0
  553. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  554. */
  555. public function getCloudFederationFactory();
  556. /**
  557. * @return ICloudFederationProviderManager
  558. * @since 14.0.0
  559. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  560. */
  561. public function getCloudFederationProviderManager();
  562. /**
  563. * @return \OCP\Remote\Api\IApiFactory
  564. * @since 13.0.0
  565. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  566. */
  567. public function getRemoteApiFactory();
  568. /**
  569. * @return \OCP\Remote\IInstanceFactory
  570. * @since 13.0.0
  571. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  572. */
  573. public function getRemoteInstanceFactory();
  574. /**
  575. * @return \OCP\Files\Storage\IStorageFactory
  576. * @since 15.0.0
  577. * @deprecated 20.0.0 have it injected or fetch it through \Psr\Container\ContainerInterface::get
  578. */
  579. public function getStorageFactory();
  580. }