iservercontainer.php 6.2 KB

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