iservercontainer.php 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. <?php
  2. /**
  3. * @author Bart Visscher <bartv@thisnet.nl>
  4. * @author Bernhard Posselt <dev@bernhard-posselt.com>
  5. * @author Björn Schießle <schiessle@owncloud.com>
  6. * @author Christopher Schäpers <kondou@ts.unde.re>
  7. * @author Jörn Friedrich Dreyer <jfd@butonic.de>
  8. * @author Lukas Reschke <lukas@owncloud.com>
  9. * @author Morris Jobke <hey@morrisjobke.de>
  10. * @author Robin Appelman <icewind@owncloud.com>
  11. * @author Thomas Müller <thomas.mueller@tmit.eu>
  12. * @author Thomas Tanghus <thomas@tanghus.net>
  13. *
  14. * @copyright Copyright (c) 2015, ownCloud, Inc.
  15. * @license AGPL-3.0
  16. *
  17. * This code is free software: you can redistribute it and/or modify
  18. * it under the terms of the GNU Affero General Public License, version 3,
  19. * as published by the Free Software Foundation.
  20. *
  21. * This program is distributed in the hope that it will be useful,
  22. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  24. * GNU Affero General Public License for more details.
  25. *
  26. * You should have received a copy of the GNU Affero General Public License, version 3,
  27. * along with this program. If not, see <http://www.gnu.org/licenses/>
  28. *
  29. */
  30. /**
  31. * Public interface of ownCloud for apps to use.
  32. * Server container interface
  33. *
  34. */
  35. // use OCP namespace for all classes that are considered public.
  36. // This means that they should be used by apps instead of the internal ownCloud classes
  37. namespace OCP;
  38. /**
  39. * Class IServerContainer
  40. * @package OCP
  41. *
  42. * This container holds all ownCloud services
  43. */
  44. interface IServerContainer {
  45. /**
  46. * The contacts manager will act as a broker between consumers for contacts information and
  47. * providers which actual deliver the contact information.
  48. *
  49. * @return \OCP\Contacts\IManager
  50. */
  51. function getContactsManager();
  52. /**
  53. * The current request object holding all information about the request currently being processed
  54. * is returned from this method.
  55. * In case the current execution was not initiated by a web request null is returned
  56. *
  57. * @return \OCP\IRequest|null
  58. */
  59. function getRequest();
  60. /**
  61. * Returns the preview manager which can create preview images for a given file
  62. *
  63. * @return \OCP\IPreview
  64. */
  65. function getPreviewManager();
  66. /**
  67. * Returns the tag manager which can get and set tags for different object types
  68. *
  69. * @see \OCP\ITagManager::load()
  70. * @return \OCP\ITagManager
  71. */
  72. function getTagManager();
  73. /**
  74. * Returns the root folder of ownCloud's data directory
  75. *
  76. * @return \OCP\Files\Folder
  77. */
  78. function getRootFolder();
  79. /**
  80. * Returns a view to ownCloud's files folder
  81. *
  82. * @param string $userId user ID
  83. * @return \OCP\Files\Folder
  84. */
  85. function getUserFolder($userId = null);
  86. /**
  87. * Returns an app-specific view in ownClouds data directory
  88. *
  89. * @return \OCP\Files\Folder
  90. */
  91. function getAppFolder();
  92. /**
  93. * Returns a user manager
  94. *
  95. * @return \OCP\IUserManager
  96. */
  97. function getUserManager();
  98. /**
  99. * Returns a group manager
  100. *
  101. * @return \OCP\IGroupManager
  102. */
  103. function getGroupManager();
  104. /**
  105. * Returns the user session
  106. *
  107. * @return \OCP\IUserSession
  108. */
  109. function getUserSession();
  110. /**
  111. * Returns the navigation manager
  112. *
  113. * @return \OCP\INavigationManager
  114. */
  115. function getNavigationManager();
  116. /**
  117. * Returns the config manager
  118. *
  119. * @return \OCP\IConfig
  120. */
  121. function getConfig();
  122. /**
  123. * Returns a Crypto instance
  124. *
  125. * @return \OCP\Security\ICrypto
  126. */
  127. function getCrypto();
  128. /**
  129. * Returns a Hasher instance
  130. *
  131. * @return \OCP\Security\IHasher
  132. */
  133. function getHasher();
  134. /**
  135. * Returns a SecureRandom instance
  136. *
  137. * @return \OCP\Security\ISecureRandom
  138. */
  139. function getSecureRandom();
  140. /**
  141. * Returns an instance of the db facade
  142. * @deprecated use getDatabaseConnection, will be removed in ownCloud 10
  143. * @return \OCP\IDb
  144. */
  145. function getDb();
  146. /**
  147. * Returns the app config manager
  148. *
  149. * @return \OCP\IAppConfig
  150. */
  151. function getAppConfig();
  152. /**
  153. * get an L10N instance
  154. * @param string $app appid
  155. * @param string $lang
  156. * @return \OCP\IL10N
  157. */
  158. function getL10N($app, $lang = null);
  159. /**
  160. * @return \OC\Encryption\Manager
  161. */
  162. function getEncryptionManager();
  163. /**
  164. * @return \OC\Encryption\File
  165. */
  166. function getEncryptionFilesHelper();
  167. /**
  168. * @param string $encryptionModuleId encryption module ID
  169. *
  170. * @return \OCP\Encryption\Keys\IStorage
  171. */
  172. function getEncryptionKeyStorage($encryptionModuleId);
  173. /**
  174. * Returns the URL generator
  175. *
  176. * @return \OCP\IURLGenerator
  177. */
  178. function getURLGenerator();
  179. /**
  180. * Returns the Helper
  181. *
  182. * @return \OCP\IHelper
  183. */
  184. function getHelper();
  185. /**
  186. * Returns an ICache instance
  187. *
  188. * @return \OCP\ICache
  189. */
  190. function getCache();
  191. /**
  192. * Returns an \OCP\CacheFactory instance
  193. *
  194. * @return \OCP\ICacheFactory
  195. */
  196. function getMemCacheFactory();
  197. /**
  198. * Returns the current session
  199. *
  200. * @return \OCP\ISession
  201. */
  202. function getSession();
  203. /**
  204. * Returns the activity manager
  205. *
  206. * @return \OCP\Activity\IManager
  207. */
  208. function getActivityManager();
  209. /**
  210. * Returns the current session
  211. *
  212. * @return \OCP\IDBConnection
  213. */
  214. function getDatabaseConnection();
  215. /**
  216. * Returns an avatar manager, used for avatar functionality
  217. *
  218. * @return \OCP\IAvatarManager
  219. */
  220. function getAvatarManager();
  221. /**
  222. * Returns an job list for controlling background jobs
  223. *
  224. * @return \OCP\BackgroundJob\IJobList
  225. */
  226. function getJobList();
  227. /**
  228. * Returns a logger instance
  229. *
  230. * @return \OCP\ILogger
  231. */
  232. function getLogger();
  233. /**
  234. * Returns a router for generating and matching urls
  235. *
  236. * @return \OCP\Route\IRouter
  237. */
  238. function getRouter();
  239. /**
  240. * Returns a search instance
  241. *
  242. * @return \OCP\ISearch
  243. */
  244. function getSearch();
  245. /**
  246. * Get the certificate manager for the user
  247. *
  248. * @param \OCP\IUser $user (optional) if not specified the current loggedin user is used
  249. * @return \OCP\ICertificateManager
  250. */
  251. function getCertificateManager($user = null);
  252. /**
  253. * Create a new event source
  254. *
  255. * @return \OCP\IEventSource
  256. */
  257. function createEventSource();
  258. /**
  259. * Returns an instance of the HTTP helper class
  260. * @return \OC\HTTPHelper
  261. * @deprecated Use \OCP\Http\Client\IClientService
  262. */
  263. function getHTTPHelper();
  264. /**
  265. * Returns an instance of the HTTP client service
  266. *
  267. * @return \OCP\Http\Client\IClientService
  268. */
  269. function getHTTPClientService();
  270. /**
  271. * Get the active event logger
  272. *
  273. * @return \OCP\Diagnostics\IEventLogger
  274. */
  275. function getEventLogger();
  276. /**
  277. * Get the active query logger
  278. *
  279. * The returned logger only logs data when debug mode is enabled
  280. *
  281. * @return \OCP\Diagnostics\IQueryLogger
  282. */
  283. function getQueryLogger();
  284. /**
  285. * Get the manager for temporary files and folders
  286. *
  287. * @return \OCP\ITempManager
  288. */
  289. function getTempManager();
  290. /**
  291. * Get the app manager
  292. *
  293. * @return \OCP\App\IAppManager
  294. */
  295. function getAppManager();
  296. /**
  297. * Get the webroot
  298. *
  299. * @return string
  300. */
  301. function getWebRoot();
  302. /**
  303. * @return \OCP\Files\Config\IMountProviderCollection
  304. */
  305. function getMountProviderCollection();
  306. /**
  307. * Get the IniWrapper
  308. *
  309. * @return \bantu\IniGetWrapper\IniGetWrapper
  310. */
  311. function getIniWrapper();
  312. /**
  313. * @return \OCP\Command\IBus
  314. */
  315. function getCommandBus();
  316. /**
  317. * Creates a new mailer
  318. *
  319. * @return \OCP\Mail\IMailer
  320. */
  321. function getMailer();
  322. }