iservercontainer.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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. * @return \OCP\Files\Folder
  75. */
  76. function getUserFolder();
  77. /**
  78. * Returns an app-specific view in ownClouds data directory
  79. *
  80. * @return \OCP\Files\Folder
  81. */
  82. function getAppFolder();
  83. /**
  84. * Returns the user session
  85. *
  86. * @return \OCP\IUserSession
  87. */
  88. function getUserSession();
  89. /**
  90. * Returns the navigation manager
  91. *
  92. * @return \OCP\INavigationManager
  93. */
  94. function getNavigationManager();
  95. /**
  96. * Returns the config manager
  97. *
  98. * @return \OCP\IConfig
  99. */
  100. function getConfig();
  101. /**
  102. * get an L10N instance
  103. * @param $app string appid
  104. * @return \OCP\IL10N
  105. */
  106. function getL10N($app);
  107. /**
  108. * Returns the URL generator
  109. *
  110. * @return \OCP\IURLGenerator
  111. */
  112. function getURLGenerator();
  113. /**
  114. * Returns the Helper
  115. *
  116. * @return \OCP\IHelper
  117. */
  118. function getHelper();
  119. /**
  120. * Returns an ICache instance
  121. *
  122. * @return \OCP\ICache
  123. */
  124. function getCache();
  125. /**
  126. * Returns the current session
  127. *
  128. * @return \OCP\ISession
  129. */
  130. function getSession();
  131. /**
  132. * Returns the activity manager
  133. *
  134. * @return \OCP\Activity\IManager
  135. */
  136. function getActivityManager();
  137. /**
  138. * Returns the current session
  139. *
  140. * @return \OCP\IDBConnection
  141. */
  142. function getDatabaseConnection();
  143. /**
  144. * Returns an avatar manager, used for avatar functionality
  145. *
  146. * @return \OCP\IAvatarManager
  147. */
  148. function getAvatarManager();
  149. }